1
0
Files
ag-index/huace/huace.js
2025-12-11 10:06:21 +08:00

578 lines
1.0 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"JiFC":[function(require,module,exports) {
},{}],"fKNg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.stopPropagation=o,exports.preventDefault=e,exports.default=void 0;var t=function(){function t(t){this.propagationStopped,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.propagationStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}();function o(t){t.stopPropagation()}function e(t){t.preventDefault()}var p=t;exports.default=p;
},{}],"zehl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={PROPERTYCHANGE:"propertychange"};exports.default=e;
},{}],"DDda":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=function(){function e(){this.disposed=!1}return e.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},e.prototype.disposeInternal=function(){},e}(),t=e;exports.default=t;
},{}],"luEr":[function(require,module,exports) {
"use strict";function r(r,n,t){for(var u,o,i=t||e,f=0,a=r.length,s=!1;f<a;)(o=+i(r[u=f+(a-f>>1)],n))<0?f=u+1:(a=u,s=!o);return s?f:~f}function e(r,e){return r>e?1:r<e?-1:0}function n(r,e){return r.indexOf(e)>=0}function t(r,e,n){var t=r.length;if(r[0]<=e)return 0;if(e<=r[t-1])return t-1;var u=void 0;if(n>0){for(u=1;u<t;++u)if(r[u]<e)return u-1}else if(n<0){for(u=1;u<t;++u)if(r[u]<=e)return u}else for(u=1;u<t;++u){if(r[u]==e)return u;if(r[u]<e)return r[u-1]-e<e-r[u]?u-1:u}return t-1}function u(r,e,n){for(;e<n;){var t=r[e];r[e]=r[n],r[n]=t,++e,--n}}function o(r,e){for(var n=Array.isArray(e)?e:[e],t=n.length,u=0;u<t;u++)r[r.length]=n[u]}function i(r,e){var n=r.indexOf(e),t=n>-1;return t&&r.splice(n,1),t}function f(r,e){for(var n,t=r.length>>>0,u=0;u<t;u++)if(e(n=r[u],u,r))return n;return null}function a(r,e){var n=r.length;if(n!==e.length)return!1;for(var t=0;t<n;t++)if(r[t]!==e[t])return!1;return!0}function s(r,e){var n,t=r.length,u=Array(r.length);for(n=0;n<t;n++)u[n]={index:n,value:r[n]};for(u.sort(function(r,n){return e(r.value,n.value)||r.index-n.index}),n=0;n<r.length;n++)r[n]=u[n].value}function l(r,e){var n;return!r.every(function(t,u){return n=u,!e(t,u,r)})?n:-1}function v(r,n,t){var u=n||e;return r.every(function(e,n){if(0===n)return!0;var o=u(r[n-1],e);return!(o>0||t&&0===o)})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.binarySearch=r,exports.numberSafeCompareFunction=e,exports.includes=n,exports.linearFindNearest=t,exports.reverseSubArray=u,exports.extend=o,exports.remove=i,exports.find=f,exports.equals=a,exports.stableSort=s,exports.findIndex=l,exports.isSorted=v;
},{}],"RgA2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TRUE=e,exports.FALSE=t,exports.VOID=n,exports.memoizeOne=o;var r=require("./array.js");function e(){return!0}function t(){return!1}function n(){}function o(e){var t,n,o,s=!1;return function(){var u=Array.prototype.slice.call(arguments);return s&&this===o&&(0,r.equals)(u,n)||(s=!0,o=this,n=u,t=e.apply(this,arguments)),t}}
},{"./array.js":"luEr"}],"mH6q":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.clear=r,exports.isEmpty=n,exports.getValues=exports.assign=void 0;var e="function"==typeof Object.assign?Object.assign:function(e,r){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,o=arguments.length;n<o;++n){var s=arguments[n];if(null!=s)for(var u in s)s.hasOwnProperty(u)&&(t[u]=s[u])}return t};function r(e){for(var r in e)delete e[r]}exports.assign=e;var t="function"==typeof Object.values?Object.values:function(e){var r=[];for(var t in e)r.push(e[t]);return r};function n(e){var r;for(r in e)return!1;return!r}exports.getValues=t;
},{}],"CR4Y":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=s(require("../Disposable.js")),t=s(require("./Event.js")),n=require("../functions.js"),i=require("../obj.js");function s(e){return e&&e.__esModule?e:{default:e}}var r=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=function(e){function s(t){var n=e.call(this)||this;return n.eventTarget_=t,n.pendingRemovals_=null,n.dispatching_=null,n.listeners_=null,n}return r(s,e),s.prototype.addEventListener=function(e,t){if(e&&t){var n=this.listeners_||(this.listeners_={}),i=n[e]||(n[e]=[]);-1===i.indexOf(t)&&i.push(t)}},s.prototype.dispatchEvent=function(e){var i="string"==typeof e?new t.default(e):e,s=i.type;i.target||(i.target=this.eventTarget_||this);var r,o=this.listeners_&&this.listeners_[s];if(o){var l=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});s in l||(l[s]=0,a[s]=0),++l[s];for(var p=0,u=o.length;p<u;++p)if(!1===(r="handleEvent"in o[p]?o[p].handleEvent(i):o[p].call(this,i))||i.propagationStopped){r=!1;break}if(--l[s],0===l[s]){var h=a[s];for(delete a[s];h--;)this.removeEventListener(s,n.VOID);delete l[s]}return r}},s.prototype.disposeInternal=function(){this.listeners_&&(0,i.clear)(this.listeners_)},s.prototype.getListeners=function(e){return this.listeners_&&this.listeners_[e]||void 0},s.prototype.hasListener=function(e){return!!this.listeners_&&(e?e in this.listeners_:Object.keys(this.listeners_).length>0)},s.prototype.removeEventListener=function(e,t){var i=this.listeners_&&this.listeners_[e];if(i){var s=i.indexOf(t);-1!==s&&(this.pendingRemovals_&&e in this.pendingRemovals_?(i[s]=n.VOID,++this.pendingRemovals_[e]):(i.splice(s,1),0===i.length&&delete this.listeners_[e]))}},s}(e.default),l=o;exports.default=l;
},{"../Disposable.js":"DDda","./Event.js":"fKNg","../functions.js":"RgA2","../obj.js":"mH6q"}],"C8cu":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};exports.default=e;
},{}],"UqnM":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.listen=t,exports.listenOnce=r,exports.unlistenByKey=n;var e=require("./obj.js");function t(e,t,r,n,i){if(n&&n!==e&&(r=r.bind(n)),i){var s=r;r=function(){e.removeEventListener(t,r),s.apply(this,arguments)}}var o={target:e,type:t,listener:r};return e.addEventListener(t,r),o}function r(e,r,n,i){return t(e,r,n,i,!0)}function n(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,e.clear)(t))}
},{"./obj.js":"mH6q"}],"IdSm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.unByKey=s,exports.default=void 0;var e=n(require("./events/Target.js")),t=n(require("./events/EventType.js")),r=require("./events.js");function n(e){return e&&e.__esModule?e:{default:e}}var o=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=function(e){function n(){var t=e.call(this)||this;return t.revision_=0,t}return o(n,e),n.prototype.changed=function(){++this.revision_,this.dispatchEvent(t.default.CHANGE)},n.prototype.getRevision=function(){return this.revision_},n.prototype.on=function(e,t){if(Array.isArray(e)){for(var n=e.length,o=new Array(n),i=0;i<n;++i)o[i]=(0,r.listen)(this,e[i],t);return o}return(0,r.listen)(this,e,t)},n.prototype.once=function(e,t){var n;if(Array.isArray(e)){var o=e.length;n=new Array(o);for(var i=0;i<o;++i)n[i]=(0,r.listenOnce)(this,e[i],t)}else n=(0,r.listenOnce)(this,e,t);return t.ol_key=n,n},n.prototype.un=function(e,t){var r=t.ol_key;if(r)s(r);else if(Array.isArray(e))for(var n=0,o=e.length;n<o;++n)this.removeEventListener(e[n],t);else this.removeEventListener(e,t)},n}(e.default);function s(e){if(Array.isArray(e))for(var t=0,n=e.length;t<n;++t)(0,r.unlistenByKey)(e[t]);else(0,r.unlistenByKey)(e)}var u=i;exports.default=u;
},{"./events/Target.js":"CR4Y","./events/EventType.js":"C8cu","./events.js":"UqnM"}],"KniQ":[function(require,module,exports) {
"use strict";function t(){return function(){throw new Error("Unimplemented abstract method.")}()}Object.defineProperty(exports,"__esModule",{value:!0}),exports.abstract=t,exports.getUid=r,exports.VERSION=void 0;var e=0;function r(t){return t.ol_uid||(t.ol_uid=String(++e))}var o="6.5.0";exports.VERSION=o;
},{}],"PhPh":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getChangeEventType=l,exports.default=exports.ObjectEvent=void 0;var t=o(require("./events/Event.js")),e=o(require("./ObjectEventType.js")),r=o(require("./Observable.js")),s=require("./obj.js"),n=require("./util.js");function o(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function s(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(s.prototype=r.prototype,new s)}}(),u=function(t){function e(e,r,s){var n=t.call(this,e)||this;return n.key=r,n.oldValue=s,n}return i(e,t),e}(t.default);exports.ObjectEvent=u;var a=function(t){function r(e){var r=t.call(this)||this;return(0,n.getUid)(r),r.values_=null,void 0!==e&&r.setProperties(e),r}return i(r,t),r.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},r.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},r.prototype.getProperties=function(){return this.values_&&(0,s.assign)({},this.values_)||{}},r.prototype.hasProperties=function(){return!!this.values_},r.prototype.notify=function(t,r){var s;s=l(t),this.dispatchEvent(new u(s,t,r)),s=e.default.PROPERTYCHANGE,this.dispatchEvent(new u(s,t,r))},r.prototype.set=function(t,e,r){var s=this.values_||(this.values_={});if(r)s[t]=e;else{var n=s[t];s[t]=e,n!==e&&this.notify(t,n)}},r.prototype.setProperties=function(t,e){for(var r in t)this.set(r,t[r],e)},r.prototype.applyProperties=function(t){t.values_&&(0,s.assign)(this.values_||(this.values_={}),t.values_)},r.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var r=this.values_[t];delete this.values_[t],(0,s.isEmpty)(this.values_)&&(this.values_=null),e||this.notify(t,r)}},r}(r.default),p={};function l(t){return p.hasOwnProperty(t)?p[t]:p[t]="change:"+t}var v=a;exports.default=v;
},{"./events/Event.js":"fKNg","./ObjectEventType.js":"zehl","./Observable.js":"IdSm","./obj.js":"mH6q","./util.js":"KniQ"}],"ygGQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("./util.js"),r=function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])})(r,e)};return function(r,e){function o(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),e=function(e){function o(r){var o=this,n="Assertion failed. See https://openlayers.org/en/"+("latest"===t.VERSION?t.VERSION:"v"+t.VERSION.split("-")[0])+"/doc/errors/#"+r+" for details.";return(o=e.call(this,n)||this).code=r,o.name="AssertionError",o.message=n,o}return r(o,e),o}(Error),o=e;exports.default=o;
},{"./util.js":"KniQ"}],"fLG6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.assert=t;var e=r(require("./AssertionError.js"));function r(e){return e&&e.__esModule?e:{default:e}}function t(r,t){if(!r)throw new e.default(t)}
},{"./AssertionError.js":"ygGQ"}],"mYW9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createStyleFunction=u,exports.default=void 0;var e=s(require("./Object.js")),t=o(require("./events/EventType.js")),r=require("./asserts.js"),n=require("./events.js");function o(e){return e&&e.__esModule?e:{default:e}}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var s=n?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,t&&t.set(e,r),r}var y=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),a=function(r){function o(t){var n=r.call(this)||this;if(n.id_=void 0,n.geometryName_="geometry",n.style_=null,n.styleFunction_=void 0,n.geometryChangeKey_=null,n.addEventListener((0,e.getChangeEventType)(n.geometryName_),n.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){var o=t;n.setGeometry(o)}else{var i=t;n.setProperties(i)}return n}return y(o,r),o.prototype.clone=function(){var e=new o(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());var t=this.getGeometry();t&&e.setGeometry(t.clone());var r=this.getStyle();return r&&e.setStyle(r),e},o.prototype.getGeometry=function(){return this.get(this.geometryName_)},o.prototype.getId=function(){return this.id_},o.prototype.getGeometryName=function(){return this.geometryName_},o.prototype.getStyle=function(){return this.style_},o.prototype.getStyleFunction=function(){return this.styleFunction_},o.prototype.handleGeometryChange_=function(){this.changed()},o.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&((0,n.unlistenByKey)(this.geometryChangeKey_),this.geometryChangeKey_=null);var e=this.getGeometry();e&&(this.geometryChangeKey_=(0,n.listen)(e,t.default.CHANGE,this.handleGeometryChange_,this)),this.changed()},o.prototype.setGeometry=function(e){this.set(this.geometryName_,e)},o.prototype.setStyle=function(e){this.style_=e,this.styleFunction_=e?u(e):void 0,this.changed()},o.prototype.setId=function(e){this.id_=e,this.changed()},o.prototype.setGeometryName=function(t){this.removeEventListener((0,e.getChangeEventType)(this.geometryName_),this.handleGeometryChanged_),this.geometryName_=t,this.addEventListener((0,e.getChangeEventType)(this.geometryName_),this.handleGeometryChanged_),this.handleGeometryChanged_()},o}(e.default);function u(e){return"function"==typeof e?e:(Array.isArray(e)?t=e:((0,r.assert)("function"==typeof e.getZIndex,41),t=[e]),function(){return t});var t}var h=a;exports.default=h;
},{"./Object.js":"PhPh","./events/EventType.js":"C8cu","./asserts.js":"fLG6","./events.js":"UqnM"}],"P4eA":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.create=e,exports.reset=n,exports.multiply=o,exports.set=s,exports.setFromArray=u,exports.apply=a,exports.rotate=i,exports.scale=c,exports.makeScale=p,exports.translate=f,exports.compose=x,exports.composeCssTransform=v,exports.invert=m,exports.makeInverse=l,exports.determinant=y,exports.toString=M;var r=require("./asserts.js"),t=new Array(6);function e(){return[1,0,0,1,0,0]}function n(r){return s(r,1,0,0,1,0,0)}function o(r,t){var e=r[0],n=r[1],o=r[2],s=r[3],u=r[4],a=r[5],i=t[0],c=t[1],p=t[2],f=t[3],x=t[4],v=t[5];return r[0]=e*i+o*c,r[1]=n*i+s*c,r[2]=e*p+o*f,r[3]=n*p+s*f,r[4]=e*x+o*v+u,r[5]=n*x+s*v+a,r}function s(r,t,e,n,o,s,u){return r[0]=t,r[1]=e,r[2]=n,r[3]=o,r[4]=s,r[5]=u,r}function u(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function a(r,t){var e=t[0],n=t[1];return t[0]=r[0]*e+r[2]*n+r[4],t[1]=r[1]*e+r[3]*n+r[5],t}function i(r,e){var n=Math.cos(e),u=Math.sin(e);return o(r,s(t,n,u,-u,n,0,0))}function c(r,e,n){return o(r,s(t,e,0,0,n,0,0))}function p(r,t,e){return s(r,t,0,0,e,0,0)}function f(r,e,n){return o(r,s(t,1,0,0,1,e,n))}function x(r,t,e,n,o,s,u,a){var i=Math.sin(s),c=Math.cos(s);return r[0]=n*c,r[1]=o*i,r[2]=-n*i,r[3]=o*c,r[4]=u*n*c-a*n*i+t,r[5]=u*o*i+a*o*c+e,r}function v(r,t,n,o,s,u,a){return M(x(e(),r,t,n,o,s,u,a))}function m(r){return l(r,r)}function l(t,e){var n=y(e);(0,r.assert)(0!==n,32);var o=e[0],s=e[1],u=e[2],a=e[3],i=e[4],c=e[5];return t[0]=a/n,t[1]=-s/n,t[2]=-u/n,t[3]=o/n,t[4]=(u*c-a*i)/n,t[5]=-(o*c-s*i)/n,t}function y(r){return r[0]*r[3]-r[1]*r[2]}function M(r){return"matrix("+r.join(", ")+")"}
},{"./asserts.js":"fLG6"}],"urGY":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"};exports.default=t;
},{}],"bUAS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};exports.default=e;
},{}],"QDir":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.boundingExtent=o,exports.buffer=a,exports.clone=i,exports.closestSquaredDistanceXY=s,exports.containsCoordinate=f,exports.containsExtent=p,exports.containsXY=c,exports.coordinateRelationship=x,exports.createEmpty=l,exports.createOrUpdate=d,exports.createOrUpdateEmpty=h,exports.createOrUpdateFromCoordinate=g,exports.createOrUpdateFromCoordinates=m,exports.createOrUpdateFromFlatCoordinates=M,exports.createOrUpdateFromRings=E,exports.equals=T,exports.approximatelyEquals=v,exports.extend=O,exports.extendCoordinate=C,exports.extendCoordinates=R,exports.extendFlatCoordinates=F,exports.extendRings=I,exports.extendXY=N,exports.forEachCorner=y,exports.getArea=B,exports.getBottomLeft=L,exports.getBottomRight=U,exports.getCenter=G,exports.getCorner=_,exports.getEnlargedArea=b,exports.getForViewAndSize=A,exports.getHeight=S,exports.getIntersectionArea=W,exports.getIntersection=q,exports.getMargin=H,exports.getSize=X,exports.getTopLeft=j,exports.getTopRight=V,exports.getWidth=P,exports.intersects=Y,exports.isEmpty=w,exports.returnOrUpdate=z,exports.scaleFromCenter=K,exports.intersectsSegment=D,exports.applyTransform=k,exports.wrapX=J;var t=n(require("./extent/Corner.js")),e=n(require("./extent/Relationship.js")),r=require("./asserts.js");function n(t){return t&&t.__esModule?t:{default:t}}function o(t){for(var e=l(),r=0,n=t.length;r<n;++r)C(e,t[r]);return e}function u(t,e,r){return d(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),r)}function a(t,e,r){return r?(r[0]=t[0]-e,r[1]=t[1]-e,r[2]=t[2]+e,r[3]=t[3]+e,r):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function i(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function s(t,e,r){var n,o;return(n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*n+(o=r<t[1]?t[1]-r:t[3]<r?r-t[3]:0)*o}function f(t,e){return c(t,e[0],e[1])}function p(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function c(t,e,r){return t[0]<=e&&e<=t[2]&&t[1]<=r&&r<=t[3]}function x(t,r){var n=t[0],o=t[1],u=t[2],a=t[3],i=r[0],s=r[1],f=e.default.UNKNOWN;return i<n?f|=e.default.LEFT:i>u&&(f|=e.default.RIGHT),s<o?f|=e.default.BELOW:s>a&&(f|=e.default.ABOVE),f===e.default.UNKNOWN&&(f=e.default.INTERSECTING),f}function l(){return[1/0,1/0,-1/0,-1/0]}function d(t,e,r,n,o){return o?(o[0]=t,o[1]=e,o[2]=r,o[3]=n,o):[t,e,r,n]}function h(t){return d(1/0,1/0,-1/0,-1/0,t)}function g(t,e){var r=t[0],n=t[1];return d(r,n,r,n,e)}function m(t,e){return R(h(e),t)}function M(t,e,r,n,o){return F(h(o),t,e,r,n)}function E(t,e){return I(h(e),t)}function T(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function v(t,e,r){return Math.abs(t[0]-e[0])<r&&Math.abs(t[2]-e[2])<r&&Math.abs(t[1]-e[1])<r&&Math.abs(t[3]-e[3])<r}function O(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function C(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function R(t,e){for(var r=0,n=e.length;r<n;++r)C(t,e[r]);return t}function F(t,e,r,n,o){for(;r<n;r+=o)N(t,e[r],e[r+1]);return t}function I(t,e){for(var r=0,n=e.length;r<n;++r)R(t,e[r]);return t}function N(t,e,r){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],r),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],r)}function y(t,e){var r;return(r=e(L(t)))?r:(r=e(U(t)))?r:(r=e(V(t)))?r:(r=e(j(t)))||!1}function B(t){var e=0;return w(t)||(e=P(t)*S(t)),e}function L(t){return[t[0],t[1]]}function U(t){return[t[2],t[1]]}function G(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function _(e,n){var o;return n===t.default.BOTTOM_LEFT?o=L(e):n===t.default.BOTTOM_RIGHT?o=U(e):n===t.default.TOP_LEFT?o=j(e):n===t.default.TOP_RIGHT?o=V(e):(0,r.assert)(!1,13),o}function b(t,e){var r=Math.min(t[0],e[0]),n=Math.min(t[1],e[1]);return(Math.max(t[2],e[2])-r)*(Math.max(t[3],e[3])-n)}function A(t,e,r,n,o){var u=e*n[0]/2,a=e*n[1]/2,i=Math.cos(r),s=Math.sin(r),f=u*i,p=u*s,c=a*i,x=a*s,l=t[0],h=t[1],g=l-f+x,m=l-f-x,M=l+f-x,E=l+f+x,T=h-p-c,v=h-p+c,O=h+p+c,C=h+p-c;return d(Math.min(g,m,M,E),Math.min(T,v,O,C),Math.max(g,m,M,E),Math.max(T,v,O,C),o)}function S(t){return t[3]-t[1]}function W(t,e){return B(q(t,e))}function q(t,e,r){var n=r||l();return Y(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):h(n),n}function H(t){return P(t)+S(t)}function X(t){return[t[2]-t[0],t[3]-t[1]]}function j(t){return[t[0],t[3]]}function V(t){return[t[2],t[3]]}function P(t){return t[2]-t[0]}function Y(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function w(t){return t[2]<t[0]||t[3]<t[1]}function z(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}function K(t,e){var r=(t[2]-t[0])/2*(e-1),n=(t[3]-t[1])/2*(e-1);t[0]-=r,t[2]+=r,t[1]-=n,t[3]+=n}function D(t,r,n){var o=!1,u=x(t,r),a=x(t,n);if(u===e.default.INTERSECTING||a===e.default.INTERSECTING)o=!0;else{var i=t[0],s=t[1],f=t[2],p=t[3],c=r[0],l=r[1],d=n[0],h=n[1],g=(h-l)/(d-c),m=void 0,M=void 0;a&e.default.ABOVE&&!(u&e.default.ABOVE)&&(o=(m=d-(h-p)/g)>=i&&m<=f),o||!(a&e.default.RIGHT)||u&e.default.RIGHT||(o=(M=h-(d-f)*g)>=s&&M<=p),o||!(a&e.default.BELOW)||u&e.default.BELOW||(o=(m=d-(h-s)/g)>=i&&m<=f),o||!(a&e.default.LEFT)||u&e.default.LEFT||(o=(M=h-(d-i)*g)>=s&&M<=p)}return o}function k(t,e,r,n){var o=[];if(n>1)for(var a=t[2]-t[0],i=t[3]-t[1],s=0;s<n;++s)o.push(t[0]+a*s/n,t[1],t[2],t[1]+i*s/n,t[2]-a*s/n,t[3],t[0],t[3]-i*s/n);else o=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(o,o,2);for(var f=[],p=[],c=(s=0,o.length);s<c;s+=2)f.push(o[s]),p.push(o[s+1]);return u(f,p,r)}function J(t,e){var r=e.getExtent(),n=G(t);if(e.canWrapX()&&(n[0]<r[0]||n[0]>=r[2])){var o=P(r),u=Math.floor((n[0]-r[0])/o)*o;t[0]-=u,t[2]-=u}return t}
},{"./extent/Corner.js":"urGY","./extent/Relationship.js":"bUAS","./asserts.js":"fLG6"}],"B96G":[function(require,module,exports) {
"use strict";function r(r,t,e){return Math.min(Math.max(r,t),e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.clamp=r,exports.squaredSegmentDistance=o,exports.squaredDistance=n,exports.solveLinearSystem=a,exports.toDegrees=s,exports.toRadians=u,exports.modulo=i,exports.lerp=c,exports.log2=exports.cosh=void 0;var t="cosh"in Math?Math.cosh:function(r){var t=Math.exp(r);return(t+1/t)/2};exports.cosh=t;var e="log2"in Math?Math.log2:function(r){return Math.log(r)*Math.LOG2E};function o(r,t,e,o,a,s){var u=a-e,i=s-o;if(0!==u||0!==i){var c=((r-e)*u+(t-o)*i)/(u*u+i*i);c>1?(e=a,o=s):c>0&&(e+=u*c,o+=i*c)}return n(r,t,e,o)}function n(r,t,e,o){var n=e-r,a=o-t;return n*n+a*a}function a(r){for(var t=r.length,e=0;e<t;e++){for(var o=e,n=Math.abs(r[e][e]),a=e+1;a<t;a++){var s=Math.abs(r[a][e]);s>n&&(n=s,o=a)}if(0===n)return null;var u=r[o];r[o]=r[e],r[e]=u;for(var i=e+1;i<t;i++)for(var c=-r[i][e]/r[e][e],f=e;f<t+1;f++)e==f?r[i][f]=0:r[i][f]+=c*r[e][f]}for(var h=new Array(t),v=t-1;v>=0;v--){h[v]=r[v][t]/r[v][v];for(var p=v-1;p>=0;p--)r[p][t]-=r[p][v]*h[v]}return h}function s(r){return 180*r/Math.PI}function u(r){return r*Math.PI/180}function i(r,t){var e=r%t;return e*t<0?e+t:e}function c(r,t,e){return r+e*(t-r)}exports.log2=e;
},{}],"eucy":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.asString=s,exports.asArray=i,exports.normalize=p,exports.toString=c,exports.isStringColor=l,exports.fromString=void 0;var r=require("./asserts.js"),e=require("./math.js"),t=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,n=/^([a-z]*)$|^hsla?\(.*\)$/i;function s(r){return"string"==typeof r?r:c(r)}function a(r){var e=document.createElement("div");if(e.style.color=r,""!==e.style.color){document.body.appendChild(e);var t=getComputedStyle(e).color;return document.body.removeChild(e),t}return""}var o=function(){var r={},e=0;return function(t){var n;if(r.hasOwnProperty(t))n=r[t];else{if(e>=1024){var s=0;for(var a in r)0==(3&s++)&&(delete r[a],--e)}n=u(t),r[t]=n,++e}return n}}();function i(r){return Array.isArray(r)?r:o(r)}function u(e){var s,o,i,u,c;if(n.exec(e)&&(e=a(e)),t.exec(e)){var l=e.length-1,f=void 0;f=l<=4?1:2;var d=4===l||8===l;s=parseInt(e.substr(1+0*f,f),16),o=parseInt(e.substr(1+1*f,f),16),i=parseInt(e.substr(1+2*f,f),16),u=d?parseInt(e.substr(1+3*f,f),16):255,1==f&&(s=(s<<4)+s,o=(o<<4)+o,i=(i<<4)+i,d&&(u=(u<<4)+u)),c=[s,o,i,u/255]}else 0==e.indexOf("rgba(")?p(c=e.slice(5,-1).split(",").map(Number)):0==e.indexOf("rgb(")?((c=e.slice(4,-1).split(",").map(Number)).push(1),p(c)):(0,r.assert)(!1,14);return c}function p(r){return r[0]=(0,e.clamp)(r[0]+.5|0,0,255),r[1]=(0,e.clamp)(r[1]+.5|0,0,255),r[2]=(0,e.clamp)(r[2]+.5|0,0,255),r[3]=(0,e.clamp)(r[3],0,1),r}function c(r){var e=r[0];e!=(0|e)&&(e=e+.5|0);var t=r[1];t!=(0|t)&&(t=t+.5|0);var n=r[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+t+","+n+","+(void 0===r[3]?1:r[3])+")"}function l(r){return n.test(r)&&(r=a(r)),t.test(r)||0===r.indexOf("rgba(")||0===r.indexOf("rgb(")}exports.fromString=o;
},{"./asserts.js":"fLG6","./math.js":"B96G"}],"V0oB":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.shared=exports.default=void 0;var e=require("../color.js"),t=function(){function e(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return e.prototype.clear=function(){this.cache_={},this.cacheSize_=0},e.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},e.prototype.expire=function(){if(this.canExpireCache()){var e=0;for(var t in this.cache_){var i=this.cache_[t];0!=(3&e++)||i.hasListener()||(delete this.cache_[t],--this.cacheSize_)}}},e.prototype.get=function(e,t,c){var r=i(e,t,c);return r in this.cache_?this.cache_[r]:null},e.prototype.set=function(e,t,c,r){var a=i(e,t,c);this.cache_[a]=r,++this.cacheSize_},e.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},e}();function i(t,i,c){return i+":"+t+":"+(c?(0,e.asString)(c):"null")}var c=t;exports.default=c;var r=new t;exports.shared=r;
},{"../color.js":"eucy"}],"HbeD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source"};exports.default=e;
},{}],"T6DQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=s(require("../Object.js")),e=s(require("./Property.js")),o=require("../util.js"),i=require("../asserts.js"),n=require("../obj.js"),r=require("../math.js");function s(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),u=function(t){function s(o){var r=t.call(this)||this,s=(0,n.assign)({},o);return s[e.default.OPACITY]=void 0!==o.opacity?o.opacity:1,(0,i.assert)("number"==typeof s[e.default.OPACITY],64),s[e.default.VISIBLE]=void 0===o.visible||o.visible,s[e.default.Z_INDEX]=o.zIndex,s[e.default.MAX_RESOLUTION]=void 0!==o.maxResolution?o.maxResolution:1/0,s[e.default.MIN_RESOLUTION]=void 0!==o.minResolution?o.minResolution:0,s[e.default.MIN_ZOOM]=void 0!==o.minZoom?o.minZoom:-1/0,s[e.default.MAX_ZOOM]=void 0!==o.maxZoom?o.maxZoom:1/0,r.className_=void 0!==s.className?o.className:"ol-layer",delete s.className,r.setProperties(s),r.state_=null,r}return a(s,t),s.prototype.getClassName=function(){return this.className_},s.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},o=this.getZIndex();return e.opacity=(0,r.clamp)(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==o?o:!1===e.managed?1/0:0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},s.prototype.getLayersArray=function(t){return(0,o.abstract)()},s.prototype.getLayerStatesArray=function(t){return(0,o.abstract)()},s.prototype.getExtent=function(){return this.get(e.default.EXTENT)},s.prototype.getMaxResolution=function(){return this.get(e.default.MAX_RESOLUTION)},s.prototype.getMinResolution=function(){return this.get(e.default.MIN_RESOLUTION)},s.prototype.getMinZoom=function(){return this.get(e.default.MIN_ZOOM)},s.prototype.getMaxZoom=function(){return this.get(e.default.MAX_ZOOM)},s.prototype.getOpacity=function(){return this.get(e.default.OPACITY)},s.prototype.getSourceState=function(){return(0,o.abstract)()},s.prototype.getVisible=function(){return this.get(e.default.VISIBLE)},s.prototype.getZIndex=function(){return this.get(e.default.Z_INDEX)},s.prototype.setExtent=function(t){this.set(e.default.EXTENT,t)},s.prototype.setMaxResolution=function(t){this.set(e.default.MAX_RESOLUTION,t)},s.prototype.setMinResolution=function(t){this.set(e.default.MIN_RESOLUTION,t)},s.prototype.setMaxZoom=function(t){this.set(e.default.MAX_ZOOM,t)},s.prototype.setMinZoom=function(t){this.set(e.default.MIN_ZOOM,t)},s.prototype.setOpacity=function(t){(0,i.assert)("number"==typeof t,64),this.set(e.default.OPACITY,t)},s.prototype.setVisible=function(t){this.set(e.default.VISIBLE,t)},s.prototype.setZIndex=function(t){this.set(e.default.Z_INDEX,t)},s.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},s}(t.default),l=u;exports.default=l;
},{"../Object.js":"PhPh","./Property.js":"HbeD","../util.js":"KniQ","../asserts.js":"fLG6","../obj.js":"mH6q","../math.js":"B96G"}],"z39m":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};exports.default=e;
},{}],"iC8j":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"};exports.default=e;
},{}],"GCgv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.inView=h,exports.default=void 0;var e=p(require("./Base.js")),t=p(require("../events/EventType.js")),r=p(require("./Property.js")),n=p(require("../render/EventType.js")),o=p(require("../source/State.js")),s=require("../asserts.js"),u=require("../obj.js"),a=require("../Object.js"),i=require("../events.js");function p(e){return e&&e.__esModule?e:{default:e}}var c=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),l=function(e){function p(t){var n=this,o=(0,u.assign)({},t);delete o.source,(n=e.call(this,o)||this).mapPrecomposeKey_=null,n.mapRenderKey_=null,n.sourceChangeKey_=null,n.renderer_=null,t.render&&(n.render=t.render),t.map&&n.setMap(t.map),n.addEventListener((0,a.getChangeEventType)(r.default.SOURCE),n.handleSourcePropertyChange_);var s=t.source?t.source:null;return n.setSource(s),n}return c(p,e),p.prototype.getLayersArray=function(e){var t=e||[];return t.push(this),t},p.prototype.getLayerStatesArray=function(e){var t=e||[];return t.push(this.getLayerState()),t},p.prototype.getSource=function(){return this.get(r.default.SOURCE)||null},p.prototype.getSourceState=function(){var e=this.getSource();return e?e.getState():o.default.UNDEFINED},p.prototype.handleSourceChange_=function(){this.changed()},p.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&((0,i.unlistenByKey)(this.sourceChangeKey_),this.sourceChangeKey_=null);var e=this.getSource();e&&(this.sourceChangeKey_=(0,i.listen)(e,t.default.CHANGE,this.handleSourceChange_,this)),this.changed()},p.prototype.getFeatures=function(e){return this.renderer_.getFeatures(e)},p.prototype.render=function(e,t){var r=this.getRenderer();if(r.prepareFrame(e))return r.renderFrame(e,t)},p.prototype.setMap=function(e){this.mapPrecomposeKey_&&((0,i.unlistenByKey)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&((0,i.unlistenByKey)(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=(0,i.listen)(e,n.default.PRECOMPOSE,function(e){var t=e.frameState.layerStatesArray,r=this.getLayerState(!1);(0,s.assert)(!t.some(function(e){return e.layer===r.layer}),67),t.push(r)},this),this.mapRenderKey_=(0,i.listen)(this,t.default.CHANGE,e.render,e),this.changed())},p.prototype.setSource=function(e){this.set(r.default.SOURCE,e)},p.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},p.prototype.hasRenderer=function(){return!!this.renderer_},p.prototype.createRenderer=function(){return null},p.prototype.disposeInternal=function(){this.setSource(null),e.prototype.disposeInternal.call(this)},p}(e.default);function h(e,t){if(!e.visible)return!1;var r=t.resolution;if(r<e.minResolution||r>=e.maxResolution)return!1;var n=t.zoom;return n>e.minZoom&&n<=e.maxZoom}var y=l;exports.default=y;
},{"./Base.js":"T6DQ","../events/EventType.js":"C8cu","./Property.js":"HbeD","../render/EventType.js":"z39m","../source/State.js":"iC8j","../asserts.js":"fLG6","../obj.js":"mH6q","../Object.js":"PhPh","../events.js":"UqnM"}],"AiCK":[function(require,module,exports) {
"use strict";function e(e,r,t){var n=void 0!==t?e.toFixed(t):""+e,i=n.indexOf(".");return(i=-1===i?n.length:i)>r?n:new Array(1+r-i).join("0")+n}function r(e,r){for(var t=(""+e).split("."),n=(""+r).split("."),i=0;i<Math.max(t.length,n.length);i++){var o=parseInt(t[i]||"0",10),s=parseInt(n[i]||"0",10);if(o>s)return 1;if(s>o)return-1}return 0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.padNumber=e,exports.compareVersions=r;
},{}],"nGsj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.add=n,exports.closestOnCircle=o,exports.closestOnSegment=a,exports.createStringXY=u,exports.degreesToStringHDMS=s,exports.format=i,exports.equals=c,exports.rotate=f,exports.scale=p,exports.squaredDistance=x,exports.distance=d,exports.squaredDistanceToSegment=g,exports.toStringHDMS=l,exports.toStringXY=h,exports.wrapX=M,exports.getWorldsAway=v;var t=require("./extent.js"),r=require("./math.js"),e=require("./string.js");function n(t,r){return t[0]+=+r[0],t[1]+=+r[1],t}function o(t,r){var e=r.getRadius(),n=r.getCenter(),o=n[0],a=n[1],u=t[0]-o,s=t[1]-a;0===u&&0===s&&(u=1);var i=Math.sqrt(u*u+s*s);return[o+e*u/i,a+e*s/i]}function a(t,r){var e,n,o=t[0],a=t[1],u=r[0],s=r[1],i=u[0],c=u[1],f=s[0],p=s[1],x=f-i,d=p-c,g=0===x&&0===d?0:(x*(o-i)+d*(a-c))/(x*x+d*d||0);return g<=0?(e=i,n=c):g>=1?(e=f,n=p):(e=i+g*x,n=c+g*d),[e,n]}function u(t){return function(r){return h(r,t)}}function s(t,n,o){var a=(0,r.modulo)(n+180,360)-180,u=Math.abs(3600*a),s=o||0,i=Math.pow(10,s),c=Math.floor(u/3600),f=Math.floor((u-3600*c)/60),p=u-3600*c-60*f;return(p=Math.ceil(p*i)/i)>=60&&(p=0,f+=1),f>=60&&(f=0,c+=1),c+"° "+(0,e.padNumber)(f,2)+" "+(0,e.padNumber)(p,2,s)+"″"+(0==a?"":" "+t.charAt(a<0?1:0))}function i(t,r,e){return t?r.replace("{x}",t[0].toFixed(e)).replace("{y}",t[1].toFixed(e)):""}function c(t,r){for(var e=!0,n=t.length-1;n>=0;--n)if(t[n]!=r[n]){e=!1;break}return e}function f(t,r){var e=Math.cos(r),n=Math.sin(r),o=t[0]*e-t[1]*n,a=t[1]*e+t[0]*n;return t[0]=o,t[1]=a,t}function p(t,r){return t[0]*=r,t[1]*=r,t}function x(t,r){var e=t[0]-r[0],n=t[1]-r[1];return e*e+n*n}function d(t,r){return Math.sqrt(x(t,r))}function g(t,r){return x(t,a(t,r))}function l(t,r){return t?s("NS",t[1],r)+" "+s("EW",t[0],r):""}function h(t,r){return i(t,"{x}, {y}",r)}function M(r,e){if(e.canWrapX()){var n=(0,t.getWidth)(e.getExtent()),o=v(r,e,n);o&&(r[0]-=o*n)}return r}function v(r,e,n){var o=e.getExtent(),a=0;if(e.canWrapX()&&(r[0]<o[0]||r[0]>o[2])){var u=n||(0,t.getWidth)(o);a=Math.floor((r[0]-o[0])/u)}return a}
},{"./extent.js":"QDir","./math.js":"B96G","./string.js":"AiCK"}],"oIh9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=c(require("../Disposable.js")),t=require("../functions.js"),r=require("../util.js"),n=require("../transform.js"),o=require("../extent.js"),a=require("../style/IconImageCache.js"),i=require("../layer/Layer.js"),u=require("../coordinate.js");function c(e){return e&&e.__esModule?e:{default:e}}var s=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),p=function(e){function c(t){var r=e.call(this)||this;return r.map_=t,r}return s(c,e),c.prototype.dispatchRenderEvent=function(e,t){(0,r.abstract)()},c.prototype.calculateMatrices2D=function(e){var t=e.viewState,r=e.coordinateToPixelTransform,o=e.pixelToCoordinateTransform;(0,n.compose)(r,e.size[0]/2,e.size[1]/2,1/t.resolution,-1/t.resolution,-t.rotation,-t.center[0],-t.center[1]),(0,n.makeInverse)(o,r)},c.prototype.forEachFeatureAtCoordinate=function(e,t,r,n,a,c,s,p){var f,l=t.viewState;function d(e,t,r,n){return a.call(c,t,e?r:null,n)}var h=l.projection,y=(0,u.wrapX)(e.slice(),h),v=[[0,0]];if(h.canWrapX()&&n){var _=h.getExtent(),g=(0,o.getWidth)(_);v.push([-g,0],[g,0])}for(var j=t.layerStatesArray,m=j.length,q=[],x=[],b=0;b<v.length;b++)for(var E=m-1;E>=0;--E){var C=j[E],A=C.layer;if(A.hasRenderer()&&(0,i.inView)(C,l)&&s.call(p,A)){var S=A.getRenderer(),w=A.getSource();if(S&&w){var F=w.getWrapX()?y:e,O=d.bind(null,C.managed);x[0]=F[0]+v[b][0],x[1]=F[1]+v[b][1],f=S.forEachFeatureAtCoordinate(x,t,r,O,q)}if(f)return f}}if(0!==q.length){var P=1/q.length;return q.forEach(function(e,t){return e.distanceSq+=t*P}),q.sort(function(e,t){return e.distanceSq-t.distanceSq}),q.some(function(e){return f=e.callback(e.feature,e.layer,e.geometry)}),f}},c.prototype.forEachLayerAtPixel=function(e,t,n,o,a){return(0,r.abstract)()},c.prototype.hasFeatureAtCoordinate=function(e,r,n,o,a,i){return void 0!==this.forEachFeatureAtCoordinate(e,r,n,o,t.TRUE,this,a,i)},c.prototype.getMap=function(){return this.map_},c.prototype.renderFrame=function(e){(0,r.abstract)()},c.prototype.scheduleExpireIconCache=function(e){a.shared.canExpireCache()&&e.postRenderFunctions.push(f)},c}(e.default);function f(e,t){a.shared.expire()}var l=p;exports.default=l;
},{"../Disposable.js":"DDda","../functions.js":"RgA2","../util.js":"KniQ","../transform.js":"P4eA","../extent.js":"QDir","../style/IconImageCache.js":"V0oB","../layer/Layer.js":"GCgv","../coordinate.js":"nGsj"}],"EB6P":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("../events/Event.js"));function e(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),o=function(t){function e(e,r,o,n){var u=t.call(this,e)||this;return u.inversePixelTransform=r,u.frameState=o,u.context=n,u}return r(e,t),e}(t.default),n=o;exports.default=n;
},{"../events/Event.js":"fKNg"}],"HgMV":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFontParameters=exports.CLASS_COLLAPSED=exports.CLASS_CONTROL=exports.CLASS_UNSUPPORTED=exports.CLASS_UNSELECTABLE=exports.CLASS_SELECTABLE=exports.CLASS_HIDDEN=void 0;var e="ol-hidden";exports.CLASS_HIDDEN=e;var r="ol-selectable";exports.CLASS_SELECTABLE=r;var t="ol-unselectable";exports.CLASS_UNSELECTABLE=t;var s="ol-unsupported";exports.CLASS_UNSUPPORTED=s;var l="ol-control";exports.CLASS_CONTROL=l;var a="ol-collapsed";exports.CLASS_COLLAPSED=a;var o=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),S=["style","variant","weight","size","lineHeight","family"],i=function(e){var r=e.match(o);if(!r)return null;for(var t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},s=0,l=S.length;s<l;++s){var a=r[s+1];void 0!==a&&(t[S[s]]=a)}return t.families=t.family.split(/,\s?/),t};exports.getFontParameters=i;
},{}],"f3Nv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PASSIVE_EVENT_LISTENERS=exports.IMAGE_DECODE=exports.WORKER_OFFSCREEN_CANVAS=exports.DEVICE_PIXEL_RATIO=exports.MAC=exports.WEBKIT=exports.SAFARI=exports.FIREFOX=void 0;var e="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",r=-1!==e.indexOf("firefox");exports.FIREFOX=r;var o=-1!==e.indexOf("safari")&&-1==e.indexOf("chrom");exports.SAFARI=o;var t=-1!==e.indexOf("webkit")&&-1==e.indexOf("edge");exports.WEBKIT=t;var n=-1!==e.indexOf("macintosh");exports.MAC=n;var i="undefined"!=typeof devicePixelRatio?devicePixelRatio:1;exports.DEVICE_PIXEL_RATIO=i;var E="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope;exports.WORKER_OFFSCREEN_CANVAS=E;var a="undefined"!=typeof Image&&Image.prototype.decode;exports.IMAGE_DECODE=a;var s=function(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("_",null,r),window.removeEventListener("_",null,r)}catch(o){}return e}();exports.PASSIVE_EVENT_LISTENERS=s;
},{}],"Xno5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createCanvasContext2D=t,exports.outerWidth=r,exports.outerHeight=n,exports.replaceNode=o,exports.removeNode=a,exports.removeChildren=i,exports.replaceChildren=s;var e=require("./has.js");function t(t,r,n){var o=n&&n.length?n.shift():e.WORKER_OFFSCREEN_CANVAS?new OffscreenCanvas(t||300,r||300):document.createElement("canvas");return t&&(o.width=t),r&&(o.height=r),o.getContext("2d")}function r(e){var t=e.offsetWidth,r=getComputedStyle(e);return t+=parseInt(r.marginLeft,10)+parseInt(r.marginRight,10)}function n(e){var t=e.offsetHeight,r=getComputedStyle(e);return t+=parseInt(r.marginTop,10)+parseInt(r.marginBottom,10)}function o(e,t){var r=t.parentNode;r&&r.replaceChild(e,t)}function a(e){return e&&e.parentNode?e.parentNode.removeChild(e):null}function i(e){for(;e.lastChild;)e.removeChild(e.lastChild)}function s(e,t){for(var r=e.childNodes,n=0;;++n){var o=r[n],a=t[n];if(!o&&!a)break;o!==a&&(o?a?e.insertBefore(a,o):(e.removeChild(o),--n):e.appendChild(a))}}
},{"./has.js":"f3Nv"}],"iAG7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.measureTextWidth=w,exports.measureAndCacheTextWidth=O,exports.measureTextWidths=H,exports.rotateAtOffset=I,exports.drawImageOrLabel=M,exports.createTransformString=_,exports.measureTextHeight=exports.registerFont=exports.textHeights=exports.labelCache=exports.checkedFonts=exports.defaultLineWidth=exports.defaultPadding=exports.defaultTextBaseline=exports.defaultTextAlign=exports.defaultStrokeStyle=exports.defaultMiterLimit=exports.defaultLineJoin=exports.defaultLineDashOffset=exports.defaultLineDash=exports.defaultLineCap=exports.defaultFillStyle=exports.defaultFont=void 0;var e=i(require("../Object.js")),t=i(require("../events/Target.js")),r=require("../has.js"),a=require("../obj.js"),n=require("../dom.js"),s=require("../css.js"),o=require("../transform.js");function i(e){return e&&e.__esModule?e:{default:e}}var l="10px sans-serif";exports.defaultFont=l;var u="#000";exports.defaultFillStyle=u;var f="round";exports.defaultLineCap=f;var d=[];exports.defaultLineDash=d;var p=0;exports.defaultLineDashOffset=p;var x="round";exports.defaultLineJoin=x;var c=10;exports.defaultMiterLimit=c;var v="#000";exports.defaultStrokeStyle=v;var g="center";exports.defaultTextAlign=g;var h="middle";exports.defaultTextBaseline=h;var m=[0,0,0,0];exports.defaultPadding=m;var y=1;exports.defaultLineWidth=y;var C=new e.default;exports.checkedFonts=C;var L=new t.default;exports.labelCache=L,L.setSize=function(){console.warn("labelCache is deprecated.")};var T,F=null,S={};exports.textHeights=S;var b=function(){var e,t,r=100,n="32px ",o=["monospace","serif"],i=o.length,l="wmytzilWMYTZIL@#/&?$%10";function u(e,r,a){for(var s=!0,u=0;u<i;++u){var f=o[u];if(t=w(e+" "+r+" "+n+f,l),a!=f){var d=w(e+" "+r+" "+n+a+","+f,l);s=s&&d!=t}}return!!s}function f(){for(var t=!0,n=C.getKeys(),s=0,o=n.length;s<o;++s){var i=n[s];C.get(i)<r&&(u.apply(this,i.split("\n"))?((0,a.clear)(S),F=null,T=void 0,C.set(i,r)):(C.set(i,C.get(i)+1,!0),t=!1))}t&&(clearInterval(e),e=void 0)}return function(t){var a=(0,s.getFontParameters)(t);if(a)for(var n=a.families,o=0,i=n.length;o<i;++o){var l=n[o],d=a.style+"\n"+a.weight+"\n"+l;void 0===C.get(d)&&(C.set(d,r,!0),u(a.style,a.weight,l)||(C.set(d,0,!0),void 0===e&&(e=setInterval(f,32))))}}}();exports.registerFont=b;var A=function(){var e;return function(t){var a=S[t];if(null==a){if(r.WORKER_OFFSCREEN_CANVAS){var n=(0,s.getFontParameters)(t),o=j(t,"Žg");a=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(o.actualBoundingBoxAscent+o.actualBoundingBoxDescent)}else e||((e=document.createElement("div")).innerHTML="M",e.style.margin="0 !important",e.style.padding="0 !important",e.style.position="absolute !important",e.style.left="-99999px !important"),e.style.font=t,document.body.appendChild(e),a=e.offsetHeight,document.body.removeChild(e);S[t]=a}return a}}();function j(e,t){return F||(F=(0,n.createCanvasContext2D)(1,1)),e!=T&&(F.font=e,T=F.font),F.measureText(t)}function w(e,t){return j(e,t).width}function O(e,t,r){if(t in r)return r[t];var a=w(e,t);return r[t]=a,a}function H(e,t,r){for(var a=t.length,n=0,s=0;s<a;++s){var o=w(e,t[s]);n=Math.max(n,o),r.push(o)}return n}function I(e,t,r,a){0!==t&&(e.translate(r,a),e.rotate(t),e.translate(-r,-a))}function M(e,t,r,a,n,s,o,i,l,u,f){e.save(),1!==r&&(e.globalAlpha*=r),t&&e.setTransform.apply(e,t),a.contextInstructions?(e.translate(l,u),e.scale(f[0],f[1]),N(a,e)):f[0]<0||f[1]<0?(e.translate(l,u),e.scale(f[0],f[1]),e.drawImage(a,n,s,o,i,0,0,o,i)):e.drawImage(a,n,s,o,i,l,u,o*f[0],i*f[1]),e.restore()}function N(e,t){for(var r=e.contextInstructions,a=0,n=r.length;a<n;a+=2)Array.isArray(r[a+1])?t[r[a]].apply(t,r[a+1]):t[r[a]]=r[a+1]}exports.measureTextHeight=A;var W=null;function _(e){return r.WORKER_OFFSCREEN_CANVAS?(0,o.toString)(e):(W||(W=(0,n.createCanvasContext2D)(1,1).canvas),W.style.transform=(0,o.toString)(e),W.style.transform)}
},{"../Object.js":"PhPh","../events/Target.js":"CR4Y","../has.js":"f3Nv","../obj.js":"mH6q","../dom.js":"Xno5","../css.js":"HgMV","../transform.js":"P4eA"}],"MHsB":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("./Map.js")),t=u(require("../ObjectEventType.js")),r=u(require("../render/Event.js")),n=u(require("../render/EventType.js")),i=u(require("../source/State.js")),s=require("../css.js"),a=require("../render/canvas.js"),l=require("../layer/Layer.js"),o=require("../events.js"),d=require("../dom.js");function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),h=function(e){function u(r){var n=e.call(this,r)||this;n.fontChangeListenerKey_=(0,o.listen)(a.checkedFonts,t.default.PROPERTYCHANGE,r.redrawText.bind(r)),n.element_=document.createElement("div");var i=n.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",n.element_.className=s.CLASS_UNSELECTABLE+" ol-layers";var l=r.getViewport();return l.insertBefore(n.element_,l.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return c(u,e),u.prototype.dispatchRenderEvent=function(e,t){var n=this.getMap();if(n.hasListener(e)){var i=new r.default(e,void 0,t);n.dispatchEvent(i)}},u.prototype.disposeInternal=function(){(0,o.unlistenByKey)(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),e.prototype.disposeInternal.call(this)},u.prototype.renderFrame=function(e){if(e){this.calculateMatrices2D(e),this.dispatchRenderEvent(n.default.PRECOMPOSE,e);var t=e.layerStatesArray.sort(function(e,t){return e.zIndex-t.zIndex}),r=e.viewState;this.children_.length=0;for(var s=[],a=null,o=0,u=t.length;o<u;++o){var c=t[o];if(e.layerIndex=o,(0,l.inView)(c,r)&&(c.sourceState==i.default.READY||c.sourceState==i.default.UNDEFINED)){var h=c.layer,p=h.render(e,a);p&&(p!==a&&(this.children_.push(p),a=p),"getDeclutter"in h&&s.push(h))}}for(o=s.length-1;o>=0;--o)s[o].renderDeclutter(e);(0,d.replaceChildren)(this.element_,this.children_),this.dispatchRenderEvent(n.default.POSTCOMPOSE,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},u.prototype.forEachLayerAtPixel=function(e,t,r,n,i){for(var s=t.viewState,a=t.layerStatesArray,o=a.length-1;o>=0;--o){var d=a[o],u=d.layer;if(u.hasRenderer()&&(0,l.inView)(d,s)&&i(u)){var c=u.getRenderer().getDataAtPixel(e,t,r);if(c){var h=n(u,c);if(h)return h}}}},u}(e.default),p=h;exports.default=p;
},{"./Map.js":"oIh9","../ObjectEventType.js":"zehl","../render/Event.js":"EB6P","../render/EventType.js":"z39m","../source/State.js":"iC8j","../css.js":"HgMV","../render/canvas.js":"iAG7","../layer/Layer.js":"GCgv","../events.js":"UqnM","../dom.js":"Xno5"}],"BTrx":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={ADD:"add",REMOVE:"remove"};exports.default=e;
},{}],"FnDa":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.CollectionEvent=void 0;var t=i(require("./AssertionError.js")),e=i(require("./Object.js")),r=i(require("./CollectionEventType.js")),n=i(require("./events/Event.js"));function i(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),s={LENGTH:"length"},u=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.element=r,i.index=n,i}return o(e,t),e}(n.default);exports.CollectionEvent=u;var a=function(e){function n(t,r){var n=e.call(this)||this,i=r||{};if(n.unique_=!!i.unique,n.array_=t||[],n.unique_)for(var o=0,s=n.array_.length;o<s;++o)n.assertUnique_(n.array_[o],o);return n.updateLength_(),n}return o(n,e),n.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},n.prototype.extend=function(t){for(var e=0,r=t.length;e<r;++e)this.push(t[e]);return this},n.prototype.forEach=function(t){for(var e=this.array_,r=0,n=e.length;r<n;++r)t(e[r],r,e)},n.prototype.getArray=function(){return this.array_},n.prototype.item=function(t){return this.array_[t]},n.prototype.getLength=function(){return this.get(s.LENGTH)},n.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new u(r.default.ADD,e,t))},n.prototype.pop=function(){return this.removeAt(this.getLength()-1)},n.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},n.prototype.remove=function(t){for(var e=this.array_,r=0,n=e.length;r<n;++r)if(e[r]===t)return this.removeAt(r)},n.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new u(r.default.REMOVE,e,t)),e},n.prototype.setAt=function(t,e){var n=this.getLength();if(t<n){this.unique_&&this.assertUnique_(e,t);var i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new u(r.default.REMOVE,i,t)),this.dispatchEvent(new u(r.default.ADD,e,t))}else{for(var o=n;o<t;++o)this.insertAt(o,void 0);this.insertAt(t,e)}},n.prototype.updateLength_=function(){this.set(s.LENGTH,this.array_.length)},n.prototype.assertUnique_=function(e,r){for(var n=0,i=this.array_.length;n<i;++n)if(this.array_[n]===e&&n!==r)throw new t.default(58)},n}(e.default),h=a;exports.default=h;
},{"./AssertionError.js":"ygGQ","./Object.js":"PhPh","./CollectionEventType.js":"BTrx","./events/Event.js":"fKNg"}],"q0nK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=c(require("./Base.js")),t=c(require("../Collection.js")),r=c(require("../CollectionEventType.js")),n=c(require("../events/EventType.js")),s=c(require("../ObjectEventType.js")),i=c(require("../source/State.js")),a=require("../asserts.js"),o=require("../obj.js"),l=require("../Object.js"),y=require("../extent.js"),u=require("../util.js"),h=require("../events.js");function c(e){return e&&e.__esModule?e:{default:e}}var d=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),f={LAYERS:"layers"},p=function(e){function c(r){var n=this,s=r||{},i=(0,o.assign)({},s);delete i.layers;var y=s.layers;return(n=e.call(this,i)||this).layersListenerKeys_=[],n.listenerKeys_={},n.addEventListener((0,l.getChangeEventType)(f.LAYERS),n.handleLayersChanged_),y?Array.isArray(y)?y=new t.default(y.slice(),{unique:!0}):(0,a.assert)("function"==typeof y.getArray,43):y=new t.default(void 0,{unique:!0}),n.setLayers(y),n}return d(c,e),c.prototype.handleLayerChange_=function(){this.changed()},c.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(h.unlistenByKey),this.layersListenerKeys_.length=0;var e=this.getLayers();for(var t in this.layersListenerKeys_.push((0,h.listen)(e,r.default.ADD,this.handleLayersAdd_,this),(0,h.listen)(e,r.default.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[t].forEach(h.unlistenByKey);(0,o.clear)(this.listenerKeys_);for(var i=e.getArray(),a=0,l=i.length;a<l;a++){var y=i[a];this.listenerKeys_[(0,u.getUid)(y)]=[(0,h.listen)(y,s.default.PROPERTYCHANGE,this.handleLayerChange_,this),(0,h.listen)(y,n.default.CHANGE,this.handleLayerChange_,this)]}this.changed()},c.prototype.handleLayersAdd_=function(e){var t=e.element;this.listenerKeys_[(0,u.getUid)(t)]=[(0,h.listen)(t,s.default.PROPERTYCHANGE,this.handleLayerChange_,this),(0,h.listen)(t,n.default.CHANGE,this.handleLayerChange_,this)],this.changed()},c.prototype.handleLayersRemove_=function(e){var t=e.element,r=(0,u.getUid)(t);this.listenerKeys_[r].forEach(h.unlistenByKey),delete this.listenerKeys_[r],this.changed()},c.prototype.getLayers=function(){return this.get(f.LAYERS)},c.prototype.setLayers=function(e){this.set(f.LAYERS,e)},c.prototype.getLayersArray=function(e){var t=void 0!==e?e:[];return this.getLayers().forEach(function(e){e.getLayersArray(t)}),t},c.prototype.getLayerStatesArray=function(e){var t=void 0!==e?e:[],r=t.length;this.getLayers().forEach(function(e){e.getLayerStatesArray(t)});for(var n=this.getLayerState(),s=r,i=t.length;s<i;s++){var a=t[s];a.opacity*=n.opacity,a.visible=a.visible&&n.visible,a.maxResolution=Math.min(a.maxResolution,n.maxResolution),a.minResolution=Math.max(a.minResolution,n.minResolution),a.minZoom=Math.max(a.minZoom,n.minZoom),a.maxZoom=Math.min(a.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==a.extent?a.extent=(0,y.getIntersection)(a.extent,n.extent):a.extent=n.extent)}return t},c.prototype.getSourceState=function(){return i.default.READY},c}(e.default),g=p;exports.default=g;
},{"./Base.js":"T6DQ","../Collection.js":"FnDa","../CollectionEventType.js":"BTrx","../events/EventType.js":"C8cu","../ObjectEventType.js":"zehl","../source/State.js":"iC8j","../asserts.js":"fLG6","../obj.js":"mH6q","../Object.js":"PhPh","../extent.js":"QDir","../util.js":"KniQ","../events.js":"UqnM"}],"vFcA":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("./events/Event.js"));function e(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),o=function(t){function e(e,r,o){var n=t.call(this,e)||this;return n.map=r,n.frameState=void 0!==o?o:null,n}return r(e,t),e}(t.default),n=o;exports.default=n;
},{"./events/Event.js":"fKNg"}],"HMLS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("./MapEvent.js"));function e(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),n=function(t){function e(e,o,n,r,i){var p=t.call(this,e,o,i)||this;return p.originalEvent=n,p.pixel_=null,p.coordinate_=null,p.dragging=void 0!==r&&r,p}return o(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),this.originalEvent.stopPropagation()},e}(t.default),r=n;exports.default=r;
},{"./MapEvent.js":"vFcA"}],"YhDM":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./events/EventType.js"));function t(e){return e&&e.__esModule?e:{default:e}}var r={SINGLECLICK:"singleclick",CLICK:e.default.CLICK,DBLCLICK:e.default.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};exports.default=r;
},{"./events/EventType.js":"C8cu"}],"TaSm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};exports.default=e;
},{}],"ohHk":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=a(require("./events/Target.js")),t=a(require("./events/EventType.js")),i=a(require("./MapBrowserEvent.js")),n=a(require("./MapBrowserEventType.js")),s=a(require("./pointer/EventType.js")),o=require("./has.js"),r=require("./events.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),h=function(e){function a(i,n){var a=e.call(this,i)||this;a.map_=i,a.clickTimeoutId_,a.emulateClicks_=!1,a.dragging_=!1,a.dragListenerKeys_=[],a.moveTolerance_=n?n*o.DEVICE_PIXEL_RATIO:o.DEVICE_PIXEL_RATIO,a.down_=null;var l=a.map_.getViewport();return a.activePointers_=0,a.trackedTouches_={},a.element_=l,a.pointerdownListenerKey_=(0,r.listen)(l,s.default.POINTERDOWN,a.handlePointerDown_,a),a.originalPointerMoveEvent_,a.relayedListenerKey_=(0,r.listen)(l,s.default.POINTERMOVE,a.relayEvent_,a),a.boundHandleTouchMove_=a.handleTouchMove_.bind(a),a.element_.addEventListener(t.default.TOUCHMOVE,a.boundHandleTouchMove_,!!o.PASSIVE_EVENT_LISTENERS&&{passive:!1}),a}return l(a,e),a.prototype.emulateClick_=function(e){var t=new i.default(n.default.CLICK,this.map_,e);this.dispatchEvent(t),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,t=new i.default(n.default.DBLCLICK,this.map_,e),this.dispatchEvent(t)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var t=new i.default(n.default.SINGLECLICK,this.map_,e);this.dispatchEvent(t)}.bind(this),250)},a.prototype.updateActivePointers_=function(e){var t=e;t.type==n.default.POINTERUP||t.type==n.default.POINTERCANCEL?delete this.trackedTouches_[t.pointerId]:t.type==n.default.POINTERDOWN&&(this.trackedTouches_[t.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},a.prototype.handlePointerUp_=function(e){this.updateActivePointers_(e);var t=new i.default(n.default.POINTERUP,this.map_,e);this.dispatchEvent(t),this.emulateClicks_&&!t.propagationStopped&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(r.unlistenByKey),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},a.prototype.isMouseActionButton_=function(e){return 0===e.button},a.prototype.handlePointerDown_=function(e){this.emulateClicks_=0===this.activePointers_,this.updateActivePointers_(e);var t=new i.default(n.default.POINTERDOWN,this.map_,e);if(this.dispatchEvent(t),this.down_=e,0===this.dragListenerKeys_.length){var s=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,r.listen)(s,n.default.POINTERMOVE,this.handlePointerMove_,this),(0,r.listen)(s,n.default.POINTERUP,this.handlePointerUp_,this),(0,r.listen)(this.element_,n.default.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==s&&this.dragListenerKeys_.push((0,r.listen)(this.element_.getRootNode(),n.default.POINTERUP,this.handlePointerUp_,this))}},a.prototype.handlePointerMove_=function(e){if(this.isMoving_(e)){this.dragging_=!0;var t=new i.default(n.default.POINTERDRAG,this.map_,e,this.dragging_);this.dispatchEvent(t)}},a.prototype.relayEvent_=function(e){this.originalPointerMoveEvent_=e;var t=!(!this.down_||!this.isMoving_(e));this.dispatchEvent(new i.default(e.type,this.map_,e,t))},a.prototype.handleTouchMove_=function(e){this.originalPointerMoveEvent_&&!this.originalPointerMoveEvent_.defaultPrevented||e.preventDefault()},a.prototype.isMoving_=function(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_},a.prototype.disposeInternal=function(){this.relayedListenerKey_&&((0,r.unlistenByKey)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(t.default.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,r.unlistenByKey)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(r.unlistenByKey),this.dragListenerKeys_.length=0,this.element_=null,e.prototype.disposeInternal.call(this)},a}(e.default),d=h;exports.default=d;
},{"./events/Target.js":"CR4Y","./events/EventType.js":"C8cu","./MapBrowserEvent.js":"HMLS","./MapBrowserEventType.js":"YhDM","./pointer/EventType.js":"TaSm","./has.js":"f3Nv","./events.js":"UqnM"}],"xLGm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend"};exports.default=e;
},{}],"zlNQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"};exports.default=e;
},{}],"RQLY":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.DROP=void 0;var t=require("../asserts.js"),e=require("../obj.js"),i=1/0;exports.DROP=i;var n=function(){function n(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return n.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,(0,e.clear)(this.queuedElements_)},n.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var n=this.keyFunction_(i);return delete this.queuedElements_[n],i},n.prototype.enqueue=function(e){(0,t.assert)(!(this.keyFunction_(e)in this.queuedElements_),31);var n=this.priorityFunction_(e);return n!=i&&(this.elements_.push(e),this.priorities_.push(n),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},n.prototype.getCount=function(){return this.elements_.length},n.prototype.getLeftChildIndex_=function(t){return 2*t+1},n.prototype.getRightChildIndex_=function(t){return 2*t+2},n.prototype.getParentIndex_=function(t){return t-1>>1},n.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},n.prototype.isEmpty=function(){return 0===this.elements_.length},n.prototype.isKeyQueued=function(t){return t in this.queuedElements_},n.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},n.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,n=e.length,s=e[t],r=i[t],o=t;t<n>>1;){var u=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),p=h<n&&i[h]<i[u]?h:u;e[t]=e[p],i[t]=i[p],t=p}e[t]=s,i[t]=r,this.siftDown_(o,t)},n.prototype.siftDown_=function(t,e){for(var i=this.elements_,n=this.priorities_,s=i[e],r=n[e];e>t;){var o=this.getParentIndex_(e);if(!(n[o]>r))break;i[e]=i[o],n[e]=n[o],e=o}i[e]=s,n[e]=r},n.prototype.reprioritize=function(){var t,e,n,s=this.priorityFunction_,r=this.elements_,o=this.priorities_,u=0,h=r.length;for(e=0;e<h;++e)(n=s(t=r[e]))==i?delete this.queuedElements_[this.keyFunction_(t)]:(o[u]=n,r[u++]=t);r.length=u,o.length=u,this.heapify_()},n}(),s=n;exports.default=s;
},{"../asserts.js":"fLG6","../obj.js":"mH6q"}],"Xz9x":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};exports.default=e;
},{}],"tHOl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getTilePriority=s,exports.default=void 0;var e=o(require("./events/EventType.js")),t=i(require("./structs/PriorityQueue.js")),n=o(require("./TileState.js"));function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function i(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=r();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}function o(e){return e&&e.__esModule?e:{default:e}}var a=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(t){function r(e,n){var r=t.call(this,function(t){return e.apply(null,t)},function(e){return e[0].getKey()})||this;return r.boundHandleTileChange_=r.handleTileChange.bind(r),r.tileChangeCallback_=n,r.tilesLoading_=0,r.tilesLoadingKeys_={},r}return a(r,t),r.prototype.enqueue=function(n){var r=t.prototype.enqueue.call(this,n);r&&n[0].addEventListener(e.default.CHANGE,this.boundHandleTileChange_);return r},r.prototype.getTilesLoading=function(){return this.tilesLoading_},r.prototype.handleTileChange=function(t){var r=t.target,i=r.getState();if(r.hifi&&i===n.default.LOADED||i===n.default.ERROR||i===n.default.EMPTY){r.removeEventListener(e.default.CHANGE,this.boundHandleTileChange_);var o=r.getKey();o in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[o],--this.tilesLoading_),this.tileChangeCallback_()}},r.prototype.loadMoreTiles=function(e,t){for(var r,i,o=0;this.tilesLoading_<e&&o<t&&this.getCount()>0;)i=(r=this.dequeue()[0]).getKey(),r.getState()!==n.default.IDLE||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++o,r.load())},r}(t.default),l=u;function s(e,n,r,i,o){if(!(e&&r in e.wantedTiles))return t.DROP;if(!e.wantedTiles[r][n.getKey()])return t.DROP;var a=e.viewState.center,u=i[0]-a[0],l=i[1]-a[1];return 65536*Math.log(o)+Math.sqrt(u*u+l*l)/o}exports.default=l;
},{"./events/EventType.js":"C8cu","./structs/PriorityQueue.js":"RQLY","./TileState.js":"Xz9x"}],"lmV0":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"};exports.default=e;
},{}],"yZx6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.METERS_PER_UNIT=void 0;var E={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},e={};exports.METERS_PER_UNIT=e,e[E.DEGREES]=2*Math.PI*6370997/360,e[E.FEET]=.3048,e[E.METERS]=1,e[E.USFEET]=1200/3937;var t=E;exports.default=t;
},{}],"cuLW":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={ANIMATING:0,INTERACTING:1};exports.default=e;
},{}],"cE7c":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};exports.default=e;
},{}],"mOEX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_TILE_SIZE=exports.DEFAULT_MAX_ZOOM=void 0;var e=42;exports.DEFAULT_MAX_ZOOM=e;var r=256;exports.DEFAULT_TILE_SIZE=r;
},{}],"WUar":[function(require,module,exports) {
var global = arguments[3];
var t=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("./Units.js"),n=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||e.METERS_PER_UNIT[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}(),i=n;exports.default=i;
},{"./Units.js":"yZx6"}],"lohs":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.fromEPSG4326=E,exports.toEPSG4326=f,exports.PROJECTIONS=exports.MAX_SAFE_Y=exports.WORLD_EXTENT=exports.EXTENT=exports.HALF_SIZE=exports.RADIUS=void 0;var t=o(require("./Projection.js")),r=o(require("./Units.js")),e=require("../math.js");function o(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])})(r,e)};return function(r,e){function o(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),a=6378137;exports.RADIUS=a;var s=Math.PI*a;exports.HALF_SIZE=s;var u=[-s,-s,s,s];exports.EXTENT=u;var i=[-180,-85,180,85];exports.WORLD_EXTENT=i;var p=a*Math.log(Math.tan(Math.PI/2));exports.MAX_SAFE_Y=p;var c=function(t){function o(o){return t.call(this,{code:o,units:r.default.METERS,extent:u,global:!0,worldExtent:i,getPointResolution:function(t,r){return t/(0,e.cosh)(r[1]/a)}})||this}return n(o,t),o}(t.default),l=[new c("EPSG:3857"),new c("EPSG:102100"),new c("EPSG:102113"),new c("EPSG:900913"),new c("http://www.opengis.net/gml/srs/epsg.xml#3857")];function E(t,r,e){var o=t.length,n=e>1?e:2,u=r;void 0===u&&(u=n>2?t.slice():new Array(o));for(var i=0;i<o;i+=n){u[i]=s*t[i]/180;var c=a*Math.log(Math.tan(Math.PI*(+t[i+1]+90)/360));c>p?c=p:c<-p&&(c=-p),u[i+1]=c}return u}function f(t,r,e){var o=t.length,n=e>1?e:2,u=r;void 0===u&&(u=n>2?t.slice():new Array(o));for(var i=0;i<o;i+=n)u[i]=180*t[i]/s,u[i+1]=360*Math.atan(Math.exp(t[i+1]/a))/Math.PI-90;return u}exports.PROJECTIONS=l;
},{"./Projection.js":"WUar","./Units.js":"yZx6","../math.js":"B96G"}],"ZniN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PROJECTIONS=exports.METERS_PER_UNIT=exports.EXTENT=exports.RADIUS=void 0;var t=r(require("./Projection.js")),e=r(require("./Units.js"));function r(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),o=6378137;exports.RADIUS=o;var s=[-180,-90,180,90];exports.EXTENT=s;var u=Math.PI*o/180;exports.METERS_PER_UNIT=u;var i=function(t){function r(r,n){return t.call(this,{code:r,units:e.default.DEGREES,extent:s,axisOrientation:n,global:!0,metersPerUnit:u,worldExtent:s})||this}return n(r,t),r}(t.default),c=[new i("CRS:84"),new i("EPSG:4326","neu"),new i("urn:ogc:def:crs:OGC:1.3:CRS84"),new i("urn:ogc:def:crs:OGC:2:84"),new i("http://www.opengis.net/gml/srs/epsg.xml#4326","neu")];exports.PROJECTIONS=c;
},{"./Projection.js":"WUar","./Units.js":"yZx6"}],"tlE8":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.clear=r,exports.get=t,exports.add=n;var e={};function r(){e={}}function t(r){return e[r]||e[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function n(r,t){e[r]=t}
},{}],"uhlP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.clear=r,exports.add=o,exports.remove=n,exports.get=i;var e=require("../obj.js"),t={};function r(){t={}}function o(e,r,o){var n=e.getCode(),i=r.getCode();n in t||(t[n]={}),t[n][i]=o}function n(r,o){var n=r.getCode(),i=o.getCode(),d=t[n][i];return delete t[n][i],(0,e.isEmpty)(t[n])&&delete t[n],d}function i(e,r){var o;return e in t&&r in t[e]&&(o=t[e][r]),o}
},{"../obj.js":"mH6q"}],"q4ER":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDistance=s,exports.getLength=n,exports.getArea=u,exports.offset=h,exports.DEFAULT_RADIUS=void 0;var e=a(require("./geom/GeometryType.js")),t=require("./math.js");function a(e){return e&&e.__esModule?e:{default:e}}var r=6371008.8;function s(e,a,s){var o=s||r,n=(0,t.toRadians)(e[1]),i=(0,t.toRadians)(a[1]),u=(i-n)/2,h=(0,t.toRadians)(a[0]-e[0])/2,f=Math.sin(u)*Math.sin(u)+Math.sin(h)*Math.sin(h)*Math.cos(n)*Math.cos(i);return 2*o*Math.atan2(Math.sqrt(f),Math.sqrt(1-f))}function o(e,t){for(var a=0,r=0,o=e.length;r<o-1;++r)a+=s(e[r],e[r+1],t);return a}function n(t,a){var s=a||{},i=s.radius||r,u=s.projection||"EPSG:3857",h=t.getType();h!==e.default.GEOMETRY_COLLECTION&&(t=t.clone().transform(u,"EPSG:4326"));var f,d,M,c,l,g,I=0;switch(h){case e.default.POINT:case e.default.MULTI_POINT:break;case e.default.LINE_STRING:case e.default.LINEAR_RING:I=o(f=t.getCoordinates(),i);break;case e.default.MULTI_LINE_STRING:case e.default.POLYGON:for(M=0,c=(f=t.getCoordinates()).length;M<c;++M)I+=o(f[M],i);break;case e.default.MULTI_POLYGON:for(M=0,c=(f=t.getCoordinates()).length;M<c;++M)for(l=0,g=(d=f[M]).length;l<g;++l)I+=o(d[l],i);break;case e.default.GEOMETRY_COLLECTION:var L=t.getGeometries();for(M=0,c=L.length;M<c;++M)I+=n(L[M],a);break;default:throw new Error("Unsupported geometry type: "+h)}return I}function i(e,a){for(var r=0,s=e.length,o=e[s-1][0],n=e[s-1][1],i=0;i<s;i++){var u=e[i][0],h=e[i][1];r+=(0,t.toRadians)(u-o)*(2+Math.sin((0,t.toRadians)(n))+Math.sin((0,t.toRadians)(h))),o=u,n=h}return r*a*a/2}function u(t,a){var s=a||{},o=s.radius||r,n=s.projection||"EPSG:3857",h=t.getType();h!==e.default.GEOMETRY_COLLECTION&&(t=t.clone().transform(n,"EPSG:4326"));var f,d,M,c,l,g,I=0;switch(h){case e.default.POINT:case e.default.MULTI_POINT:case e.default.LINE_STRING:case e.default.MULTI_LINE_STRING:case e.default.LINEAR_RING:break;case e.default.POLYGON:for(f=t.getCoordinates(),I=Math.abs(i(f[0],o)),M=1,c=f.length;M<c;++M)I-=Math.abs(i(f[M],o));break;case e.default.MULTI_POLYGON:for(M=0,c=(f=t.getCoordinates()).length;M<c;++M)for(d=f[M],I+=Math.abs(i(d[0],o)),l=1,g=d.length;l<g;++l)I-=Math.abs(i(d[l],o));break;case e.default.GEOMETRY_COLLECTION:var L=t.getGeometries();for(M=0,c=L.length;M<c;++M)I+=u(L[M],a);break;default:throw new Error("Unsupported geometry type: "+h)}return I}function h(e,a,s,o){var n=o||r,i=(0,t.toRadians)(e[1]),u=(0,t.toRadians)(e[0]),h=a/n,f=Math.asin(Math.sin(i)*Math.cos(h)+Math.cos(i)*Math.sin(h)*Math.cos(s)),d=u+Math.atan2(Math.sin(s)*Math.sin(h)*Math.cos(i),Math.cos(h)-Math.sin(i)*Math.sin(f));return[(0,t.toDegrees)(d),(0,t.toDegrees)(f)]}exports.DEFAULT_RADIUS=r;
},{"./geom/GeometryType.js":"lmV0","./math.js":"B96G"}],"Diht":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.cloneTransform=l,exports.identityTransform=E,exports.addProjection=g,exports.addProjections=P,exports.get=x,exports.getPointResolution=j,exports.addEquivalentProjections=v,exports.addEquivalentTransforms=m,exports.clearAllProjections=T,exports.createProjection=S,exports.createTransformFromCoordinateTransform=O,exports.addCoordinateTransforms=U,exports.fromLonLat=y,exports.toLonLat=h,exports.equivalent=R,exports.getTransformFromProjections=C,exports.getTransform=_,exports.transform=q,exports.transformExtent=G,exports.transformWithProjections=M,exports.setUserProjection=I,exports.clearUserProjection=N,exports.getUserProjection=W,exports.useGeographic=D,exports.toUserCoordinate=w,exports.fromUserCoordinate=J,exports.toUserExtent=L,exports.fromUserExtent=A,exports.createSafeCoordinateTransform=F,exports.addCommon=k,Object.defineProperty(exports,"Projection",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"METERS_PER_UNIT",{enumerable:!0,get:function(){return r.METERS_PER_UNIT}});var e=d(require("./proj/Projection.js")),r=p(require("./proj/Units.js")),t=require("./proj/epsg3857.js"),n=require("./proj/epsg4326.js"),o=require("./proj/projections.js"),i=require("./proj/transforms.js"),u=require("./extent.js"),s=require("./math.js"),a=require("./sphere.js"),f=require("./coordinate.js");function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=c();if(r&&r.has(e))return r.get(e);var t={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(t,o,i):t[o]=e[o]}return t.default=e,r&&r.set(e,t),t}function d(e){return e&&e.__esModule?e:{default:e}}function l(e,r,t){var n;if(void 0!==r){for(var o=0,i=e.length;o<i;++o)r[o]=e[o];n=r}else n=e.slice();return n}function E(e,r,t){if(void 0!==r&&e!==r){for(var n=0,o=e.length;n<o;++n)r[n]=e[n];e=r}return e}function g(e){(0,o.add)(e.getCode(),e),(0,i.add)(e,e,l)}function P(e){e.forEach(g)}function x(e){return"string"==typeof e?(0,o.get)(e):e||null}function j(e,t,n,o){var i,u=(e=x(e)).getPointResolutionFunc();if(u){if(i=u(t,n),o&&o!==e.getUnits())(f=e.getMetersPerUnit())&&(i=i*f/r.METERS_PER_UNIT[o])}else{var s=e.getUnits();if(s==r.default.DEGREES&&!o||o==r.default.DEGREES)i=t;else{var f,c=C(e,x("EPSG:4326"));if(c===E&&s!==r.default.DEGREES)i=t*e.getMetersPerUnit();else{var p=[n[0]-t/2,n[1],n[0]+t/2,n[1],n[0],n[1]-t/2,n[0],n[1]+t/2];p=c(p,p,2),i=((0,a.getDistance)(p.slice(0,2),p.slice(2,4))+(0,a.getDistance)(p.slice(4,6),p.slice(6,8)))/2}void 0!==(f=o?r.METERS_PER_UNIT[o]:e.getMetersPerUnit())&&(i/=f)}}return i}function v(e){P(e),e.forEach(function(r){e.forEach(function(e){r!==e&&(0,i.add)(r,e,l)})})}function m(e,r,t,n){e.forEach(function(e){r.forEach(function(r){(0,i.add)(e,r,t),(0,i.add)(r,e,n)})})}function T(){(0,o.clear)(),(0,i.clear)()}function S(e,r){return e?"string"==typeof e?x(e):e:x(r)}function O(e){return function(r,t,n){for(var o=r.length,i=void 0!==n?n:2,u=void 0!==t?t:new Array(o),s=0;s<o;s+=i){var a=e([r[s],r[s+1]]);u[s]=a[0],u[s+1]=a[1];for(var f=i-1;f>=2;--f)u[s+f]=r[s+f]}return u}}function U(e,r,t,n){var o=x(e),u=x(r);(0,i.add)(o,u,O(t)),(0,i.add)(u,o,O(n))}function y(e,r){return q(e,"EPSG:4326",void 0!==r?r:"EPSG:3857")}function h(e,r){var t=q(e,void 0!==r?r:"EPSG:3857","EPSG:4326"),n=t[0];return(n<-180||n>180)&&(t[0]=(0,s.modulo)(n+180,360)-180),t}function R(e,r){if(e===r)return!0;var t=e.getUnits()===r.getUnits();return e.getCode()===r.getCode()?t:C(e,r)===l&&t}function C(e,r){var t=e.getCode(),n=r.getCode(),o=(0,i.get)(t,n);return o||(o=E),o}function _(e,r){return C(x(e),x(r))}function q(e,r,t){return _(r,t)(e,void 0,e.length)}function G(e,r,t,n){var o=_(r,t);return(0,u.applyTransform)(e,o,void 0,n)}function M(e,r,t){return C(r,t)(e)}var b=null;function I(e){b=x(e)}function N(){b=null}function W(){return b}function D(){I("EPSG:4326")}function w(e,r){return b?q(e,r,b):e}function J(e,r){return b?q(e,b,r):e}function L(e,r){return b?G(e,r,b):e}function A(e,r){return b?G(e,b,r):e}function F(e,r,t){return function(n){var o,i,a=n[0],c=n[1];if(e.canWrapX()){var p=e.getExtent(),d=(0,u.getWidth)(p);(i=(0,f.getWorldsAway)(n,e,d))&&(a-=i*d),a=(0,s.clamp)(a,p[0],p[2]),c=(0,s.clamp)(c,p[1],p[3]),o=t([a,c])}else o=t(n);return i&&r.canWrapX()&&(o[0]+=i*(0,u.getWidth)(r.getExtent())),o}}function k(){v(t.PROJECTIONS),v(n.PROJECTIONS),m(n.PROJECTIONS,t.PROJECTIONS,t.fromEPSG4326,t.toEPSG4326)}k();
},{"./proj/Projection.js":"WUar","./proj/Units.js":"yZx6","./proj/epsg3857.js":"lohs","./proj/epsg4326.js":"ZniN","./proj/projections.js":"tlE8","./proj/transforms.js":"uhlP","./extent.js":"QDir","./math.js":"B96G","./sphere.js":"q4ER","./coordinate.js":"nGsj"}],"Rc7z":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createExtent=a,exports.none=e;var t=require("./math.js");function a(a,e,r){return function(n,o,u,h,M){if(n){var c=e?0:u[0]*o,l=e?0:u[1]*o,x=M?M[0]:0,i=M?M[1]:0,m=a[0]+c/2+x,s=a[2]-c/2+x,p=a[1]+l/2+i,f=a[3]-l/2+i;m>s&&(s=m=(s+m)/2),p>f&&(f=p=(f+p)/2);var g=(0,t.clamp)(n[0],m,s),v=(0,t.clamp)(n[1],p,f),d=30*o;return h&&r&&(g+=-d*Math.log(1+Math.max(0,m-n[0])/d)+d*Math.log(1+Math.max(0,n[0]-s)/d),v+=-d*Math.log(1+Math.max(0,p-n[1])/d)+d*Math.log(1+Math.max(0,n[1]-f)/d)),[g,v]}}}function e(t){return t}
},{"./math.js":"B96G"}],"o7nl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createSnapToResolutions=i,exports.createSnapToPower=o,exports.createMinMaxResolution=h;var t=require("./math.js"),a=require("./extent.js"),r=require("./array.js");function e(t,r,e,n){var i=(0,a.getWidth)(r)/e[0],o=(0,a.getHeight)(r)/e[1];return n?Math.min(t,Math.max(i,o)):Math.min(t,Math.min(i,o))}function n(a,r,e){var n=Math.min(a,r);return n*=Math.log(1+50*Math.max(0,a/r-1))/50+1,e&&(n=Math.max(n,e),n/=Math.log(1+50*Math.max(0,e/a-1))/50+1),(0,t.clamp)(n,e/2,2*r)}function i(a,i,o,h){return function(u,M,l,c){if(void 0!==u){var m=a[0],f=a[a.length-1],v=o?e(m,o,l,h):m;if(c)return void 0===i||i?n(u,v,f):(0,t.clamp)(u,f,v);var s=Math.min(v,u),p=Math.floor((0,r.linearFindNearest)(a,s,M));return a[p]>v&&p<a.length-1?a[p+1]:a[p]}}}function o(a,r,i,o,h,u){return function(M,l,c,m){if(void 0!==M){var f=h?e(r,h,c,u):r,v=void 0!==i?i:0;if(m)return void 0===o||o?n(M,f,v):(0,t.clamp)(M,v,f);var s=Math.ceil(Math.log(r/f)/Math.log(a)-1e-9),p=-l*(.5-1e-9)+.5,d=Math.min(f,M),g=Math.floor(Math.log(r/d)/Math.log(a)+p),x=Math.max(s,g),j=r/Math.pow(a,x);return(0,t.clamp)(j,v,f)}}}function h(a,r,i,o,h){return function(u,M,l,c){if(void 0!==u){var m=o?e(a,o,l,h):a;return(void 0===i||i)&&c?n(u,m,r):(0,t.clamp)(u,r,m)}}}
},{"./math.js":"B96G","./extent.js":"QDir","./array.js":"luEr"}],"EKd0":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.disable=e,exports.none=o,exports.createSnapToN=t,exports.createSnapToZero=n;var r=require("./math.js");function e(r){return void 0!==r?0:void 0}function o(r){return void 0!==r?r:void 0}function t(r){var e=2*Math.PI/r;return function(r,o){return o?r:void 0!==r?r=Math.floor(r/e+.5)*e:void 0}}function n(e){var o=e||(0,r.toRadians)(5);return function(r,e){return e?r:void 0!==r?Math.abs(r)<=o?0:r:void 0}}
},{"./math.js":"B96G"}],"IeCz":[function(require,module,exports) {
"use strict";function e(e){return Math.pow(e,3)}function t(t){return 1-e(1-t)}function n(e){return 3*e*e-2*e*e*e}function r(e){return e}function u(e){return e<.5?n(2*e):1-n(2*(e-.5))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.easeIn=e,exports.easeOut=t,exports.inAndOut=n,exports.linear=r,exports.upAndDown=u;
},{}],"Utvi":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};exports.default=e;
},{}],"LGwr":[function(require,module,exports) {
"use strict";function r(r,t,e,n,o,a){for(var f=a||[],s=0,l=t;l<e;l+=n){var u=r[l],v=r[l+1];f[s++]=o[0]*u+o[2]*v+o[4],f[s++]=o[1]*u+o[3]*v+o[5]}return a&&f.length!=s&&(f.length=s),f}function t(r,t,e,n,o,a,f){for(var s=f||[],l=Math.cos(o),u=Math.sin(o),v=a[0],h=a[1],c=0,g=t;g<e;g+=n){var i=r[g]-v,p=r[g+1]-h;s[c++]=v+i*l-p*u,s[c++]=h+i*u+p*l;for(var x=g+2;x<g+n;++x)s[c++]=r[x]}return f&&s.length!=c&&(s.length=c),s}function e(r,t,e,n,o,a,f,s){for(var l=s||[],u=f[0],v=f[1],h=0,c=t;c<e;c+=n){var g=r[c]-u,i=r[c+1]-v;l[h++]=u+o*g,l[h++]=v+a*i;for(var p=c+2;p<c+n;++p)l[h++]=r[p]}return s&&l.length!=h&&(l.length=h),l}function n(r,t,e,n,o,a,f){for(var s=f||[],l=0,u=t;u<e;u+=n){s[l++]=r[u]+o,s[l++]=r[u+1]+a;for(var v=u+2;v<u+n;++v)s[l++]=r[v]}return f&&s.length!=l&&(s.length=l),s}Object.defineProperty(exports,"__esModule",{value:!0}),exports.transform2D=r,exports.rotate=t,exports.scale=e,exports.translate=n;
},{}],"F8sI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=p(require("../Object.js")),e=p(require("../proj/Units.js")),r=require("../util.js"),n=require("../transform.js"),o=require("../extent.js"),i=require("../proj.js"),s=require("../functions.js"),a=require("./flat/transform.js");function p(t){return t&&t.__esModule?t:{default:t}}var u=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),c=(0,n.create)(),f=function(t){function p(){var e=t.call(this)||this;return e.extent_=(0,o.createEmpty)(),e.extentRevision_=-1,e.simplifiedGeometryMaxMinSquaredTolerance=0,e.simplifiedGeometryRevision=0,e.simplifyTransformedInternal=(0,s.memoizeOne)(function(t,e,r){if(!r)return this.getSimplifiedGeometry(e);var n=this.clone();return n.applyTransform(r),n.getSimplifiedGeometry(e)}),e}return u(p,t),p.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},p.prototype.clone=function(){return(0,r.abstract)()},p.prototype.closestPointXY=function(t,e,n,o){return(0,r.abstract)()},p.prototype.containsXY=function(t,e){var r=this.getClosestPoint([t,e]);return r[0]===t&&r[1]===e},p.prototype.getClosestPoint=function(t,e){var r=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],r,1/0),r},p.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},p.prototype.computeExtent=function(t){return(0,r.abstract)()},p.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&(0,o.createOrUpdateEmpty)(e),this.extentRevision_=this.getRevision()}return(0,o.returnOrUpdate)(this.extent_,t)},p.prototype.rotate=function(t,e){(0,r.abstract)()},p.prototype.scale=function(t,e,n){(0,r.abstract)()},p.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},p.prototype.getSimplifiedGeometry=function(t){return(0,r.abstract)()},p.prototype.getType=function(){return(0,r.abstract)()},p.prototype.applyTransform=function(t){(0,r.abstract)()},p.prototype.intersectsExtent=function(t){return(0,r.abstract)()},p.prototype.translate=function(t,e){(0,r.abstract)()},p.prototype.transform=function(t,r){var s=(0,i.get)(t),p=s.getUnits()==e.default.TILE_PIXELS?function(t,e,p){var u=s.getExtent(),f=s.getWorldExtent(),l=(0,o.getHeight)(f)/(0,o.getHeight)(u);return(0,n.compose)(c,f[0],f[3],l,-l,0,0,0),(0,a.transform2D)(t,0,t.length,p,c,e),(0,i.getTransform)(s,r)(t,e,p)}:(0,i.getTransform)(s,r);return this.applyTransform(p),this},p}(t.default),l=f;exports.default=l;
},{"../Object.js":"PhPh","../proj/Units.js":"yZx6","../util.js":"KniQ","../transform.js":"P4eA","../extent.js":"QDir","../proj.js":"Diht","../functions.js":"RgA2","./flat/transform.js":"LGwr"}],"pnrv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStrideForLayout=l,exports.transformGeom2D=f,exports.default=void 0;var t=n(require("./Geometry.js")),e=n(require("./GeometryLayout.js")),r=require("../util.js"),i=require("../extent.js"),o=require("./flat/transform.js");function n(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),s=function(t){function n(){var r=t.call(this)||this;return r.layout=e.default.XY,r.stride=2,r.flatCoordinates=null,r}return a(n,t),n.prototype.computeExtent=function(t){return(0,i.createOrUpdateFromFlatCoordinates)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},n.prototype.getCoordinates=function(){return(0,r.abstract)()},n.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},n.prototype.getFlatCoordinates=function(){return this.flatCoordinates},n.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},n.prototype.getLayout=function(){return this.layout},n.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},n.prototype.getSimplifiedGeometryInternal=function(t){return this},n.prototype.getStride=function(){return this.stride},n.prototype.setFlatCoordinates=function(t,e){this.stride=l(t),this.layout=t,this.flatCoordinates=e},n.prototype.setCoordinates=function(t,e){(0,r.abstract)()},n.prototype.setLayout=function(t,r,i){var o;if(t)o=l(t);else{for(var n=0;n<i;++n){if(0===r.length)return this.layout=e.default.XY,void(this.stride=2);r=r[0]}t=u(o=r.length)}this.layout=t,this.stride=o},n.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},n.prototype.rotate=function(t,e){var r=this.getFlatCoordinates();if(r){var i=this.getStride();(0,o.rotate)(r,0,r.length,i,t,e,r),this.changed()}},n.prototype.scale=function(t,e,r){var n=e;void 0===n&&(n=t);var a=r;a||(a=(0,i.getCenter)(this.getExtent()));var s=this.getFlatCoordinates();if(s){var u=this.getStride();(0,o.scale)(s,0,s.length,u,t,n,a,s),this.changed()}},n.prototype.translate=function(t,e){var r=this.getFlatCoordinates();if(r){var i=this.getStride();(0,o.translate)(r,0,r.length,i,t,e,r),this.changed()}},n}(t.default);function u(t){var r;return 2==t?r=e.default.XY:3==t?r=e.default.XYZ:4==t&&(r=e.default.XYZM),r}function l(t){var r;return t==e.default.XY?r=2:t==e.default.XYZ||t==e.default.XYM?r=3:t==e.default.XYZM&&(r=4),r}function f(t,e,r){var i=t.getFlatCoordinates();if(i){var n=t.getStride();return(0,o.transform2D)(i,0,i.length,n,e,r)}return null}var d=s;exports.default=d;
},{"./Geometry.js":"F8sI","./GeometryLayout.js":"Utvi","../util.js":"KniQ","../extent.js":"QDir","./flat/transform.js":"LGwr"}],"rMra":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.maxSquaredDelta=t,exports.arrayMaxSquaredDelta=a,exports.multiArrayMaxSquaredDelta=n,exports.assignClosestPoint=s,exports.assignClosestArrayPoint=o,exports.assignClosestMultiArrayPoint=i;var r=require("../../math.js");function e(e,t,a,n,s,o,i){var u,f=e[t],l=e[t+1],v=e[a]-f,h=e[a+1]-l;if(0===v&&0===h)u=t;else{var g=((s-f)*v+(o-l)*h)/(v*v+h*h);if(g>1)u=a;else{if(g>0){for(var c=0;c<n;++c)i[c]=(0,r.lerp)(e[t+c],e[a+c],g);return void(i.length=n)}u=t}}for(c=0;c<n;++c)i[c]=e[u+c];i.length=n}function t(e,t,a,n,s){var o=e[t],i=e[t+1];for(t+=n;t<a;t+=n){var u=e[t],f=e[t+1],l=(0,r.squaredDistance)(o,i,u,f);l>s&&(s=l),o=u,i=f}return s}function a(r,e,a,n,s){for(var o=0,i=a.length;o<i;++o){var u=a[o];s=t(r,e,u,n,s),e=u}return s}function n(r,e,t,n,s){for(var o=0,i=t.length;o<i;++o){var u=t[o];s=a(r,e,u,n,s),e=u[u.length-1]}return s}function s(t,a,n,s,o,i,u,f,l,v,h){if(a==n)return v;var g,c;if(0===o){if((c=(0,r.squaredDistance)(u,f,t[a],t[a+1]))<v){for(g=0;g<s;++g)l[g]=t[a+g];return l.length=s,c}return v}for(var N=h||[NaN,NaN],x=a+s;x<n;)if(e(t,x-s,x,s,u,f,N),(c=(0,r.squaredDistance)(u,f,N[0],N[1]))<v){for(v=c,g=0;g<s;++g)l[g]=N[g];l.length=s,x+=s}else x+=s*Math.max((Math.sqrt(c)-Math.sqrt(v))/o|0,1);if(i&&(e(t,n-s,a,s,u,f,N),(c=(0,r.squaredDistance)(u,f,N[0],N[1]))<v)){for(v=c,g=0;g<s;++g)l[g]=N[g];l.length=s}return v}function o(r,e,t,a,n,o,i,u,f,l,v){for(var h=v||[NaN,NaN],g=0,c=t.length;g<c;++g){var N=t[g];l=s(r,e,N,a,n,o,i,u,f,l,h),e=N}return l}function i(r,e,t,a,n,s,i,u,f,l,v){for(var h=v||[NaN,NaN],g=0,c=t.length;g<c;++g){var N=t[g];l=o(r,e,N,a,n,s,i,u,f,l,h),e=N[N.length-1]}return l}
},{"../../math.js":"B96G"}],"FNhl":[function(require,module,exports) {
"use strict";function e(e,r,t,n){for(var o=0,a=t.length;o<a;++o)e[r++]=t[o];return r}function r(e,r,t,n){for(var o=0,a=t.length;o<a;++o)for(var f=t[o],l=0;l<n;++l)e[r++]=f[l];return r}function t(e,t,n,o,a){for(var f=a||[],l=0,u=0,i=n.length;u<i;++u){var s=r(e,t,n[u],o);f[l++]=s,t=s}return f.length=l,f}function n(e,r,n,o,a){for(var f=a||[],l=0,u=0,i=n.length;u<i;++u){var s=t(e,r,n[u],o,f[l]);f[l++]=s,r=s[s.length-1]}return f.length=l,f}Object.defineProperty(exports,"__esModule",{value:!0}),exports.deflateCoordinate=e,exports.deflateCoordinates=r,exports.deflateCoordinatesArray=t,exports.deflateMultiCoordinatesArray=n;
},{}],"IEpt":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.simplifyLineString=e,exports.douglasPeucker=t,exports.douglasPeuckerArray=n,exports.douglasPeuckerMultiArray=u,exports.radialDistance=a,exports.snap=o,exports.quantize=i,exports.quantizeArray=s,exports.quantizeMultiArray=f;var r=require("../../math.js");function e(r,e,n,u,o,i,s){var f=void 0!==s?s:[];return i||(n=a(r,e,n,u,o,f,0),r=f,e=0,u=2),f.length=t(r,e,n,u,o,f,0),f}function t(e,t,n,u,a,o,i){var s=(n-t)/u;if(s<3){for(;t<n;t+=u)o[i++]=e[t],o[i++]=e[t+1];return i}var f=new Array(s);f[0]=1,f[s-1]=1;for(var p=[t,n-u],v=0;p.length>0;){for(var l=p.pop(),c=p.pop(),h=0,g=e[c],d=e[c+1],x=e[l],y=e[l+1],q=c+u;q<l;q+=u){var A=e[q],M=e[q+1],P=(0,r.squaredSegmentDistance)(A,M,g,d,x,y);P>h&&(v=q,h=P)}h>a&&(f[(v-t)/u]=1,c+u<v&&p.push(c,v),v+u<l&&p.push(v,l))}for(q=0;q<s;++q)f[q]&&(o[i++]=e[t+q*u],o[i++]=e[t+q*u+1]);return i}function n(r,e,n,u,a,o,i,s){for(var f=0,p=n.length;f<p;++f){var v=n[f];i=t(r,e,v,u,a,o,i),s.push(i),e=v}return i}function u(r,e,t,u,a,o,i,s){for(var f=0,p=t.length;f<p;++f){var v=t[f],l=[];i=n(r,e,v,u,a,o,i,l),s.push(l),e=v[v.length-1]}return i}function a(e,t,n,u,a,o,i){if(n<=t+u){for(;t<n;t+=u)o[i++]=e[t],o[i++]=e[t+1];return i}var s=e[t],f=e[t+1];o[i++]=s,o[i++]=f;var p=s,v=f;for(t+=u;t<n;t+=u)p=e[t],v=e[t+1],(0,r.squaredDistance)(s,f,p,v)>a&&(o[i++]=p,o[i++]=v,s=p,f=v);return p==s&&v==f||(o[i++]=p,o[i++]=v),i}function o(r,e){return e*Math.round(r/e)}function i(r,e,t,n,u,a,i){if(e==t)return i;var s,f,p=o(r[e],u),v=o(r[e+1],u);e+=n,a[i++]=p,a[i++]=v;do{if(s=o(r[e],u),f=o(r[e+1],u),(e+=n)==t)return a[i++]=s,a[i++]=f,i}while(s==p&&f==v);for(;e<t;){var l=o(r[e],u),c=o(r[e+1],u);if(e+=n,l!=s||c!=f){var h=s-p,g=f-v,d=l-p,x=c-v;h*x==g*d&&(h<0&&d<h||h==d||h>0&&d>h)&&(g<0&&x<g||g==x||g>0&&x>g)?(s=l,f=c):(a[i++]=s,a[i++]=f,p=s,v=f,s=l,f=c)}}return a[i++]=s,a[i++]=f,i}function s(r,e,t,n,u,a,o,s){for(var f=0,p=t.length;f<p;++f){var v=t[f];o=i(r,e,v,n,u,a,o),s.push(o),e=v}return o}function f(r,e,t,n,u,a,o,i){for(var f=0,p=t.length;f<p;++f){var v=t[f],l=[];o=s(r,e,v,n,u,a,o,l),i.push(l),e=v[v.length-1]}return o}
},{"../../math.js":"B96G"}],"znXl":[function(require,module,exports) {
"use strict";function e(e,r,t,n,o){for(var i=void 0!==o?o:[],a=0,l=r;l<t;l+=n)i[a++]=e.slice(l,l+n);return i.length=a,i}function r(r,t,n,o,i){for(var a=void 0!==i?i:[],l=0,s=0,f=n.length;s<f;++s){var u=n[s];a[l++]=e(r,t,u,o,a[l]),t=u}return a.length=l,a}function t(e,t,n,o,i){for(var a=void 0!==i?i:[],l=0,s=0,f=n.length;s<f;++s){var u=n[s];a[l++]=r(e,t,u,o,a[l]),t=u[u.length-1]}return a.length=l,a}Object.defineProperty(exports,"__esModule",{value:!0}),exports.inflateCoordinates=e,exports.inflateCoordinatesArray=r,exports.inflateMultiCoordinatesArray=t;
},{}],"EOSm":[function(require,module,exports) {
"use strict";function r(r,e,n,t){for(var o=0,i=r[n-t],a=r[n-t+1];e<n;e+=t){var s=r[e],u=r[e+1];o+=a*s-i*u,i=s,a=u}return o/2}function e(e,n,t,o){for(var i=0,a=0,s=t.length;a<s;++a){var u=t[a];i+=r(e,n,u,o),n=u}return i}function n(r,n,t,o){for(var i=0,a=0,s=t.length;a<s;++a){var u=t[a];i+=e(r,n,u,o),n=u[u.length-1]}return i}Object.defineProperty(exports,"__esModule",{value:!0}),exports.linearRing=r,exports.linearRings=e,exports.linearRingss=n;
},{}],"jRgU":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=u(require("./GeometryLayout.js")),e=u(require("./GeometryType.js")),o=u(require("./SimpleGeometry.js")),r=require("./flat/closest.js"),i=require("../extent.js"),s=require("./flat/deflate.js"),n=require("./flat/simplify.js"),a=require("./flat/inflate.js"),l=require("./flat/area.js");function u(t){return t&&t.__esModule?t:{default:t}}var f=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),d=function(o){function u(t,e){var r=o.call(this)||this;return r.maxDelta_=-1,r.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?r.setCoordinates(t,e):r.setFlatCoordinates(e,t),r}return f(u,o),u.prototype.clone=function(){return new u(this.flatCoordinates.slice(),this.layout)},u.prototype.closestPointXY=function(t,e,o,s){return s<(0,i.closestSquaredDistanceXY)(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,r.maxSquaredDelta)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,r.assignClosestPoint)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,o,s))},u.prototype.getArea=function(){return(0,l.linearRing)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},u.prototype.getCoordinates=function(){return(0,a.inflateCoordinates)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},u.prototype.getSimplifiedGeometryInternal=function(e){var o=[];return o.length=(0,n.douglasPeucker)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,o,0),new u(o,t.default.XY)},u.prototype.getType=function(){return e.default.LINEAR_RING},u.prototype.intersectsExtent=function(t){return!1},u.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,s.deflateCoordinates)(this.flatCoordinates,0,t,this.stride),this.changed()},u}(o.default),h=d;exports.default=h;
},{"./GeometryLayout.js":"Utvi","./GeometryType.js":"lmV0","./SimpleGeometry.js":"pnrv","./flat/closest.js":"rMra","../extent.js":"QDir","./flat/deflate.js":"FNhl","./flat/simplify.js":"IEpt","./flat/inflate.js":"znXl","./flat/area.js":"EOSm"}],"gLcY":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=i(require("./GeometryType.js")),e=i(require("./SimpleGeometry.js")),o=require("../extent.js"),r=require("./flat/deflate.js"),n=require("../math.js");function i(t){return t&&t.__esModule?t:{default:t}}var s=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),a=function(e){function i(t,o){var r=e.call(this)||this;return r.setCoordinates(t,o),r}return s(i,e),i.prototype.clone=function(){var t=new i(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},i.prototype.closestPointXY=function(t,e,o,r){var i=this.flatCoordinates,s=(0,n.squaredDistance)(t,e,i[0],i[1]);if(s<r){for(var a=this.stride,u=0;u<a;++u)o[u]=i[u];return o.length=a,s}return r},i.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},i.prototype.computeExtent=function(t){return(0,o.createOrUpdateFromCoordinate)(this.flatCoordinates,t)},i.prototype.getType=function(){return t.default.POINT},i.prototype.intersectsExtent=function(t){return(0,o.containsXY)(t,this.flatCoordinates[0],this.flatCoordinates[1])},i.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,r.deflateCoordinate)(this.flatCoordinates,0,t,this.stride),this.changed()},i}(e.default),u=a;exports.default=u;
},{"./GeometryType.js":"lmV0","./SimpleGeometry.js":"pnrv","../extent.js":"QDir","./flat/deflate.js":"FNhl","../math.js":"B96G"}],"dzdN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.linearRingContainsExtent=n,exports.linearRingContainsXY=e,exports.linearRingsContainsXY=t,exports.linearRingssContainsXY=i;var r=require("../../extent.js");function n(n,t,i,o,u){return!(0,r.forEachCorner)(u,function(r){return!e(n,t,i,o,r[0],r[1])})}function e(r,n,e,t,i,o){for(var u=0,a=r[e-t],s=r[e-t+1];n<e;n+=t){var f=r[n],l=r[n+1];s<=o?l>o&&(f-a)*(o-s)-(i-a)*(l-s)>0&&u++:l<=o&&(f-a)*(o-s)-(i-a)*(l-s)<0&&u--,a=f,s=l}return 0!==u}function t(r,n,t,i,o,u){if(0===t.length)return!1;if(!e(r,n,t[0],i,o,u))return!1;for(var a=1,s=t.length;a<s;++a)if(e(r,t[a-1],t[a],i,o,u))return!1;return!0}function i(r,n,e,i,o,u){if(0===e.length)return!1;for(var a=0,s=e.length;a<s;++a){var f=e[a];if(t(r,n,f,i,o,u))return!0;n=f[f.length-1]}return!1}
},{"../../extent.js":"QDir"}],"UDvN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getInteriorPointOfArray=t,exports.getInteriorPointsOfMultiArray=n;var r=require("./contains.js"),e=require("../../array.js");function t(t,n,a,o,i,s,u){for(var f,l,v,g,h,p,c,y=i[s+1],N=[],b=0,j=a.length;b<j;++b){var x=a[b];for(g=t[x-o],p=t[x-o+1],f=n;f<x;f+=o)h=t[f],c=t[f+1],(y<=p&&c<=y||p<=y&&y<=c)&&(v=(y-p)/(c-p)*(h-g)+g,N.push(v)),g=h,p=c}var M=NaN,O=-1/0;for(N.sort(e.numberSafeCompareFunction),g=N[0],f=1,l=N.length;f<l;++f){h=N[f];var P=Math.abs(h-g);P>O&&(v=(g+h)/2,(0,r.linearRingsContainsXY)(t,n,a,o,v,y)&&(M=v,O=P)),g=h}return isNaN(M)&&(M=i[s]),u?(u.push(M,y,O),u):[M,y,O]}function n(r,e,n,a,o){for(var i=[],s=0,u=n.length;s<u;++s){var f=n[s];i=t(r,e,f,a,o,2*s,i),e=f[f.length-1]}return i}
},{"./contains.js":"dzdN","../../array.js":"luEr"}],"U8i0":[function(require,module,exports) {
"use strict";function e(e,r,t,o,u){for(var f,n=[e[r],e[r+1]],s=[];r+o<t;r+=o){if(s[0]=e[r+o],s[1]=e[r+o+1],f=u(n,s))return f;n[0]=s[0],n[1]=s[1]}return!1}Object.defineProperty(exports,"__esModule",{value:!0}),exports.forEach=e;
},{}],"GZir":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.intersectsLineString=t,exports.intersectsLineStringArray=i,exports.intersectsLinearRing=s,exports.intersectsLinearRingArray=a,exports.intersectsLinearRingMultiArray=o;var n=require("../../extent.js"),e=require("./segments.js"),r=require("./contains.js");function t(r,t,i,s,a){var o=(0,n.extendFlatCoordinates)((0,n.createEmpty)(),r,t,i,s);return!!(0,n.intersects)(a,o)&&(!!(0,n.containsExtent)(a,o)||(o[0]>=a[0]&&o[2]<=a[2]||(o[1]>=a[1]&&o[3]<=a[3]||(0,e.forEach)(r,t,i,s,function(e,r){return(0,n.intersectsSegment)(a,e,r)}))))}function i(n,e,r,i,s){for(var a=0,o=r.length;a<o;++a){if(t(n,e,r[a],i,s))return!0;e=r[a]}return!1}function s(n,e,i,s,a){return!!t(n,e,i,s,a)||(!!(0,r.linearRingContainsXY)(n,e,i,s,a[0],a[1])||(!!(0,r.linearRingContainsXY)(n,e,i,s,a[0],a[3])||(!!(0,r.linearRingContainsXY)(n,e,i,s,a[2],a[1])||!!(0,r.linearRingContainsXY)(n,e,i,s,a[2],a[3]))))}function a(n,e,i,a,o){if(!s(n,e,i[0],a,o))return!1;if(1===i.length)return!0;for(var u=1,c=i.length;u<c;++u)if((0,r.linearRingContainsExtent)(n,i[u-1],i[u],a,o)&&!t(n,i[u-1],i[u],a,o))return!1;return!0}function o(n,e,r,t,i){for(var s=0,o=r.length;s<o;++s){var u=r[s];if(a(n,e,u,t,i))return!0;e=u[u.length-1]}return!1}
},{"../../extent.js":"QDir","./segments.js":"U8i0","./contains.js":"dzdN"}],"ElTe":[function(require,module,exports) {
"use strict";function e(e,r,o,t){for(;r<o-t;){for(var s=0;s<t;++s){var a=e[r+s];e[r+s]=e[o-t+s],e[o-t+s]=a}r+=t,o-=t}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.coordinates=e;
},{}],"cJkE":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.linearRingIsClockwise=e,exports.linearRingsAreOriented=n,exports.linearRingssAreOriented=t,exports.orientLinearRings=i,exports.orientLinearRingsArray=o;var r=require("./reverse.js");function e(r,e,n,t){for(var i=0,o=r[n-t],s=r[n-t+1];e<n;e+=t){var a=r[e],u=r[e+1];i+=(a-o)*(u+s),o=a,s=u}return 0===i?void 0:i>0}function n(r,n,t,i,o){for(var s=void 0!==o&&o,a=0,u=t.length;a<u;++a){var f=t[a],v=e(r,n,f,i);if(0===a){if(s&&v||!s&&!v)return!1}else if(s&&!v||!s&&v)return!1;n=f}return!0}function t(r,e,t,i,o){for(var s=0,a=t.length;s<a;++s){var u=t[s];if(!n(r,e,u,i,o))return!1;u.length&&(e=u[u.length-1])}return!0}function i(n,t,i,o,s){for(var a=void 0!==s&&s,u=0,f=i.length;u<f;++u){var v=i[u],l=e(n,t,v,o);(0===u?a&&l||!a&&!l:a&&!l||!a&&l)&&(0,r.coordinates)(n,t,v,o),t=v}return t}function o(r,e,n,t,o){for(var s=0,a=n.length;s<a;++s)e=i(r,e,n[s],t,o);return e}
},{"./reverse.js":"ElTe"}],"Nwwk":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.circular=j,exports.fromExtent=x,exports.fromCircle=P,exports.makeRegular=m,exports.default=void 0;var t=C(require("./GeometryLayout.js")),e=C(require("./GeometryType.js")),i=C(require("./LinearRing.js")),r=C(require("./Point.js")),n=C(require("./SimpleGeometry.js")),s=require("./flat/closest.js"),o=require("../extent.js"),a=require("./flat/deflate.js"),l=require("../array.js"),d=require("./flat/interiorpoint.js"),h=require("./flat/inflate.js"),u=require("./flat/intersectsextent.js"),f=require("./flat/orient.js"),p=require("./flat/area.js"),c=require("./flat/contains.js"),g=require("../math.js"),_=require("./flat/simplify.js"),y=require("../sphere.js");function C(t){return t&&t.__esModule?t:{default:t}}var v=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),R=function(n){function g(t,e,i){var r=n.call(this)||this;return r.ends_=[],r.flatInteriorPointRevision_=-1,r.flatInteriorPoint_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,void 0!==e&&i?(r.setFlatCoordinates(e,t),r.ends_=i):r.setCoordinates(t,e),r}return v(g,n),g.prototype.appendLinearRing=function(t){this.flatCoordinates?(0,l.extend)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},g.prototype.clone=function(){var t=new g(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},g.prototype.closestPointXY=function(t,e,i,r){return r<(0,o.closestSquaredDistanceXY)(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.arrayMaxSquaredDelta)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.assignClosestArrayPoint)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,r))},g.prototype.containsXY=function(t,e){return(0,c.linearRingsContainsXY)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},g.prototype.getArea=function(){return(0,p.linearRings)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},g.prototype.getCoordinates=function(t){var e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,f.orientLinearRings)(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,(0,h.inflateCoordinatesArray)(e,0,this.ends_,this.stride)},g.prototype.getEnds=function(){return this.ends_},g.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=(0,o.getCenter)(this.getExtent());this.flatInteriorPoint_=(0,d.getInteriorPointOfArray)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},g.prototype.getInteriorPoint=function(){return new r.default(this.getFlatInteriorPoint(),t.default.XYM)},g.prototype.getLinearRingCount=function(){return this.ends_.length},g.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new i.default(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},g.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,r=this.ends_,n=[],s=0,o=0,a=r.length;o<a;++o){var l=r[o],d=new i.default(e.slice(s,l),t);n.push(d),s=l}return n},g.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;(0,f.linearRingsAreOriented)(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=(0,f.orientLinearRings)(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},g.prototype.getSimplifiedGeometryInternal=function(e){var i=[],r=[];return i.length=(0,_.quantizeArray)(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),i,0,r),new g(i,t.default.XY,r)},g.prototype.getType=function(){return e.default.POLYGON},g.prototype.intersectsExtent=function(t){return(0,u.intersectsLinearRingArray)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},g.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=(0,a.deflateCoordinatesArray)(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},g}(n.default),q=R;function j(e,i,r,n){for(var s=r||32,o=[],a=0;a<s;++a)(0,l.extend)(o,(0,y.offset)(e,i,2*Math.PI*a/s,n));return o.push(o[0],o[1]),new R(o,t.default.XY,[o.length])}function x(e){var i=e[0],r=e[1],n=e[2],s=e[3],o=[i,r,i,s,n,s,n,r,i,r];return new R(o,t.default.XY,[o.length])}function P(t,e,i){for(var r=e||32,n=t.getStride(),s=t.getLayout(),o=t.getCenter(),a=n*(r+1),l=new Array(a),d=0;d<a;d+=n){l[d]=0,l[d+1]=0;for(var h=2;h<n;h++)l[d+h]=o[h]}var u=[l.length],f=new R(l,s,u);return m(f,o,t.getRadius(),i),f}function m(t,e,i,r){for(var n=t.getFlatCoordinates(),s=t.getStride(),o=n.length/s-1,a=r||0,l=0;l<=o;++l){var d=l*s,h=a+2*(0,g.modulo)(l,o)*Math.PI/o;n[d]=e[0]+i*Math.cos(h),n[d+1]=e[1]+i*Math.sin(h)}t.changed()}exports.default=q;
},{"./GeometryLayout.js":"Utvi","./GeometryType.js":"lmV0","./LinearRing.js":"jRgU","./Point.js":"gLcY","./SimpleGeometry.js":"pnrv","./flat/closest.js":"rMra","../extent.js":"QDir","./flat/deflate.js":"FNhl","../array.js":"luEr","./flat/interiorpoint.js":"UDvN","./flat/inflate.js":"znXl","./flat/intersectsextent.js":"GZir","./flat/orient.js":"cJkE","./flat/area.js":"EOSm","./flat/contains.js":"dzdN","../math.js":"B96G","./flat/simplify.js":"IEpt","../sphere.js":"q4ER"}],"hNqE":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createCenterConstraint=j,exports.createResolutionConstraint=x,exports.createRotationConstraint=A,exports.isNoopAnimation=E,exports.default=void 0;var t=v(require("./Object.js")),e=v(require("./geom/GeometryType.js")),o=v(require("./proj/Units.js")),n=v(require("./ViewHint.js")),i=v(require("./ViewProperty.js")),r=require("./tilegrid/common.js"),s=require("./proj.js"),a=require("./functions.js"),u=require("./coordinate.js"),h=require("./asserts.js"),l=require("./obj.js"),c=require("./centerconstraint.js"),p=require("./math.js"),g=require("./resolutionconstraint.js"),m=require("./rotationconstraint.js"),d=require("./easing.js"),f=require("./extent.js"),_=require("./array.js"),R=require("./geom/Polygon.js");function v(t){return t&&t.__esModule?t:{default:t}}var y=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),C=0,I=function(t){function o(e){var o=t.call(this)||this,n=(0,l.assign)({},e);return o.hints_=[0,0],o.animations_=[],o.updateAnimationKey_,o.projection_=(0,s.createProjection)(n.projection,"EPSG:3857"),o.viewportSize_=[100,100],o.targetCenter_=null,o.targetResolution_,o.targetRotation_,o.cancelAnchor_=void 0,n.center&&(n.center=(0,s.fromUserCoordinate)(n.center,o.projection_)),n.extent&&(n.extent=(0,s.fromUserExtent)(n.extent,o.projection_)),o.applyOptions_(n),o}return y(o,t),o.prototype.applyOptions_=function(t){var e=x(t);this.maxResolution_=e.maxResolution,this.minResolution_=e.minResolution,this.zoomFactor_=e.zoomFactor,this.resolutions_=t.resolutions,this.padding=t.padding,this.minZoom_=e.minZoom;var o=j(t),n=e.constraint,i=A(t);this.constraints_={center:o,resolution:n,rotation:i},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom),this.setProperties({}),this.options_=t},o.prototype.getUpdatedOptions_=function(t){var e=(0,l.assign)({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),(0,l.assign)({},e,t)},o.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),o=0;o<e.length;++o){var n=arguments[o];n.center&&((n=(0,l.assign)({},n)).center=(0,s.fromUserCoordinate)(n.center,this.getProjection())),n.anchor&&((n=(0,l.assign)({},n)).anchor=(0,s.fromUserCoordinate)(n.anchor,this.getProjection())),e[o]=n}this.animateInternal.apply(this,e)},o.prototype.animateInternal=function(t){var e,o=arguments.length;if(o>1&&"function"==typeof arguments[o-1]&&(e=arguments[o-1],--o),!this.isDef()){var i=arguments[o-1];return i.center&&this.setCenterInternal(i.center),void 0!==i.zoom&&this.setZoom(i.zoom),void 0!==i.rotation&&this.setRotation(i.rotation),void(e&&M(e,!0))}for(var r=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,u=this.targetRotation_,h=[],l=0;l<o;++l){var c=arguments[l],g={start:r,complete:!1,anchor:c.anchor,duration:void 0!==c.duration?c.duration:1e3,easing:c.easing||d.inAndOut,callback:e};if(c.center&&(g.sourceCenter=s,g.targetCenter=c.center.slice(),s=g.targetCenter),void 0!==c.zoom?(g.sourceResolution=a,g.targetResolution=this.getResolutionForZoom(c.zoom),a=g.targetResolution):c.resolution&&(g.sourceResolution=a,g.targetResolution=c.resolution,a=g.targetResolution),void 0!==c.rotation){g.sourceRotation=u;var m=(0,p.modulo)(c.rotation-u+Math.PI,2*Math.PI)-Math.PI;g.targetRotation=u+m,u=g.targetRotation}E(g)?g.complete=!0:r+=g.duration,h.push(g)}this.animations_.push(h),this.setHint(n.default.ANIMATING,1),this.updateAnimations_()},o.prototype.getAnimating=function(){return this.hints_[n.default.ANIMATING]>0},o.prototype.getInteracting=function(){return this.hints_[n.default.INTERACTING]>0},o.prototype.cancelAnimations=function(){var t;this.setHint(n.default.ANIMATING,-this.hints_[n.default.ANIMATING]);for(var e=0,o=this.animations_.length;e<o;++e){var i=this.animations_[e];if(i[0].callback&&M(i[0].callback,!1),!t)for(var r=0,s=i.length;r<s;++r){var a=i[r];if(!a.complete){t=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t},o.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,o=this.animations_.length-1;o>=0;--o){for(var i=this.animations_[o],r=!0,s=0,a=i.length;s<a;++s){var u=i[s];if(!u.complete){var h=t-u.start,l=u.duration>0?h/u.duration:1;l>=1?(u.complete=!0,l=1):r=!1;var c=u.easing(l);if(u.sourceCenter){var g=u.sourceCenter[0],m=u.sourceCenter[1],d=g+c*(u.targetCenter[0]-g),f=m+c*(u.targetCenter[1]-m);this.targetCenter_=[d,f]}if(u.sourceResolution&&u.targetResolution){var _=1===c?u.targetResolution:u.sourceResolution+c*(u.targetResolution-u.sourceResolution);if(u.anchor){var R=this.getViewportSize_(this.getRotation()),v=this.constraints_.resolution(_,0,R,!0);this.targetCenter_=this.calculateCenterZoom(v,u.anchor)}this.targetResolution_=_,this.applyTargetState_(!0)}if(void 0!==u.sourceRotation&&void 0!==u.targetRotation){var y=1===c?(0,p.modulo)(u.targetRotation+Math.PI,2*Math.PI)-Math.PI:u.sourceRotation+c*(u.targetRotation-u.sourceRotation);if(u.anchor){var C=this.constraints_.rotation(y,!0);this.targetCenter_=this.calculateCenterRotate(C,u.anchor)}this.targetRotation_=y}if(this.applyTargetState_(!0),e=!0,!u.complete)break}}if(r){this.animations_[o]=null,this.setHint(n.default.ANIMATING,-1);var I=i[0].callback;I&&M(I,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},o.prototype.calculateCenterRotate=function(t,e){var o,n=this.getCenterInternal();return void 0!==n&&(o=[n[0]-e[0],n[1]-e[1]],(0,u.rotate)(o,t-this.getRotation()),(0,u.add)(o,e)),o},o.prototype.calculateCenterZoom=function(t,e){var o,n=this.getCenterInternal(),i=this.getResolution();void 0!==n&&void 0!==i&&(o=[e[0]-t*(e[0]-n[0])/i,e[1]-t*(e[1]-n[1])/i]);return o},o.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var o=e[0],n=e[1];return[Math.abs(o*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(o*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e},o.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},o.prototype.getCenter=function(){var t=this.getCenterInternal();return t?(0,s.toUserCoordinate)(t,this.getProjection()):t},o.prototype.getCenterInternal=function(){return this.get(i.default.CENTER)},o.prototype.getConstraints=function(){return this.constraints_},o.prototype.getConstrainResolution=function(){return this.options_.constrainResolution},o.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},o.prototype.calculateExtent=function(t){var e=this.calculateExtentInternal(t);return(0,s.toUserExtent)(e,this.getProjection())},o.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSize_(),o=this.getCenterInternal();(0,h.assert)(o,1);var n=this.getResolution();(0,h.assert)(void 0!==n,2);var i=this.getRotation();return(0,h.assert)(void 0!==i,3),(0,f.getForViewAndSize)(o,n,i,e)},o.prototype.getMaxResolution=function(){return this.maxResolution_},o.prototype.getMinResolution=function(){return this.minResolution_},o.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},o.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},o.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},o.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},o.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},o.prototype.getProjection=function(){return this.projection_},o.prototype.getResolution=function(){return this.get(i.default.RESOLUTION)},o.prototype.getResolutions=function(){return this.resolutions_},o.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal((0,s.fromUserExtent)(t,this.getProjection()),e)},o.prototype.getResolutionForExtentInternal=function(t,e){var o=e||this.getViewportSize_(),n=(0,f.getWidth)(t)/o[0],i=(0,f.getHeight)(t)/o[1];return Math.max(n,i)},o.prototype.getResolutionForValueFunction=function(t){var e=t||2,o=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,i=Math.log(o/n)/Math.log(e);return function(t){return o/Math.pow(e,t*i)}},o.prototype.getRotation=function(){return this.get(i.default.ROTATION)},o.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),o=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,i=Math.log(o/n)/e;return function(t){return Math.log(o/t)/e/i}},o.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),o=this.padding;return o&&(e=[e[0]-o[1]-o[3],e[1]-o[0]-o[2]]),e},o.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),o=this.getRotation(),n=this.getCenterInternal(),i=this.padding;if(i){var r=this.getViewportSizeMinusPadding_();n=S(n,this.getViewportSize_(),[r[0]/2+i[3],r[1]/2+i[0]],e,o)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,rotation:o,zoom:this.getZoom()}},o.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},o.prototype.getZoomForResolution=function(t){var e,o,n=this.minZoom_||0;if(this.resolutions_){var i=(0,_.linearFindNearest)(this.resolutions_,t,1);n=i,e=this.resolutions_[i],o=i==this.resolutions_.length-1?2:e/this.resolutions_[i+1]}else e=this.maxResolution_,o=this.zoomFactor_;return n+Math.log(e/t)/Math.log(o)},o.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=(0,p.clamp)(Math.floor(t),0,this.resolutions_.length-2),o=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(o,(0,p.clamp)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},o.prototype.fit=function(t,o){var n;if((0,h.assert)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t)){(0,h.assert)(!(0,f.isEmpty)(t),25);var i=(0,s.fromUserExtent)(t,this.getProjection());n=(0,R.fromExtent)(i)}else if(t.getType()===e.default.CIRCLE){i=(0,s.fromUserExtent)(t.getExtent(),this.getProjection());(n=(0,R.fromExtent)(i)).rotate(this.getRotation(),(0,f.getCenter)(i))}else{var r=(0,s.getUserProjection)();n=r?t.clone().transform(r,this.getProjection()):t}this.fitInternal(n,o)},o.prototype.fitInternal=function(t,e){var o=e||{},n=o.size;n||(n=this.getViewportSizeMinusPadding_());var i,r=void 0!==o.padding?o.padding:[0,0,0,0],s=void 0!==o.nearest&&o.nearest;i=void 0!==o.minResolution?o.minResolution:void 0!==o.maxZoom?this.getResolutionForZoom(o.maxZoom):0;for(var u=t.getFlatCoordinates(),h=this.getRotation(),l=Math.cos(-h),c=Math.sin(-h),p=1/0,g=1/0,m=-1/0,d=-1/0,f=t.getStride(),_=0,R=u.length;_<R;_+=f){var v=u[_]*l-u[_+1]*c,y=u[_]*c+u[_+1]*l;p=Math.min(p,v),g=Math.min(g,y),m=Math.max(m,v),d=Math.max(d,y)}var C=this.getResolutionForExtentInternal([p,g,m,d],[n[0]-r[1]-r[3],n[1]-r[0]-r[2]]);C=isNaN(C)?i:Math.max(C,i),C=this.getConstrainedResolution(C,s?0:1),c=-c;var I=(p+m)/2,j=(g+d)/2,x=(I+=(r[1]-r[3])/2*C)*l-(j+=(r[0]-r[2])/2*C)*c,A=j*l+I*c,E=this.getConstrainedCenter([x,A],C),S=o.callback?o.callback:a.VOID;void 0!==o.duration?this.animateInternal({resolution:C,center:E,duration:o.duration,easing:o.easing},S):(this.targetResolution_=C,this.targetCenter_=E,this.applyTargetState_(!1,!0),M(S,!0))},o.prototype.centerOn=function(t,e,o){this.centerOnInternal((0,s.fromUserCoordinate)(t,this.getProjection()),e,o)},o.prototype.centerOnInternal=function(t,e,o){this.setCenterInternal(S(t,e,o,this.getResolution(),this.getRotation()))},o.prototype.calculateCenterShift=function(t,e,o,n){var i,r=this.padding;if(r&&t){var s=this.getViewportSizeMinusPadding_(-o),a=S(t,n,[s[0]/2+r[3],s[1]/2+r[0]],e,o);i=[t[0]-a[0],t[1]-a[1]]}return i},o.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},o.prototype.adjustCenter=function(t){var e=(0,s.toUserCoordinate)(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},o.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},o.prototype.adjustResolution=function(t,e){var o=e&&(0,s.fromUserCoordinate)(e,this.getProjection());this.adjustResolutionInternal(t,o)},o.prototype.adjustResolutionInternal=function(t,e){var o=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(this.targetResolution_*t,0,n,o);e&&(this.targetCenter_=this.calculateCenterZoom(i,e)),this.targetResolution_*=t,this.applyTargetState_()},o.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},o.prototype.adjustRotation=function(t,e){e&&(e=(0,s.fromUserCoordinate)(e,this.getProjection())),this.adjustRotationInternal(t,e)},o.prototype.adjustRotationInternal=function(t,e){var o=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,o);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()},o.prototype.setCenter=function(t){this.setCenterInternal((0,s.fromUserCoordinate)(t,this.getProjection()))},o.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},o.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},o.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},o.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},o.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},o.prototype.applyTargetState_=function(t,e){var o=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,o),r=this.getViewportSize_(n),s=this.constraints_.resolution(this.targetResolution_,0,r,o),a=this.constraints_.center(this.targetCenter_,s,r,o,this.calculateCenterShift(this.targetCenter_,s,n,r));this.get(i.default.ROTATION)!==n&&this.set(i.default.ROTATION,n),this.get(i.default.RESOLUTION)!==s&&this.set(i.default.RESOLUTION,s),this.get(i.default.CENTER)&&(0,u.equals)(this.get(i.default.CENTER),a)||this.set(i.default.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},o.prototype.resolveConstraints=function(t,e,o){var n=void 0!==t?t:200,i=e||0,r=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(r),a=this.constraints_.resolution(this.targetResolution_,i,s),h=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,r,s));if(0===n&&!this.cancelAnchor_)return this.targetResolution_=a,this.targetRotation_=r,this.targetCenter_=h,void this.applyTargetState_();var l=o||(0===n?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===a&&this.getRotation()===r&&this.getCenterInternal()&&(0,u.equals)(this.getCenterInternal(),h)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:r,center:h,resolution:a,duration:n,easing:d.easeOut,anchor:l}))},o.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(n.default.INTERACTING,1)},o.prototype.endInteraction=function(t,e,o){var n=o&&(0,s.fromUserCoordinate)(o,this.getProjection());this.endInteractionInternal(t,e,n)},o.prototype.endInteractionInternal=function(t,e,o){this.setHint(n.default.INTERACTING,-1),this.resolveConstraints(t,e,o)},o.prototype.getConstrainedCenter=function(t,e){var o=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),o)},o.prototype.getConstrainedZoom=function(t,e){var o=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(o,e))},o.prototype.getConstrainedResolution=function(t,e){var o=e||0,n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,o,n)},o}(t.default);function M(t,e){setTimeout(function(){t(e)},0)}function j(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return(0,c.createExtent)(t.extent,t.constrainOnlyCenter,e)}var o=(0,s.createProjection)(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&o.isGlobal()){var n=o.getExtent().slice();return n[0]=-1/0,n[2]=1/0,(0,c.createExtent)(n,!1,!1)}return c.none}function x(t){var e,n,i,a=void 0!==t.minZoom?t.minZoom:C,u=void 0!==t.maxZoom?t.maxZoom:28,h=void 0!==t.zoomFactor?t.zoomFactor:2,l=void 0!==t.multiWorld&&t.multiWorld,c=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,p=void 0!==t.showFullExtent&&t.showFullExtent,m=(0,s.createProjection)(t.projection,"EPSG:3857"),d=m.getExtent(),_=t.constrainOnlyCenter,R=t.extent;if(l||R||!m.isGlobal()||(_=!1,R=d),void 0!==t.resolutions){var v=t.resolutions;n=v[a],i=void 0!==v[u]?v[u]:v[v.length-1],e=t.constrainResolution?(0,g.createSnapToResolutions)(v,c,!_&&R,p):(0,g.createMinMaxResolution)(n,i,c,!_&&R,p)}else{var y=(d?Math.max((0,f.getWidth)(d),(0,f.getHeight)(d)):360*s.METERS_PER_UNIT[o.default.DEGREES]/m.getMetersPerUnit())/r.DEFAULT_TILE_SIZE/Math.pow(2,C),I=y/Math.pow(2,28-C);void 0!==(n=t.maxResolution)?a=0:n=y/Math.pow(h,a),void 0===(i=t.minResolution)&&(i=void 0!==t.maxZoom?void 0!==t.maxResolution?n/Math.pow(h,u):y/Math.pow(h,u):I),u=a+Math.floor(Math.log(n/i)/Math.log(h)),i=n/Math.pow(h,u-a),e=t.constrainResolution?(0,g.createSnapToPower)(h,n,i,c,!_&&R,p):(0,g.createMinMaxResolution)(n,i,c,!_&&R,p)}return{constraint:e,maxResolution:n,minResolution:i,minZoom:a,zoomFactor:h}}function A(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(0,m.createSnapToZero)():!1===e?m.none:"number"==typeof e?(0,m.createSnapToN)(e):m.none}return m.disable}function E(t){return!(t.sourceCenter&&t.targetCenter&&!(0,u.equals)(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function S(t,e,o,n,i){var r=Math.cos(-i),s=Math.sin(-i),a=t[0]*r-t[1]*s,u=t[1]*r+t[0]*s;return[(a+=(e[0]/2-o[0])*n)*r-(u+=(o[1]-e[1]/2)*n)*(s=-s),u*r+a*s]}var T=I;exports.default=T;
},{"./Object.js":"PhPh","./geom/GeometryType.js":"lmV0","./proj/Units.js":"yZx6","./ViewHint.js":"cuLW","./ViewProperty.js":"cE7c","./tilegrid/common.js":"mOEX","./proj.js":"Diht","./functions.js":"RgA2","./coordinate.js":"nGsj","./asserts.js":"fLG6","./obj.js":"mH6q","./centerconstraint.js":"Rc7z","./math.js":"B96G","./resolutionconstraint.js":"o7nl","./rotationconstraint.js":"EKd0","./easing.js":"IeCz","./extent.js":"QDir","./array.js":"luEr","./geom/Polygon.js":"Nwwk"}],"TAHd":[function(require,module,exports) {
"use strict";function r(r,e,t){return void 0===t&&(t=[0,0]),t[0]=r[0]+2*e,t[1]=r[1]+2*e,t}function e(r){return r[0]>0&&r[1]>0}function t(r,e,t){return void 0===t&&(t=[0,0]),t[0]=r[0]*e+.5|0,t[1]=r[1]*e+.5|0,t}function o(r,e){return Array.isArray(r)?r:(void 0===e?e=[r,r]:(e[0]=r,e[1]=r),e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.buffer=r,exports.hasArea=e,exports.scale=t,exports.toSize=o;
},{}],"kRwz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=x(require("./Object.js")),t=S(require("./Collection.js")),r=S(require("./CollectionEventType.js")),n=S(require("./events/EventType.js")),i=S(require("./layer/Group.js")),o=S(require("./MapBrowserEvent.js")),a=S(require("./MapBrowserEventHandler.js")),s=S(require("./MapBrowserEventType.js")),l=S(require("./MapEvent.js")),d=S(require("./MapEventType.js")),u=S(require("./MapProperty.js")),p=S(require("./ObjectEventType.js")),h=S(require("./pointer/EventType.js")),y=S(require("./render/EventType.js")),v=x(require("./TileQueue.js")),f=S(require("./View.js")),c=S(require("./ViewHint.js")),_=require("./has.js"),g=require("./functions.js"),E=require("./transform.js"),m=require("./asserts.js"),w=require("./extent.js"),T=require("./proj.js"),C=require("./size.js"),L=require("./events.js"),R=require("./dom.js");function S(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function x(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}var I=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),A=function(i){function f(n){var o=i.call(this)||this,a=O(n);return o.boundHandleBrowserEvent_=o.handleBrowserEvent.bind(o),o.maxTilesLoading_=void 0!==n.maxTilesLoading?n.maxTilesLoading:16,o.pixelRatio_=void 0!==n.pixelRatio?n.pixelRatio:_.DEVICE_PIXEL_RATIO,o.postRenderTimeoutHandle_,o.animationDelayKey_,o.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(o),o.coordinateToPixelTransform_=(0,E.create)(),o.pixelToCoordinateTransform_=(0,E.create)(),o.frameIndex_=0,o.frameState_=null,o.previousExtent_=null,o.viewPropertyListenerKey_=null,o.viewChangeListenerKey_=null,o.layerGroupPropertyListenerKeys_=null,o.viewport_=document.createElement("div"),o.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),o.viewport_.style.position="relative",o.viewport_.style.overflow="hidden",o.viewport_.style.width="100%",o.viewport_.style.height="100%",o.overlayContainer_=document.createElement("div"),o.overlayContainer_.style.position="absolute",o.overlayContainer_.style.zIndex="0",o.overlayContainer_.style.width="100%",o.overlayContainer_.style.height="100%",o.overlayContainer_.style.pointerEvents="none",o.overlayContainer_.className="ol-overlaycontainer",o.viewport_.appendChild(o.overlayContainer_),o.overlayContainerStopEvent_=document.createElement("div"),o.overlayContainerStopEvent_.style.position="absolute",o.overlayContainerStopEvent_.style.zIndex="0",o.overlayContainerStopEvent_.style.width="100%",o.overlayContainerStopEvent_.style.height="100%",o.overlayContainerStopEvent_.style.pointerEvents="none",o.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",o.viewport_.appendChild(o.overlayContainerStopEvent_),o.mapBrowserEventHandler_=null,o.moveTolerance_=n.moveTolerance,o.keyboardEventTarget_=a.keyboardEventTarget,o.keyHandlerKeys_=null,o.controls=a.controls||new t.default,o.interactions=a.interactions||new t.default,o.overlays_=a.overlays,o.overlayIdIndex_={},o.renderer_=null,o.handleResize_,o.postRenderFunctions_=[],o.tileQueue_=new v.default(o.getTilePriority.bind(o),o.handleTileChange_.bind(o)),o.addEventListener((0,e.getChangeEventType)(u.default.LAYERGROUP),o.handleLayerGroupChanged_),o.addEventListener((0,e.getChangeEventType)(u.default.VIEW),o.handleViewChanged_),o.addEventListener((0,e.getChangeEventType)(u.default.SIZE),o.handleSizeChanged_),o.addEventListener((0,e.getChangeEventType)(u.default.TARGET),o.handleTargetChanged_),o.setProperties(a.values),o.controls.forEach(function(e){e.setMap(this)}.bind(o)),o.controls.addEventListener(r.default.ADD,function(e){e.element.setMap(this)}.bind(o)),o.controls.addEventListener(r.default.REMOVE,function(e){e.element.setMap(null)}.bind(o)),o.interactions.forEach(function(e){e.setMap(this)}.bind(o)),o.interactions.addEventListener(r.default.ADD,function(e){e.element.setMap(this)}.bind(o)),o.interactions.addEventListener(r.default.REMOVE,function(e){e.element.setMap(null)}.bind(o)),o.overlays_.forEach(o.addOverlayInternal_.bind(o)),o.overlays_.addEventListener(r.default.ADD,function(e){this.addOverlayInternal_(e.element)}.bind(o)),o.overlays_.addEventListener(r.default.REMOVE,function(e){var t=e.element.getId();void 0!==t&&delete this.overlayIdIndex_[t.toString()],e.element.setMap(null)}.bind(o)),o}return I(f,i),f.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},f.prototype.addControl=function(e){this.getControls().push(e)},f.prototype.addInteraction=function(e){this.getInteractions().push(e)},f.prototype.addLayer=function(e){this.getLayerGroup().getLayers().push(e)},f.prototype.addOverlay=function(e){this.getOverlays().push(e)},f.prototype.addOverlayInternal_=function(e){var t=e.getId();void 0!==t&&(this.overlayIdIndex_[t.toString()]=e),e.setMap(this)},f.prototype.disposeInternal=function(){this.setTarget(null),i.prototype.disposeInternal.call(this)},f.prototype.forEachFeatureAtPixel=function(e,t,r){if(this.frameState_){var n=this.getCoordinateFromPixelInternal(e),i=void 0!==(r=void 0!==r?r:{}).hitTolerance?r.hitTolerance:0,o=void 0!==r.layerFilter?r.layerFilter:g.TRUE,a=!1!==r.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,i,a,t,null,o,null)}},f.prototype.getFeaturesAtPixel=function(e,t){var r=[];return this.forEachFeatureAtPixel(e,function(e){r.push(e)},t),r},f.prototype.forEachLayerAtPixel=function(e,t,r){if(this.frameState_){var n=r||{},i=void 0!==n.hitTolerance?n.hitTolerance:0,o=n.layerFilter||g.TRUE;return this.renderer_.forEachLayerAtPixel(e,this.frameState_,i,t,o)}},f.prototype.hasFeatureAtPixel=function(e,t){if(!this.frameState_)return!1;var r=this.getCoordinateFromPixelInternal(e),n=void 0!==(t=void 0!==t?t:{}).layerFilter?t.layerFilter:g.TRUE,i=void 0!==t.hitTolerance?t.hitTolerance:0,o=!1!==t.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(r,this.frameState_,i,o,n,null)},f.prototype.getEventCoordinate=function(e){return this.getCoordinateFromPixel(this.getEventPixel(e))},f.prototype.getEventCoordinateInternal=function(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))},f.prototype.getEventPixel=function(e){var t=this.viewport_.getBoundingClientRect(),r="changedTouches"in e?e.changedTouches[0]:e;return[r.clientX-t.left,r.clientY-t.top]},f.prototype.getTarget=function(){return this.get(u.default.TARGET)},f.prototype.getTargetElement=function(){var e=this.getTarget();return void 0!==e?"string"==typeof e?document.getElementById(e):e:null},f.prototype.getCoordinateFromPixel=function(e){return(0,T.toUserCoordinate)(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())},f.prototype.getCoordinateFromPixelInternal=function(e){var t=this.frameState_;return t?(0,E.apply)(t.pixelToCoordinateTransform,e.slice()):null},f.prototype.getControls=function(){return this.controls},f.prototype.getOverlays=function(){return this.overlays_},f.prototype.getOverlayById=function(e){var t=this.overlayIdIndex_[e.toString()];return void 0!==t?t:null},f.prototype.getInteractions=function(){return this.interactions},f.prototype.getLayerGroup=function(){return this.get(u.default.LAYERGROUP)},f.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},f.prototype.getLoading=function(){for(var e=this.getLayerGroup().getLayerStatesArray(),t=0,r=e.length;t<r;++t){var n=e[t].layer.getSource();if(n&&n.loading)return!0}return!1},f.prototype.getPixelFromCoordinate=function(e){var t=(0,T.fromUserCoordinate)(e,this.getView().getProjection());return this.getPixelFromCoordinateInternal(t)},f.prototype.getPixelFromCoordinateInternal=function(e){var t=this.frameState_;return t?(0,E.apply)(t.coordinateToPixelTransform,e.slice(0,2)):null},f.prototype.getRenderer=function(){return this.renderer_},f.prototype.getSize=function(){return this.get(u.default.SIZE)},f.prototype.getView=function(){return this.get(u.default.VIEW)},f.prototype.getViewport=function(){return this.viewport_},f.prototype.getOverlayContainer=function(){return this.overlayContainer_},f.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},f.prototype.getOwnerDocument=function(){return this.getTargetElement()?this.getTargetElement().ownerDocument:document},f.prototype.getTilePriority=function(e,t,r,n){return(0,v.getTilePriority)(this.frameState_,e,t,r,n)},f.prototype.handleBrowserEvent=function(e,t){var r=t||e.type,n=new o.default(r,this,e);this.handleMapBrowserEvent(n)},f.prototype.handleMapBrowserEvent=function(e){if(this.frameState_){var t=e.originalEvent,r=t.type;if(r===h.default.POINTERDOWN||r===n.default.WHEEL||r===n.default.KEYDOWN){var i=this.getOwnerDocument(),o=this.viewport_.getRootNode?this.viewport_.getRootNode():i,a="host"in o?o.elementFromPoint(t.clientX,t.clientY):t.target;if(this.overlayContainerStopEvent_.contains(a)||!(o===i?i.documentElement:o).contains(a))return}if(e.frameState=this.frameState_,!1!==this.dispatchEvent(e))for(var s=this.getInteractions().getArray().slice(),l=s.length-1;l>=0;l--){var d=s[l];if(d.getMap()===this&&d.getActive()&&this.getTargetElement())if(!d.handleEvent(e)||e.propagationStopped)break}}},f.prototype.handlePostRender=function(){var e=this.frameState_,t=this.tileQueue_;if(!t.isEmpty()){var r=this.maxTilesLoading_,n=r;if(e){var i=e.viewHints;if(i[c.default.ANIMATING]||i[c.default.INTERACTING]){var o=!_.IMAGE_DECODE&&Date.now()-e.time>8;r=o?0:8,n=o?0:2}}t.getTilesLoading()<r&&(t.reprioritize(),t.loadMoreTiles(r,n))}!e||!this.hasListener(y.default.RENDERCOMPLETE)||e.animate||this.tileQueue_.getTilesLoading()||this.getLoading()||this.renderer_.dispatchRenderEvent(y.default.RENDERCOMPLETE,e);for(var a=this.postRenderFunctions_,s=0,l=a.length;s<l;++s)a[s](this,e);a.length=0},f.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},f.prototype.handleTargetChanged_=function(){var e;if(this.getTarget()&&(e=this.getTargetElement()),this.mapBrowserEventHandler_){for(var t=0,r=this.keyHandlerKeys_.length;t<r;++t)(0,L.unlistenByKey)(this.keyHandlerKeys_[t]);this.keyHandlerKeys_=null,this.viewport_.removeEventListener(n.default.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(n.default.WHEEL,this.boundHandleBrowserEvent_),void 0!==this.handleResize_&&(removeEventListener(n.default.RESIZE,this.handleResize_,!1),this.handleResize_=void 0),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,(0,R.removeNode)(this.viewport_)}if(e){for(var i in e.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new a.default(this,this.moveTolerance_),s.default)this.mapBrowserEventHandler_.addEventListener(s.default[i],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(n.default.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(n.default.WHEEL,this.boundHandleBrowserEvent_,!!_.PASSIVE_EVENT_LISTENERS&&{passive:!1});var o=this.keyboardEventTarget_?this.keyboardEventTarget_:e;this.keyHandlerKeys_=[(0,L.listen)(o,n.default.KEYDOWN,this.handleBrowserEvent,this),(0,L.listen)(o,n.default.KEYPRESS,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),window.addEventListener(n.default.RESIZE,this.handleResize_,!1))}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()},f.prototype.handleTileChange_=function(){this.render()},f.prototype.handleViewPropertyChanged_=function(){this.render()},f.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&((0,L.unlistenByKey)(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&((0,L.unlistenByKey)(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var e=this.getView();e&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=(0,L.listen)(e,p.default.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=(0,L.listen)(e,n.default.CHANGE,this.handleViewPropertyChanged_,this),e.resolveConstraints(0)),this.render()},f.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(L.unlistenByKey),this.layerGroupPropertyListenerKeys_=null);var e=this.getLayerGroup();e&&(this.layerGroupPropertyListenerKeys_=[(0,L.listen)(e,p.default.PROPERTYCHANGE,this.render,this),(0,L.listen)(e,n.default.CHANGE,this.render,this)]),this.render()},f.prototype.isRendered=function(){return!!this.frameState_},f.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},f.prototype.redrawText=function(){for(var e=this.getLayerGroup().getLayerStatesArray(),t=0,r=e.length;t<r;++t){var n=e[t].layer;n.hasRenderer()&&n.getRenderer().handleFontsChanged()}},f.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},f.prototype.removeControl=function(e){return this.getControls().remove(e)},f.prototype.removeInteraction=function(e){return this.getInteractions().remove(e)},f.prototype.removeLayer=function(e){return this.getLayerGroup().getLayers().remove(e)},f.prototype.removeOverlay=function(e){return this.getOverlays().remove(e)},f.prototype.renderFrame_=function(e){var t=this,r=this.getSize(),n=this.getView(),i=this.frameState_,o=null;if(void 0!==r&&(0,C.hasArea)(r)&&n&&n.isDef()){var a=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),s=n.getState();o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:(0,w.getForViewAndSize)(s.center,s.resolution,s.rotation,r),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:r,tileQueue:this.tileQueue_,time:e,usedTiles:{},viewState:s,viewHints:a,wantedTiles:{}}}if(this.frameState_=o,this.renderer_.renderFrame(o),o){if(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),i)(!this.previousExtent_||!(0,w.isEmpty)(this.previousExtent_)&&!(0,w.equals)(o.extent,this.previousExtent_))&&(this.dispatchEvent(new l.default(d.default.MOVESTART,this,i)),this.previousExtent_=(0,w.createOrUpdateEmpty)(this.previousExtent_));this.previousExtent_&&!o.viewHints[c.default.ANIMATING]&&!o.viewHints[c.default.INTERACTING]&&!(0,w.equals)(o.extent,this.previousExtent_)&&(this.dispatchEvent(new l.default(d.default.MOVEEND,this,o)),(0,w.clone)(o.extent,this.previousExtent_))}this.dispatchEvent(new l.default(d.default.POSTRENDER,this,o)),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(function(){t.postRenderTimeoutHandle_=void 0,t.handlePostRender()},0))},f.prototype.setLayerGroup=function(e){this.set(u.default.LAYERGROUP,e)},f.prototype.setSize=function(e){this.set(u.default.SIZE,e)},f.prototype.setTarget=function(e){this.set(u.default.TARGET,e)},f.prototype.setView=function(e){this.set(u.default.VIEW,e)},f.prototype.updateSize=function(){var e=this.getTargetElement();if(e){var t=getComputedStyle(e);this.setSize([e.offsetWidth-parseFloat(t.borderLeftWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)-parseFloat(t.borderRightWidth),e.offsetHeight-parseFloat(t.borderTopWidth)-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)-parseFloat(t.borderBottomWidth)])}else this.setSize(void 0);this.updateViewportSize_()},f.prototype.updateViewportSize_=function(){var e=this.getView();if(e){var t=void 0,r=getComputedStyle(this.viewport_);r.width&&r.height&&(t=[parseInt(r.width,10),parseInt(r.height,10)]),e.setViewportSize(t)}},f}(e.default);function O(e){var r=null;void 0!==e.keyboardEventTarget&&(r="string"==typeof e.keyboardEventTarget?document.getElementById(e.keyboardEventTarget):e.keyboardEventTarget);var n,o,a,s={},l=e.layers&&"function"==typeof e.layers.getLayers?e.layers:new i.default({layers:e.layers});return s[u.default.LAYERGROUP]=l,s[u.default.TARGET]=e.target,s[u.default.VIEW]=void 0!==e.view?e.view:new f.default,void 0!==e.controls&&(Array.isArray(e.controls)?n=new t.default(e.controls.slice()):((0,m.assert)("function"==typeof e.controls.getArray,47),n=e.controls)),void 0!==e.interactions&&(Array.isArray(e.interactions)?o=new t.default(e.interactions.slice()):((0,m.assert)("function"==typeof e.interactions.getArray,48),o=e.interactions)),void 0!==e.overlays?Array.isArray(e.overlays)?a=new t.default(e.overlays.slice()):((0,m.assert)("function"==typeof e.overlays.getArray,49),a=e.overlays):a=new t.default,{controls:n,interactions:o,keyboardEventTarget:r,overlays:a,values:s}}var b=A;exports.default=b;
},{"./Object.js":"PhPh","./Collection.js":"FnDa","./CollectionEventType.js":"BTrx","./events/EventType.js":"C8cu","./layer/Group.js":"q0nK","./MapBrowserEvent.js":"HMLS","./MapBrowserEventHandler.js":"ohHk","./MapBrowserEventType.js":"YhDM","./MapEvent.js":"vFcA","./MapEventType.js":"xLGm","./MapProperty.js":"zlNQ","./ObjectEventType.js":"zehl","./pointer/EventType.js":"TaSm","./render/EventType.js":"z39m","./TileQueue.js":"tHOl","./View.js":"hNqE","./ViewHint.js":"cuLW","./has.js":"f3Nv","./functions.js":"RgA2","./transform.js":"P4eA","./asserts.js":"fLG6","./extent.js":"QDir","./proj.js":"Diht","./size.js":"TAHd","./events.js":"UqnM","./dom.js":"Xno5"}],"xxE2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=s(require("../Object.js")),t=s(require("../MapEventType.js")),r=require("../functions.js"),n=require("../events.js"),o=require("../dom.js");function s(e){return e&&e.__esModule?e:{default:e}}var i=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),p=function(e){function s(t){var r=e.call(this)||this,n=t.element;return!n||t.target||n.style.pointerEvents||(n.style.pointerEvents="auto"),r.element=n||null,r.target_=null,r.map_=null,r.listenerKeys=[],t.render&&(r.render=t.render),t.target&&r.setTarget(t.target),r}return i(s,e),s.prototype.disposeInternal=function(){(0,o.removeNode)(this.element),e.prototype.disposeInternal.call(this)},s.prototype.getMap=function(){return this.map_},s.prototype.setMap=function(e){this.map_&&(0,o.removeNode)(this.element);for(var s=0,i=this.listenerKeys.length;s<i;++s)(0,n.unlistenByKey)(this.listenerKeys[s]);(this.listenerKeys.length=0,this.map_=e,this.map_)&&((this.target_?this.target_:e.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==r.VOID&&this.listenerKeys.push((0,n.listen)(e,t.default.POSTRENDER,this.render,this)),e.render())},s.prototype.render=function(e){},s.prototype.setTarget=function(e){this.target_="string"==typeof e?document.getElementById(e):e},s}(e.default),u=p;exports.default=u;
},{"../Object.js":"PhPh","../MapEventType.js":"xLGm","../functions.js":"RgA2","../events.js":"UqnM","../dom.js":"Xno5"}],"Q4Cf":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("./Control.js")),l=i(require("../events/EventType.js")),t=require("../css.js"),s=require("../array.js"),o=require("../layer/Layer.js"),a=require("../dom.js");function i(e){return e&&e.__esModule?e:{default:e}}var r=function(){var e=function(l,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,l){e.__proto__=l}||function(e,l){for(var t in l)Object.prototype.hasOwnProperty.call(l,t)&&(e[t]=l[t])})(l,t)};return function(l,t){function s(){this.constructor=l}e(l,t),l.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}}(),n=function(e){function i(s){var o=this,a=s||{};(o=e.call(this,{element:document.createElement("div"),render:a.render,target:a.target})||this).ulElement_=document.createElement("ul"),o.collapsed_=void 0===a.collapsed||a.collapsed,o.userCollapsed_=o.collapsed_,o.overrideCollapsible_=void 0!==a.collapsible,o.collapsible_=void 0===a.collapsible||a.collapsible,o.collapsible_||(o.collapsed_=!1);var i=void 0!==a.className?a.className:"ol-attribution",r=void 0!==a.tipLabel?a.tipLabel:"Attributions",n=void 0!==a.expandClassName?a.expandClassName:i+"-expand",p=void 0!==a.collapseLabel?a.collapseLabel:"»",c=void 0!==a.collapseClassName?a.collapseClassName:i+"-collpase";"string"==typeof p?(o.collapseLabel_=document.createElement("span"),o.collapseLabel_.textContent=p,o.collapseLabel_.className=c):o.collapseLabel_=p;var d=void 0!==a.label?a.label:"i";"string"==typeof d?(o.label_=document.createElement("span"),o.label_.textContent=d,o.label_.className=n):o.label_=d;var u=o.collapsible_&&!o.collapsed_?o.collapseLabel_:o.label_,_=document.createElement("button");_.setAttribute("type","button"),_.title=r,_.appendChild(u),_.addEventListener(l.default.CLICK,o.handleClick_.bind(o),!1);var b=i+" "+t.CLASS_UNSELECTABLE+" "+t.CLASS_CONTROL+(o.collapsed_&&o.collapsible_?" "+t.CLASS_COLLAPSED:"")+(o.collapsible_?"":" ol-uncollapsible"),h=o.element;return h.className=b,h.appendChild(o.ulElement_),h.appendChild(_),o.renderedAttributions_=[],o.renderedVisible_=!0,o}return r(i,e),i.prototype.collectSourceAttributions_=function(e){for(var l={},t=[],s=!0,a=e.layerStatesArray,i=0,r=a.length;i<r;++i){var n=a[i];if((0,o.inView)(n,e.viewState)){var p=n.layer.getSource();if(p){var c=p.getAttributions();if(c){var d=c(e);if(d)if(s=s&&!1!==p.getAttributionsCollapsible(),Array.isArray(d))for(var u=0,_=d.length;u<_;++u)d[u]in l||(t.push(d[u]),l[d[u]]=!0);else d in l||(t.push(d),l[d]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(s),t},i.prototype.updateElement_=function(e){if(e){var l=this.collectSourceAttributions_(e),t=l.length>0;if(this.renderedVisible_!=t&&(this.element.style.display=t?"":"none",this.renderedVisible_=t),!(0,s.equals)(l,this.renderedAttributions_)){(0,a.removeChildren)(this.ulElement_);for(var o=0,i=l.length;o<i;++o){var r=document.createElement("li");r.innerHTML=l[o],this.ulElement_.appendChild(r)}this.renderedAttributions_=l}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},i.prototype.handleClick_=function(e){e.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},i.prototype.handleToggle_=function(){this.element.classList.toggle(t.CLASS_COLLAPSED),this.collapsed_?(0,a.replaceNode)(this.collapseLabel_,this.label_):(0,a.replaceNode)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_},i.prototype.getCollapsible=function(){return this.collapsible_},i.prototype.setCollapsible=function(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},i.prototype.setCollapsed=function(e){this.userCollapsed_=e,this.collapsible_&&this.collapsed_!==e&&this.handleToggle_()},i.prototype.getCollapsed=function(){return this.collapsed_},i.prototype.render=function(e){this.updateElement_(e.frameState)},i}(e.default),p=n;exports.default=p;
},{"./Control.js":"xxE2","../events/EventType.js":"C8cu","../css.js":"HgMV","../array.js":"luEr","../layer/Layer.js":"GCgv","../dom.js":"Xno5"}],"sCgw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./Control.js")),e=r(require("../events/EventType.js")),a=require("../css.js"),o=require("../easing.js");function r(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,a){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])})(e,a)};return function(e,a){function o(){this.constructor=e}t(e,a),e.prototype=null===a?Object.create(a):(o.prototype=a.prototype,new o)}}(),n=function(t){function r(o){var r=this,i=o||{};r=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this;var n=void 0!==i.className?i.className:"ol-rotate",s=void 0!==i.label?i.label:"⇧",l=void 0!==i.compassClassName?i.compassClassName:"ol-compass";r.label_=null,"string"==typeof s?(r.label_=document.createElement("span"),r.label_.className=l,r.label_.textContent=s):(r.label_=s,r.label_.classList.add(l));var d=i.tipLabel?i.tipLabel:"Reset rotation",u=document.createElement("button");u.className=n+"-reset",u.setAttribute("type","button"),u.title=d,u.appendChild(r.label_),u.addEventListener(e.default.CLICK,r.handleClick_.bind(r),!1);var c=n+" "+a.CLASS_UNSELECTABLE+" "+a.CLASS_CONTROL,_=r.element;return _.className=c,_.appendChild(u),r.callResetNorth_=i.resetNorth?i.resetNorth:void 0,r.duration_=void 0!==i.duration?i.duration:250,r.autoHide_=void 0===i.autoHide||i.autoHide,r.rotation_=void 0,r.autoHide_&&r.element.classList.add(a.CLASS_HIDDEN),r}return i(r,t),r.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},r.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:o.easeOut}):t.setRotation(0))}},r.prototype.render=function(t){var e=t.frameState;if(e){var o=e.viewState.rotation;if(o!=this.rotation_){var r="rotate("+o+"rad)";if(this.autoHide_){var i=this.element.classList.contains(a.CLASS_HIDDEN);i||0!==o?i&&0!==o&&this.element.classList.remove(a.CLASS_HIDDEN):this.element.classList.add(a.CLASS_HIDDEN)}this.label_.style.transform=r}this.rotation_=o}},r}(t.default),s=n;exports.default=s;
},{"./Control.js":"xxE2","../events/EventType.js":"C8cu","../css.js":"HgMV","../easing.js":"IeCz"}],"L3CO":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=a(require("./Control.js")),e=a(require("../events/EventType.js")),o=require("../css.js"),n=require("../easing.js");function a(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),r=function(t){function a(n){var a=this,i=n||{};a=t.call(this,{element:document.createElement("div"),target:i.target})||this;var r=void 0!==i.className?i.className:"ol-zoom",u=void 0!==i.delta?i.delta:1,l=void 0!==i.zoomInClassName?i.zoomInClassName:r+"-in",s=void 0!==i.zoomOutClassName?i.zoomOutClassName:r+"-out",d=void 0!==i.zoomInLabel?i.zoomInLabel:"+",c=void 0!==i.zoomOutLabel?i.zoomOutLabel:"",m=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",p=void 0!==i.zoomOutTipLabel?i.zoomOutTipLabel:"Zoom out",v=document.createElement("button");v.className=l,v.setAttribute("type","button"),v.title=m,v.appendChild("string"==typeof d?document.createTextNode(d):d),v.addEventListener(e.default.CLICK,a.handleClick_.bind(a,u),!1);var f=document.createElement("button");f.className=s,f.setAttribute("type","button"),f.title=p,f.appendChild("string"==typeof c?document.createTextNode(c):c),f.addEventListener(e.default.CLICK,a.handleClick_.bind(a,-u),!1);var _=r+" "+o.CLASS_UNSELECTABLE+" "+o.CLASS_CONTROL,C=a.element;return C.className=_,C.appendChild(v),C.appendChild(f),a.duration_=void 0!==i.duration?i.duration:250,a}return i(a,t),a.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},a.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var o=e.getZoom();if(void 0!==o){var a=e.getConstrainedZoom(o+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:a,duration:this.duration_,easing:n.easeOut})):e.setZoom(a)}}},a}(t.default),u=r;exports.default=u;
},{"./Control.js":"xxE2","../events/EventType.js":"C8cu","../css.js":"HgMV","../easing.js":"IeCz"}],"dOoh":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("./Control.js")),t=r(require("../events/EventType.js")),s=require("../css.js"),l=require("../events.js"),n=require("../dom.js");function r(e){return e&&e.__esModule?e:{default:e}}var a=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])})(t,s)};return function(t,s){function l(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(l.prototype=s.prototype,new l)}}(),u=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],c={ENTERFULLSCREEN:"enterfullscreen",LEAVEFULLSCREEN:"leavefullscreen"},i=function(e){function r(l){var n=this,r=l||{};(n=e.call(this,{element:document.createElement("div"),target:r.target})||this).cssClassName_=void 0!==r.className?r.className:"ol-full-screen",n.activeClassName_=void 0!==r.activeClassName?r.activeClassName.split(" "):[n.cssClassName_+"-true"],n.inactiveClassName_=void 0!==r.inactiveClassName?r.inactiveClassName.split(" "):[n.cssClassName_+"-false"];var a=void 0!==r.label?r.label:"⤢";n.labelNode_="string"==typeof a?document.createTextNode(a):a;var u=void 0!==r.labelActive?r.labelActive:"×";n.labelActiveNode_="string"==typeof u?document.createTextNode(u):u,n.button_=document.createElement("button");var c=r.tipLabel?r.tipLabel:"Toggle full-screen";n.setClassName_(n.button_,d()),n.button_.setAttribute("type","button"),n.button_.title=c,n.button_.appendChild(n.labelNode_),n.button_.addEventListener(t.default.CLICK,n.handleClick_.bind(n),!1);var i=n.cssClassName_+" "+s.CLASS_UNSELECTABLE+" "+s.CLASS_CONTROL+" "+(o()?"":s.CLASS_UNSUPPORTED),p=n.element;return p.className=i,p.appendChild(n.button_),n.keys_=void 0!==r.keys&&r.keys,n.source_=r.source,n}return a(r,e),r.prototype.handleClick_=function(e){e.preventDefault(),this.handleFullScreen_()},r.prototype.handleFullScreen_=function(){if(o()){var e=this.getMap();if(e)if(d())m();else{var t=void 0;t=this.source_?"string"==typeof this.source_?document.getElementById(this.source_):this.source_:e.getTargetElement(),this.keys_?_(t):p(t)}}},r.prototype.handleFullScreenChange_=function(){var e=this.getMap();d()?(this.setClassName_(this.button_,!0),(0,n.replaceNode)(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(c.ENTERFULLSCREEN)):(this.setClassName_(this.button_,!1),(0,n.replaceNode)(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(c.LEAVEFULLSCREEN)),e&&e.updateSize()},r.prototype.setClassName_=function(e,t){var s,l,n,r=this.activeClassName_,a=this.inactiveClassName_,u=t?r:a;(s=e.classList).remove.apply(s,r),(l=e.classList).remove.apply(l,a),(n=e.classList).add.apply(n,u)},r.prototype.setMap=function(t){if(e.prototype.setMap.call(this,t),t)for(var s=0,n=u.length;s<n;++s)this.listenerKeys.push((0,l.listen)(document,u[s],this.handleFullScreenChange_,this))},r}(e.default);function o(){var e=document.body;return!!(e.webkitRequestFullscreen||e.msRequestFullscreen&&document.msFullscreenEnabled||e.requestFullscreen&&document.fullscreenEnabled)}function d(){return!!(document.webkitIsFullScreen||document.msFullscreenElement||document.fullscreenElement)}function p(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()}function _(e){e.webkitRequestFullscreen?e.webkitRequestFullscreen():p(e)}function m(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}var v=i;exports.default=v;
},{"./Control.js":"xxE2","../events/EventType.js":"C8cu","../css.js":"HgMV","../events.js":"UqnM","../dom.js":"Xno5"}],"Cbl8":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=i(require("./Control.js")),e=i(require("../pointer/EventType.js")),o=require("../Object.js"),r=require("../proj.js"),n=require("../events.js");function i(t){return t&&t.__esModule?t:{default:t}}var s=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),a="projection",u="coordinateFormat",p=function(t){function i(e){var r=this,n=e||{},i=document.createElement("div");return i.className=void 0!==n.className?n.className:"ol-mouse-position",(r=t.call(this,{element:i,render:n.render,target:n.target})||this).addEventListener((0,o.getChangeEventType)(a),r.handleProjectionChanged_),n.coordinateFormat&&r.setCoordinateFormat(n.coordinateFormat),n.projection&&r.setProjection(n.projection),r.undefinedHTML_=void 0!==n.undefinedHTML?n.undefinedHTML:"&#160;",r.renderOnMouseOut_=!!r.undefinedHTML_,r.renderedHTML_=i.innerHTML,r.mapProjection_=null,r.transform_=null,r}return s(i,t),i.prototype.handleProjectionChanged_=function(){this.transform_=null},i.prototype.getCoordinateFormat=function(){return this.get(u)},i.prototype.getProjection=function(){return this.get(a)},i.prototype.handleMouseMove=function(t){var e=this.getMap();this.updateHTML_(e.getEventPixel(t))},i.prototype.handleMouseOut=function(t){this.updateHTML_(null)},i.prototype.setMap=function(o){if(t.prototype.setMap.call(this,o),o){var r=o.getViewport();this.listenerKeys.push((0,n.listen)(r,e.default.POINTERMOVE,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push((0,n.listen)(r,e.default.POINTEROUT,this.handleMouseOut,this))}},i.prototype.setCoordinateFormat=function(t){this.set(u,t)},i.prototype.setProjection=function(t){this.set(a,(0,r.get)(t))},i.prototype.updateHTML_=function(t){var e=this.undefinedHTML_;if(t&&this.mapProjection_){if(!this.transform_){var o=this.getProjection();this.transform_=o?(0,r.getTransformFromProjections)(this.mapProjection_,o):r.identityTransform}var n=this.getMap().getCoordinateFromPixelInternal(t);if(n){var i=(0,r.getUserProjection)();i&&(this.transform_=(0,r.getTransformFromProjections)(this.mapProjection_,i)),this.transform_(n,n);var s=this.getCoordinateFormat();e=s?s(n):n.toString()}}this.renderedHTML_&&e===this.renderedHTML_||(this.element.innerHTML=e,this.renderedHTML_=e)},i.prototype.render=function(t){var e=t.frameState;e?this.mapProjection_!=e.viewState.projection&&(this.mapProjection_=e.viewState.projection,this.transform_=null):this.mapProjection_=null},i}(t.default),c=p;exports.default=c;
},{"./Control.js":"xxE2","../pointer/EventType.js":"TaSm","../Object.js":"PhPh","../proj.js":"Diht","../events.js":"UqnM"}],"VpAM":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t={BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_CENTER:"center-center",CENTER_RIGHT:"center-right",TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right"};exports.default=t;
},{}],"qWcX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("./Object.js")),t=a(require("./MapEventType.js")),n=a(require("./OverlayPositioning.js")),i=require("./css.js"),o=require("./extent.js"),r=require("./events.js"),s=require("./dom.js");function a(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function u(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var r=i?Object.getOwnPropertyDescriptor(e,o):null;r&&(r.get||r.set)?Object.defineProperty(n,o,r):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}var d=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),l={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"},f=function(a){function p(t){var o=a.call(this)||this;o.options=t,o.id=t.id,o.insertFirst=void 0===t.insertFirst||t.insertFirst,o.stopEvent=void 0===t.stopEvent||t.stopEvent,o.element=document.createElement("div"),o.element.className=void 0!==t.className?t.className:"ol-overlay-container "+i.CLASS_SELECTABLE,o.element.style.position="absolute",o.element.style.pointerEvents="auto";var r=t.autoPan;return r&&"object"!=typeof r&&(r={animation:t.autoPanAnimation,margin:t.autoPanMargin}),o.autoPan=r||!1,o.rendered={transform_:"",visible:!0},o.mapPostrenderListenerKey=null,o.addEventListener((0,e.getChangeEventType)(l.ELEMENT),o.handleElementChanged),o.addEventListener((0,e.getChangeEventType)(l.MAP),o.handleMapChanged),o.addEventListener((0,e.getChangeEventType)(l.OFFSET),o.handleOffsetChanged),o.addEventListener((0,e.getChangeEventType)(l.POSITION),o.handlePositionChanged),o.addEventListener((0,e.getChangeEventType)(l.POSITIONING),o.handlePositioningChanged),void 0!==t.element&&o.setElement(t.element),o.setOffset(void 0!==t.offset?t.offset:[0,0]),o.setPositioning(void 0!==t.positioning?t.positioning:n.default.TOP_LEFT),void 0!==t.position&&o.setPosition(t.position),o}return d(p,a),p.prototype.getElement=function(){return this.get(l.ELEMENT)},p.prototype.getId=function(){return this.id},p.prototype.getMap=function(){return this.get(l.MAP)},p.prototype.getOffset=function(){return this.get(l.OFFSET)},p.prototype.getPosition=function(){return this.get(l.POSITION)},p.prototype.getPositioning=function(){return this.get(l.POSITIONING)},p.prototype.handleElementChanged=function(){(0,s.removeChildren)(this.element);var e=this.getElement();e&&this.element.appendChild(e)},p.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&((0,s.removeNode)(this.element),(0,r.unlistenByKey)(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var e=this.getMap();if(e){this.mapPostrenderListenerKey=(0,r.listen)(e,t.default.POSTRENDER,this.render,this),this.updatePixelPosition();var n=this.stopEvent?e.getOverlayContainerStopEvent():e.getOverlayContainer();this.insertFirst?n.insertBefore(this.element,n.childNodes[0]||null):n.appendChild(this.element),this.performAutoPan()}},p.prototype.render=function(){this.updatePixelPosition()},p.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},p.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},p.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},p.prototype.setElement=function(e){this.set(l.ELEMENT,e)},p.prototype.setMap=function(e){this.set(l.MAP,e)},p.prototype.setOffset=function(e){this.set(l.OFFSET,e)},p.prototype.setPosition=function(e){this.set(l.POSITION,e)},p.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},p.prototype.panIntoView=function(e){var t=this.getMap();if(t&&t.getTargetElement()&&this.get(l.POSITION)){var n=this.getRect(t.getTargetElement(),t.getSize()),i=this.getElement(),r=this.getRect(i,[(0,s.outerWidth)(i),(0,s.outerHeight)(i)]),a=e||{},p=void 0===a.margin?20:a.margin;if(!(0,o.containsExtent)(n,r)){var u=r[0]-n[0],d=n[2]-r[2],f=r[1]-n[1],h=n[3]-r[3],g=[0,0];if(u<0?g[0]=u-p:d<0&&(g[0]=Math.abs(d)+p),f<0?g[1]=f-p:h<0&&(g[1]=Math.abs(h)+p),0!==g[0]||0!==g[1]){var c=t.getView().getCenterInternal(),E=t.getPixelFromCoordinateInternal(c);if(!E)return;var P=[E[0]+g[0],E[1]+g[1]],y=a.animation||{};t.getView().animateInternal({center:t.getCoordinateFromPixelInternal(P),duration:y.duration,easing:y.easing})}}}},p.prototype.getRect=function(e,t){var n=e.getBoundingClientRect(),i=n.left+window.pageXOffset,o=n.top+window.pageYOffset;return[i,o,i+t[0],o+t[1]]},p.prototype.setPositioning=function(e){this.set(l.POSITIONING,e)},p.prototype.setVisible=function(e){this.rendered.visible!==e&&(this.element.style.display=e?"":"none",this.rendered.visible=e)},p.prototype.updatePixelPosition=function(){var e=this.getMap(),t=this.getPosition();if(e&&e.isRendered()&&t){var n=e.getPixelFromCoordinate(t),i=e.getSize();this.updateRenderedPosition(n,i)}else this.setVisible(!1)},p.prototype.updateRenderedPosition=function(e,t){var i=this.element.style,o=this.getOffset(),r=this.getPositioning();this.setVisible(!0);var s=Math.round(e[0]+o[0])+"px",a=Math.round(e[1]+o[1])+"px",p="0%",u="0%";r==n.default.BOTTOM_RIGHT||r==n.default.CENTER_RIGHT||r==n.default.TOP_RIGHT?p="-100%":r!=n.default.BOTTOM_CENTER&&r!=n.default.CENTER_CENTER&&r!=n.default.TOP_CENTER||(p="-50%"),r==n.default.BOTTOM_LEFT||r==n.default.BOTTOM_CENTER||r==n.default.BOTTOM_RIGHT?u="-100%":r!=n.default.CENTER_LEFT&&r!=n.default.CENTER_CENTER&&r!=n.default.CENTER_RIGHT||(u="-50%");var d="translate("+p+", "+u+") translate("+s+", "+a+")";this.rendered.transform_!=d&&(this.rendered.transform_=d,i.transform=d,i.msTransform=d)},p.prototype.getOptions=function(){return this.options},p}(e.default),h=f;exports.default=h;
},{"./Object.js":"PhPh","./MapEventType.js":"xLGm","./OverlayPositioning.js":"VpAM","./css.js":"HgMV","./extent.js":"QDir","./events.js":"UqnM","./dom.js":"Xno5"}],"KMhA":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=f(require("../renderer/Composite.js")),t=f(require("./Control.js")),i=f(require("../events/EventType.js")),o=f(require("../MapEventType.js")),n=f(require("../MapProperty.js")),a=f(require("../ObjectEventType.js")),l=f(require("../Overlay.js")),r=f(require("../OverlayPositioning.js")),s=f(require("../PluggableMap.js")),p=f(require("../View.js")),d=f(require("../ViewProperty.js")),h=require("../css.js"),u=require("../extent.js"),c=require("../Object.js"),v=require("../events.js"),_=require("../geom/Polygon.js"),g=require("../dom.js");function f(e){return e&&e.__esModule?e:{default:e}}var w=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),m=.75,b=.1,y=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return w(i,t),i.prototype.createRenderer=function(){return new e.default(this)},i}(s.default),E=function(e){function t(t){var o=this,n=t||{};(o=e.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).boundHandleRotationChanged_=o.handleRotationChanged_.bind(o),o.collapsed_=void 0===n.collapsed||n.collapsed,o.collapsible_=void 0===n.collapsible||n.collapsible,o.collapsible_||(o.collapsed_=!1),o.rotateWithView_=void 0!==n.rotateWithView&&n.rotateWithView,o.viewExtent_=void 0;var a=void 0!==n.className?n.className:"ol-overviewmap",s=void 0!==n.tipLabel?n.tipLabel:"Overview map",p=void 0!==n.collapseLabel?n.collapseLabel:"«";"string"==typeof p?(o.collapseLabel_=document.createElement("span"),o.collapseLabel_.textContent=p):o.collapseLabel_=p;var d=void 0!==n.label?n.label:"»";"string"==typeof d?(o.label_=document.createElement("span"),o.label_.textContent=d):o.label_=d;var u=o.collapsible_&&!o.collapsed_?o.collapseLabel_:o.label_,c=document.createElement("button");c.setAttribute("type","button"),c.title=s,c.appendChild(u),c.addEventListener(i.default.CLICK,o.handleClick_.bind(o),!1),o.ovmapDiv_=document.createElement("div"),o.ovmapDiv_.className="ol-overviewmap-map",o.view_=n.view,o.ovmap_=new y({view:n.view});var v=o.ovmap_;n.layers&&n.layers.forEach(function(e){v.addLayer(e)});var _=document.createElement("div");_.className="ol-overviewmap-box",_.style.boxSizing="border-box",o.boxOverlay_=new l.default({position:[0,0],positioning:r.default.CENTER_CENTER,element:_}),o.ovmap_.addOverlay(o.boxOverlay_);var g=a+" "+h.CLASS_UNSELECTABLE+" "+h.CLASS_CONTROL+(o.collapsed_&&o.collapsible_?" "+h.CLASS_COLLAPSED:"")+(o.collapsible_?"":" ol-uncollapsible"),f=o.element;f.className=g,f.appendChild(o.ovmapDiv_),f.appendChild(c);var w=o,m=o.boxOverlay_,b=o.boxOverlay_.getElement(),E=function(e){var t,i={clientX:(t=e).clientX,clientY:t.clientY},o=v.getEventCoordinateInternal(i);m.setPosition(o)},C=function(e){var t=v.getEventCoordinateInternal(e);w.getMap().getView().setCenterInternal(t),window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",C)};return b.addEventListener("mousedown",function(){window.addEventListener("mousemove",E),window.addEventListener("mouseup",C)}),o}return w(t,e),t.prototype.setMap=function(t){var i=this.getMap();if(t!==i){if(i){var o=i.getView();o&&this.unbindView_(o),this.ovmap_.setTarget(null)}if(e.prototype.setMap.call(this,t),t){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push((0,v.listen)(t,a.default.PROPERTYCHANGE,this.handleMapPropertyChange_,this));var n=t.getView();n&&(this.bindView_(n),n.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_()))}}},t.prototype.handleMapPropertyChange_=function(e){if(e.key===n.default.VIEW){var t=e.oldValue;t&&this.unbindView_(t);var i=this.getMap().getView();this.bindView_(i)}},t.prototype.bindView_=function(e){if(!this.view_){var t=new p.default({projection:e.getProjection()});this.ovmap_.setView(t)}e.addEventListener((0,c.getChangeEventType)(d.default.ROTATION),this.boundHandleRotationChanged_),this.handleRotationChanged_()},t.prototype.unbindView_=function(e){e.removeEventListener((0,c.getChangeEventType)(d.default.ROTATION),this.boundHandleRotationChanged_)},t.prototype.handleRotationChanged_=function(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())},t.prototype.validateExtent_=function(){var e=this.getMap(),t=this.ovmap_;if(e.isRendered()&&t.isRendered()){var i=e.getSize(),o=e.getView().calculateExtentInternal(i);if(!this.viewExtent_||!(0,u.equals)(o,this.viewExtent_)){this.viewExtent_=o;var n=t.getSize(),a=t.getView().calculateExtentInternal(n),l=t.getPixelFromCoordinateInternal((0,u.getTopLeft)(o)),r=t.getPixelFromCoordinateInternal((0,u.getBottomRight)(o)),s=Math.abs(l[0]-r[0]),p=Math.abs(l[1]-r[1]),d=n[0],h=n[1];s<d*b||p<h*b||s>d*m||p>h*m?this.resetExtent_():(0,u.containsExtent)(a,o)||this.recenter_()}}},t.prototype.resetExtent_=function(){if(0!==m&&0!==b){var e=this.getMap(),t=this.ovmap_,i=e.getSize(),o=e.getView().calculateExtentInternal(i),n=t.getView(),a=Math.log(m/b)/Math.LN2,l=1/(Math.pow(2,a/2)*b);(0,u.scaleFromCenter)(o,l),n.fitInternal((0,_.fromExtent)(o))}},t.prototype.recenter_=function(){var e=this.getMap(),t=this.ovmap_,i=e.getView();t.getView().setCenterInternal(i.getCenterInternal())},t.prototype.updateBox_=function(){var e=this.getMap(),t=this.ovmap_;if(e.isRendered()&&t.isRendered()){var i=e.getSize(),o=e.getView(),n=t.getView(),a=this.rotateWithView_?0:-o.getRotation(),l=this.boxOverlay_,r=this.boxOverlay_.getElement(),s=o.getCenterInternal(),p=o.getResolution(),d=n.getResolution(),h=i[0]*p/d,u=i[1]*p/d;if(l.setPosition(s),r){r.style.width=h+"px",r.style.height=u+"px";var c="rotate("+a+"rad)";r.style.transform=c}}},t.prototype.handleClick_=function(e){e.preventDefault(),this.handleToggle_()},t.prototype.handleToggle_=function(){this.element.classList.toggle(h.CLASS_COLLAPSED),this.collapsed_?(0,g.replaceNode)(this.collapseLabel_,this.label_):(0,g.replaceNode)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;var e=this.ovmap_;if(!this.collapsed_){if(e.isRendered())return this.viewExtent_=void 0,void e.render();e.updateSize(),this.resetExtent_(),(0,v.listenOnce)(e,o.default.POSTRENDER,function(e){this.updateBox_()},this)}},t.prototype.getCollapsible=function(){return this.collapsible_},t.prototype.setCollapsible=function(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),!e&&this.collapsed_&&this.handleToggle_())},t.prototype.setCollapsed=function(e){this.collapsible_&&this.collapsed_!==e&&this.handleToggle_()},t.prototype.getCollapsed=function(){return this.collapsed_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.setRotateWithView=function(e){this.rotateWithView_!==e&&(this.rotateWithView_=e,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))},t.prototype.getOverviewMap=function(){return this.ovmap_},t.prototype.render=function(e){this.validateExtent_(),this.updateBox_()},t}(t.default),C=E;exports.default=C;
},{"../renderer/Composite.js":"MHsB","./Control.js":"xxE2","../events/EventType.js":"C8cu","../MapEventType.js":"xLGm","../MapProperty.js":"zlNQ","../ObjectEventType.js":"zehl","../Overlay.js":"qWcX","../OverlayPositioning.js":"VpAM","../PluggableMap.js":"kRwz","../View.js":"hNqE","../ViewProperty.js":"cE7c","../css.js":"HgMV","../extent.js":"QDir","../Object.js":"PhPh","../events.js":"UqnM","../geom/Polygon.js":"Nwwk","../dom.js":"Xno5"}],"DK5d":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Units=void 0;var e=a(require("./Control.js")),t=a(require("../proj/Units.js")),i=require("../css.js"),r=require("../proj.js"),s=require("../asserts.js"),n=require("../Object.js");function a(e){return e&&e.__esModule?e:{default:e}}var o=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),l="units",d={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"};exports.Units=d;var p=[1,2,5],c=25.4/.28,h=function(e){function a(t){var r=this,s=t||{},a=void 0!==s.className?s.className:s.bar?"ol-scale-bar":"ol-scale-line";return(r=e.call(this,{element:document.createElement("div"),render:s.render,target:s.target})||this).innerElement_=document.createElement("div"),r.innerElement_.className=a+"-inner",r.element.className=a+" "+i.CLASS_UNSELECTABLE,r.element.appendChild(r.innerElement_),r.viewState_=null,r.minWidth_=void 0!==s.minWidth?s.minWidth:64,r.renderedVisible_=!1,r.renderedWidth_=void 0,r.renderedHTML_="",r.addEventListener((0,n.getChangeEventType)(l),r.handleUnitsChanged_),r.setUnits(s.units||d.METRIC),r.scaleBar_=s.bar||!1,r.scaleBarSteps_=s.steps||4,r.scaleBarText_=s.text||!1,r.dpi_=s.dpi||void 0,r}return o(a,e),a.prototype.getUnits=function(){return this.get(l)},a.prototype.handleUnitsChanged_=function(){this.updateElement_()},a.prototype.setUnits=function(e){this.set(l,e)},a.prototype.setDpi=function(e){this.dpi_=e},a.prototype.updateElement_=function(){var e=this.viewState_;if(e){var i=e.center,n=e.projection,a=this.getUnits(),o=a==d.DEGREES?t.default.DEGREES:t.default.METERS,l=(0,r.getPointResolution)(n,e.resolution,i,o),h=this.minWidth_*(this.dpi_||c)/c,u=h*l,f="";if(a==d.DEGREES){var _=r.METERS_PER_UNIT[t.default.DEGREES];(u*=_)<_/60?(f="″",l*=3600):u<_?(f="",l*=60):f="°"}else a==d.IMPERIAL?u<.9144?(f="in",l/=.0254):u<1609.344?(f="ft",l/=.3048):(f="mi",l/=1609.344):a==d.NAUTICAL?(l/=1852,f="nm"):a==d.METRIC?u<.001?(f="μm",l*=1e6):u<1?(f="mm",l*=1e3):u<1e3?f="m":(f="km",l/=1e3):a==d.US?u<.9144?(f="in",l*=39.37):u<1609.344?(f="ft",l/=.30480061):(f="mi",l/=1609.3472):(0,s.assert)(!1,33);for(var v,m,E,S,y=3*Math.floor(Math.log(h*l)/Math.log(10));;){E=Math.floor(y/3);var M=Math.pow(10,E);if(v=p[(y%3+3)%3]*M,m=Math.round(v/l),isNaN(m))return this.element.style.display="none",void(this.renderedVisible_=!1);if(m>=h)break;++y}S=this.scaleBar_?this.createScaleBar(m,v,f):v.toFixed(E<0?-E:0)+" "+f,this.renderedHTML_!=S&&(this.innerElement_.innerHTML=S,this.renderedHTML_=S),this.renderedWidth_!=m&&(this.innerElement_.style.width=m+"px",this.renderedWidth_=m),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},a.prototype.createScaleBar=function(e,t,i){for(var r="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),s=[],n=e/this.scaleBarSteps_,a="#ffffff",o=0;o<this.scaleBarSteps_;o++)0===o&&s.push(this.createMarker("absolute",o)),s.push('<div><div class="ol-scale-singlebar" style="width: '+n+"px;background-color: "+a+';"></div>'+this.createMarker("relative",o)+(o%2==0||2===this.scaleBarSteps_?this.createStepText(o,e,!1,t,i):"")+"</div>"),o===this.scaleBarSteps_-1&&s.push(this.createStepText(o+1,e,!0,t,i)),a="#ffffff"===a?"#000000":"#ffffff";return'<div style="display: flex;">'+(this.scaleBarText_?'<div class="ol-scale-text" style="width: '+e+'px;">'+r+"</div>":"")+s.join("")+"</div>"},a.prototype.createMarker=function(e,t){return'<div class="ol-scale-step-marker" style="position: '+e+";top: "+("absolute"===e?3:-10)+'px;"></div>'},a.prototype.createStepText=function(e,t,i,r,s){var n=(0===e?0:Math.round(r/this.scaleBarSteps_*e*100)/100)+(0===e?"":" "+s);return'<div class="ol-scale-step-text" style="margin-left: '+(0===e?-3:t/this.scaleBarSteps_*-1)+"px;text-align: "+(0===e?"left":"center")+"; min-width: "+(0===e?0:t/this.scaleBarSteps_*2)+"px;left: "+(i?t+"px":"unset")+';">'+n+"</div>"},a.prototype.getScaleForResolution=function(){var e=(0,r.getPointResolution)(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center),t=this.dpi_||c,i=this.viewState_.projection.getMetersPerUnit();return parseFloat(e.toString())*i*(1e3/25.4)*t},a.prototype.render=function(e){var t=e.frameState;this.viewState_=t?t.viewState:null,this.updateElement_()},a}(e.default),u=h;exports.default=u;
},{"./Control.js":"xxE2","../proj/Units.js":"yZx6","../css.js":"HgMV","../proj.js":"Diht","../asserts.js":"fLG6","../Object.js":"PhPh"}],"AKwM":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=l(require("./Control.js")),e=l(require("../events/EventType.js")),i=l(require("../pointer/EventType.js")),r=require("../css.js"),n=require("../math.js"),o=require("../easing.js"),s=require("../events.js"),a=require("../events/Event.js");function l(t){return t&&t.__esModule?t:{default:t}}var h=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),d={VERTICAL:0,HORIZONTAL:1},u=function(t){function l(n){var o=this,s=n||{};(o=t.call(this,{element:document.createElement("div"),render:s.render})||this).dragListenerKeys_=[],o.currentResolution_=void 0,o.direction_=d.VERTICAL,o.dragging_,o.heightLimit_=0,o.widthLimit_=0,o.startX_,o.startY_,o.thumbSize_=null,o.sliderInitialized_=!1,o.duration_=void 0!==s.duration?s.duration:200;var l=void 0!==s.className?s.className:"ol-zoomslider",h=document.createElement("button");h.setAttribute("type","button"),h.className=l+"-thumb "+r.CLASS_UNSELECTABLE;var u=o.element;return u.className=l+" "+r.CLASS_UNSELECTABLE+" "+r.CLASS_CONTROL,u.appendChild(h),u.addEventListener(i.default.POINTERDOWN,o.handleDraggerStart_.bind(o),!1),u.addEventListener(i.default.POINTERMOVE,o.handleDraggerDrag_.bind(o),!1),u.addEventListener(i.default.POINTERUP,o.handleDraggerEnd_.bind(o),!1),u.addEventListener(e.default.CLICK,o.handleContainerClick_.bind(o),!1),h.addEventListener(e.default.CLICK,a.stopPropagation,!1),o}return h(l,t),l.prototype.setMap=function(e){t.prototype.setMap.call(this,e),e&&e.render()},l.prototype.initSlider_=function(){var t=this.element,e=t.offsetWidth,i=t.offsetHeight;if(0===e&&0===i)return this.sliderInitialized_=!1;var r=t.firstElementChild,n=getComputedStyle(r),o=r.offsetWidth+parseFloat(n.marginRight)+parseFloat(n.marginLeft),s=r.offsetHeight+parseFloat(n.marginTop)+parseFloat(n.marginBottom);return this.thumbSize_=[o,s],e>i?(this.direction_=d.HORIZONTAL,this.widthLimit_=e-o):(this.direction_=d.VERTICAL,this.heightLimit_=i-s),this.sliderInitialized_=!0},l.prototype.handleContainerClick_=function(t){var e=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),r=this.getResolutionForPosition_(i),n=e.getConstrainedZoom(e.getZoomForResolution(r));e.animateInternal({zoom:n,duration:this.duration_,easing:o.easeOut})},l.prototype.handleDraggerStart_=function(t){if(!this.dragging_&&t.target===this.element.firstElementChild){var e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){var r=this.handleDraggerDrag_,n=this.handleDraggerEnd_,o=this.getMap().getOwnerDocument();this.dragListenerKeys_.push((0,s.listen)(o,i.default.POINTERMOVE,r,this),(0,s.listen)(o,i.default.POINTERUP,n,this))}}},l.prototype.handleDraggerDrag_=function(t){if(this.dragging_){var e=t.clientX-this.startX_,i=t.clientY-this.startY_,r=this.getRelativePosition_(e,i);this.currentResolution_=this.getResolutionForPosition_(r),this.getMap().getView().setResolution(this.currentResolution_)}},l.prototype.handleDraggerEnd_=function(t){this.dragging_&&(this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(s.unlistenByKey),this.dragListenerKeys_.length=0)},l.prototype.setThumbPosition_=function(t){var e=this.getPositionForResolution_(t),i=this.element.firstElementChild;this.direction_==d.HORIZONTAL?i.style.left=this.widthLimit_*e+"px":i.style.top=this.heightLimit_*e+"px"},l.prototype.getRelativePosition_=function(t,e){var i;return i=this.direction_===d.HORIZONTAL?t/this.widthLimit_:e/this.heightLimit_,(0,n.clamp)(i,0,1)},l.prototype.getResolutionForPosition_=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},l.prototype.getPositionForResolution_=function(t){var e=this.getMap().getView().getValueForResolutionFunction();return(0,n.clamp)(1-e(t),0,1)},l.prototype.render=function(t){if(t.frameState&&(this.sliderInitialized_||this.initSlider_())){var e=t.frameState.viewState.resolution;this.currentResolution_=e,this.setThumbPosition_(e)}},l}(t.default),g=u;exports.default=g;
},{"./Control.js":"xxE2","../events/EventType.js":"C8cu","../pointer/EventType.js":"TaSm","../css.js":"HgMV","../math.js":"B96G","../easing.js":"IeCz","../events.js":"UqnM","../events/Event.js":"fKNg"}],"W4Y0":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./Control.js")),e=r(require("../events/EventType.js")),n=require("../css.js"),o=require("../geom/Polygon.js");function r(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),a=function(t){function r(o){var r=this,i=o||{};(r=t.call(this,{element:document.createElement("div"),target:i.target})||this).extent=i.extent?i.extent:null;var a=void 0!==i.className?i.className:"ol-zoom-extent",l=void 0!==i.label?i.label:"E",u=void 0!==i.tipLabel?i.tipLabel:"Fit to extent",c=document.createElement("button");c.setAttribute("type","button"),c.title=u,c.appendChild("string"==typeof l?document.createTextNode(l):l),c.addEventListener(e.default.CLICK,r.handleClick_.bind(r),!1);var s=a+" "+n.CLASS_UNSELECTABLE+" "+n.CLASS_CONTROL,p=r.element;return p.className=s,p.appendChild(c),r}return i(r,t),r.prototype.handleClick_=function(t){t.preventDefault(),this.handleZoomToExtent()},r.prototype.handleZoomToExtent=function(){var t=this.getMap().getView(),e=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal((0,o.fromExtent)(e))},r}(t.default),l=a;exports.default=l;
},{"./Control.js":"xxE2","../events/EventType.js":"C8cu","../css.js":"HgMV","../geom/Polygon.js":"Nwwk"}],"ucqx":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaults=d,Object.defineProperty(exports,"Attribution",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"Rotate",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"Zoom",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"Control",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"FullScreen",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"MousePosition",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"OverviewMap",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"ScaleLine",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(exports,"ZoomSlider",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(exports,"ZoomToExtent",{enumerable:!0,get:function(){return f.default}});var e=s(require("./control/Attribution.js")),t=s(require("./Collection.js")),r=s(require("./control/Rotate.js")),o=s(require("./control/Zoom.js")),n=s(require("./control/Control.js")),u=s(require("./control/FullScreen.js")),i=s(require("./control/MousePosition.js")),l=s(require("./control/OverviewMap.js")),a=s(require("./control/ScaleLine.js")),c=s(require("./control/ZoomSlider.js")),f=s(require("./control/ZoomToExtent.js"));function s(e){return e&&e.__esModule?e:{default:e}}function d(n){var u=n||{},i=new t.default;return(void 0===u.zoom||u.zoom)&&i.push(new o.default(u.zoomOptions)),(void 0===u.rotate||u.rotate)&&i.push(new r.default(u.rotateOptions)),(void 0===u.attribution||u.attribution)&&i.push(new e.default(u.attributionOptions)),i}
},{"./control/Attribution.js":"Q4Cf","./Collection.js":"FnDa","./control/Rotate.js":"sCgw","./control/Zoom.js":"L3CO","./control/Control.js":"xxE2","./control/FullScreen.js":"dOoh","./control/MousePosition.js":"Cbl8","./control/OverviewMap.js":"KMhA","./control/ScaleLine.js":"DK5d","./control/ZoomSlider.js":"AKwM","./control/ZoomToExtent.js":"W4Y0"}],"caOi":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={ACTIVE:"active"};exports.default=e;
},{}],"jB2p":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pan=a,exports.zoomByDelta=u,exports.default=void 0;var t=o(require("../Object.js")),e=o(require("./Property.js")),n=require("../easing.js");function o(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=function(t){function n(e){var n=t.call(this)||this;return e&&e.handleEvent&&(n.handleEvent=e.handleEvent),n.map_=null,n.setActive(!0),n}return r(n,t),n.prototype.getActive=function(){return this.get(e.default.ACTIVE)},n.prototype.getMap=function(){return this.map_},n.prototype.handleEvent=function(t){return!0},n.prototype.setActive=function(t){this.set(e.default.ACTIVE,t)},n.prototype.setMap=function(t){this.map_=t},n}(t.default);function a(t,e,o){var r=t.getCenterInternal();if(r){var i=[r[0]+e[0],r[1]+e[1]];t.animateInternal({duration:void 0!==o?o:250,easing:n.linear,center:t.getConstrainedCenter(i)})}}function u(t,e,o,r){var i=t.getZoom();if(void 0!==i){var a=t.getConstrainedZoom(i+e),u=t.getResolutionForZoom(a);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:u,anchor:o,duration:void 0!==r?r:250,easing:n.easeOut})}}var s=i;exports.default=s;
},{"../Object.js":"PhPh","./Property.js":"caOi","../easing.js":"IeCz"}],"NSa4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("./Interaction.js")),e=r(require("../MapBrowserEventType.js"));function r(t){return t&&t.__esModule?t:{default:t}}function n(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return n=function(){return t},t}function o(t){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var e=n();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var a=o?Object.getOwnPropertyDescriptor(t,u):null;a&&(a.get||a.set)?Object.defineProperty(r,u,a):r[u]=t[u]}return r.default=t,e&&e.set(t,r),r}var u=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),a=function(r){function n(t){var e=r.call(this)||this,n=t||{};return e.delta_=n.delta?n.delta:1,e.duration_=void 0!==n.duration?n.duration:250,e}return u(n,r),n.prototype.handleEvent=function(r){var n=!1;if(r.type==e.default.DBLCLICK){var o=r.originalEvent,u=r.map,a=r.coordinate,i=o.shiftKey?-this.delta_:this.delta_,f=u.getView();(0,t.zoomByDelta)(f,i,a,this.duration_),o.preventDefault(),n=!0}return!n},n}(t.default),i=a;exports.default=i;
},{"./Interaction.js":"jB2p","../MapBrowserEventType.js":"YhDM"}],"dnA2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.centroid=a,exports.default=void 0;var t=r(require("./Interaction.js")),e=r(require("../MapBrowserEventType.js")),n=require("../obj.js");function r(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(t){function r(e){var n=this,r=e||{};return n=t.call(this,r)||this,r.handleDownEvent&&(n.handleDownEvent=r.handleDownEvent),r.handleDragEvent&&(n.handleDragEvent=r.handleDragEvent),r.handleMoveEvent&&(n.handleMoveEvent=r.handleMoveEvent),r.handleUpEvent&&(n.handleUpEvent=r.handleUpEvent),r.stopDown&&(n.stopDown=r.stopDown),n.handlingDownUpSequence=!1,n.trackedPointers_={},n.targetPointers=[],n}return o(r,t),r.prototype.getPointerCount=function(){return this.targetPointers.length},r.prototype.handleDownEvent=function(t){return!1},r.prototype.handleDragEvent=function(t){},r.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var n=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==e.default.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==e.default.POINTERUP){var r=this.handleUpEvent(t);this.handlingDownUpSequence=r&&this.targetPointers.length>0}}else if(t.type==e.default.POINTERDOWN){var o=this.handleDownEvent(t);this.handlingDownUpSequence=o,n=this.stopDown(o)}else t.type==e.default.POINTERMOVE&&this.handleMoveEvent(t);return!n},r.prototype.handleMoveEvent=function(t){},r.prototype.handleUpEvent=function(t){return!1},r.prototype.stopDown=function(t){return t},r.prototype.updateTrackedPointers_=function(t){if(u(t)){var r=t.originalEvent,o=r.pointerId.toString();t.type==e.default.POINTERUP?delete this.trackedPointers_[o]:t.type==e.default.POINTERDOWN?this.trackedPointers_[o]=r:o in this.trackedPointers_&&(this.trackedPointers_[o]=r),this.targetPointers=(0,n.getValues)(this.trackedPointers_)}},r}(t.default);function a(t){for(var e=t.length,n=0,r=0,o=0;o<e;o++)n+=t[o].clientX,r+=t[o].clientY;return[n/e,r/e]}function u(t){var n=t.type;return n===e.default.POINTERDOWN||n===e.default.POINTERDRAG||n===e.default.POINTERUP}var l=i;exports.default=l;
},{"./Interaction.js":"jB2p","../MapBrowserEventType.js":"YhDM","../obj.js":"mH6q"}],"YcID":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.all=i,exports.primaryAction=exports.penOnly=exports.touchOnly=exports.mouseOnly=exports.targetNotEditable=exports.shiftKeyOnly=exports.platformModifierKeyOnly=exports.noModifierKeys=exports.doubleClick=exports.singleClick=exports.pointerMove=exports.never=exports.mouseActionButton=exports.click=exports.always=exports.focusWithTabindex=exports.focus=exports.altShiftKeysOnly=exports.altKeyOnly=void 0;var e=o(require("../MapBrowserEventType.js")),t=require("../functions.js"),r=require("../has.js"),n=require("../asserts.js");function o(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=arguments;return function(e){for(var r=!0,n=0,o=t.length;n<o&&(r=r&&t[n](e));++n);return r}}var a=function(e){var t=e.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey};exports.altKeyOnly=a;var s=function(e){var t=e.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey};exports.altShiftKeysOnly=s;var u=function(e){return e.target.getTargetElement().contains(document.activeElement)};exports.focus=u;var l=function(e){return!e.map.getTargetElement().hasAttribute("tabindex")||u(e)};exports.focusWithTabindex=l;var p=t.TRUE;exports.always=p;var y=function(t){return t.type==e.default.CLICK};exports.click=y;var v=function(e){var t=e.originalEvent;return 0==t.button&&!(r.WEBKIT&&r.MAC&&t.ctrlKey)};exports.mouseActionButton=v;var c=t.FALSE;exports.never=c;var f=function(e){return"pointermove"==e.type};exports.pointerMove=f;var x=function(t){return t.type==e.default.SINGLECLICK};exports.singleClick=x;var K=function(t){return t.type==e.default.DBLCLICK};exports.doubleClick=K;var E=function(e){var t=e.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey};exports.noModifierKeys=E;var d=function(e){var t=e.originalEvent;return!t.altKey&&(r.MAC?t.metaKey:t.ctrlKey)&&!t.shiftKey};exports.platformModifierKeyOnly=d;var g=function(e){var t=e.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey};exports.shiftKeyOnly=g;var m=function(e){var t=e.originalEvent.target.tagName;return"INPUT"!==t&&"SELECT"!==t&&"TEXTAREA"!==t};exports.targetNotEditable=m;var h=function(e){var t=e.originalEvent;return(0,n.assert)(void 0!==t,56),"mouse"==t.pointerType};exports.mouseOnly=h;var O=function(e){var t=e.originalEvent;return(0,n.assert)(void 0!==t,56),"touch"===t.pointerType};exports.touchOnly=O;var T=function(e){var t=e.originalEvent;return(0,n.assert)(void 0!==t,56),"pen"===t.pointerType};exports.penOnly=T;var C=function(e){var t=e.originalEvent;return(0,n.assert)(void 0!==t,56),t.isPrimary&&0===t.button};exports.primaryAction=C;
},{"../MapBrowserEventType.js":"YhDM","../functions.js":"RgA2","../has.js":"f3Nv","../asserts.js":"fLG6"}],"N4gU":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=a(require("./Pointer.js")),e=require("../functions.js"),n=require("../events/condition.js"),i=require("../easing.js"),r=require("../coordinate.js");function o(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}function a(t){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var a=i?Object.getOwnPropertyDescriptor(t,r):null;a&&(a.get||a.set)?Object.defineProperty(n,r,a):n[r]=t[r]}return n.default=t,e&&e.set(t,n),n}var s=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),c=function(o){function a(t){var i=o.call(this,{stopDown:e.FALSE})||this,r=t||{};i.kinetic_=r.kinetic,i.lastCentroid=null,i.lastPointersCount_,i.panning_=!1;var a=r.condition?r.condition:(0,n.all)(n.noModifierKeys,n.primaryAction);return i.condition_=r.onFocusOnly?(0,n.all)(n.focusWithTabindex,a):a,i.noKinetic_=!1,i}return s(a,o),a.prototype.handleDragEvent=function(e){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var n=this.targetPointers,i=(0,t.centroid)(n);if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){var o=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],a=e.map.getView();(0,r.scale)(o,a.getResolution()),(0,r.rotate)(o,a.getRotation()),a.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=n.length,e.originalEvent.preventDefault()},a.prototype.handleUpEvent=function(t){var e=t.map,n=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var r=this.kinetic_.getDistance(),o=this.kinetic_.getAngle(),a=n.getCenterInternal(),s=e.getPixelFromCoordinateInternal(a),c=e.getCoordinateFromPixelInternal([s[0]-r*Math.cos(o),s[1]-r*Math.sin(o)]);n.animateInternal({center:n.getConstrainedCenter(c),duration:500,easing:i.easeOut})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},a.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},a}(t.default),l=c;exports.default=l;
},{"./Pointer.js":"dnA2","../functions.js":"RgA2","../events/condition.js":"YcID","../easing.js":"IeCz","../coordinate.js":"nGsj"}],"PgBj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=i(require("./Pointer.js")),n=require("../functions.js"),e=require("../events/condition.js"),o=require("../rotationconstraint.js");function i(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){function o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),a=function(t){function i(o){var i=this,r=o||{};return(i=t.call(this,{stopDown:n.FALSE})||this).condition_=r.condition?r.condition:e.altShiftKeysOnly,i.lastAngle_=void 0,i.duration_=void 0!==r.duration?r.duration:250,i}return r(i,t),i.prototype.handleDragEvent=function(t){if((0,e.mouseOnly)(t)){var n=t.map,i=n.getView();if(i.getConstraints().rotation!==o.disable){var r=n.getSize(),a=t.pixel,u=Math.atan2(r[1]/2-a[1],a[0]-r[0]/2);if(void 0!==this.lastAngle_){var s=u-this.lastAngle_;i.adjustRotationInternal(-s)}this.lastAngle_=u}}},i.prototype.handleUpEvent=function(t){return!(0,e.mouseOnly)(t)||(t.map.getView().endInteraction(this.duration_),!1)},i.prototype.handleDownEvent=function(t){return!!(0,e.mouseOnly)(t)&&(!(!(0,e.mouseActionButton)(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},i}(t.default),u=a;exports.default=u;
},{"./Pointer.js":"dnA2","../functions.js":"RgA2","../events/condition.js":"YcID","../rotationconstraint.js":"EKd0"}],"bMDg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=i(require("../Disposable.js")),e=i(require("../geom/Polygon.js"));function i(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=function(t){function i(e){var i=t.call(this)||this;return i.geometry_=null,i.element_=document.createElement("div"),i.element_.style.position="absolute",i.element_.style.pointerEvents="auto",i.element_.className="ol-box "+e,i.map_=null,i.startPixel_=null,i.endPixel_=null,i}return n(i,t),i.prototype.disposeInternal=function(){this.setMap(null)},i.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,i=this.element_.style;i.left=Math.min(t[0],e[0])+"px",i.top=Math.min(t[1],e[1])+"px",i.width=Math.abs(e[0]-t[0])+"px",i.height=Math.abs(e[1]-t[1])+"px"},i.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},i.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},i.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,i=this.endPixel_,n=[t,[t[0],i[1]],i,[i[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new e.default([n])},i.prototype.getGeometry=function(){return this.geometry_},i}(t.default),o=r;exports.default=o;
},{"../Disposable.js":"DDda","../geom/Polygon.js":"Nwwk"}],"AQRw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.DragBoxEvent=void 0;var t=i(require("../events/Event.js")),n=i(require("./Pointer.js")),o=i(require("../render/Box.js")),e=require("../events/condition.js");function i(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(n,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])})(n,o)};return function(n,o){function e(){this.constructor=n}t(n,o),n.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}}(),s={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},a=function(t){function n(n,o,e){var i=t.call(this,n)||this;return i.coordinate=o,i.mapBrowserEvent=e,i}return r(n,t),n}(t.default);exports.DragBoxEvent=a;var u=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.box_=new o.default(r.className||"ol-dragbox"),i.minArea_=void 0!==r.minArea?r.minArea:64,r.onBoxEnd&&(i.onBoxEnd=r.onBoxEnd),i.startPixel_=null,i.condition_=r.condition?r.condition:e.mouseActionButton,i.boxEndCondition_=r.boxEndCondition?r.boxEndCondition:i.defaultBoxEndCondition,i}return r(n,t),n.prototype.defaultBoxEndCondition=function(t,n,o){var e=o[0]-n[0],i=o[1]-n[1];return e*e+i*i>=this.minArea_},n.prototype.getGeometry=function(){return this.box_.getGeometry()},n.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new a(s.BOXDRAG,t.coordinate,t))},n.prototype.handleUpEvent=function(t){this.box_.setMap(null);var n=this.boxEndCondition_(t,this.startPixel_,t.pixel);return n&&this.onBoxEnd(t),this.dispatchEvent(new a(n?s.BOXEND:s.BOXCANCEL,t.coordinate,t)),!1},n.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new a(s.BOXSTART,t.coordinate,t)),!0)},n.prototype.onBoxEnd=function(t){},n}(n.default),d=u;exports.default=d;
},{"../events/Event.js":"fKNg","./Pointer.js":"dnA2","../render/Box.js":"bMDg","../events/condition.js":"YcID"}],"pTqW":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./DragBox.js")),e=require("../extent.js"),o=require("../easing.js"),n=require("../events/condition.js");function r(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),a=function(t){function r(e){var o=this,r=e||{},i=r.condition?r.condition:n.shiftKeyOnly;return(o=t.call(this,{condition:i,className:r.className||"ol-dragzoom",minArea:r.minArea})||this).duration_=void 0!==r.duration?r.duration:200,o.out_=void 0!==r.out&&r.out,o}return i(r,t),r.prototype.onBoxEnd=function(t){var n=this.getMap(),r=n.getView(),i=n.getSize(),a=this.getGeometry().getExtent();if(this.out_){var u=r.calculateExtentInternal(i),s=(0,e.createOrUpdateFromCoordinates)([n.getPixelFromCoordinateInternal((0,e.getBottomLeft)(a)),n.getPixelFromCoordinateInternal((0,e.getTopRight)(a))]),c=r.getResolutionForExtentInternal(s,i);(0,e.scaleFromCenter)(u,1/c),a=u}var l=r.getConstrainedResolution(r.getResolutionForExtentInternal(a,i)),d=r.getConstrainedCenter((0,e.getCenter)(a),l);r.animateInternal({resolution:l,center:d,duration:this.duration_,easing:o.easeOut})},r}(t.default),u=a;exports.default=u;
},{"./DragBox.js":"AQRw","../extent.js":"QDir","../easing.js":"IeCz","../events/condition.js":"YcID"}],"mmJk":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={LEFT:37,UP:38,RIGHT:39,DOWN:40};exports.default=e;
},{}],"CFRo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=a(require("../events/EventType.js")),e=u(require("./Interaction.js")),r=a(require("../events/KeyCode.js")),n=require("../events/condition.js"),o=require("../coordinate.js");function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}function u(t){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var e=i();if(e&&e.has(t))return e.get(t);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var u=n?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=t[o]}return r.default=t,e&&e.set(t,r),r}function a(t){return t&&t.__esModule?t:{default:t}}var f=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),l=function(i){function u(t){var e=i.call(this)||this,r=t||{};return e.defaultCondition_=function(t){return(0,n.noModifierKeys)(t)&&(0,n.targetNotEditable)(t)},e.condition_=void 0!==r.condition?r.condition:e.defaultCondition_,e.duration_=void 0!==r.duration?r.duration:100,e.pixelDelta_=void 0!==r.pixelDelta?r.pixelDelta:128,e}return f(u,i),u.prototype.handleEvent=function(n){var i=!1;if(n.type==t.default.KEYDOWN){var u=n.originalEvent,a=u.keyCode;if(this.condition_(n)&&(a==r.default.DOWN||a==r.default.LEFT||a==r.default.RIGHT||a==r.default.UP)){var f=n.map.getView(),l=f.getResolution()*this.pixelDelta_,c=0,d=0;a==r.default.DOWN?d=-l:a==r.default.LEFT?c=-l:a==r.default.RIGHT?c=l:d=l;var p=[c,d];(0,o.rotate)(p,f.getRotation()),(0,e.pan)(f,p,this.duration_),u.preventDefault(),i=!0}}return!i},u}(e.default),c=l;exports.default=c;
},{"../events/EventType.js":"C8cu","./Interaction.js":"jB2p","../events/KeyCode.js":"mmJk","../events/condition.js":"YcID","../coordinate.js":"nGsj"}],"S8wR":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=i(require("../events/EventType.js")),e=o(require("./Interaction.js")),r=require("../events/condition.js");function n(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return n=function(){return t},t}function o(t){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var e=n();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}function i(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),u=function(n){function o(t){var e=n.call(this)||this,o=t||{};return e.condition_=o.condition?o.condition:r.targetNotEditable,e.delta_=o.delta?o.delta:1,e.duration_=void 0!==o.duration?o.duration:100,e}return a(o,n),o.prototype.handleEvent=function(r){var n=!1;if(r.type==t.default.KEYDOWN||r.type==t.default.KEYPRESS){var o=r.originalEvent,i=o.charCode;if(this.condition_(r)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var a=r.map,u=i=="+".charCodeAt(0)?this.delta_:-this.delta_,c=a.getView();(0,e.zoomByDelta)(c,u,void 0,this.duration_),o.preventDefault(),n=!0}}return!n},o}(e.default),c=u;exports.default=c;
},{"../events/EventType.js":"C8cu","./Interaction.js":"jB2p","../events/condition.js":"YcID"}],"gAnK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=function(){function t(t,i,n){this.decay_=t,this.minVelocity_=i,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,i){this.points_.push(t,i,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,i=this.points_.length-3;if(this.points_[i+2]<t)return!1;for(var n=i-3;n>0&&this.points_[n+2]>t;)n-=3;var e=this.points_[i+2]-this.points_[n+2];if(e<1e3/60)return!1;var s=this.points_[i]-this.points_[n],o=this.points_[i+1]-this.points_[n+1];return this.angle_=Math.atan2(o,s),this.initialVelocity_=Math.sqrt(s*s+o*o)/e,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),i=t;exports.default=i;
},{}],"kPt6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Mode=void 0;var t=s(require("../events/EventType.js")),e=a(require("./Interaction.js")),o=require("../has.js"),i=require("../events/condition.js"),n=require("../math.js");function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}function a(t){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var e=r();if(e&&e.has(t))return e.get(t);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var a=i?Object.getOwnPropertyDescriptor(t,n):null;a&&(a.get||a.set)?Object.defineProperty(o,n,a):o[n]=t[n]}return o.default=t,e&&e.set(t,o),o}function s(t){return t&&t.__esModule?t:{default:t}}var u=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),l={TRACKPAD:"trackpad",WHEEL:"wheel"};exports.Mode=l;var c=function(r){function a(t){var e=this,o=t||{};(e=r.call(this,o)||this).totalDelta_=0,e.lastDelta_=0,e.maxDelta_=void 0!==o.maxDelta?o.maxDelta:1,e.duration_=void 0!==o.duration?o.duration:250,e.timeout_=void 0!==o.timeout?o.timeout:80,e.useAnchor_=void 0===o.useAnchor||o.useAnchor,e.constrainResolution_=void 0!==o.constrainResolution&&o.constrainResolution;var n=o.condition?o.condition:i.always;return e.condition_=o.onFocusOnly?(0,i.all)(i.focusWithTabindex,n):n,e.lastAnchor_=null,e.startTime_=void 0,e.timeoutId_,e.mode_=void 0,e.trackpadEventGap_=400,e.trackpadTimeoutId_,e.deltaPerZoom_=300,e}return u(a,r),a.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},a.prototype.handleEvent=function(e){if(!this.condition_(e))return!0;if(e.type!==t.default.WHEEL)return!0;var i,n=e.map,r=e.originalEvent;if(r.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.coordinate),e.type==t.default.WHEEL&&(i=r.deltaY,o.FIREFOX&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(i/=o.DEVICE_PIXEL_RATIO),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(i*=40)),0===i)return!1;this.lastDelta_=i;var a=Date.now();void 0===this.startTime_&&(this.startTime_=a),(!this.mode_||a-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(i)<4?l.TRACKPAD:l.WHEEL);var s=n.getView();if(this.mode_===l.TRACKPAD&&!s.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(s.getAnimating()&&s.cancelAnimations(),s.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),s.adjustZoom(-i/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=a,!1;this.totalDelta_+=i;var u=Math.max(this.timeout_-(a-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),u),!1},a.prototype.handleWheelZoom_=function(t){var o=t.getView();o.getAnimating()&&o.cancelAnimations();var i=-(0,n.clamp)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(o.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),(0,e.zoomByDelta)(o,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},a.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},a}(e.default),_=c;exports.default=_;
},{"../events/EventType.js":"C8cu","./Interaction.js":"jB2p","../has.js":"f3Nv","../events/condition.js":"YcID","../math.js":"B96G"}],"hbGN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("./Pointer.js")),e=require("../functions.js"),n=require("../rotationconstraint.js");function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}function o(t){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var e=r();if(e&&e.has(t))return e.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=t[i]}return n.default=t,e&&e.set(t,n),n}var i=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(r){function o(t){var n=this,o=t||{},i=o;return i.stopDown||(i.stopDown=e.FALSE),(n=r.call(this,i)||this).anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=void 0!==o.threshold?o.threshold:.3,n.duration_=void 0!==o.duration?o.duration:250,n}return i(o,r),o.prototype.handleDragEvent=function(e){var r=0,o=this.targetPointers[0],i=this.targetPointers[1],a=Math.atan2(i.clientY-o.clientY,i.clientX-o.clientX);if(void 0!==this.lastAngle_){var s=a-this.lastAngle_;this.rotationDelta_+=s,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),r=s}this.lastAngle_=a;var l=e.map,u=l.getView();if(u.getConstraints().rotation!==n.disable){var c=l.getViewport().getBoundingClientRect(),h=(0,t.centroid)(this.targetPointers);h[0]-=c.left,h[1]-=c.top,this.anchor_=l.getCoordinateFromPixelInternal(h),this.rotating_&&(l.render(),u.adjustRotationInternal(r,this.anchor_))}},o.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)},o.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},o}(t.default),s=a;exports.default=s;
},{"./Pointer.js":"dnA2","../functions.js":"RgA2","../rotationconstraint.js":"EKd0"}],"rcXm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./Pointer.js")),e=require("../functions.js");function n(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return n=function(){return t},t}function r(t){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var e=n();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var o=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(n){function r(t){var r=this,o=t||{},i=o;return i.stopDown||(i.stopDown=e.FALSE),(r=n.call(this,i)||this).anchor_=null,r.duration_=void 0!==o.duration?o.duration:400,r.lastDistance_=void 0,r.lastScaleDelta_=1,r}return o(r,n),r.prototype.handleDragEvent=function(e){var n=1,r=this.targetPointers[0],o=this.targetPointers[1],i=r.clientX-o.clientX,a=r.clientY-o.clientY,s=Math.sqrt(i*i+a*a);void 0!==this.lastDistance_&&(n=this.lastDistance_/s),this.lastDistance_=s;var c=e.map,l=c.getView();1!=n&&(this.lastScaleDelta_=n);var u=c.getViewport().getBoundingClientRect(),p=(0,t.centroid)(this.targetPointers);p[0]-=u.left,p[1]-=u.top,this.anchor_=c.getCoordinateFromPixelInternal(p),c.render(),l.adjustResolutionInternal(n,this.anchor_)},r.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),n=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,n),!1}return!0},r.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},r}(t.default),a=i;exports.default=a;
},{"./Pointer.js":"dnA2","../functions.js":"RgA2"}],"AbO3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"};exports.default=e;
},{}],"IYO6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.DragAndDropEvent=void 0;var t=a(require("../events/Event.js")),e=a(require("../events/EventType.js")),r=a(require("../format/FormatType.js")),s=a(require("./Interaction.js")),n=require("../functions.js"),o=require("../proj.js"),i=require("../events.js");function a(t){return t&&t.__esModule?t:{default:t}}var u=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function s(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(s.prototype=r.prototype,new s)}}(),p={ADD_FEATURES:"addfeatures"},f=function(t){function e(e,r,s,n){var o=t.call(this,e)||this;return o.features=s,o.file=r,o.projection=n,o}return u(e,t),e}(t.default);exports.DragAndDropEvent=f;var l=function(t){function s(e){var s=this,i=e||{};(s=t.call(this,{handleEvent:n.TRUE})||this).readAsBuffer_=!1,s.formats_=[];for(var a=i.formatConstructors?i.formatConstructors:[],u=0,p=a.length;u<p;++u){var f=a[u];"function"==typeof f&&(f=new f),s.formats_.push(f),s.readAsBuffer_=s.readAsBuffer_||f.getType()===r.default.ARRAY_BUFFER}return s.projection_=i.projection?(0,o.get)(i.projection):null,s.dropListenKeys_=null,s.source_=i.source||null,s.target=i.target?i.target:null,s}return u(s,t),s.prototype.handleResult_=function(t,e){var s,n=e.target.result,o=this.getMap(),i=this.projection_;i||(i=o.getView().getProjection());for(var a=this.formats_,u=0,l=a.length;u<l;++u){var c=a[u],h=n;this.readAsBuffer_&&c.getType()!==r.default.ARRAY_BUFFER&&(void 0===s&&(s=(new TextDecoder).decode(n)),h=s);var d=this.tryReadFeatures_(c,h,{featureProjection:i});if(d&&d.length>0){this.source_&&(this.source_.clear(),this.source_.addFeatures(d)),this.dispatchEvent(new f(p.ADD_FEATURES,t,d,i));break}}},s.prototype.registerListeners_=function(){var t=this.getMap();if(t){var r=this.target?this.target:t.getViewport();this.dropListenKeys_=[(0,i.listen)(r,e.default.DROP,this.handleDrop,this),(0,i.listen)(r,e.default.DRAGENTER,this.handleStop,this),(0,i.listen)(r,e.default.DRAGOVER,this.handleStop,this),(0,i.listen)(r,e.default.DROP,this.handleStop,this)]}},s.prototype.setActive=function(e){!this.getActive()&&e&&this.registerListeners_(),this.getActive()&&!e&&this.unregisterListeners_(),t.prototype.setActive.call(this,e)},s.prototype.setMap=function(e){this.unregisterListeners_(),t.prototype.setMap.call(this,e),this.getActive()&&this.registerListeners_()},s.prototype.tryReadFeatures_=function(t,e,r){try{return t.readFeatures(e,r)}catch(s){return null}},s.prototype.unregisterListeners_=function(){this.dropListenKeys_&&(this.dropListenKeys_.forEach(i.unlistenByKey),this.dropListenKeys_=null)},s.prototype.handleDrop=function(t){for(var r=t.dataTransfer.files,s=0,n=r.length;s<n;++s){var o=r.item(s),i=new FileReader;i.addEventListener(e.default.LOAD,this.handleResult_.bind(this,o)),this.readAsBuffer_?i.readAsArrayBuffer(o):i.readAsText(o)}},s.prototype.handleStop=function(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"},s}(s.default),c=l;exports.default=c;
},{"../events/Event.js":"fKNg","../events/EventType.js":"C8cu","../format/FormatType.js":"AbO3","./Interaction.js":"jB2p","../functions.js":"RgA2","../proj.js":"Diht","../events.js":"UqnM"}],"ITeC":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=n(require("./Pointer.js")),e=require("../events/condition.js");function n(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=function(t){function n(n){var i=this,o=n||{};return(i=t.call(this,o)||this).condition_=o.condition?o.condition:e.shiftKeyOnly,i.lastAngle_=void 0,i.lastMagnitude_=void 0,i.lastScaleDelta_=0,i.duration_=void 0!==o.duration?o.duration:400,i}return i(n,t),n.prototype.handleDragEvent=function(t){if((0,e.mouseOnly)(t)){var n=t.map,i=n.getSize(),o=t.pixel,a=o[0]-i[0]/2,r=i[1]/2-o[1],s=Math.atan2(r,a),l=Math.sqrt(a*a+r*r),u=n.getView();if(void 0!==this.lastAngle_){var d=this.lastAngle_-s;u.adjustRotationInternal(d)}this.lastAngle_=s,void 0!==this.lastMagnitude_&&u.adjustResolutionInternal(this.lastMagnitude_/l),void 0!==this.lastMagnitude_&&(this.lastScaleDelta_=this.lastMagnitude_/l),this.lastMagnitude_=l}},n.prototype.handleUpEvent=function(t){if(!(0,e.mouseOnly)(t))return!0;var n=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,i),this.lastScaleDelta_=0,!1},n.prototype.handleDownEvent=function(t){return!!(0,e.mouseOnly)(t)&&(!!this.condition_(t)&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0))},n}(t.default),a=o;exports.default=a;
},{"./Pointer.js":"dnA2","../events/condition.js":"YcID"}],"AyCw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=s(require("./GeometryType.js")),e=s(require("./SimpleGeometry.js")),r=require("../extent.js"),o=require("./flat/deflate.js"),i=require("./flat/transform.js");function s(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),a=function(e){function s(t,r,o){var i=e.call(this)||this;if(void 0!==o&&void 0===r)i.setFlatCoordinates(o,t);else{var s=r||0;i.setCenterAndRadius(t,s,o)}return i}return n(s,e),s.prototype.clone=function(){var t=new s(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},s.prototype.closestPointXY=function(t,e,r,o){var i=this.flatCoordinates,s=t-i[0],n=e-i[1],a=s*s+n*n;if(a<o){if(0===a)for(var u=0;u<this.stride;++u)r[u]=i[u];else{var d=this.getRadius()/Math.sqrt(a);r[0]=i[0]+d*s,r[1]=i[1]+d*n;for(u=2;u<this.stride;++u)r[u]=i[u]}return r.length=this.stride,a}return o},s.prototype.containsXY=function(t,e){var r=this.flatCoordinates,o=t-r[0],i=e-r[1];return o*o+i*i<=this.getRadiusSquared_()},s.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},s.prototype.computeExtent=function(t){var e=this.flatCoordinates,o=e[this.stride]-e[0];return(0,r.createOrUpdate)(e[0]-o,e[1]-o,e[0]+o,e[1]+o,t)},s.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},s.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},s.prototype.getType=function(){return t.default.CIRCLE},s.prototype.intersectsExtent=function(t){var e=this.getExtent();if((0,r.intersects)(t,e)){var o=this.getCenter();return t[0]<=o[0]&&t[2]>=o[0]||(t[1]<=o[1]&&t[3]>=o[1]||(0,r.forEachCorner)(t,this.intersectsCoordinate.bind(this)))}return!1},s.prototype.setCenter=function(t){var e=this.stride,r=this.flatCoordinates[e]-this.flatCoordinates[0],o=t.slice();o[e]=o[0]+r;for(var i=1;i<e;++i)o[e+i]=t[i];this.setFlatCoordinates(this.layout,o),this.changed()},s.prototype.setCenterAndRadius=function(t,e,r){this.setLayout(r,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var i=this.flatCoordinates,s=(0,o.deflateCoordinate)(i,0,t,this.stride);i[s++]=i[0]+e;for(var n=1,a=this.stride;n<a;++n)i[s++]=i[n];i.length=s,this.changed()},s.prototype.getCoordinates=function(){return null},s.prototype.setCoordinates=function(t,e){},s.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},s.prototype.rotate=function(t,e){var r=this.getCenter(),o=this.getStride();this.setCenter((0,i.rotate)(r,0,r.length,o,t,e,r)),this.changed()},s.prototype.translate=function(t,e){var r=this.getCenter(),o=this.getStride();this.setCenter((0,i.translate)(r,0,r.length,o,t,e,r)),this.changed()},s}(e.default);a.prototype.transform;var u=a;exports.default=u;
},{"./GeometryType.js":"lmV0","./SimpleGeometry.js":"pnrv","../extent.js":"QDir","./flat/deflate.js":"FNhl","./flat/transform.js":"LGwr"}],"rDTq":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.interpolatePoint=n,exports.lineStringCoordinateAtM=t,exports.lineStringsCoordinateAtM=i;var r=require("../../array.js"),e=require("../../math.js");function n(n,t,i,l,u,a,f){var o,s,v=(i-t)/l;if(1===v)o=t;else if(2===v)o=t,s=u;else if(0!==v){for(var c=n[t],p=n[t+1],h=0,d=[0],g=t+l;g<i;g+=l){var x=n[g],y=n[g+1];h+=Math.sqrt((x-c)*(x-c)+(y-p)*(y-p)),d.push(h),c=x,p=y}var M=u*h,j=(0,r.binarySearch)(d,M);j<0?(s=(M-d[-j-2])/(d[-j-1]-d[-j-2]),o=t+(-j-2)*l):o=t+j*l}var q=f>1?f:2,A=a||new Array(q);for(g=0;g<q;++g)A[g]=void 0===o?NaN:void 0===s?n[o+g]:(0,e.lerp)(n[o+g],n[o+l+g],s);return A}function t(r,n,t,i,l,u){if(t==n)return null;var a;if(l<r[n+i-1])return u?((a=r.slice(n,n+i))[i-1]=l,a):null;if(r[t-1]<l)return u?((a=r.slice(t-i,t))[i-1]=l,a):null;if(l==r[n+i-1])return r.slice(n,n+i);for(var f=n/i,o=t/i;f<o;){var s=f+o>>1;l<r[(s+1)*i-1]?o=s:f=s+1}var v=r[f*i-1];if(l==v)return r.slice((f-1)*i,(f-1)*i+i);var c=(l-v)/(r[(f+1)*i-1]-v);a=[];for(var p=0;p<i-1;++p)a.push((0,e.lerp)(r[(f-1)*i+p],r[f*i+p],c));return a.push(l),a}function i(r,e,n,i,l,u,a){if(a)return t(r,e,n[n.length-1],i,l,u);var f;if(l<r[i-1])return u?((f=r.slice(0,i))[i-1]=l,f):null;if(r[r.length-1]<l)return u?((f=r.slice(r.length-i))[i-1]=l,f):null;for(var o=0,s=n.length;o<s;++o){var v=n[o];if(e!=v){if(l<r[e+i-1])return null;if(l<=r[v-1])return t(r,e,v,i,l,!1);e=v}}return null}
},{"../../array.js":"luEr","../../math.js":"B96G"}],"ZZrx":[function(require,module,exports) {
"use strict";function r(r,t,e,n){for(var i=r[t],o=r[t+1],s=0,a=t+n;a<e;a+=n){var u=r[a],c=r[a+1];s+=Math.sqrt((u-i)*(u-i)+(c-o)*(c-o)),i=u,o=c}return s}function t(t,e,n,i){var o=r(t,e,n,i),s=t[n-i]-t[e],a=t[n-i+1]-t[e+1];return o+=Math.sqrt(s*s+a*a)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.lineStringLength=r,exports.linearRingLength=t;
},{}],"DfxW":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=p(require("./GeometryLayout.js")),e=p(require("./GeometryType.js")),i=p(require("./SimpleGeometry.js")),o=require("./flat/closest.js"),r=require("../extent.js"),n=require("./flat/deflate.js"),s=require("./flat/simplify.js"),a=require("../array.js"),l=require("./flat/segments.js"),f=require("./flat/inflate.js"),h=require("./flat/interpolate.js"),d=require("./flat/intersectsextent.js"),u=require("./flat/length.js");function p(t){return t&&t.__esModule?t:{default:t}}var c=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),C=function(i){function p(t,e){var o=i.call(this)||this;return o.flatMidpoint_=null,o.flatMidpointRevision_=-1,o.maxDelta_=-1,o.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?o.setCoordinates(t,e):o.setFlatCoordinates(e,t),o}return c(p,i),p.prototype.appendCoordinate=function(t){this.flatCoordinates?(0,a.extend)(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},p.prototype.clone=function(){var t=new p(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},p.prototype.closestPointXY=function(t,e,i,n){return n<(0,r.closestSquaredDistanceXY)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,o.maxSquaredDelta)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,o.assignClosestPoint)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))},p.prototype.forEachSegment=function(t){return(0,l.forEach)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},p.prototype.getCoordinateAtM=function(e,i){if(this.layout!=t.default.XYM&&this.layout!=t.default.XYZM)return null;var o=void 0!==i&&i;return(0,h.lineStringCoordinateAtM)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,o)},p.prototype.getCoordinates=function(){return(0,f.inflateCoordinates)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},p.prototype.getCoordinateAt=function(t,e){return(0,h.interpolatePoint)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},p.prototype.getLength=function(){return(0,u.lineStringLength)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},p.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},p.prototype.getSimplifiedGeometryInternal=function(e){var i=[];return i.length=(0,s.douglasPeucker)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,i,0),new p(i,t.default.XY)},p.prototype.getType=function(){return e.default.LINE_STRING},p.prototype.intersectsExtent=function(t){return(0,d.intersectsLineString)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},p.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,n.deflateCoordinates)(this.flatCoordinates,0,t,this.stride),this.changed()},p}(i.default),y=C;exports.default=y;
},{"./GeometryLayout.js":"Utvi","./GeometryType.js":"lmV0","./SimpleGeometry.js":"pnrv","./flat/closest.js":"rMra","../extent.js":"QDir","./flat/deflate.js":"FNhl","./flat/simplify.js":"IEpt","../array.js":"luEr","./flat/segments.js":"U8i0","./flat/inflate.js":"znXl","./flat/interpolate.js":"rDTq","./flat/intersectsextent.js":"GZir","./flat/length.js":"ZZrx"}],"fbCo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=f(require("./GeometryLayout.js")),e=f(require("./GeometryType.js")),i=f(require("./LineString.js")),r=f(require("./SimpleGeometry.js")),s=require("./flat/closest.js"),n=require("../extent.js"),o=require("./flat/deflate.js"),a=require("./flat/simplify.js"),l=require("../array.js"),d=require("./flat/inflate.js"),u=require("./flat/interpolate.js"),h=require("./flat/intersectsextent.js");function f(t){return t&&t.__esModule?t:{default:t}}var p=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),c=function(r){function f(t,e,i){var s=r.call(this)||this;if(s.ends_=[],s.maxDelta_=-1,s.maxDeltaRevision_=-1,Array.isArray(t[0]))s.setCoordinates(t,e);else if(void 0!==e&&i)s.setFlatCoordinates(e,t),s.ends_=i;else{for(var n=s.getLayout(),o=t,a=[],d=[],u=0,h=o.length;u<h;++u){var f=o[u];0===u&&(n=f.getLayout()),(0,l.extend)(a,f.getFlatCoordinates()),d.push(a.length)}s.setFlatCoordinates(n,a),s.ends_=d}return s}return p(f,r),f.prototype.appendLineString=function(t){this.flatCoordinates?(0,l.extend)(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},f.prototype.clone=function(){var t=new f(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},f.prototype.closestPointXY=function(t,e,i,r){return r<(0,n.closestSquaredDistanceXY)(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.arrayMaxSquaredDelta)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.assignClosestArrayPoint)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,r))},f.prototype.getCoordinateAtM=function(e,i,r){if(this.layout!=t.default.XYM&&this.layout!=t.default.XYZM||0===this.flatCoordinates.length)return null;var s=void 0!==i&&i,n=void 0!==r&&r;return(0,u.lineStringsCoordinateAtM)(this.flatCoordinates,0,this.ends_,this.stride,e,s,n)},f.prototype.getCoordinates=function(){return(0,d.inflateCoordinatesArray)(this.flatCoordinates,0,this.ends_,this.stride)},f.prototype.getEnds=function(){return this.ends_},f.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new i.default(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},f.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,e=this.ends_,r=this.layout,s=[],n=0,o=0,a=e.length;o<a;++o){var l=e[o],d=new i.default(t.slice(n,l),r);s.push(d),n=l}return s},f.prototype.getFlatMidpoints=function(){for(var t=[],e=this.flatCoordinates,i=0,r=this.ends_,s=this.stride,n=0,o=r.length;n<o;++n){var a=r[n],d=(0,u.interpolatePoint)(e,i,a,s,.5);(0,l.extend)(t,d),i=a}return t},f.prototype.getSimplifiedGeometryInternal=function(e){var i=[],r=[];return i.length=(0,a.douglasPeuckerArray)(this.flatCoordinates,0,this.ends_,this.stride,e,i,0,r),new f(i,t.default.XY,r)},f.prototype.getType=function(){return e.default.MULTI_LINE_STRING},f.prototype.intersectsExtent=function(t){return(0,h.intersectsLineStringArray)(this.flatCoordinates,0,this.ends_,this.stride,t)},f.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=(0,o.deflateCoordinatesArray)(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},f}(r.default),y=c;exports.default=y;
},{"./GeometryLayout.js":"Utvi","./GeometryType.js":"lmV0","./LineString.js":"DfxW","./SimpleGeometry.js":"pnrv","./flat/closest.js":"rMra","../extent.js":"QDir","./flat/deflate.js":"FNhl","./flat/simplify.js":"IEpt","../array.js":"luEr","./flat/inflate.js":"znXl","./flat/interpolate.js":"rDTq","./flat/intersectsextent.js":"GZir"}],"dNu5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=l(require("./GeometryType.js")),e=l(require("./Point.js")),r=l(require("./SimpleGeometry.js")),o=require("../extent.js"),i=require("./flat/deflate.js"),n=require("../array.js"),s=require("./flat/inflate.js"),a=require("../math.js");function l(t){return t&&t.__esModule?t:{default:t}}var u=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),f=function(r){function l(t,e){var o=r.call(this)||this;return e&&!Array.isArray(t[0])?o.setFlatCoordinates(e,t):o.setCoordinates(t,e),o}return u(l,r),l.prototype.appendPoint=function(t){this.flatCoordinates?(0,n.extend)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},l.prototype.clone=function(){var t=new l(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},l.prototype.closestPointXY=function(t,e,r,i){if(i<(0,o.closestSquaredDistanceXY)(this.getExtent(),t,e))return i;for(var n=this.flatCoordinates,s=this.stride,l=0,u=n.length;l<u;l+=s){var f=(0,a.squaredDistance)(t,e,n[l],n[l+1]);if(f<i){i=f;for(var d=0;d<s;++d)r[d]=n[l+d];r.length=s}}return i},l.prototype.getCoordinates=function(){return(0,s.inflateCoordinates)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},l.prototype.getPoint=function(t){var r=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||r<=t?null:new e.default(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},l.prototype.getPoints=function(){for(var t=this.flatCoordinates,r=this.layout,o=this.stride,i=[],n=0,s=t.length;n<s;n+=o){var a=new e.default(t.slice(n,n+o),r);i.push(a)}return i},l.prototype.getType=function(){return t.default.MULTI_POINT},l.prototype.intersectsExtent=function(t){for(var e=this.flatCoordinates,r=this.stride,i=0,n=e.length;i<n;i+=r){var s=e[i],a=e[i+1];if((0,o.containsXY)(t,s,a))return!0}return!1},l.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,i.deflateCoordinates)(this.flatCoordinates,0,t,this.stride),this.changed()},l}(r.default),d=f;exports.default=d;
},{"./GeometryType.js":"lmV0","./Point.js":"gLcY","./SimpleGeometry.js":"pnrv","../extent.js":"QDir","./flat/deflate.js":"FNhl","../array.js":"luEr","./flat/inflate.js":"znXl","../math.js":"B96G"}],"VjQP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.linearRingss=r;var e=require("../../extent.js");function r(r,t,a,n){for(var s=[],o=(0,e.createEmpty)(),i=0,u=a.length;i<u;++i){var l=a[i];o=(0,e.createOrUpdateFromFlatCoordinates)(r,t,l[0],n),s.push((o[0]+o[2])/2,(o[1]+o[3])/2),t=l[l.length-1]}return s}
},{"../../extent.js":"QDir"}],"ouhF":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=y(require("./GeometryLayout.js")),e=y(require("./GeometryType.js")),i=y(require("./MultiPoint.js")),s=y(require("./Polygon.js")),r=y(require("./SimpleGeometry.js")),n=require("./flat/closest.js"),o=require("../extent.js"),a=require("./flat/deflate.js"),l=require("../array.js"),d=require("./flat/interiorpoint.js"),h=require("./flat/inflate.js"),u=require("./flat/intersectsextent.js"),f=require("./flat/orient.js"),g=require("./flat/area.js"),p=require("./flat/center.js"),c=require("./flat/contains.js"),_=require("./flat/simplify.js");function y(t){return t&&t.__esModule?t:{default:t}}var v=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),C=function(r){function y(t,e,i){var s=r.call(this)||this;if(s.endss_=[],s.flatInteriorPointsRevision_=-1,s.flatInteriorPoints_=null,s.maxDelta_=-1,s.maxDeltaRevision_=-1,s.orientedRevision_=-1,s.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){for(var n=s.getLayout(),o=t,a=[],d=[],h=0,u=o.length;h<u;++h){var f=o[h];0===h&&(n=f.getLayout());for(var g=a.length,p=f.getEnds(),c=0,_=p.length;c<_;++c)p[c]+=g;(0,l.extend)(a,f.getFlatCoordinates()),d.push(p)}e=n,t=a,i=d}return void 0!==e&&i?(s.setFlatCoordinates(e,t),s.endss_=i):s.setCoordinates(t,e),s}return v(y,r),y.prototype.appendPolygon=function(t){var e;if(this.flatCoordinates){var i=this.flatCoordinates.length;(0,l.extend)(this.flatCoordinates,t.getFlatCoordinates());for(var s=0,r=(e=t.getEnds().slice()).length;s<r;++s)e[s]+=i}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()},y.prototype.clone=function(){for(var t=this.endss_.length,e=new Array(t),i=0;i<t;++i)e[i]=this.endss_[i].slice();var s=new y(this.flatCoordinates.slice(),this.layout,e);return s.applyProperties(this),s},y.prototype.closestPointXY=function(t,e,i,s){return s<(0,o.closestSquaredDistanceXY)(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,n.multiArrayMaxSquaredDelta)(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,n.assignClosestMultiArrayPoint)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,i,s))},y.prototype.containsXY=function(t,e){return(0,c.linearRingssContainsXY)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)},y.prototype.getArea=function(){return(0,g.linearRingss)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},y.prototype.getCoordinates=function(t){var e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,f.orientLinearRingsArray)(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,(0,h.inflateMultiCoordinatesArray)(e,0,this.endss_,this.stride)},y.prototype.getEndss=function(){return this.endss_},y.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=(0,p.linearRingss)(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=(0,d.getInteriorPointsOfMultiArray)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},y.prototype.getInteriorPoints=function(){return new i.default(this.getFlatInteriorPoints().slice(),t.default.XYM)},y.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;(0,f.linearRingssAreOriented)(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=(0,f.orientLinearRingsArray)(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},y.prototype.getSimplifiedGeometryInternal=function(e){var i=[],s=[];return i.length=(0,_.quantizeMultiArray)(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),i,0,s),new y(i,t.default.XY,s)},y.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var e;if(0===t)e=0;else{var i=this.endss_[t-1];e=i[i.length-1]}var r=this.endss_[t].slice(),n=r[r.length-1];if(0!==e)for(var o=0,a=r.length;o<a;++o)r[o]-=e;return new s.default(this.flatCoordinates.slice(e,n),this.layout,r)},y.prototype.getPolygons=function(){for(var t=this.layout,e=this.flatCoordinates,i=this.endss_,r=[],n=0,o=0,a=i.length;o<a;++o){var l=i[o].slice(),d=l[l.length-1];if(0!==n)for(var h=0,u=l.length;h<u;++h)l[h]-=n;var f=new s.default(e.slice(n,d),t,l);r.push(f),n=d}return r},y.prototype.getType=function(){return e.default.MULTI_POLYGON},y.prototype.intersectsExtent=function(t){return(0,u.intersectsLinearRingMultiArray)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},y.prototype.setCoordinates=function(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=(0,a.deflateMultiCoordinatesArray)(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{var s=i[i.length-1];this.flatCoordinates.length=0===s.length?0:s[s.length-1]}this.changed()},y}(r.default),q=C;exports.default=q;
},{"./GeometryLayout.js":"Utvi","./GeometryType.js":"lmV0","./MultiPoint.js":"dNu5","./Polygon.js":"Nwwk","./SimpleGeometry.js":"pnrv","./flat/closest.js":"rMra","../extent.js":"QDir","./flat/deflate.js":"FNhl","../array.js":"luEr","./flat/interiorpoint.js":"UDvN","./flat/inflate.js":"znXl","./flat/intersectsextent.js":"GZir","./flat/orient.js":"cJkE","./flat/area.js":"EOSm","./flat/center.js":"VjQP","./flat/contains.js":"dzdN","./flat/simplify.js":"IEpt"}],"XGea":[function(require,module,exports) {
var define;
var t;!function(i,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof t&&t.amd?t(n):(i=i||self).RBush=n()}(this,function(){"use strict";function t(t,r,e,a,h){!function t(n,r,e,a,h){for(;a>e;){if(a-e>600){var o=a-e+1,s=r-e+1,l=Math.log(o),f=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*f*(o-f)/o)*(s-o/2<0?-1:1);t(n,r,Math.max(e,Math.floor(r-s*f/o+u)),Math.min(a,Math.floor(r+(o-s)*f/o+u)),h)}var m=n[r],c=e,p=a;for(i(n,e,r),h(n[a],m)>0&&i(n,e,a);c<p;){for(i(n,c,p),c++,p--;h(n[c],m)<0;)c++;for(;h(n[p],m)>0;)p--}0===h(n[e],m)?i(n,e,p):i(n,++p,a),p<=r&&(e=p+1),r<=p&&(a=p-1)}}(t,r,e||0,a||t.length-1,h||n)}function i(t,i,n){var r=t[i];t[i]=t[n],t[n]=r}function n(t,i){return t<i?-1:t>i?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function e(t,i,n){if(!n)return i.indexOf(t);for(var r=0;r<i.length;r++)if(n(t,i[r]))return r;return-1}function a(t,i){h(t,0,t.children.length,i,t)}function h(t,i,n,r,e){e||(e=p(null)),e.minX=1/0,e.minY=1/0,e.maxX=-1/0,e.maxY=-1/0;for(var a=i;a<n;a++){var h=t.children[a];o(e,t.leaf?r(h):h)}return e}function o(t,i){return t.minX=Math.min(t.minX,i.minX),t.minY=Math.min(t.minY,i.minY),t.maxX=Math.max(t.maxX,i.maxX),t.maxY=Math.max(t.maxY,i.maxY),t}function s(t,i){return t.minX-i.minX}function l(t,i){return t.minY-i.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,i){return t.minX<=i.minX&&t.minY<=i.minY&&i.maxX<=t.maxX&&i.maxY<=t.maxY}function c(t,i){return i.minX<=t.maxX&&i.minY<=t.maxY&&i.maxX>=t.minX&&i.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,r,e,a){for(var h=[n,r];h.length;)if(!((r=h.pop())-(n=h.pop())<=e)){var o=n+Math.ceil((r-n)/e/2)*e;t(i,o,n,r,a),h.push(n,o,o,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var i=this.data,n=[];if(!c(t,i))return n;for(var r=this.toBBox,e=[];i;){for(var a=0;a<i.children.length;a++){var h=i.children[a],o=i.leaf?r(h):h;c(t,o)&&(i.leaf?n.push(h):m(t,o)?this._all(h,n):e.push(h))}i=e.pop()}return n},r.prototype.collides=function(t){var i=this.data;if(!c(t,i))return!1;for(var n=[];i;){for(var r=0;r<i.children.length;r++){var e=i.children[r],a=i.leaf?this.toBBox(e):e;if(c(t,a)){if(i.leaf||m(t,a))return!0;n.push(e)}}i=n.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var i=0;i<t.length;i++)this.insert(t[i]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=p([]),this},r.prototype.remove=function(t,i){if(!t)return this;for(var n,r,a,h=this.data,o=this.toBBox(t),s=[],l=[];h||s.length;){if(h||(h=s.pop(),r=s[s.length-1],n=l.pop(),a=!0),h.leaf){var f=e(t,h.children,i);if(-1!==f)return h.children.splice(f,1),s.push(h),this._condense(s),this}a||h.leaf||!m(h,o)?r?(n++,h=r.children[n],a=!1):h=null:(s.push(h),l.push(n),n=0,r=h,h=h.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,i){return t.minX-i.minX},r.prototype.compareMinY=function(t,i){return t.minY-i.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,i){for(var n=[];t;)t.leaf?i.push.apply(i,t.children):n.push.apply(n,t.children),t=n.pop();return i},r.prototype._build=function(t,i,n,r){var e,h=n-i+1,o=this._maxEntries;if(h<=o)return a(e=p(t.slice(i,n+1)),this.toBBox),e;r||(r=Math.ceil(Math.log(h)/Math.log(o)),o=Math.ceil(h/Math.pow(o,r-1))),(e=p([])).leaf=!1,e.height=r;var s=Math.ceil(h/o),l=s*Math.ceil(Math.sqrt(o));d(t,i,n,l,this.compareMinX);for(var f=i;f<=n;f+=l){var u=Math.min(f+l-1,n);d(t,f,u,s,this.compareMinY);for(var m=f;m<=u;m+=s){var c=Math.min(m+s-1,u);e.children.push(this._build(t,m,c,r-1))}}return a(e,this.toBBox),e},r.prototype._chooseSubtree=function(t,i,n,r){for(;r.push(i),!i.leaf&&r.length-1!==n;){for(var e=1/0,a=1/0,h=void 0,o=0;o<i.children.length;o++){var s=i.children[o],l=f(s),u=(m=t,c=s,(Math.max(c.maxX,m.maxX)-Math.min(c.minX,m.minX))*(Math.max(c.maxY,m.maxY)-Math.min(c.minY,m.minY))-l);u<a?(a=u,e=l<e?l:e,h=s):u===a&&l<e&&(e=l,h=s)}i=h||i.children[0]}var m,c;return i},r.prototype._insert=function(t,i,n){var r=n?t:this.toBBox(t),e=[],a=this._chooseSubtree(r,this.data,i,e);for(a.children.push(t),o(a,r);i>=0&&e[i].children.length>this._maxEntries;)this._split(e,i),i--;this._adjustParentBBoxes(r,e,i)},r.prototype._split=function(t,i){var n=t[i],r=n.children.length,e=this._minEntries;this._chooseSplitAxis(n,e,r);var h=this._chooseSplitIndex(n,e,r),o=p(n.children.splice(h,n.children.length-h));o.height=n.height,o.leaf=n.leaf,a(n,this.toBBox),a(o,this.toBBox),i?t[i-1].children.push(o):this._splitRoot(n,o)},r.prototype._splitRoot=function(t,i){this.data=p([t,i]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,i,n){for(var r,e,a,o,s,l,u,m=1/0,c=1/0,p=i;p<=n-i;p++){var d=h(t,0,p,this.toBBox),x=h(t,p,n,this.toBBox),v=(e=d,a=x,void 0,void 0,void 0,void 0,o=Math.max(e.minX,a.minX),s=Math.max(e.minY,a.minY),l=Math.min(e.maxX,a.maxX),u=Math.min(e.maxY,a.maxY),Math.max(0,l-o)*Math.max(0,u-s)),M=f(d)+f(x);v<m?(m=v,r=p,c=M<c?M:c):v===m&&M<c&&(c=M,r=p)}return r||n-i},r.prototype._chooseSplitAxis=function(t,i,n){var r=t.leaf?this.compareMinX:s,e=t.leaf?this.compareMinY:l;this._allDistMargin(t,i,n,r)<this._allDistMargin(t,i,n,e)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,i,n,r){t.children.sort(r);for(var e=this.toBBox,a=h(t,0,i,e),s=h(t,n-i,n,e),l=u(a)+u(s),f=i;f<n-i;f++){var m=t.children[f];o(a,t.leaf?e(m):m),l+=u(a)}for(var c=n-i-1;c>=i;c--){var p=t.children[c];o(s,t.leaf?e(p):p),l+=u(s)}return l},r.prototype._adjustParentBBoxes=function(t,i,n){for(var r=n;r>=0;r--)o(i[r],t)},r.prototype._condense=function(t){for(var i=t.length-1,n=void 0;i>=0;i--)0===t[i].children.length?i>0?(n=t[i-1].children).splice(n.indexOf(t[i]),1):this.clear():a(t[i],this.toBBox)},r});
},{}],"S8ow":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../util.js"),e=require("../size.js"),o=function(){function o(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=(0,e.toSize)(t.scale),this.displacement_=t.displacement}return o.prototype.clone=function(){var t=this.getScale();return new o({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},o.prototype.getOpacity=function(){return this.opacity_},o.prototype.getRotateWithView=function(){return this.rotateWithView_},o.prototype.getRotation=function(){return this.rotation_},o.prototype.getScale=function(){return this.scale_},o.prototype.getScaleArray=function(){return this.scaleArray_},o.prototype.getDisplacement=function(){return this.displacement_},o.prototype.getAnchor=function(){return(0,t.abstract)()},o.prototype.getImage=function(e){return(0,t.abstract)()},o.prototype.getHitDetectionImage=function(){return(0,t.abstract)()},o.prototype.getPixelRatio=function(t){return 1},o.prototype.getImageState=function(){return(0,t.abstract)()},o.prototype.getImageSize=function(){return(0,t.abstract)()},o.prototype.getHitDetectionImageSize=function(){return(0,t.abstract)()},o.prototype.getOrigin=function(){return(0,t.abstract)()},o.prototype.getSize=function(){return(0,t.abstract)()},o.prototype.setOpacity=function(t){this.opacity_=t},o.prototype.setRotateWithView=function(t){this.rotateWithView_=t},o.prototype.setRotation=function(t){this.rotation_=t},o.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=(0,e.toSize)(t)},o.prototype.listenImageChange=function(e){(0,t.abstract)()},o.prototype.load=function(){(0,t.abstract)()},o.prototype.unlistenImageChange=function(e){(0,t.abstract)()},o}(),i=o;exports.default=i;
},{"../util.js":"KniQ","../size.js":"TAHd"}],"V5XN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.asColorLike=e;var r=require("./color.js");function e(e){return Array.isArray(e)?(0,r.toString)(e):e}
},{"./color.js":"eucy"}],"il3X":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("../ImageState.js")),e=o(require("./Image.js")),i=require("../color.js"),s=require("../colorlike.js"),n=require("../dom.js"),r=require("../render/canvas.js");function o(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),l=function(e){function o(t){var i=this,s=void 0!==t.rotateWithView&&t.rotateWithView;return(i=e.call(this,{opacity:1,rotateWithView:s,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0]})||this).canvas_={},i.hitDetectionCanvas_=null,i.fill_=void 0!==t.fill?t.fill:null,i.origin_=[0,0],i.points_=t.points,i.radius_=void 0!==t.radius?t.radius:t.radius1,i.radius2_=t.radius2,i.angle_=void 0!==t.angle?t.angle:0,i.stroke_=void 0!==t.stroke?t.stroke:null,i.anchor_=null,i.size_=null,i.imageSize_=null,i.hitDetectionImageSize_=null,i.render(),i}return a(o,e),o.prototype.clone=function(){var t=this.getScale(),e=new o({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return e.setOpacity(this.getOpacity()),e},o.prototype.getAnchor=function(){return this.anchor_},o.prototype.getAngle=function(){return this.angle_},o.prototype.getFill=function(){return this.fill_},o.prototype.getHitDetectionImage=function(){if(!this.hitDetectionCanvas_){var t=this.createRenderOptions();this.createHitDetectionCanvas_(t)}return this.hitDetectionCanvas_},o.prototype.getImage=function(t){if(!this.canvas_[t||1]){var e=this.createRenderOptions(),i=(0,n.createCanvasContext2D)(e.size*t||1,e.size*t||1);this.draw_(e,i,0,0,t||1),this.canvas_[t||1]=i.canvas}return this.canvas_[t||1]},o.prototype.getPixelRatio=function(t){return t},o.prototype.getImageSize=function(){return this.imageSize_},o.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},o.prototype.getImageState=function(){return t.default.LOADED},o.prototype.getOrigin=function(){return this.origin_},o.prototype.getPoints=function(){return this.points_},o.prototype.getRadius=function(){return this.radius_},o.prototype.getRadius2=function(){return this.radius2_},o.prototype.getSize=function(){return this.size_},o.prototype.getStroke=function(){return this.stroke_},o.prototype.listenImageChange=function(t){},o.prototype.load=function(){},o.prototype.unlistenImageChange=function(t){},o.prototype.createRenderOptions=function(){var t,e=r.defaultLineCap,i=r.defaultLineJoin,n=0,o=null,a=0,l=0;return this.stroke_&&(null===(t=this.stroke_.getColor())&&(t=r.defaultStrokeStyle),t=(0,s.asColorLike)(t),void 0===(l=this.stroke_.getWidth())&&(l=r.defaultLineWidth),o=this.stroke_.getLineDash(),a=this.stroke_.getLineDashOffset(),void 0===(i=this.stroke_.getLineJoin())&&(i=r.defaultLineJoin),void 0===(e=this.stroke_.getLineCap())&&(e=r.defaultLineCap),void 0===(n=this.stroke_.getMiterLimit())&&(n=r.defaultMiterLimit)),{strokeStyle:t,strokeWidth:l,size:2*(this.radius_+l)+1,lineCap:e,lineDash:o,lineDashOffset:a,lineJoin:i,miterLimit:n}},o.prototype.render=function(){var t=this.createRenderOptions(),e=(0,n.createCanvasContext2D)(t.size,t.size);this.draw_(t,e,0,0,1),this.canvas_={},this.canvas_[1]=e.canvas;var i=e.canvas.width,s=i,r=this.getDisplacement();this.hitDetectionImageSize_=[t.size,t.size],this.createHitDetectionCanvas_(t),this.anchor_=[i/2-r[0],i/2+r[1]],this.size_=[i,i],this.imageSize_=[s,s]},o.prototype.draw_=function(t,e,i,n,o){var a,l,h;e.setTransform(o,0,0,o,0,0),e.translate(i,n),e.beginPath();var u=this.points_;if(u===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var c=void 0!==this.radius2_?this.radius2_:this.radius_;for(c!==this.radius_&&(u*=2),a=0;a<=u;a++)l=2*a*Math.PI/u-Math.PI/2+this.angle_,h=a%2==0?this.radius_:c,e.lineTo(t.size/2+h*Math.cos(l),t.size/2+h*Math.sin(l))}if(this.fill_){var d=this.fill_.getColor();null===d&&(d=r.defaultFillStyle),e.fillStyle=(0,s.asColorLike)(d),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke()),e.closePath()},o.prototype.createHitDetectionCanvas_=function(t){if(this.hitDetectionCanvas_=this.getImage(1),this.fill_){var e=this.fill_.getColor(),s=0;if("string"==typeof e&&(e=(0,i.asArray)(e)),null===e?s=1:Array.isArray(e)&&(s=4===e.length?e[3]:1),0===s){var r=(0,n.createCanvasContext2D)(t.size,t.size);this.hitDetectionCanvas_=r.canvas,this.drawHitDetectionCanvas_(t,r,0,0)}}},o.prototype.drawHitDetectionCanvas_=function(t,e,i,s){e.translate(i,s),e.beginPath();var n=this.points_;if(n===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var o=void 0!==this.radius2_?this.radius2_:this.radius_;o!==this.radius_&&(n*=2);var a=void 0,l=void 0,h=void 0;for(a=0;a<=n;a++)h=2*a*Math.PI/n-Math.PI/2+this.angle_,l=a%2==0?this.radius_:o,e.lineTo(t.size/2+l*Math.cos(h),t.size/2+l*Math.sin(h))}e.fillStyle=r.defaultFillStyle,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.stroke()),e.closePath()},o}(e.default),h=l;exports.default=h;
},{"../ImageState.js":"Xz9x","./Image.js":"S8ow","../color.js":"eucy","../colorlike.js":"V5XN","../dom.js":"Xno5","../render/canvas.js":"iAG7"}],"cdf1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("./RegularShape.js"));function e(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),o=function(t){function e(e){var i=e||{};return t.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,scale:void 0!==i.scale?i.scale:1,rotation:void 0!==i.rotation?i.rotation:0,rotateWithView:void 0!==i.rotateWithView&&i.rotateWithView,displacement:void 0!==i.displacement?i.displacement:[0,0]})||this}return i(e,t),e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(t.default),r=o;exports.default=r;
},{"./RegularShape.js":"il3X"}],"AFcg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var o=function(){function o(o){var r=o||{};this.color_=void 0!==r.color?r.color:null}return o.prototype.clone=function(){var r=this.getColor();return new o({color:Array.isArray(r)?r.slice():r||void 0})},o.prototype.getColor=function(){return this.color_},o.prototype.setColor=function(o){this.color_=o},o}(),r=o;exports.default=r;
},{}],"TXDt":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=function(){function t(t){var i=t||{};this.color_=void 0!==i.color?i.color:null,this.lineCap_=i.lineCap,this.lineDash_=void 0!==i.lineDash?i.lineDash:null,this.lineDashOffset_=i.lineDashOffset,this.lineJoin_=i.lineJoin,this.miterLimit_=i.miterLimit,this.width_=i.width}return t.prototype.clone=function(){var i=this.getColor();return new t({color:Array.isArray(i)?i.slice():i||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}(),i=t;exports.default=i;
},{}],"he4w":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.toFunction=l,exports.createDefaultStyle=f,exports.createEditingStyle=d,exports.default=void 0;var e=i(require("./Circle.js")),t=i(require("./Fill.js")),o=i(require("../geom/GeometryType.js")),r=i(require("./Stroke.js")),n=require("../asserts.js");function i(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e){var t=e||{};this.geometry_=null,this.geometryFunction_=a,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}return e.prototype.clone=function(){var t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new e({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.setRenderer=function(e){this.renderer_=e},e.prototype.getGeometry=function(){return this.geometry_},e.prototype.getGeometryFunction=function(){return this.geometryFunction_},e.prototype.getFill=function(){return this.fill_},e.prototype.setFill=function(e){this.fill_=e},e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(e){this.image_=e},e.prototype.getStroke=function(){return this.stroke_},e.prototype.setStroke=function(e){this.stroke_=e},e.prototype.getText=function(){return this.text_},e.prototype.setText=function(e){this.text_=e},e.prototype.getZIndex=function(){return this.zIndex_},e.prototype.setGeometry=function(e){"function"==typeof e?this.geometryFunction_=e:"string"==typeof e?this.geometryFunction_=function(t){return t.get(e)}:e?void 0!==e&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=a,this.geometry_=e},e.prototype.setZIndex=function(e){this.zIndex_=e},e}();function l(e){var t;if("function"==typeof e)t=e;else{var o;if(Array.isArray(e))o=e;else(0,n.assert)("function"==typeof e.getZIndex,41),o=[e];t=function(){return o}}return t}var s=null;function f(o,n){if(!s){var i=new t.default({color:"rgba(255,255,255,0.4)"}),l=new r.default({color:"#3399CC",width:1.25});s=[new u({image:new e.default({fill:i,stroke:l,radius:5}),fill:i,stroke:l})]}return s}function d(){var n={},i=[255,255,255,1],l=[0,153,255,1];return n[o.default.POLYGON]=[new u({fill:new t.default({color:[255,255,255,.5]})})],n[o.default.MULTI_POLYGON]=n[o.default.POLYGON],n[o.default.LINE_STRING]=[new u({stroke:new r.default({color:i,width:5})}),new u({stroke:new r.default({color:l,width:3})})],n[o.default.MULTI_LINE_STRING]=n[o.default.LINE_STRING],n[o.default.CIRCLE]=n[o.default.POLYGON].concat(n[o.default.LINE_STRING]),n[o.default.POINT]=[new u({image:new e.default({radius:6,fill:new t.default({color:l}),stroke:new r.default({color:i,width:1.5})}),zIndex:1/0})],n[o.default.MULTI_POINT]=n[o.default.POINT],n[o.default.GEOMETRY_COLLECTION]=n[o.default.POLYGON].concat(n[o.default.LINE_STRING],n[o.default.POINT]),n}function a(e){return e.getGeometry()}var c=u;exports.default=c;
},{"./Circle.js":"cdf1","./Fill.js":"AFcg","../geom/GeometryType.js":"lmV0","./Stroke.js":"TXDt","../asserts.js":"fLG6"}],"pskK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("./Layer.js")),t=i(require("rbush")),r=require("../obj.js"),n=require("../style/Style.js");function i(e){return e&&e.__esModule?e:{default:e}}var o=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),u={RENDER_ORDER:"renderOrder"},l=function(e){function i(t){var n=this,i=t||{},o=(0,r.assign)({},i);return delete o.style,delete o.renderBuffer,delete o.updateWhileAnimating,delete o.updateWhileInteracting,(n=e.call(this,o)||this).declutter_=void 0!==i.declutter&&i.declutter,n.renderBuffer_=void 0!==i.renderBuffer?i.renderBuffer:100,n.style_=null,n.styleFunction_=void 0,n.setStyle(i.style),n.updateWhileAnimating_=void 0!==i.updateWhileAnimating&&i.updateWhileAnimating,n.updateWhileInteracting_=void 0!==i.updateWhileInteracting&&i.updateWhileInteracting,n}return o(i,e),i.prototype.getDeclutter=function(){return this.declutter_},i.prototype.getFeatures=function(t){return e.prototype.getFeatures.call(this,t)},i.prototype.getRenderBuffer=function(){return this.renderBuffer_},i.prototype.getRenderOrder=function(){return this.get(u.RENDER_ORDER)},i.prototype.getStyle=function(){return this.style_},i.prototype.getStyleFunction=function(){return this.styleFunction_},i.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},i.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},i.prototype.renderDeclutter=function(e){e.declutterTree||(e.declutterTree=new t.default(9)),this.getRenderer().renderDeclutter(e)},i.prototype.setRenderOrder=function(e){this.set(u.RENDER_ORDER,e)},i.prototype.setStyle=function(e){this.style_=void 0!==e?e:n.createDefaultStyle,this.styleFunction_=null===e?void 0:(0,n.toFunction)(this.style_),this.changed()},i}(e.default),c=l;exports.default=c;
},{"./Layer.js":"GCgv","rbush":"XGea","../obj.js":"mH6q","../style/Style.js":"he4w"}],"kTJv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.closePathInstruction=exports.beginPathInstruction=exports.strokeInstruction=exports.fillInstruction=void 0;var t={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},r=[t.FILL];exports.fillInstruction=r;var e=[t.STROKE];exports.strokeInstruction=e;var o=[t.BEGIN_PATH];exports.beginPathInstruction=o;var s=[t.CLOSE_PATH];exports.closePathInstruction=s;var E=t;exports.default=E;
},{}],"LQER":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=function(){function t(){}return t.prototype.drawCustom=function(t,o,e){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,o){},t.prototype.drawFeature=function(t,o){},t.prototype.drawGeometryCollection=function(t,o){},t.prototype.drawLineString=function(t,o){},t.prototype.drawMultiLineString=function(t,o){},t.prototype.drawMultiPoint=function(t,o){},t.prototype.drawMultiPolygon=function(t,o){},t.prototype.drawPoint=function(t,o){},t.prototype.drawPolygon=function(t,o){},t.prototype.drawText=function(t,o){},t.prototype.setFillStrokeStyle=function(t,o){},t.prototype.setImageStyle=function(t,o){},t.prototype.setTextStyle=function(t,o){},t}(),o=t;exports.default=o;
},{}],"QBj4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=l(require("./Instruction.js")),e=l(require("../../geom/GeometryType.js")),i=l(require("../../extent/Relationship.js")),n=l(require("../VectorContext.js")),r=require("../../colorlike.js"),o=require("../../extent.js"),s=require("../canvas.js"),a=require("../../array.js"),u=require("../../geom/flat/inflate.js");function l(t){return t&&t.__esModule?t:{default:t}}var h=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),d=function(n){function l(t,e,i,r){var o=n.call(this)||this;return o.tolerance=t,o.maxExtent=e,o.pixelRatio=r,o.maxLineWidth=0,o.resolution=i,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return h(l,n),l.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map(function(t){return t*e})},l.prototype.appendFlatPointCoordinates=function(t,e){for(var i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,r=this.coordinates,s=r.length,a=0,u=t.length;a<u;a+=e)n[0]=t[a],n[1]=t[a+1],(0,o.containsCoordinate)(i,n)&&(r[s++]=n[0],r[s++]=n[1]);return s},l.prototype.appendFlatLineCoordinates=function(t,e,n,r,s,a){var u=this.coordinates,l=u.length,h=this.getBufferedMaxExtent();a&&(e+=r);var d,f,c,p=t[e],y=t[e+1],L=this.tmpCoordinate_,v=!0;for(d=e+r;d<n;d+=r)L[0]=t[d],L[1]=t[d+1],(c=(0,o.coordinateRelationship)(h,L))!==f?(v&&(u[l++]=p,u[l++]=y,v=!1),u[l++]=L[0],u[l++]=L[1]):c===i.default.INTERSECTING?(u[l++]=L[0],u[l++]=L[1],v=!1):v=!0,p=L[0],y=L[1],f=c;return(s&&v||d===e+r)&&(u[l++]=p,u[l++]=y),l},l.prototype.drawCustomCoordinates_=function(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){var a=i[o],u=this.appendFlatLineCoordinates(t,e,a,n,!1,!1);r.push(u),e=a}return e},l.prototype.drawCustom=function(i,n,r){this.beginGeometry(i,n);var o,s,a,l,h,d=i.getType(),f=i.getStride(),c=this.coordinates.length;if(d==e.default.MULTI_POLYGON){o=i.getOrientedFlatCoordinates(),l=[];var p=i.getEndss();h=0;for(var y=0,L=p.length;y<L;++y){var v=[];h=this.drawCustomCoordinates_(o,h,p[y],f,v),l.push(v)}this.instructions.push([t.default.CUSTOM,c,l,i,r,u.inflateMultiCoordinatesArray])}else d==e.default.POLYGON||d==e.default.MULTI_LINE_STRING?(a=[],o=d==e.default.POLYGON?i.getOrientedFlatCoordinates():i.getFlatCoordinates(),h=this.drawCustomCoordinates_(o,0,i.getEnds(),f,a),this.instructions.push([t.default.CUSTOM,c,a,i,r,u.inflateCoordinatesArray])):d==e.default.LINE_STRING||d==e.default.CIRCLE?(o=i.getFlatCoordinates(),s=this.appendFlatLineCoordinates(o,0,o.length,f,!1,!1),this.instructions.push([t.default.CUSTOM,c,s,i,r,u.inflateCoordinates])):d==e.default.MULTI_POINT?(o=i.getFlatCoordinates(),(s=this.appendFlatPointCoordinates(o,f))>c&&this.instructions.push([t.default.CUSTOM,c,s,i,r,u.inflateCoordinates])):d==e.default.POINT&&(o=i.getFlatCoordinates(),this.coordinates.push(o[0],o[1]),s=this.coordinates.length,this.instructions.push([t.default.CUSTOM,c,s,i,r]));this.endGeometry(n)},l.prototype.beginGeometry=function(e,i){this.beginGeometryInstruction1_=[t.default.BEGIN_GEOMETRY,i,0,e],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[t.default.BEGIN_GEOMETRY,i,0,e],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},l.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},l.prototype.reverseHitDetectionInstructions=function(){var e,i=this.hitDetectionInstructions;i.reverse();var n,r,o=i.length,s=-1;for(e=0;e<o;++e)(r=(n=i[e])[0])==t.default.END_GEOMETRY?s=e:r==t.default.BEGIN_GEOMETRY&&(n[2]=e,(0,a.reverseSubArray)(this.hitDetectionInstructions,s,e),s=-1)},l.prototype.setFillStrokeStyle=function(t,e){var i=this.state;if(t){var n=t.getColor();i.fillStyle=(0,r.asColorLike)(n||s.defaultFillStyle)}else i.fillStyle=void 0;if(e){var o=e.getColor();i.strokeStyle=(0,r.asColorLike)(o||s.defaultStrokeStyle);var a=e.getLineCap();i.lineCap=void 0!==a?a:s.defaultLineCap;var u=e.getLineDash();i.lineDash=u?u.slice():s.defaultLineDash;var l=e.getLineDashOffset();i.lineDashOffset=l||s.defaultLineDashOffset;var h=e.getLineJoin();i.lineJoin=void 0!==h?h:s.defaultLineJoin;var d=e.getWidth();i.lineWidth=void 0!==d?d:s.defaultLineWidth;var f=e.getMiterLimit();i.miterLimit=void 0!==f?f:s.defaultMiterLimit,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},l.prototype.createFill=function(e){var i=e.fillStyle,n=[t.default.SET_FILL_STYLE,i];return"string"!=typeof i&&n.push(!0),n},l.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},l.prototype.createStroke=function(e){return[t.default.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio]},l.prototype.updateFillStyle=function(t,e){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)},l.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,n=t.lineCap,r=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,u=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!(0,a.equals)(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=u||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=u,t.currentMiterLimit=l)},l.prototype.endGeometry=function(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var i=[t.default.END_GEOMETRY,e];this.instructions.push(i),this.hitDetectionInstructions.push(i)},l.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,o.clone)(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;(0,o.buffer)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},l}(n.default),f=d;exports.default=f;
},{"./Instruction.js":"kTJv","../../geom/GeometryType.js":"lmV0","../../extent/Relationship.js":"bUAS","../VectorContext.js":"LQER","../../colorlike.js":"V5XN","../../extent.js":"QDir","../canvas.js":"iAG7","../../array.js":"luEr","../../geom/flat/inflate.js":"znXl"}],"JWDt":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("./Builder.js")),i=e(require("./Instruction.js"));function e(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(i,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])})(i,e)};return function(i,e){function o(){this.constructor=i}t(i,e),i.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),h=function(t){function e(i,e,o,h){var s=t.call(this,i,e,o,h)||this;return s.hitDetectionImage_=null,s.image_=null,s.imagePixelRatio_=void 0,s.anchorX_=void 0,s.anchorY_=void 0,s.height_=void 0,s.opacity_=void 0,s.originX_=void 0,s.originY_=void 0,s.rotateWithView_=void 0,s.rotation_=void 0,s.scale_=void 0,s.width_=void 0,s.declutterImageWithText_=void 0,s}return o(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var o=t.getFlatCoordinates(),h=t.getStride(),s=this.coordinates.length,a=this.appendFlatPointCoordinates(o,h);this.instructions.push([i.default.DRAW_IMAGE,s,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([i.default.DRAW_IMAGE,s,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var o=t.getFlatCoordinates(),h=t.getStride(),s=this.coordinates.length,a=this.appendFlatPointCoordinates(o,h);this.instructions.push([i.default.DRAW_IMAGE,s,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([i.default.DRAW_IMAGE,s,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,i){var e=t.getAnchor(),o=t.getSize(),h=t.getHitDetectionImage(),s=t.getImage(this.pixelRatio),a=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=e[0],this.anchorY_=e[1],this.hitDetectionImage_=h,this.image_=s,this.height_=o[1],this.opacity_=t.getOpacity(),this.originX_=a[0],this.originY_=a[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=o[0],this.declutterImageWithText_=i},e}(t.default),s=h;exports.default=s;
},{"./Builder.js":"QBj4","./Instruction.js":"kTJv"}],"ppsk":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./Builder.js")),e=n(require("./Instruction.js"));function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}function n(t){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var e=i();if(e&&e.has(t))return e.get(t);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=r?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,e&&e.set(t,n),n}function r(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),s=function(t){function i(e,i,n,r){return t.call(this,e,i,n,r)||this}return o(i,t),i.prototype.drawFlatCoordinates_=function(t,i,n,r){var o=this.coordinates.length,s=this.appendFlatLineCoordinates(t,i,n,r,!1,!1),u=[e.default.MOVE_TO_LINE_TO,o,s];return this.instructions.push(u),this.hitDetectionInstructions.push(u),n},i.prototype.drawLineString=function(t,i){var n=this.state,r=n.strokeStyle,o=n.lineWidth;if(void 0!==r&&void 0!==o){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,i),this.hitDetectionInstructions.push([e.default.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],e.beginPathInstruction);var s=t.getFlatCoordinates(),u=t.getStride();this.drawFlatCoordinates_(s,0,s.length,u),this.hitDetectionInstructions.push(e.strokeInstruction),this.endGeometry(i)}},i.prototype.drawMultiLineString=function(t,i){var n=this.state,r=n.strokeStyle,o=n.lineWidth;if(void 0!==r&&void 0!==o){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,i),this.hitDetectionInstructions.push([e.default.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],e.beginPathInstruction);for(var s=t.getEnds(),u=t.getFlatCoordinates(),a=t.getStride(),l=0,h=0,c=s.length;h<c;++h)l=this.drawFlatCoordinates_(u,l,s[h],a);this.hitDetectionInstructions.push(e.strokeInstruction),this.endGeometry(i)}},i.prototype.finish=function(){var i=this.state;return null!=i.lastStroke&&i.lastStroke!=this.coordinates.length&&this.instructions.push(e.strokeInstruction),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},i.prototype.applyStroke=function(i){null!=i.lastStroke&&i.lastStroke!=this.coordinates.length&&(this.instructions.push(e.strokeInstruction),i.lastStroke=this.coordinates.length),i.lastStroke=0,t.prototype.applyStroke.call(this,i),this.instructions.push(e.beginPathInstruction)},i}(t.default),u=s;exports.default=u;
},{"./Builder.js":"QBj4","./Instruction.js":"kTJv"}],"e19k":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./Builder.js")),e=o(require("./Instruction.js")),i=require("../canvas.js"),n=require("../../geom/flat/simplify.js");function s(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return s=function(){return t},t}function o(t){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var e=s();if(e&&e.has(t))return e.get(t);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var r=n?Object.getOwnPropertyDescriptor(t,o):null;r&&(r.get||r.set)?Object.defineProperty(i,o,r):i[o]=t[o]}return i.default=t,e&&e.set(t,i),i}function r(t){return t&&t.__esModule?t:{default:t}}var l=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),u=function(t){function s(e,i,n,s){return t.call(this,e,i,n,s)||this}return l(s,t),s.prototype.drawFlatCoordinatess_=function(t,i,n,s){var o=this.state,r=void 0!==o.fillStyle,l=void 0!==o.strokeStyle,u=n.length;this.instructions.push(e.beginPathInstruction),this.hitDetectionInstructions.push(e.beginPathInstruction);for(var h=0;h<u;++h){var a=n[h],c=this.coordinates.length,f=this.appendFlatLineCoordinates(t,i,a,s,!0,!l),p=[e.default.MOVE_TO_LINE_TO,c,f];this.instructions.push(p),this.hitDetectionInstructions.push(p),l&&(this.instructions.push(e.closePathInstruction),this.hitDetectionInstructions.push(e.closePathInstruction)),i=a}return r&&(this.instructions.push(e.fillInstruction),this.hitDetectionInstructions.push(e.fillInstruction)),l&&(this.instructions.push(e.strokeInstruction),this.hitDetectionInstructions.push(e.strokeInstruction)),i},s.prototype.drawCircle=function(t,n){var s=this.state,o=s.fillStyle,r=s.strokeStyle;if(void 0!==o||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,n),void 0!==s.fillStyle&&this.hitDetectionInstructions.push([e.default.SET_FILL_STYLE,i.defaultFillStyle]),void 0!==s.strokeStyle&&this.hitDetectionInstructions.push([e.default.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset]);var l=t.getFlatCoordinates(),u=t.getStride(),h=this.coordinates.length;this.appendFlatLineCoordinates(l,0,l.length,u,!1,!1);var a=[e.default.CIRCLE,h];this.instructions.push(e.beginPathInstruction,a),this.hitDetectionInstructions.push(e.beginPathInstruction,a),void 0!==s.fillStyle&&(this.instructions.push(e.fillInstruction),this.hitDetectionInstructions.push(e.fillInstruction)),void 0!==s.strokeStyle&&(this.instructions.push(e.strokeInstruction),this.hitDetectionInstructions.push(e.strokeInstruction)),this.endGeometry(n)}},s.prototype.drawPolygon=function(t,n){var s=this.state,o=s.fillStyle,r=s.strokeStyle;if(void 0!==o||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,n),void 0!==s.fillStyle&&this.hitDetectionInstructions.push([e.default.SET_FILL_STYLE,i.defaultFillStyle]),void 0!==s.strokeStyle&&this.hitDetectionInstructions.push([e.default.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset]);var l=t.getEnds(),u=t.getOrientedFlatCoordinates(),h=t.getStride();this.drawFlatCoordinatess_(u,0,l,h),this.endGeometry(n)}},s.prototype.drawMultiPolygon=function(t,n){var s=this.state,o=s.fillStyle,r=s.strokeStyle;if(void 0!==o||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,n),void 0!==s.fillStyle&&this.hitDetectionInstructions.push([e.default.SET_FILL_STYLE,i.defaultFillStyle]),void 0!==s.strokeStyle&&this.hitDetectionInstructions.push([e.default.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset]);for(var l=t.getEndss(),u=t.getOrientedFlatCoordinates(),h=t.getStride(),a=0,c=0,f=l.length;c<f;++c)a=this.drawFlatCoordinatess_(u,a,l[c],h);this.endGeometry(n)}},s.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var i=this.coordinates,s=0,o=i.length;s<o;++s)i[s]=(0,n.snap)(i[s],e);return t.prototype.finish.call(this)},s.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},s}(t.default),h=u;exports.default=h;
},{"./Builder.js":"QBj4","./Instruction.js":"kTJv","../canvas.js":"iAG7","../../geom/flat/simplify.js":"IEpt"}],"AXKs":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={POINT:"point",LINE:"line"};exports.default=e;
},{}],"hCfl":[function(require,module,exports) {
"use strict";function t(t,e,r,o,a){var s,i,n,u,c,v,d,h,f,p=r,M=r,l=0,x=0,_=r;for(s=r;s<o;s+=a){var b=e[s],g=e[s+1];void 0!==u&&(h=b-u,f=g-c,n=Math.sqrt(h*h+f*f),void 0!==v&&(x+=i,Math.acos((v*h+d*f)/(i*n))>t&&(x>l&&(l=x,p=_,M=s),x=0,_=s-a)),i=n,v=h,d=f),u=b,c=g}return(x+=n)>l?[_,s]:[p,M]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.matchingChunk=t;
},{}],"DEzw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.TEXT_ALIGN=void 0;var t=h(require("./Builder.js")),e=h(require("./Instruction.js")),i=h(require("../../geom/GeometryType.js")),s=h(require("../../style/TextPlacement.js")),a=require("../../colorlike.js"),l=require("../canvas.js"),r=require("../../util.js"),n=require("../../extent.js"),o=require("../../geom/flat/straightchunk.js");function h(t){return t&&t.__esModule?t:{default:t}}var f=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),u={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};exports.TEXT_ALIGN=u;var d=function(t){function h(e,i,s,a){var l=t.call(this,e,i,s,a)||this;return l.labels_=null,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=void 0,l.textRotation_=0,l.textFillState_=null,l.fillStates={},l.textStrokeState_=null,l.strokeStates={},l.textState_={},l.textStates={},l.textKey_="",l.fillKey_="",l.strokeKey_="",l.declutterImageWithText_=void 0,l}return f(h,t),h.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},h.prototype.drawText=function(t,a){var r=this.textFillState_,h=this.textStrokeState_,f=this.textState_;if(""!==this.text_&&f&&(r||h)){var u=this.coordinates,d=u.length,g=t.getType(),_=null,x=t.getStride();if(f.placement!==s.default.LINE||g!=i.default.LINE_STRING&&g!=i.default.MULTI_LINE_STRING&&g!=i.default.POLYGON&&g!=i.default.MULTI_POLYGON){var c=f.overflow?null:[];switch(g){case i.default.POINT:case i.default.MULTI_POINT:_=t.getFlatCoordinates();break;case i.default.LINE_STRING:_=t.getFlatMidpoint();break;case i.default.CIRCLE:_=t.getCenter();break;case i.default.MULTI_LINE_STRING:_=t.getFlatMidpoints(),x=2;break;case i.default.POLYGON:_=t.getFlatInteriorPoint(),f.overflow||c.push(_[2]/this.resolution),x=3;break;case i.default.MULTI_POLYGON:var S=t.getFlatInteriorPoints();_=[];for(m=0,F=S.length;m<F;m+=3)f.overflow||c.push(S[m+2]/this.resolution),_.push(S[m],S[m+1]);if(0===_.length)return;x=2}if((D=this.appendFlatPointCoordinates(_,x))===d)return;this.saveTextStates_(),(f.backgroundFill||f.backgroundStroke)&&(this.setFillStrokeStyle(f.backgroundFill,f.backgroundStroke),f.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),f.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,a);var p=f.padding;if(p!=l.defaultPadding&&(f.scale[0]<0||f.scale[1]<0)){var y=f.padding[0],k=f.padding[1],v=f.padding[2],L=f.padding[3];f.scale[0]<0&&(k=-k,L=-L),f.scale[1]<0&&(y=-y,v=-v),p=[y,k,v,L]}var N=this.pixelRatio;this.instructions.push([e.default.DRAW_IMAGE,d,D,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,p==l.defaultPadding?l.defaultPadding:p.map(function(t){return t*N}),!!f.backgroundFill,!!f.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,c]);var I=1/N;this.hitDetectionInstructions.push([e.default.DRAW_IMAGE,d,D,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[I,I],NaN,this.declutterImageWithText_,p,!!f.backgroundFill,!!f.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,c]),this.endGeometry(a)}else{if(!(0,n.intersects)(this.getBufferedMaxExtent(),t.getExtent()))return;var O=void 0;if(_=t.getFlatCoordinates(),g==i.default.LINE_STRING)O=[_.length];else if(g==i.default.MULTI_LINE_STRING)O=t.getEnds();else if(g==i.default.POLYGON)O=t.getEnds().slice(0,1);else if(g==i.default.MULTI_POLYGON){var T=t.getEndss();O=[];for(var m=0,F=T.length;m<F;++m)O.push(T[m][0])}this.beginGeometry(t,a);for(var b=f.textAlign,R=0,A=void 0,C=0,G=O.length;C<G;++C){if(null==b){var P=(0,o.matchingChunk)(f.maxAngle,_,R,O[C],x);R=P[0],A=P[1]}else A=O[C];for(var m=R;m<A;m+=x)u.push(_[m],_[m+1]);var D=u.length;R=O[C],this.drawChars_(d,D),d=D}this.endGeometry(a)}}},h.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,s=this.strokeKey_;t&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var a=this.textKey_;a in this.textStates||(this.textStates[a]={font:e.font,textAlign:e.textAlign||l.defaultTextAlign,textBaseline:e.textBaseline||l.defaultTextBaseline,scale:e.scale});var r=this.fillKey_;i&&(r in this.fillStates||(this.fillStates[r]={fillStyle:i.fillStyle}))},h.prototype.drawChars_=function(t,i){var s=this.textStrokeState_,a=this.textState_,l=this.strokeKey_,r=this.textKey_,n=this.fillKey_;this.saveTextStates_();var o=this.pixelRatio,h=u[a.textBaseline],f=this.textOffsetY_*o,d=this.text_,g=s?s.lineWidth*Math.abs(a.scale[0])/2:0;this.instructions.push([e.default.DRAW_CHARS,t,i,h,a.overflow,n,a.maxAngle,o,f,l,g*o,d,r,1]),this.hitDetectionInstructions.push([e.default.DRAW_CHARS,t,i,h,a.overflow,n,a.maxAngle,1,f,l,g,d,r,1/o])},h.prototype.setTextStyle=function(t,e){var i,s,n;if(t){var o=t.getFill();o?((s=this.textFillState_)||(s={},this.textFillState_=s),s.fillStyle=(0,a.asColorLike)(o.getColor()||l.defaultFillStyle)):(s=null,this.textFillState_=s);var h=t.getStroke();if(h){(n=this.textStrokeState_)||(n={},this.textStrokeState_=n);var f=h.getLineDash(),u=h.getLineDashOffset(),d=h.getWidth(),g=h.getMiterLimit();n.lineCap=h.getLineCap()||l.defaultLineCap,n.lineDash=f?f.slice():l.defaultLineDash,n.lineDashOffset=void 0===u?l.defaultLineDashOffset:u,n.lineJoin=h.getLineJoin()||l.defaultLineJoin,n.lineWidth=void 0===d?l.defaultLineWidth:d,n.miterLimit=void 0===g?l.defaultMiterLimit:g,n.strokeStyle=(0,a.asColorLike)(h.getColor()||l.defaultStrokeStyle)}else n=null,this.textStrokeState_=n;i=this.textState_;var _=t.getFont()||l.defaultFont;(0,l.registerFont)(_);var x=t.getScaleArray();i.overflow=t.getOverflow(),i.font=_,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.textBaseline=t.getTextBaseline()||l.defaultTextBaseline,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||l.defaultPadding,i.scale=void 0===x?[1,1]:x;var c=t.getOffsetX(),S=t.getOffsetY(),p=t.getRotateWithView(),y=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===c?0:c,this.textOffsetY_=void 0===S?0:S,this.textRotateWithView_=void 0!==p&&p,this.textRotation_=void 0===y?0:y,this.strokeKey_=n?("string"==typeof n.strokeStyle?n.strokeStyle:(0,r.getUid)(n.strokeStyle))+n.lineCap+n.lineDashOffset+"|"+n.lineWidth+n.lineJoin+n.miterLimit+"["+n.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.textBaseline||"?"),this.fillKey_=s?"string"==typeof s.fillStyle?s.fillStyle:"|"+(0,r.getUid)(s.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},h}(t.default),g=d;exports.default=g;
},{"./Builder.js":"QBj4","./Instruction.js":"kTJv","../../geom/GeometryType.js":"lmV0","../../style/TextPlacement.js":"AXKs","../../colorlike.js":"V5XN","../canvas.js":"iAG7","../../util.js":"KniQ","../../extent.js":"QDir","../../geom/flat/straightchunk.js":"hCfl"}],"vqHd":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=n(require("./Builder.js")),t=n(require("./ImageBuilder.js")),i=n(require("./LineStringBuilder.js")),r=n(require("./PolygonBuilder.js")),u=n(require("./TextBuilder.js"));function n(e){return e&&e.__esModule?e:{default:e}}var o={Circle:r.default,Default:e.default,Image:t.default,LineString:i.default,Polygon:r.default,Text:u.default},s=function(){function e(e,t,i,r){this.tolerance_=e,this.maxExtent_=t,this.pixelRatio_=r,this.resolution_=i,this.buildersByZIndex_={}}return e.prototype.finish=function(){var e={};for(var t in this.buildersByZIndex_){e[t]=e[t]||{};var i=this.buildersByZIndex_[t];for(var r in i){var u=i[r].finish();e[t][r]=u}}return e},e.prototype.getBuilder=function(e,t){var i=void 0!==e?e.toString():"0",r=this.buildersByZIndex_[i];void 0===r&&(r={},this.buildersByZIndex_[i]=r);var u=r[t];void 0===u&&(u=new(0,o[t])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[t]=u);return u},e}(),l=s;exports.default=l;
},{"./Builder.js":"QBj4","./ImageBuilder.js":"JWDt","./LineStringBuilder.js":"ppsk","./PolygonBuilder.js":"e19k","./TextBuilder.js":"DEzw"}],"fpOz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=a(require("../events/EventType.js")),e=a(require("../ImageState.js")),r=a(require("../Observable.js")),n=a(require("../source/State.js")),o=require("../util.js");function a(t){return t&&t.__esModule?t:{default:t}}var u=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=function(r){function a(t){var e=r.call(this)||this;return e.boundHandleImageChange_=e.handleImageChange_.bind(e),e.layer_=t,e.declutterExecutorGroup=null,e}return u(a,r),a.prototype.getFeatures=function(t){return(0,o.abstract)()},a.prototype.prepareFrame=function(t){return(0,o.abstract)()},a.prototype.renderFrame=function(t,e){return(0,o.abstract)()},a.prototype.loadedTileCallback=function(t,e,r){t[e]||(t[e]={}),t[e][r.tileCoord.toString()]=r},a.prototype.createLoadedTileFinder=function(t,e,r){return function(n,o){var a=this.loadedTileCallback.bind(this,r,n);return t.forEachLoadedTile(e,n,o,a)}.bind(this)},a.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,o){},a.prototype.getDataAtPixel=function(t,e,r){return(0,o.abstract)()},a.prototype.getLayer=function(){return this.layer_},a.prototype.handleFontsChanged=function(){},a.prototype.handleImageChange_=function(t){t.target.getState()===e.default.LOADED&&this.renderIfReadyAndVisible()},a.prototype.loadImage=function(r){var n=r.getState();return n!=e.default.LOADED&&n!=e.default.ERROR&&r.addEventListener(t.default.CHANGE,this.boundHandleImageChange_),n==e.default.IDLE&&(r.load(),n=r.getState()),n==e.default.LOADED},a.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==n.default.READY&&t.changed()},a}(r.default),d=i;exports.default=d;
},{"../events/EventType.js":"C8cu","../ImageState.js":"Xz9x","../Observable.js":"IdSm","../source/State.js":"iC8j","../util.js":"KniQ"}],"vPfl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=s(require("../Layer.js")),e=s(require("../../render/Event.js")),r=s(require("../../render/EventType.js")),n=require("../../transform.js"),o=require("../../extent.js"),a=require("../../dom.js"),i=require("../../render/canvas.js");function s(t){return t&&t.__esModule?t:{default:t}}var l=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),p=function(t){function s(e){var r=t.call(this,e)||this;return r.container=null,r.renderedResolution,r.tempTransform=(0,n.create)(),r.pixelTransform=(0,n.create)(),r.inversePixelTransform=(0,n.create)(),r.context=null,r.containerReused=!1,r}return l(s,t),s.prototype.useContainer=function(t,e,r){var n,o,i=this.getLayer().getClassName();t&&""===t.style.opacity&&t.className===i&&((l=t.firstElementChild)instanceof HTMLCanvasElement&&(o=l.getContext("2d")));if(!o||0!==o.canvas.width&&o.canvas.style.transform!==e?this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1):(this.container=t,this.context=o,this.containerReused=!0),!this.container){(n=document.createElement("div")).className=i;var s=n.style;s.position="absolute",s.width="100%",s.height="100%";var l=(o=(0,a.createCanvasContext2D)()).canvas;n.appendChild(l),(s=l.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=n,this.context=o}},s.prototype.clip=function(t,e,r){var a=e.pixelRatio,s=e.size[0]*a/2,l=e.size[1]*a/2,p=e.viewState.rotation,c=(0,o.getTopLeft)(r),u=(0,o.getTopRight)(r),d=(0,o.getBottomRight)(r),f=(0,o.getBottomLeft)(r);(0,n.apply)(e.coordinateToPixelTransform,c),(0,n.apply)(e.coordinateToPixelTransform,u),(0,n.apply)(e.coordinateToPixelTransform,d),(0,n.apply)(e.coordinateToPixelTransform,f),t.save(),(0,i.rotateAtOffset)(t,-p,s,l),t.beginPath(),t.moveTo(c[0]*a,c[1]*a),t.lineTo(u[0]*a,u[1]*a),t.lineTo(d[0]*a,d[1]*a),t.lineTo(f[0]*a,f[1]*a),t.clip(),(0,i.rotateAtOffset)(t,p,s,l)},s.prototype.clipUnrotated=function(t,e,r){var a=(0,o.getTopLeft)(r),i=(0,o.getTopRight)(r),s=(0,o.getBottomRight)(r),l=(0,o.getBottomLeft)(r);(0,n.apply)(e.coordinateToPixelTransform,a),(0,n.apply)(e.coordinateToPixelTransform,i),(0,n.apply)(e.coordinateToPixelTransform,s),(0,n.apply)(e.coordinateToPixelTransform,l);var p=this.inversePixelTransform;(0,n.apply)(p,a),(0,n.apply)(p,i),(0,n.apply)(p,s),(0,n.apply)(p,l),t.save(),t.beginPath(),t.moveTo(Math.round(a[0]),Math.round(a[1])),t.lineTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(l[0]),Math.round(l[1])),t.clip()},s.prototype.dispatchRenderEvent_=function(t,r,n){var o=this.getLayer();if(o.hasListener(t)){var a=new e.default(t,this.inversePixelTransform,n,r);o.dispatchEvent(a)}},s.prototype.preRender=function(t,e){this.dispatchRenderEvent_(r.default.PRERENDER,t,e)},s.prototype.postRender=function(t,e){this.dispatchRenderEvent_(r.default.POSTRENDER,t,e)},s.prototype.getRenderTransform=function(t,e,r,o,a,i,s){var l=a/2,p=i/2,c=o/e,u=-c,d=-t[0]+s,f=-t[1];return(0,n.compose)(this.tempTransform,l,p,c,u,-r,d,f)},s.prototype.getDataAtPixel=function(t,e,r){var a,i=(0,n.apply)(this.inversePixelTransform,t.slice()),s=this.context,l=this.getLayer().getExtent();if(l){var p=(0,n.apply)(e.pixelToCoordinateTransform,t.slice());if(!(0,o.containsCoordinate)(l,p))return null}try{var c=Math.round(i[0]),u=Math.round(i[1]),d=document.createElement("canvas"),f=d.getContext("2d");d.width=1,d.height=1,f.clearRect(0,0,1,1),f.drawImage(s.canvas,c,u,1,1,0,0,1,1),a=f.getImageData(0,0,1,1).data}catch(h){return"SecurityError"===h.name?new Uint8Array:a}return 0===a[3]?null:a},s}(t.default),c=p;exports.default=c;
},{"../Layer.js":"fpOz","../../render/Event.js":"EB6P","../../render/EventType.js":"z39m","../../transform.js":"P4eA","../../extent.js":"QDir","../../dom.js":"Xno5","../../render/canvas.js":"iAG7"}],"irm1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"};exports.default=e;
},{}],"JxN9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.drawTextOnPath=e;var r=require("../../math.js"),a=require("./transform.js");function e(e,t,i,n,s,v,u,f,l,o,h,p){var M=e[t],b=e[t+1],d=0,c=0,g=0,j=0;function q(){d=M,c=b,M=e[t+=n],b=e[t+1],j+=g,g=Math.sqrt((M-d)*(M-d)+(b-c)*(b-c))}do{q()}while(t<i-n&&j+g<v);for(var x=(v-j)/g,P=(0,r.lerp)(d,M,x),m=(0,r.lerp)(c,b,x),w=t-n,O=j,_=v+f*l(o,s,h);t<i-n&&j+g<_;)q();x=(_-j)/g;var k,y=(0,r.lerp)(d,M,x),I=(0,r.lerp)(c,b,x);if(p){var T=[P,m,y,I];(0,a.rotate)(T,0,4,2,p,T,T),k=T[0]>T[2]}else k=P>y;var z,A=Math.PI,B=[],C=w+n===t;if(g=0,j=O,M=e[t=w],b=e[t+1],C){q();var D=Math.atan2(b-c,M-d);k&&(D+=D>0?-A:A);var E=(y+P)/2,F=(I+m)/2;return B[0]=[E,F,(_-v)/2,D,s],B}for(var G=0,H=s.length;G<H;){q();var J=Math.atan2(b-c,M-d);if(k&&(J+=J>0?-A:A),void 0!==z){var K=J-z;if(K+=K>A?-2*A:K<-A?2*A:0,Math.abs(K)>u)return null}z=J;for(var L=G,N=0;G<H;++G){var Q=f*l(o,s[k?H-G-1:G],h);if(t+n<i&&j+g<v+N+Q/2)break;N+=Q}if(G!==L){var R=k?s.substring(H-L,H-G):s.substring(L,G);x=(v+N/2-j)/g;E=(0,r.lerp)(d,M,x),F=(0,r.lerp)(c,b,x);B.push([E,F,N/2,J,R]),v+=N}}return B}
},{"../../math.js":"B96G","./transform.js":"LGwr"}],"pZKE":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=d(require("./Instruction.js")),e=require("./TextBuilder.js"),i=require("../../has.js"),a=require("../../transform.js"),r=require("../../extent.js"),s=require("../canvas.js"),l=require("../../geom/flat/textpath.js"),n=require("../../array.js"),o=require("../../geom/flat/length.js"),h=require("../../geom/flat/transform.js");function d(t){return t&&t.__esModule?t:{default:t}}var u=(0,r.createEmpty)(),c=[],f=[],p=[],g=[];function m(t){return t[3].declutterBox}var _=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function v(t,i){return"start"!==i&&"end"!==i||_.test(t)||(i="start"===i?"left":"right"),e.TEXT_ALIGN[i]}var x=function(){function d(t,e,i,r,s){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderBuffer_=s,this.renderedTransform_=(0,a.create)(),this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={}}return d.prototype.createLabel=function(t,e,a,r){var l=t+e+a+r;if(this.labels_[l])return this.labels_[l];var n=r?this.strokeStates[r]:null,o=a?this.fillStates[a]:null,h=this.textStates[e],d=this.pixelRatio,u=[h.scale[0]*d,h.scale[1]*d],c=v(t,h.textAlign||s.defaultTextAlign),f=r&&n.lineWidth?n.lineWidth:0,p=t.split("\n"),g=p.length,m=[],_=(0,s.measureTextWidths)(h.font,p,m),x=(0,s.measureTextHeight)(h.font),S=_+f,T=[],y=(S+2)*u[0],C=(x*g+f)*u[1],b={width:y<0?Math.floor(y):Math.ceil(y),height:C<0?Math.floor(C):Math.ceil(C),contextInstructions:T};(1==u[0]&&1==u[1]||T.push("scale",u),T.push("font",h.font),r)&&(T.push("strokeStyle",n.strokeStyle),T.push("lineWidth",f),T.push("lineCap",n.lineCap),T.push("lineJoin",n.lineJoin),T.push("miterLimit",n.miterLimit),(i.WORKER_OFFSCREEN_CANVAS?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(T.push("setLineDash",[n.lineDash]),T.push("lineDashOffset",n.lineDashOffset)));a&&T.push("fillStyle",o.fillStyle),T.push("textBaseline","middle"),T.push("textAlign","center");var L,k=.5-c,w=c*S+k*f;if(r)for(L=0;L<g;++L)T.push("strokeText",[p[L],w+k*m[L],.5*(f+x)+L*x]);if(a)for(L=0;L<g;++L)T.push("fillText",[p[L],w+k*m[L],.5*(f+x)+L*x]);return this.labels_[l]=b,b},d.prototype.replayTextBackground_=function(t,e,i,a,r,s,l){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,a),t.lineTo.apply(t,r),t.lineTo.apply(t,e),s&&(this.alignFill_=s[2],this.fill_(t)),l&&(this.setStrokeStyle_(t,l),t.stroke())},d.prototype.calculateImageOrLabelDimensions_=function(t,e,i,s,l,n,o,h,d,m,_,v,x,S,T,y){var C,b=i-(o*=v[0]),L=s-(h*=v[1]),k=l+d>t?t-d:l,w=n+m>e?e-m:n,I=S[3]+k*v[0]+S[1],R=S[0]+w*v[1]+S[2],O=b-S[3],E=L-S[0];return(T||0!==_)&&(c[0]=O,g[0]=O,c[1]=E,f[1]=E,f[0]=O+I,p[0]=f[0],p[1]=E+R,g[1]=p[1]),0!==_?(C=(0,a.compose)((0,a.create)(),i,s,1,1,_,-i,-s),(0,a.apply)(C,c),(0,a.apply)(C,f),(0,a.apply)(C,p),(0,a.apply)(C,g),(0,r.createOrUpdate)(Math.min(c[0],f[0],p[0],g[0]),Math.min(c[1],f[1],p[1],g[1]),Math.max(c[0],f[0],p[0],g[0]),Math.max(c[1],f[1],p[1],g[1]),u)):(0,r.createOrUpdate)(Math.min(O,O+I),Math.min(E,E+R),Math.max(O,O+I),Math.max(E,E+R),u),x&&(b=Math.round(b),L=Math.round(L)),{drawImageX:b,drawImageY:L,drawImageW:k,drawImageH:w,originX:d,originY:m,declutterBox:{minX:u[0],minY:u[1],maxX:u[2],maxY:u[3],value:y},canvasTransform:C,scale:v}},d.prototype.replayImageOrLabel_=function(t,e,i,a,r,l,n){var o=!(!l&&!n),h=a.declutterBox,d=t.canvas,u=n?n[2]*a.scale[0]/2:0;return h.minX-u<=d.width/e&&h.maxX+u>=0&&h.minY-u<=d.height/e&&h.maxY+u>=0&&(o&&this.replayTextBackground_(t,c,f,p,g,l,n),(0,s.drawImageOrLabel)(t,a.canvasTransform,r,i,a.originX,a.originY,a.drawImageW,a.drawImageH,a.drawImageX,a.drawImageY,a.scale)),!0},d.prototype.fill_=function(t){if(this.alignFill_){var e=(0,a.apply)(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},d.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},d.prototype.drawLabelWithPointPlacement_=function(t,i,a,r){var l=this.textStates[i],n=this.createLabel(t,i,r,a),o=this.strokeStates[a],h=this.pixelRatio,d=v(t,l.textAlign||s.defaultTextAlign),u=e.TEXT_ALIGN[l.textBaseline||s.defaultTextBaseline],c=o&&o.lineWidth?o.lineWidth:0;return{label:n,anchorX:d*(n.width/h-2*l.scale[0])+2*(.5-d)*c,anchorY:u*n.height/h+2*(.5-u)*c}},d.prototype.execute_=function(i,d,u,c,f,p,g,_){var v;this.pixelCoordinates_&&(0,n.equals)(u,this.renderedTransform_)?v=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),v=(0,h.transform2D)(this.coordinates,0,this.coordinates.length,2,u,this.pixelCoordinates_),(0,a.setFromArray)(this.renderedTransform_,u));for(var x,S,T,y,C,b,L,k,w,I,R,O,E,M,D,A,B=0,W=c.length,P=0,Y=0,N=0,X=null,q=null,j=this.coordinateCache_,F=this.viewRotation_,G=Math.round(1e12*Math.atan2(-u[1],u[0]))/1e12,H={context:i,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:F},J=this.instructions!=c||this.overlaps?0:200;B<W;){var K=c[B];switch(K[0]){case t.default.BEGIN_GEOMETRY:E=K[1],A=K[3],E.getGeometry()?void 0===g||(0,r.intersects)(g,A.getExtent())?++B:B=K[2]+1:B=K[2];break;case t.default.BEGIN_PATH:Y>J&&(this.fill_(i),Y=0),N>J&&(i.stroke(),N=0),Y||N||(i.beginPath(),y=NaN,C=NaN),++B;break;case t.default.CIRCLE:var U=v[P=K[1]],V=v[P+1],z=v[P+2]-U,Q=v[P+3]-V,Z=Math.sqrt(z*z+Q*Q);i.moveTo(U+Z,V),i.arc(U,V,Z,0,2*Math.PI,!0),++B;break;case t.default.CLOSE_PATH:i.closePath(),++B;break;case t.default.CUSTOM:P=K[1],x=K[2];var $=K[3],tt=K[4],et=6==K.length?K[5]:void 0;H.geometry=$,H.feature=E,B in j||(j[B]=[]);var it=j[B];et?et(v,P,x,2,it):(it[0]=v[P],it[1]=v[P+1],it.length=2),tt(it,H),++B;break;case t.default.DRAW_IMAGE:P=K[1],x=K[2],k=K[3],S=K[4],T=K[5];var at=K[6],rt=K[7],st=K[8],lt=K[9],nt=K[10],ot=K[11],ht=K[12],dt=K[13],ut=K[14];if(!k&&K.length>=19){w=K[18],I=K[19],R=K[20],O=K[21];var ct=this.drawLabelWithPointPlacement_(w,I,R,O);k=ct.label,K[3]=k;var ft=K[22];S=(ct.anchorX-ft)*this.pixelRatio,K[4]=S;var pt=K[23];T=(ct.anchorY-pt)*this.pixelRatio,K[5]=T,at=k.height,K[6]=at,dt=k.width,K[13]=dt}var gt=void 0;K.length>24&&(gt=K[24]);var mt=void 0,_t=void 0,vt=void 0;K.length>16?(mt=K[15],_t=K[16],vt=K[17]):(mt=s.defaultPadding,_t=!1,vt=!1),nt&&G?ot+=F:nt||G||(ot-=F);for(var xt=0;P<x;P+=2)if(!(gt&&gt[xt++]<dt/this.pixelRatio)){var St=[i,d,k,Kt=this.calculateImageOrLabelDimensions_(k.width,k.height,v[P],v[P+1],dt,at,S,T,st,lt,ot,ht,f,mt,_t||vt,E),rt,_t?X:null,vt?q:null],Tt=void 0,yt=void 0;if(_&&ut){if(!ut[P]){ut[P]=St;continue}if(Tt=ut[P],delete ut[P],yt=m(Tt),_.collides(yt))continue}_&&_.collides(Kt.declutterBox)||(Tt&&(_&&_.insert(yt),this.replayImageOrLabel_.apply(this,Tt)),_&&_.insert(Kt.declutterBox),this.replayImageOrLabel_.apply(this,St))}++B;break;case t.default.DRAW_CHARS:var Ct=K[1],bt=K[2],Lt=K[3],kt=K[4];O=K[5];var wt=K[6],It=K[7],Rt=K[8];R=K[9];var Ot=K[10];w=K[11],I=K[12];var Et=[K[13],K[13]],Mt=this.textStates[I],Dt=Mt.font,At=[Mt.scale[0]*It,Mt.scale[1]*It],Bt=void 0;Dt in this.widths_?Bt=this.widths_[Dt]:(Bt={},this.widths_[Dt]=Bt);var Wt=(0,o.lineStringLength)(v,Ct,bt,2),Pt=Math.abs(At[0])*(0,s.measureAndCacheTextWidth)(Dt,w,Bt);if(kt||Pt<=Wt){var Yt=this.textStates[I].textAlign,Nt=(Wt-Pt)*e.TEXT_ALIGN[Yt],Xt=(0,l.drawTextOnPath)(v,Ct,bt,2,w,Nt,wt,Math.abs(At[0]),s.measureAndCacheTextWidth,Dt,Bt,G?0:this.viewRotation_);t:if(Xt){var qt=[],jt=void 0,Ft=void 0,Gt=void 0,Ht=void 0,Jt=void 0;if(R)for(jt=0,Ft=Xt.length;jt<Ft;++jt){Gt=(Jt=Xt[jt])[4],Ht=this.createLabel(Gt,I,"",R),S=Jt[2]+(At[0]<0?-Ot:Ot),T=Lt*Ht.height+2*(.5-Lt)*Ot*At[1]/At[0]-Rt;var Kt=this.calculateImageOrLabelDimensions_(Ht.width,Ht.height,Jt[0],Jt[1],Ht.width,Ht.height,S,T,0,0,Jt[3],Et,!1,s.defaultPadding,!1,E);if(_&&_.collides(Kt.declutterBox))break t;qt.push([i,d,Ht,Kt,1,null,null])}if(O)for(jt=0,Ft=Xt.length;jt<Ft;++jt){Gt=(Jt=Xt[jt])[4],Ht=this.createLabel(Gt,I,O,""),S=Jt[2],T=Lt*Ht.height-Rt;Kt=this.calculateImageOrLabelDimensions_(Ht.width,Ht.height,Jt[0],Jt[1],Ht.width,Ht.height,S,T,0,0,Jt[3],Et,!1,s.defaultPadding,!1,E);if(_&&_.collides(Kt.declutterBox))break t;qt.push([i,d,Ht,Kt,1,null,null])}_&&_.load(qt.map(m));for(var Ut=0,Vt=qt.length;Ut<Vt;++Ut)this.replayImageOrLabel_.apply(this,qt[Ut])}}++B;break;case t.default.END_GEOMETRY:if(void 0!==p){var zt=p(E=K[1],A);if(zt)return zt}++B;break;case t.default.FILL:J?Y++:this.fill_(i),++B;break;case t.default.MOVE_TO_LINE_TO:for(P=K[1],x=K[2],M=v[P],L=(D=v[P+1])+.5|0,(b=M+.5|0)===y&&L===C||(i.moveTo(M,D),y=b,C=L),P+=2;P<x;P+=2)b=(M=v[P])+.5|0,L=(D=v[P+1])+.5|0,P!=x-2&&b===y&&L===C||(i.lineTo(M,D),y=b,C=L);++B;break;case t.default.SET_FILL_STYLE:X=K,this.alignFill_=K[2],Y&&(this.fill_(i),Y=0,N&&(i.stroke(),N=0)),i.fillStyle=K[1],++B;break;case t.default.SET_STROKE_STYLE:q=K,N&&(i.stroke(),N=0),this.setStrokeStyle_(i,K),++B;break;case t.default.STROKE:J?N++:i.stroke(),++B;break;default:++B}}Y&&this.fill_(i),N&&i.stroke()},d.prototype.execute=function(t,e,i,a,r,s){this.viewRotation_=a,this.execute_(t,e,i,this.instructions,r,void 0,void 0,s)},d.prototype.executeHitDetection=function(t,e,i,a,r){return this.viewRotation_=i,this.execute_(t,1,e,this.hitDetectionInstructions,!0,a,r)},d}(),S=x;exports.default=S;
},{"./Instruction.js":"kTJv","./TextBuilder.js":"DEzw","../../has.js":"f3Nv","../../transform.js":"P4eA","../../extent.js":"QDir","../canvas.js":"iAG7","../../geom/flat/textpath.js":"JxN9","../../array.js":"luEr","../../geom/flat/length.js":"ZZrx","../../geom/flat/transform.js":"LGwr"}],"ngEc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPixelIndexArray=x,exports.default=void 0;var e=u(require("./BuilderType.js")),t=u(require("./Executor.js")),r=require("../../extent.js"),o=require("../../transform.js"),i=require("../../dom.js"),n=require("../../obj.js"),a=require("../../array.js"),s=require("../../geom/flat/transform.js");function u(e){return e&&e.__esModule?e:{default:e}}var f=[e.default.POLYGON,e.default.CIRCLE,e.default.LINE_STRING,e.default.IMAGE,e.default.TEXT,e.default.DEFAULT],h=function(){function u(e,t,r,i,n,a){this.maxExtent_=e,this.overlaps_=i,this.pixelRatio_=r,this.resolution_=t,this.renderBuffer_=a,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=(0,o.create)(),this.createExecutors_(n)}return u.prototype.clip=function(e,t){var r=this.getClipCoords(t);e.beginPath(),e.moveTo(r[0],r[1]),e.lineTo(r[2],r[3]),e.lineTo(r[4],r[5]),e.lineTo(r[6],r[7]),e.clip()},u.prototype.createExecutors_=function(e){for(var r in e){var o=this.executorsByZIndex_[r];void 0===o&&(o={},this.executorsByZIndex_[r]=o);var i=e[r],n=[this.renderBuffer_||0,this.renderBuffer_||0];for(var a in i){var s=i[a];o[a]=new t.default(this.resolution_,this.pixelRatio_,this.overlaps_,s,n)}}},u.prototype.hasExecutors=function(e){for(var t in this.executorsByZIndex_)for(var r=this.executorsByZIndex_[t],o=0,i=e.length;o<i;++o)if(e[o]in r)return!0;return!1},u.prototype.forEachFeatureAtCoordinate=function(t,n,s,u,h,c){var d=2*(u=Math.round(u))+1,l=(0,o.compose)(this.hitDetectionTransform_,u+.5,u+.5,1/n,-1/n,-s,-t[0],-t[1]),v=!this.hitDetectionContext_;v&&(this.hitDetectionContext_=(0,i.createCanvasContext2D)(d,d));var p,_=this.hitDetectionContext_;_.canvas.width!==d||_.canvas.height!==d?(_.canvas.width=d,_.canvas.height=d):v||_.clearRect(0,0,d,d),void 0!==this.renderBuffer_&&(p=(0,r.createEmpty)(),(0,r.extendCoordinate)(p,t),(0,r.buffer)(p,n*(this.renderBuffer_+u),p));var y,m=x(u);function E(t,r){for(var o=_.getImageData(0,0,d,d).data,i=0,n=m.length;i<n;i++)if(o[m[i]]>0){if(!c||y!==e.default.IMAGE&&y!==e.default.TEXT||-1!==c.indexOf(t)){var a=(m[i]-3)/4,s=u-a%d,f=u-(a/d|0),x=h(t,r,s*s+f*f);if(x)return x}_.clearRect(0,0,d,d);break}}var g,I,B,C,T,b=Object.keys(this.executorsByZIndex_).map(Number);for(b.sort(a.numberSafeCompareFunction),g=b.length-1;g>=0;--g){var j=b[g].toString();for(B=this.executorsByZIndex_[j],I=f.length-1;I>=0;--I)if(void 0!==(C=B[y=f[I]])&&(T=C.executeHitDetection(_,l,s,E,p)))return T}},u.prototype.getClipCoords=function(e){var t=this.maxExtent_;if(!t)return null;var r=t[0],o=t[1],i=t[2],n=t[3],a=[r,o,r,n,i,n,i,o];return(0,s.transform2D)(a,0,8,2,e,a),a},u.prototype.isEmpty=function(){return(0,n.isEmpty)(this.executorsByZIndex_)},u.prototype.execute=function(e,t,r,o,i,n,s){var u=Object.keys(this.executorsByZIndex_).map(Number);u.sort(a.numberSafeCompareFunction),this.maxExtent_&&(e.save(),this.clip(e,r));var h,c,x,d,l,v,p=n||f;for(s&&u.reverse(),h=0,c=u.length;h<c;++h){var _=u[h].toString();for(l=this.executorsByZIndex_[_],x=0,d=p.length;x<d;++x){void 0!==(v=l[p[x]])&&v.execute(e,t,r,o,i,s)}}this.maxExtent_&&e.restore()},u}(),c={};function x(e){if(void 0!==c[e])return c[e];for(var t=2*e+1,r=e*e,o=new Array(r+1),i=0;i<=e;++i)for(var n=0;n<=e;++n){var a=i*i+n*n;if(a>r)break;var s=o[a];s||(s=[],o[a]=s),s.push(4*((e+i)*t+(e+n))+3),i>0&&s.push(4*((e-i)*t+(e+n))+3),n>0&&(s.push(4*((e+i)*t+(e-n))+3),i>0&&s.push(4*((e-i)*t+(e-n))+3))}for(var u=[],f=(i=0,o.length);i<f;++i)o[i]&&u.push.apply(u,o[i]);return c[e]=u,u}var d=h;exports.default=d;
},{"./BuilderType.js":"irm1","./Executor.js":"pZKE","../../extent.js":"QDir","../../transform.js":"P4eA","../../dom.js":"Xno5","../../obj.js":"mH6q","../../array.js":"luEr","../../geom/flat/transform.js":"LGwr"}],"fo6K":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=h(require("../../geom/GeometryType.js")),e=h(require("../VectorContext.js")),i=require("../../colorlike.js"),s=require("../../transform.js"),a=require("../canvas.js"),o=require("../../array.js"),r=require("../../extent.js"),n=require("../../geom/flat/transform.js"),l=require("../../geom/SimpleGeometry.js");function h(t){return t&&t.__esModule?t:{default:t}}var _=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),f=function(e){function h(t,i,a,o,r,n,l){var h=e.call(this)||this;return h.context_=t,h.pixelRatio_=i,h.extent_=a,h.transform_=o,h.viewRotation_=r,h.squaredTolerance_=n,h.userTransform_=l,h.contextFillState_=null,h.contextStrokeState_=null,h.contextTextState_=null,h.fillState_=null,h.strokeState_=null,h.image_=null,h.imageAnchorX_=0,h.imageAnchorY_=0,h.imageHeight_=0,h.imageOpacity_=0,h.imageOriginX_=0,h.imageOriginY_=0,h.imageRotateWithView_=!1,h.imageRotation_=0,h.imageScale_=[0,0],h.imageWidth_=0,h.text_="",h.textOffsetX_=0,h.textOffsetY_=0,h.textRotateWithView_=!1,h.textRotation_=0,h.textScale_=[0,0],h.textFillState_=null,h.textStrokeState_=null,h.textState_=null,h.pixelCoordinates_=[],h.tmpLocalTransform_=(0,s.create)(),h}return _(h,e),h.prototype.drawImages_=function(t,e,i,a){if(this.image_){var o=(0,n.transform2D)(t,e,i,2,this.transform_,this.pixelCoordinates_),r=this.context_,l=this.tmpLocalTransform_,h=r.globalAlpha;1!=this.imageOpacity_&&(r.globalAlpha=h*this.imageOpacity_);var _=this.imageRotation_;this.imageRotateWithView_&&(_+=this.viewRotation_);for(var f=0,g=o.length;f<g;f+=2){var x=o[f]-this.imageAnchorX_,S=o[f+1]-this.imageAnchorY_;if(0!==_||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var m=x+this.imageAnchorX_,d=S+this.imageAnchorY_;(0,s.compose)(l,m,d,1,1,_,-m,-d),r.setTransform.apply(r,l),r.translate(m,d),r.scale(this.imageScale_[0],this.imageScale_[1]),r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),r.setTransform(1,0,0,1,0,0)}else r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,x,S,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(r.globalAlpha=h)}},h.prototype.drawText_=function(t,e,i,a){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var o=(0,n.transform2D)(t,e,i,a,this.transform_,this.pixelCoordinates_),r=this.context_,l=this.textRotation_;for(this.textRotateWithView_&&(l+=this.viewRotation_);e<i;e+=a){var h=o[e]+this.textOffsetX_,_=o[e+1]+this.textOffsetY_;if(0!==l||1!=this.textScale_[0]||1!=this.textScale_[1]){var f=(0,s.compose)(this.tmpLocalTransform_,h,_,1,1,l,-h,-_);r.setTransform.apply(r,f),r.translate(h,_),r.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&r.strokeText(this.text_,0,0),this.textFillState_&&r.fillText(this.text_,0,0),r.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&r.strokeText(this.text_,h,_),this.textFillState_&&r.fillText(this.text_,h,_)}}},h.prototype.moveToLineTo_=function(t,e,i,s,a){var o=this.context_,r=(0,n.transform2D)(t,e,i,s,this.transform_,this.pixelCoordinates_);o.moveTo(r[0],r[1]);var l=r.length;a&&(l-=2);for(var h=2;h<l;h+=2)o.lineTo(r[h],r[h+1]);return a&&o.closePath(),i},h.prototype.drawRings_=function(t,e,i,s){for(var a=0,o=i.length;a<o;++a)e=this.moveToLineTo_(t,e,i[a],s,!0);return e},h.prototype.drawCircle=function(t){if((0,r.intersects)(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=(0,l.transformGeom2D)(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],s=e[3]-e[1],a=Math.sqrt(i*i+s*s),o=this.context_;o.beginPath(),o.arc(e[0],e[1],a,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},h.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},h.prototype.setTransform=function(t){this.transform_=t},h.prototype.drawGeometry=function(e){switch(e.getType()){case t.default.POINT:this.drawPoint(e);break;case t.default.LINE_STRING:this.drawLineString(e);break;case t.default.POLYGON:this.drawPolygon(e);break;case t.default.MULTI_POINT:this.drawMultiPoint(e);break;case t.default.MULTI_LINE_STRING:this.drawMultiLineString(e);break;case t.default.MULTI_POLYGON:this.drawMultiPolygon(e);break;case t.default.GEOMETRY_COLLECTION:this.drawGeometryCollection(e);break;case t.default.CIRCLE:this.drawCircle(e)}},h.prototype.drawFeature=function(t,e){var i=e.getGeometryFunction()(t);i&&(0,r.intersects)(this.extent_,i.getExtent())&&(this.setStyle(e),this.drawGeometry(i))},h.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),i=0,s=e.length;i<s;++i)this.drawGeometry(e[i])},h.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},h.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},h.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,r.intersects)(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var s=t.getFlatMidpoint();this.drawText_(s,0,2,2)}}},h.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if((0,r.intersects)(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,s=t.getFlatCoordinates(),a=0,o=t.getEnds(),n=t.getStride();i.beginPath();for(var l=0,h=o.length;l<h;++l)a=this.moveToLineTo_(s,a,o[l],n,!1);i.stroke()}if(""!==this.text_){var _=t.getFlatMidpoints();this.drawText_(_,0,_.length,2)}}},h.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,r.intersects)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var i=t.getFlatInteriorPoint();this.drawText_(i,0,2,2)}}},h.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,r.intersects)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getOrientedFlatCoordinates(),s=0,a=t.getEndss(),o=t.getStride();e.beginPath();for(var n=0,l=a.length;n<l;++n){var h=a[n];s=this.drawRings_(i,s,h,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var _=t.getFlatInteriorPoints();this.drawText_(_,0,_.length,2)}}},h.prototype.setContextFillState_=function(t){var e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},h.prototype.setContextStrokeState_=function(t){var e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&((0,o.equals)(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},h.prototype.setContextTextState_=function(t){var e=this.context_,i=this.contextTextState_,s=t.textAlign?t.textAlign:a.defaultTextAlign;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=s&&(i.textAlign=s,e.textAlign=s),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=s,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:s,textBaseline:t.textBaseline})},h.prototype.setFillStrokeStyle=function(t,e){if(t){var s=t.getColor();this.fillState_={fillStyle:(0,i.asColorLike)(s||a.defaultFillStyle)}}else this.fillState_=null;if(e){var o=e.getColor(),r=e.getLineCap(),n=e.getLineDash(),l=e.getLineDashOffset(),h=e.getLineJoin(),_=e.getWidth(),f=e.getMiterLimit();this.strokeState_={lineCap:void 0!==r?r:a.defaultLineCap,lineDash:n||a.defaultLineDash,lineDashOffset:l||a.defaultLineDashOffset,lineJoin:void 0!==h?h:a.defaultLineJoin,lineWidth:this.pixelRatio_*(void 0!==_?_:a.defaultLineWidth),miterLimit:void 0!==f?f:a.defaultMiterLimit,strokeStyle:(0,i.asColorLike)(o||a.defaultStrokeStyle)}}else this.strokeState_=null},h.prototype.setImageStyle=function(t){if(t){var e=t.getSize();if(e){var i=t.getAnchor(),s=t.getImage(1),a=t.getOrigin(),o=t.getScaleArray();this.imageAnchorX_=i[0],this.imageAnchorY_=i[1],this.imageHeight_=e[1],this.image_=s,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=a[0],this.imageOriginY_=a[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=[this.pixelRatio_*o[0],this.pixelRatio_*o[1]],this.imageWidth_=e[0]}else this.image_=null}else this.image_=null},h.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var s=e.getColor();this.textFillState_={fillStyle:(0,i.asColorLike)(s||a.defaultFillStyle)}}else this.textFillState_=null;var o=t.getStroke();if(o){var r=o.getColor(),n=o.getLineCap(),l=o.getLineDash(),h=o.getLineDashOffset(),_=o.getLineJoin(),f=o.getWidth(),g=o.getMiterLimit();this.textStrokeState_={lineCap:void 0!==n?n:a.defaultLineCap,lineDash:l||a.defaultLineDash,lineDashOffset:h||a.defaultLineDashOffset,lineJoin:void 0!==_?_:a.defaultLineJoin,lineWidth:void 0!==f?f:a.defaultLineWidth,miterLimit:void 0!==g?g:a.defaultMiterLimit,strokeStyle:(0,i.asColorLike)(r||a.defaultStrokeStyle)}}else this.textStrokeState_=null;var x=t.getFont(),S=t.getOffsetX(),m=t.getOffsetY(),d=t.getRotateWithView(),c=t.getRotation(),u=t.getScaleArray(),p=t.getText(),y=t.getTextAlign(),T=t.getTextBaseline();this.textState_={font:void 0!==x?x:a.defaultFont,textAlign:void 0!==y?y:a.defaultTextAlign,textBaseline:void 0!==T?T:a.defaultTextBaseline},this.text_=void 0!==p?p:"",this.textOffsetX_=void 0!==S?this.pixelRatio_*S:0,this.textOffsetY_=void 0!==m?this.pixelRatio_*m:0,this.textRotateWithView_=void 0!==d&&d,this.textRotation_=void 0!==c?c:0,this.textScale_=[this.pixelRatio_*u[0],this.pixelRatio_*u[1]]}else this.text_=""},h}(e.default),g=f;exports.default=g;
},{"../../geom/GeometryType.js":"lmV0","../VectorContext.js":"LQER","../../colorlike.js":"V5XN","../../transform.js":"P4eA","../canvas.js":"iAG7","../../array.js":"luEr","../../extent.js":"QDir","../../geom/flat/transform.js":"LGwr","../../geom/SimpleGeometry.js":"pnrv"}],"Rlas":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={FRACTION:"fraction",PIXELS:"pixels"};exports.default=e;
},{}],"Ojbp":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./events/Target.js")),e=r(require("./events/EventType.js")),o=require("./util.js");function r(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),u=function(t){function r(e,o,r,n){var u=t.call(this)||this;return u.extent=e,u.pixelRatio_=r,u.resolution=o,u.state=n,u}return n(r,t),r.prototype.changed=function(){this.dispatchEvent(e.default.CHANGE)},r.prototype.getExtent=function(){return this.extent},r.prototype.getImage=function(){return(0,o.abstract)()},r.prototype.getPixelRatio=function(){return this.pixelRatio_},r.prototype.getResolution=function(){return this.resolution},r.prototype.getState=function(){return this.state},r.prototype.load=function(){(0,o.abstract)()},r}(t.default),i=u;exports.default=i;
},{"./events/Target.js":"CR4Y","./events/EventType.js":"C8cu","./util.js":"KniQ"}],"DHWK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.listenImage=l,exports.default=void 0;var t=o(require("./events/EventType.js")),e=o(require("./ImageBase.js")),n=o(require("./ImageState.js")),i=require("./has.js"),r=require("./extent.js"),s=require("./events.js");function o(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),u=function(t){function e(e,i,r,s,o,a){var u=t.call(this,e,i,r,n.default.IDLE)||this;return u.src_=s,u.image_=new Image,null!==o&&(u.image_.crossOrigin=o),u.unlisten_=null,u.state=n.default.IDLE,u.imageLoadFunction_=a,u}return a(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=n.default.ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=(0,r.getHeight)(this.extent)/this.image_.height),this.state=n.default.LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=n.default.IDLE&&this.state!=n.default.ERROR||(this.state=n.default.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=l(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(e.default);function l(e,n,r){var o=e;if(o.src&&i.IMAGE_DECODE){var a=o.decode(),u=!0;return a.then(function(){u&&n()}).catch(function(t){u&&("EncodingError"===t.name&&"Invalid image type."===t.message?n():r())}),function(){u=!1}}var l=[(0,s.listenOnce)(o,t.default.LOAD,n),(0,s.listenOnce)(o,t.default.ERROR,r)];return function(){l.forEach(s.unlistenByKey)}}var c=u;exports.default=c;
},{"./events/EventType.js":"C8cu","./ImageBase.js":"Ojbp","./ImageState.js":"Xz9x","./has.js":"f3Nv","./extent.js":"QDir","./events.js":"UqnM"}],"XCOy":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.get=c,exports.default=void 0;var t=r(require("../events/Target.js")),e=r(require("../events/EventType.js")),i=r(require("../ImageState.js")),a=require("../color.js"),n=require("../dom.js"),s=require("./IconImageCache.js"),o=require("../Image.js");function r(t){return t&&t.__esModule?t:{default:t}}var h=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function a(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(a.prototype=i.prototype,new a)}}(),_=null,l=function(t){function s(e,i,a,n,s,o){var r=t.call(this)||this;return r.hitDetectionImage_=null,r.image_=e||new Image,null!==n&&(r.image_.crossOrigin=n),r.canvas_={},r.color_=o,r.unlisten_=null,r.imageState_=s,r.size_=a,r.src_=i,r.tainted_,r}return h(s,t),s.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===i.default.LOADED){_||(_=(0,n.createCanvasContext2D)(1,1)),_.drawImage(this.image_,0,0);try{_.getImageData(0,0,1,1),this.tainted_=!1}catch(t){_=null,this.tainted_=!0}}return!0===this.tainted_},s.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(e.default.CHANGE)},s.prototype.handleImageError_=function(){this.imageState_=i.default.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},s.prototype.handleImageLoad_=function(){this.imageState_=i.default.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},s.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},s.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},s.prototype.getImageState=function(){return this.imageState_},s.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],i=(0,n.createCanvasContext2D)(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},s.prototype.getSize=function(){return this.size_},s.prototype.getSrc=function(){return this.src_},s.prototype.load=function(){if(this.imageState_==i.default.IDLE){this.imageState_=i.default.LOADING;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=(0,o.listenImage)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},s.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var i=e.getContext("2d");if(i.scale(t,t),i.drawImage(this.image_,0,0),i.globalCompositeOperation="multiply","multiply"===i.globalCompositeOperation||this.isTainted_())i.fillStyle=(0,a.asString)(this.color_),i.fillRect(0,0,e.width,e.height),i.globalCompositeOperation="destination-in",i.drawImage(this.image_,0,0);else{for(var n=i.getImageData(0,0,e.width,e.height),s=n.data,o=this.color_[0]/255,r=this.color_[1]/255,h=this.color_[2]/255,_=this.color_[3],l=0,c=s.length;l<c;l+=4)s[l]*=o,s[l+1]*=r,s[l+2]*=h,s[l+3]*=_;i.putImageData(n,0,0)}}},s.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},s}(t.default);function c(t,e,i,a,n,o){var r=s.shared.get(e,a,o);return r||(r=new l(t,e,i,a,n,o),s.shared.set(e,a,o,r)),r}var u=l;exports.default=u;
},{"../events/Target.js":"CR4Y","../events/EventType.js":"C8cu","../ImageState.js":"Xz9x","../color.js":"eucy","../dom.js":"Xno5","./IconImageCache.js":"V0oB","../Image.js":"DHWK"}],"z2xv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=h(require("../events/EventType.js")),i=h(require("./IconAnchorUnits.js")),e=h(require("./IconOrigin.js")),o=h(require("../ImageState.js")),r=h(require("./Image.js")),n=require("../color.js"),s=require("../asserts.js"),a=require("./IconImage.js"),c=require("../util.js");function h(t){return t&&t.__esModule?t:{default:t}}var l=function(){var t=function(i,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])})(i,e)};return function(i,e){function o(){this.constructor=i}t(i,e),i.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),u=function(r){function h(t){var h=this,l=t||{},u=void 0!==l.opacity?l.opacity:1,g=void 0!==l.rotation?l.rotation:0,f=void 0!==l.scale?l.scale:1,_=void 0!==l.rotateWithView&&l.rotateWithView;(h=r.call(this,{opacity:u,rotation:g,scale:f,displacement:void 0!==l.displacement?l.displacement:[0,0],rotateWithView:_})||this).anchor_=void 0!==l.anchor?l.anchor:[.5,.5],h.normalizedAnchor_=null,h.anchorOrigin_=void 0!==l.anchorOrigin?l.anchorOrigin:e.default.TOP_LEFT,h.anchorXUnits_=void 0!==l.anchorXUnits?l.anchorXUnits:i.default.FRACTION,h.anchorYUnits_=void 0!==l.anchorYUnits?l.anchorYUnits:i.default.FRACTION,h.crossOrigin_=void 0!==l.crossOrigin?l.crossOrigin:null;var d=void 0!==l.img?l.img:null,O=void 0!==l.imgSize?l.imgSize:null,p=l.src;(0,s.assert)(!(void 0!==p&&d),4),(0,s.assert)(!d||d&&O,5),void 0!==p&&0!==p.length||!d||(p=d.src||(0,c.getUid)(d)),(0,s.assert)(void 0!==p&&p.length>0,6);var I=void 0!==l.src?o.default.IDLE:o.default.LOADED;return h.color_=void 0!==l.color?(0,n.asArray)(l.color):null,h.iconImage_=(0,a.get)(d,p,O,h.crossOrigin_,I,h.color_),h.offset_=void 0!==l.offset?l.offset:[0,0],h.offsetOrigin_=void 0!==l.offsetOrigin?l.offsetOrigin:e.default.TOP_LEFT,h.origin_=null,h.size_=void 0!==l.size?l.size:null,h}return l(h,r),h.prototype.clone=function(){var t=this.getScale();return new h({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},h.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,o=this.getSize();if(this.anchorXUnits_==i.default.FRACTION||this.anchorYUnits_==i.default.FRACTION){if(!o)return null;t=this.anchor_.slice(),this.anchorXUnits_==i.default.FRACTION&&(t[0]*=o[0]),this.anchorYUnits_==i.default.FRACTION&&(t[1]*=o[1])}if(this.anchorOrigin_!=e.default.TOP_LEFT){if(!o)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=e.default.TOP_RIGHT&&this.anchorOrigin_!=e.default.BOTTOM_RIGHT||(t[0]=-t[0]+o[0]),this.anchorOrigin_!=e.default.BOTTOM_LEFT&&this.anchorOrigin_!=e.default.BOTTOM_RIGHT||(t[1]=-t[1]+o[1])}return this.normalizedAnchor_=t,this.normalizedAnchor_},h.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},h.prototype.getColor=function(){return this.color_},h.prototype.getImage=function(t){return this.iconImage_.getImage(t)},h.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},h.prototype.getImageSize=function(){return this.iconImage_.getSize()},h.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},h.prototype.getImageState=function(){return this.iconImage_.getImageState()},h.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},h.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_,i=this.getDisplacement();if(this.offsetOrigin_!=e.default.TOP_LEFT){var o=this.getSize(),r=this.iconImage_.getSize();if(!o||!r)return null;t=t.slice(),this.offsetOrigin_!=e.default.TOP_RIGHT&&this.offsetOrigin_!=e.default.BOTTOM_RIGHT||(t[0]=r[0]-o[0]-t[0]),this.offsetOrigin_!=e.default.BOTTOM_LEFT&&this.offsetOrigin_!=e.default.BOTTOM_RIGHT||(t[1]=r[1]-o[1]-t[1])}return t[0]+=i[0],t[1]+=i[1],this.origin_=t,this.origin_},h.prototype.getSrc=function(){return this.iconImage_.getSrc()},h.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},h.prototype.listenImageChange=function(i){this.iconImage_.addEventListener(t.default.CHANGE,i)},h.prototype.load=function(){this.iconImage_.load()},h.prototype.unlistenImageChange=function(i){this.iconImage_.removeEventListener(t.default.CHANGE,i)},h}(r.default),g=u;exports.default=g;
},{"../events/EventType.js":"C8cu","./IconAnchorUnits.js":"Rlas","./IconOrigin.js":"urGY","../ImageState.js":"Xz9x","./Image.js":"S8ow","../color.js":"eucy","../asserts.js":"fLG6","./IconImage.js":"XCOy","../util.js":"KniQ"}],"RPsG":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=i(require("./Fill.js")),e=i(require("./TextPlacement.js")),o=require("../size.js");function i(t){return t&&t.__esModule?t:{default:t}}var n="#333",r=function(){function i(i){var r=i||{};this.font_=r.font,this.rotation_=r.rotation,this.rotateWithView_=r.rotateWithView,this.scale_=r.scale,this.scaleArray_=(0,o.toSize)(void 0!==r.scale?r.scale:1),this.text_=r.text,this.textAlign_=r.textAlign,this.textBaseline_=r.textBaseline,this.fill_=void 0!==r.fill?r.fill:new t.default({color:n}),this.maxAngle_=void 0!==r.maxAngle?r.maxAngle:Math.PI/4,this.placement_=void 0!==r.placement?r.placement:e.default.POINT,this.overflow_=!!r.overflow,this.stroke_=void 0!==r.stroke?r.stroke:null,this.offsetX_=void 0!==r.offsetX?r.offsetX:0,this.offsetY_=void 0!==r.offsetY?r.offsetY:0,this.backgroundFill_=r.backgroundFill?r.backgroundFill:null,this.backgroundStroke_=r.backgroundStroke?r.backgroundStroke:null,this.padding_=void 0===r.padding?null:r.padding}return i.prototype.clone=function(){var t=this.getScale();return new i({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()})},i.prototype.getOverflow=function(){return this.overflow_},i.prototype.getFont=function(){return this.font_},i.prototype.getMaxAngle=function(){return this.maxAngle_},i.prototype.getPlacement=function(){return this.placement_},i.prototype.getOffsetX=function(){return this.offsetX_},i.prototype.getOffsetY=function(){return this.offsetY_},i.prototype.getFill=function(){return this.fill_},i.prototype.getRotateWithView=function(){return this.rotateWithView_},i.prototype.getRotation=function(){return this.rotation_},i.prototype.getScale=function(){return this.scale_},i.prototype.getScaleArray=function(){return this.scaleArray_},i.prototype.getStroke=function(){return this.stroke_},i.prototype.getText=function(){return this.text_},i.prototype.getTextAlign=function(){return this.textAlign_},i.prototype.getTextBaseline=function(){return this.textBaseline_},i.prototype.getBackgroundFill=function(){return this.backgroundFill_},i.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},i.prototype.getPadding=function(){return this.padding_},i.prototype.setOverflow=function(t){this.overflow_=t},i.prototype.setFont=function(t){this.font_=t},i.prototype.setMaxAngle=function(t){this.maxAngle_=t},i.prototype.setOffsetX=function(t){this.offsetX_=t},i.prototype.setOffsetY=function(t){this.offsetY_=t},i.prototype.setPlacement=function(t){this.placement_=t},i.prototype.setRotateWithView=function(t){this.rotateWithView_=t},i.prototype.setFill=function(t){this.fill_=t},i.prototype.setRotation=function(t){this.rotation_=t},i.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=(0,o.toSize)(void 0!==t?t:1)},i.prototype.setStroke=function(t){this.stroke_=t},i.prototype.setText=function(t){this.text_=t},i.prototype.setTextAlign=function(t){this.textAlign_=t},i.prototype.setTextBaseline=function(t){this.textBaseline_=t},i.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},i.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},i.prototype.setPadding=function(t){this.padding_=t},i}(),s=r;exports.default=s;
},{"./Fill.js":"AFcg","./TextPlacement.js":"AXKs","../size.js":"TAHd"}],"qeKX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Circle",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"Fill",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"Icon",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"IconImage",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"Image",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"RegularShape",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"Stroke",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"Style",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"Text",{enumerable:!0,get:function(){return s.default}});var e=f(require("./style/Circle.js")),t=f(require("./style/Fill.js")),r=f(require("./style/Icon.js")),u=f(require("./style/IconImage.js")),n=f(require("./style/Image.js")),l=f(require("./style/RegularShape.js")),o=f(require("./style/Stroke.js")),i=f(require("./style/Style.js")),s=f(require("./style/Text.js"));function f(e){return e&&e.__esModule?e:{default:e}}
},{"./style/Circle.js":"cdf1","./style/Fill.js":"AFcg","./style/Icon.js":"z2xv","./style/IconImage.js":"XCOy","./style/Image.js":"S8ow","./style/RegularShape.js":"il3X","./style/Stroke.js":"TXDt","./style/Style.js":"he4w","./style/Text.js":"RPsG"}],"MrCe":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createHitDetectionImageData=s,exports.hitDetect=g;var e=l(require("./Immediate.js")),t=l(require("../../geom/GeometryType.js")),r=l(require("../../style/IconAnchorUnits.js")),a=require("../../style.js"),i=require("../../dom.js"),n=require("../../extent.js"),o=require("../../array.js");function l(e){return e&&e.__esModule?e:{default:e}}function s(l,s,g,u,c,h,f){var d=l[0]/2,v=l[1]/2,m=(0,i.createCanvasContext2D)(d,v);m.imageSmoothingEnabled=!1;for(var y=m.canvas,I=new e.default(m,.5,c,null,f),p=g.length,S=Math.floor(16777215/p),w={},x=1;x<=p;++x){var C=g[x-1],j=C.getStyleFunction()||u;if(u){var q=j(C,h);if(q){Array.isArray(q)||(q=[q]);for(var E="#"+("000000"+(x*S).toString(16)).slice(-6),M=0,O=q.length;M<O;++M){var b=q[M],D=b.clone(),N=D.getFill();N&&N.setColor(E);var T=D.getStroke();T&&T.setColor(E),D.setText(void 0);var G=b.getImage();if(G){var L=G.getImageSize();if(!L)continue;var P=document.createElement("canvas");P.width=L[0],P.height=L[1];var R=P.getContext("2d",{alpha:!1});R.fillStyle=E;var _=R.canvas;R.fillRect(0,0,_.width,_.height);var z=L?L[0]:_.width,A=L?L[1]:_.height;(0,i.createCanvasContext2D)(z,A).drawImage(_,0,0),D.setImage(new a.Icon({img:_,imgSize:L,anchor:G.getAnchor(),anchorXUnits:r.default.PIXELS,anchorYUnits:r.default.PIXELS,offset:G.getOrigin(),size:G.getSize(),opacity:G.getOpacity(),scale:G.getScale(),rotation:G.getRotation(),rotateWithView:G.getRotateWithView()}))}var F=Number(D.getZIndex());(V=w[F])||(V={},w[F]=V,V[t.default.POLYGON]=[],V[t.default.CIRCLE]=[],V[t.default.LINE_STRING]=[],V[t.default.POINT]=[]);var U=D.getGeometryFunction()(C);U&&(0,n.intersects)(c,U.getExtent())&&V[U.getType().replace("Multi","")].push(U,D)}}}}for(var X=Object.keys(w).map(Number).sort(o.numberSafeCompareFunction),k=(x=0,X.length);x<k;++x){var V=w[X[x]];for(var W in V){var Y=V[W];for(M=0,O=Y.length;M<O;M+=2){I.setStyle(Y[M+1]);for(var H=0,Z=s.length;H<Z;++H)I.setTransform(s[H]),I.drawGeometry(Y[M])}}}return m.getImageData(0,0,y.width,y.height)}function g(e,t,r){var a=[];if(r){var i=4*(Math.round(e[0]/2)+Math.round(e[1]/2)*r.width),n=r.data[i],o=r.data[i+1],l=r.data[i+2]+256*(o+256*n),s=Math.floor(16777215/t.length);l&&l%s==0&&a.push(t[l/s-1])}return a}
},{"./Immediate.js":"fo6K","../../geom/GeometryType.js":"lmV0","../../style/IconAnchorUnits.js":"Rlas","../../style.js":"qeKX","../../dom.js":"Xno5","../../extent.js":"QDir","../../array.js":"luEr"}],"UCah":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaultOrder=n,exports.getSquaredTolerance=d,exports.getTolerance=u,exports.renderFeature=o;var e=l(require("../render/canvas/BuilderType.js")),t=l(require("../geom/GeometryType.js")),r=l(require("../ImageState.js")),a=require("../util.js");function l(e){return e&&e.__esModule?e:{default:e}}var g=.5,i={Point:y,LineString:v,Polygon:m,MultiPoint:c,MultiLineString:I,MultiPolygon:S,GeometryCollection:s,Circle:f};function n(e,t){return parseInt((0,a.getUid)(e),10)-parseInt((0,a.getUid)(t),10)}function d(e,t){var r=u(e,t);return r*r}function u(e,t){return g*e/t}function f(t,r,a,l,g){var i=a.getFill(),n=a.getStroke();if(i||n){var d=t.getBuilder(a.getZIndex(),e.default.CIRCLE);d.setFillStrokeStyle(i,n),d.drawCircle(r,l)}var u=a.getText();if(u&&u.getText()){var f=(g||t).getBuilder(a.getZIndex(),e.default.TEXT);f.setTextStyle(u),f.drawText(r,l)}}function o(e,t,a,l,g,i,n){var d=!1,u=a.getImage();if(u){var f=u.getImageState();f==r.default.LOADED||f==r.default.ERROR?u.unlistenImageChange(g):(f==r.default.IDLE&&u.load(),f=u.getImageState(),u.listenImageChange(g),d=!0)}return T(e,t,a,l,i,n),d}function T(e,t,r,a,l,g){var n=r.getGeometryFunction()(t);if(n){var d=n.simplifyTransformed(a,l);if(r.getRenderer())x(e,d,r,t);else(0,i[d.getType()])(e,d,r,t,g)}}function x(r,a,l,g){if(a.getType()!=t.default.GEOMETRY_COLLECTION)r.getBuilder(l.getZIndex(),e.default.DEFAULT).drawCustom(a,g,l.getRenderer());else for(var i=a.getGeometries(),n=0,d=i.length;n<d;++n)x(r,i[n],l,g)}function s(e,t,r,a,l){var g,n,d=t.getGeometriesArray();for(g=0,n=d.length;g<n;++g){(0,i[d[g].getType()])(e,d[g],r,a,l)}}function v(t,r,a,l,g){var i=a.getStroke();if(i){var n=t.getBuilder(a.getZIndex(),e.default.LINE_STRING);n.setFillStrokeStyle(null,i),n.drawLineString(r,l)}var d=a.getText();if(d&&d.getText()){var u=(g||t).getBuilder(a.getZIndex(),e.default.TEXT);u.setTextStyle(d),u.drawText(r,l)}}function I(t,r,a,l,g){var i=a.getStroke();if(i){var n=t.getBuilder(a.getZIndex(),e.default.LINE_STRING);n.setFillStrokeStyle(null,i),n.drawMultiLineString(r,l)}var d=a.getText();if(d&&d.getText()){var u=(g||t).getBuilder(a.getZIndex(),e.default.TEXT);u.setTextStyle(d),u.drawText(r,l)}}function S(t,r,a,l,g){var i=a.getFill(),n=a.getStroke();if(n||i){var d=t.getBuilder(a.getZIndex(),e.default.POLYGON);d.setFillStrokeStyle(i,n),d.drawMultiPolygon(r,l)}var u=a.getText();if(u&&u.getText()){var f=(g||t).getBuilder(a.getZIndex(),e.default.TEXT);f.setTextStyle(u),f.drawText(r,l)}}function y(t,a,l,g,i){var n,d=l.getImage(),u=l.getText();if(i&&(t=i,n=d&&u&&u.getText()?{}:void 0),d){if(d.getImageState()!=r.default.LOADED)return;var f=t.getBuilder(l.getZIndex(),e.default.IMAGE);f.setImageStyle(d,n),f.drawPoint(a,g)}if(u&&u.getText()){var o=t.getBuilder(l.getZIndex(),e.default.TEXT);o.setTextStyle(u,n),o.drawText(a,g)}}function c(t,a,l,g,i){var n,d=l.getImage(),u=l.getText();if(i&&(t=i,n=d&&u&&u.getText()?{}:void 0),d){if(d.getImageState()!=r.default.LOADED)return;var f=t.getBuilder(l.getZIndex(),e.default.IMAGE);f.setImageStyle(d,n),f.drawMultiPoint(a,g)}if(u&&u.getText()){var o=(i||t).getBuilder(l.getZIndex(),e.default.TEXT);o.setTextStyle(u,n),o.drawText(a,g)}}function m(t,r,a,l,g){var i=a.getFill(),n=a.getStroke();if(i||n){var d=t.getBuilder(a.getZIndex(),e.default.POLYGON);d.setFillStrokeStyle(i,n),d.drawPolygon(r,l)}var u=a.getText();if(u&&u.getText()){var f=(g||t).getBuilder(a.getZIndex(),e.default.TEXT);f.setTextStyle(u),f.drawText(r,l)}}
},{"../render/canvas/BuilderType.js":"irm1","../geom/GeometryType.js":"lmV0","../ImageState.js":"Xz9x","../util.js":"KniQ"}],"F2e3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=h(require("../../render/canvas/BuilderGroup.js")),t=h(require("./Layer.js")),r=h(require("../../render/canvas/ExecutorGroup.js")),n=h(require("../../ViewHint.js")),i=require("../../transform.js"),a=require("../../extent.js"),o=require("../../render/canvas/hitdetect.js"),s=require("../vector.js"),u=require("../../proj.js"),d=require("../../util.js"),l=require("../../coordinate.js");function h(e){return e&&e.__esModule?e:{default:e}}var c=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),p=function(t){function h(e){var r=t.call(this,e)||this;return r.boundHandleStyleImageChange_=r.handleStyleImageChange_.bind(r),r.animatingOrInteracting_,r.dirty_=!1,r.hitDetectionImageData_=null,r.renderedFeatures_=null,r.renderedRevision_=-1,r.renderedResolution_=NaN,r.renderedExtent_=(0,a.createEmpty)(),r.renderedRotation_,r.renderedCenter_=null,r.renderedProjection_=null,r.renderedRenderOrder_=null,r.replayGroup_=null,r.replayGroupChanged=!0,r.declutterExecutorGroup=null,r.clipping=!0,r}return c(h,t),h.prototype.useContainer=function(e,r,n){n<1&&(e=null),t.prototype.useContainer.call(this,e,r,n)},h.prototype.renderWorlds=function(e,t,r){var i=t.extent,o=t.viewState,s=o.center,u=o.resolution,d=o.projection,l=o.rotation,h=d.getExtent(),c=this.getLayer().getSource(),p=t.pixelRatio,f=t.viewHints,g=!(f[n.default.ANIMATING]||f[n.default.INTERACTING]),y=this.context,_=Math.round(t.size[0]*p),v=Math.round(t.size[1]*p),x=c.getWrapX()&&d.canWrapX(),m=x?(0,a.getWidth)(h):null,R=x?Math.ceil((i[2]-h[2])/m)+1:1,E=x?Math.floor((i[0]-h[0])/m):0;do{var I=this.getRenderTransform(s,u,l,p,_,v,E*m);e.execute(y,1,I,l,g,void 0,r)}while(++E<R)},h.prototype.renderDeclutter=function(e){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,e,e.declutterTree)},h.prototype.renderFrame=function(e,t){var r=e.pixelRatio,n=e.layerStatesArray[e.layerIndex];(0,i.makeScale)(this.pixelTransform,1/r,1/r),(0,i.makeInverse)(this.inversePixelTransform,this.pixelTransform);var o=(0,i.toString)(this.pixelTransform);this.useContainer(t,o,n.opacity);var s=this.context,d=s.canvas,l=this.replayGroup_,h=this.declutterExecutorGroup;if((!l||l.isEmpty())&&(!h||h.isEmpty()))return!this.containerReused&&d.width>0&&(d.width=0),this.container;var c=Math.round(e.size[0]*r),p=Math.round(e.size[1]*r);d.width!=c||d.height!=p?(d.width=c,d.height=p,d.style.transform!==o&&(d.style.transform=o)):this.containerReused||s.clearRect(0,0,c,p),this.preRender(s,e);var f=e.viewState,g=f.projection,y=!1;if(n.extent&&this.clipping){var _=(0,u.fromUserExtent)(n.extent,g);(y=!(0,a.containsExtent)(_,e.extent)&&(0,a.intersects)(_,e.extent))&&this.clipUnrotated(s,e,_)}this.renderWorlds(l,e),y&&s.restore(),this.postRender(s,e);var v=n.opacity,x=this.container;return v!==parseFloat(x.style.opacity)&&(x.style.opacity=1===v?"":String(v)),this.renderedRotation_!==f.rotation&&(this.renderedRotation_=f.rotation,this.hitDetectionImageData_=null),this.container},h.prototype.getFeatures=function(e){return new Promise(function(t){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var r=[this.context.canvas.width,this.context.canvas.height];(0,i.apply)(this.pixelTransform,r);var n=this.renderedCenter_,s=this.renderedResolution_,u=this.renderedRotation_,d=this.renderedProjection_,l=this.renderedExtent_,h=this.getLayer(),c=[],p=r[0]/2,f=r[1]/2;c.push(this.getRenderTransform(n,s,u,.5,p,f,0).slice());var g=h.getSource(),y=d.getExtent();if(g.getWrapX()&&d.canWrapX()&&!(0,a.containsExtent)(y,l)){for(var _=l[0],v=(0,a.getWidth)(y),x=0,m=void 0;_<y[0];)m=v*--x,c.push(this.getRenderTransform(n,s,u,.5,p,f,m).slice()),_+=v;for(x=0,_=l[2];_>y[2];)m=v*++x,c.push(this.getRenderTransform(n,s,u,.5,p,f,m).slice()),_-=v}this.hitDetectionImageData_=(0,o.createHitDetectionImageData)(r,c,this.renderedFeatures_,h.getStyleFunction(),l,s,u)}t((0,o.hitDetect)(e,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},h.prototype.forEachFeatureAtCoordinate=function(e,t,r,n,i){var a=this;if(this.replayGroup_){var o,s=t.viewState.resolution,u=t.viewState.rotation,l=this.getLayer(),h={},c=function(e,t,r){var a=(0,d.getUid)(e),o=h[a];if(o){if(!0!==o&&r<o.distanceSq){if(0===r)return h[a]=!0,i.splice(i.lastIndexOf(o),1),n(e,l,t);o.geometry=t,o.distanceSq=r}}else{if(0===r)return h[a]=!0,n(e,l,t);i.push(h[a]={feature:e,layer:l,geometry:t,distanceSq:r,callback:n})}},p=[this.replayGroup_];return this.declutterExecutorGroup&&p.push(this.declutterExecutorGroup),p.some(function(n){return o=n.forEachFeatureAtCoordinate(e,s,u,r,c,n===a.declutterExecutorGroup?t.declutterTree.all().map(function(e){return e.value}):null)}),o}},h.prototype.handleFontsChanged=function(){var e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()},h.prototype.handleStyleImageChange_=function(e){this.renderIfReadyAndVisible()},h.prototype.prepareFrame=function(t){var i=this.getLayer(),o=i.getSource();if(!o)return!1;var d=t.viewHints[n.default.ANIMATING],h=t.viewHints[n.default.INTERACTING],c=i.getUpdateWhileAnimating(),p=i.getUpdateWhileInteracting();if(!this.dirty_&&!c&&d||!p&&h)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var f=t.extent,g=t.viewState,y=g.projection,_=g.resolution,v=t.pixelRatio,x=i.getRevision(),m=i.getRenderBuffer(),R=i.getRenderOrder();void 0===R&&(R=s.defaultOrder);var E=g.center.slice(),I=(0,a.buffer)(f,m*_),j=[I.slice()],w=y.getExtent();if(o.getWrapX()&&y.canWrapX()&&!(0,a.containsExtent)(w,t.extent)){var G=(0,a.getWidth)(w),S=Math.max((0,a.getWidth)(I)/2,G);I[0]=w[0]-S,I[2]=w[2]+S,(0,l.wrapX)(E,y);var F=(0,a.wrapX)(j[0],y);F[0]<w[0]&&F[2]<w[2]?j.push([F[0]+G,F[1],F[2]+G,F[3]]):F[0]>w[0]&&F[2]>w[2]&&j.push([F[0]-G,F[1],F[2]-G,F[3]])}if(!this.dirty_&&this.renderedResolution_==_&&this.renderedRevision_==x&&this.renderedRenderOrder_==R&&(0,a.containsExtent)(this.renderedExtent_,I))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var T,C=new e.default((0,s.getTolerance)(_,v),I,_,v);this.getLayer().getDeclutter()&&(T=new e.default((0,s.getTolerance)(_,v),I,_,v));var O,D=(0,u.getUserProjection)();if(D){for(var q=0,W=j.length;q<W;++q)o.loadFeatures((0,u.toUserExtent)(j[q],y),_,D);O=(0,u.getTransformFromProjections)(D,y)}else for(q=0,W=j.length;q<W;++q)o.loadFeatures(j[q],_,y);var b=(0,s.getSquaredTolerance)(_,v),A=function(e){var t,r=e.getStyleFunction()||i.getStyleFunction();if(r&&(t=r(e,_)),t){var n=this.renderFeature(e,b,t,C,O,T);this.dirty_=this.dirty_||n}}.bind(this),M=(0,u.toUserExtent)(I,y),N=o.getFeaturesInExtent(M);R&&N.sort(R);for(q=0,W=N.length;q<W;++q)A(N[q]);this.renderedFeatures_=N;var P=C.finish(),H=new r.default(I,_,v,o.getOverlaps(),P,i.getRenderBuffer());return T&&(this.declutterExecutorGroup=new r.default(I,_,v,o.getOverlaps(),T.finish(),i.getRenderBuffer())),this.renderedResolution_=_,this.renderedRevision_=x,this.renderedRenderOrder_=R,this.renderedExtent_=I,this.renderedCenter_=E,this.renderedProjection_=y,this.replayGroup_=H,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},h.prototype.renderFeature=function(e,t,r,n,i,a){if(!r)return!1;var o=!1;if(Array.isArray(r))for(var u=0,d=r.length;u<d;++u)o=(0,s.renderFeature)(n,e,r[u],t,this.boundHandleStyleImageChange_,i,a)||o;else o=(0,s.renderFeature)(n,e,r,t,this.boundHandleStyleImageChange_,i,a);return o},h}(t.default),f=p;exports.default=f;
},{"../../render/canvas/BuilderGroup.js":"vqHd","./Layer.js":"vPfl","../../render/canvas/ExecutorGroup.js":"ngEc","../../ViewHint.js":"cuLW","../../transform.js":"P4eA","../../extent.js":"QDir","../../render/canvas/hitdetect.js":"MrCe","../vector.js":"UCah","../../proj.js":"Diht","../../util.js":"KniQ","../../coordinate.js":"nGsj"}],"dflx":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./BaseVector.js")),e=r(require("../renderer/canvas/VectorLayer.js"));function r(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),n=function(t){function r(e){return t.call(this,e)||this}return o(r,t),r.prototype.createRenderer=function(){return new e.default(this)},r}(t.default),u=n;exports.default=u;
},{"./BaseVector.js":"pskK","../renderer/canvas/VectorLayer.js":"F2e3"}],"MiUH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=n(require("rbush")),e=require("../extent.js"),r=require("../util.js"),i=require("../obj.js");function n(t){return t&&t.__esModule?t:{default:t}}var o=function(){function n(e){this.rbush_=new t.default(e),this.items_={}}return n.prototype.insert=function(t,e){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[(0,r.getUid)(e)]=i},n.prototype.load=function(t,e){for(var i=new Array(e.length),n=0,o=e.length;n<o;n++){var s=t[n],u=e[n],a={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:u};i[n]=a,this.items_[(0,r.getUid)(u)]=a}this.rbush_.load(i)},n.prototype.remove=function(t){var e=(0,r.getUid)(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)},n.prototype.update=function(t,i){var n=this.items_[(0,r.getUid)(i)],o=[n.minX,n.minY,n.maxX,n.maxY];(0,e.equals)(o,t)||(this.remove(i),this.insert(t,i))},n.prototype.getAll=function(){return this.rbush_.all().map(function(t){return t.value})},n.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(t){return t.value})},n.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},n.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},n.prototype.forEach_=function(t,e){for(var r,i=0,n=t.length;i<n;i++)if(r=e(t[i]))return r;return r},n.prototype.isEmpty=function(){return(0,i.isEmpty)(this.items_)},n.prototype.clear=function(){this.rbush_.clear(),this.items_={}},n.prototype.getExtent=function(t){var r=this.rbush_.toJSON();return(0,e.createOrUpdate)(r.minX,r.minY,r.maxX,r.maxY,t)},n.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},n}(),s=o;exports.default=s;
},{"rbush":"XGea","../extent.js":"QDir","../util.js":"KniQ","../obj.js":"mH6q"}],"H38a":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=n(require("../Object.js")),o=n(require("./State.js")),r=require("../util.js"),e=require("../proj.js");function n(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(o,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])})(o,r)};return function(o,r){function e(){this.constructor=o}t(o,r),o.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}}(),u=function(t){function n(r){var n=t.call(this)||this;return n.projection_=(0,e.get)(r.projection),n.attributions_=s(r.attributions),n.attributionsCollapsible_=void 0===r.attributionsCollapsible||r.attributionsCollapsible,n.loading=!1,n.state_=void 0!==r.state?r.state:o.default.READY,n.wrapX_=void 0!==r.wrapX&&r.wrapX,n}return i(n,t),n.prototype.getAttributions=function(){return this.attributions_},n.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},n.prototype.getProjection=function(){return this.projection_},n.prototype.getResolutions=function(){return(0,r.abstract)()},n.prototype.getState=function(){return this.state_},n.prototype.getWrapX=function(){return this.wrapX_},n.prototype.getContextOptions=function(){},n.prototype.refresh=function(){this.changed()},n.prototype.setAttributions=function(t){this.attributions_=s(t),this.changed()},n.prototype.setState=function(t){this.state_=t,this.changed()},n}(t.default);function s(t){return t?Array.isArray(t)?function(o){return t}:"function"==typeof t?t:function(o){return[t]}:null}var a=u;exports.default=a;
},{"../Object.js":"PhPh","./State.js":"iC8j","../util.js":"KniQ","../proj.js":"Diht"}],"s8Fc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};exports.default=e;
},{}],"JpXE":[function(require,module,exports) {
"use strict";function e(e,t){return[[-1/0,-1/0,1/0,1/0]]}function t(e,t){return[e]}function r(e){return function(t,r){var n=e.getZForResolution(r),o=e.getTileRangeForExtentAndZ(t,n),u=[],i=[n,0,0];for(i[1]=o.minX;i[1]<=o.maxX;++i[1])for(i[2]=o.minY;i[2]<=o.maxY;++i[2])u.push(e.getTileCoordExtent(i));return u}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.all=e,exports.bbox=t,exports.tile=r;
},{}],"U3JP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.loadFeaturesXhr=s,exports.xhr=o,exports.setWithCredentials=a;var e=r(require("./format/FormatType.js")),t=require("./functions.js");function r(e){return e&&e.__esModule?e:{default:e}}var n=!1;function s(t,r,s,o,a,u,i){var f=new XMLHttpRequest;f.open("GET","function"==typeof t?t(s,o,a):t,!0),r.getType()==e.default.ARRAY_BUFFER&&(f.responseType="arraybuffer"),f.withCredentials=n,f.onload=function(t){if(!f.status||f.status>=200&&f.status<300){var n=r.getType(),o=void 0;n==e.default.JSON||n==e.default.TEXT?o=f.responseText:n==e.default.XML?(o=f.responseXML)||(o=(new DOMParser).parseFromString(f.responseText,"application/xml")):n==e.default.ARRAY_BUFFER&&(o=f.response),o?u(r.readFeatures(o,{extent:s,featureProjection:a}),r.readProjection(o)):i()}else i()},f.onerror=i,f.send()}function o(e,r){return function(n,o,a,u,i){var f=this;s(e,r,n,o,a,function(e,t){void 0!==u&&u(e),f.addFeatures(e)},i||t.VOID)}}function a(e){n=e}
},{"./format/FormatType.js":"AbO3","./functions.js":"RgA2"}],"ZS12":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.VectorSourceEvent=void 0;var e=y(require("../Collection.js")),t=y(require("../CollectionEventType.js")),r=y(require("../events/Event.js")),n=y(require("../events/EventType.js")),i=y(require("../ObjectEventType.js")),o=y(require("../structs/RBush.js")),s=y(require("./Source.js")),a=y(require("./State.js")),u=y(require("./VectorEventType.js")),d=require("../functions.js"),h=require("../loadingstrategy.js"),l=require("../asserts.js"),f=require("../extent.js"),c=require("../array.js"),_=require("../util.js"),p=require("../obj.js"),v=require("../events.js"),E=require("../featureloader.js");function y(e){return e&&e.__esModule?e:{default:e}}var g=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),F=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.feature=r,i.features=n,i}return g(t,e),t}(r.default);exports.VectorSourceEvent=F;var x=function(r){function s(t){var n=this,i=t||{};(n=r.call(this,{attributions:i.attributions,projection:void 0,state:a.default.READY,wrapX:void 0===i.wrapX||i.wrapX})||this).loader_=d.VOID,n.format_=i.format,n.overlaps_=void 0===i.overlaps||i.overlaps,n.url_=i.url,void 0!==i.loader?n.loader_=i.loader:void 0!==n.url_&&((0,l.assert)(n.format_,7),n.loader_=(0,E.xhr)(n.url_,n.format_)),n.strategy_=void 0!==i.strategy?i.strategy:h.all;var s,u,f=void 0===i.useSpatialIndex||i.useSpatialIndex;return n.featuresRtree_=f?new o.default:null,n.loadedExtentsRtree_=new o.default,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null,Array.isArray(i.features)?u=i.features:i.features&&(u=(s=i.features).getArray()),f||void 0!==s||(s=new e.default(u)),void 0!==u&&n.addFeaturesInternal(u),void 0!==s&&n.bindFeaturesCollection_(s),n}return g(s,r),s.prototype.addFeature=function(e){this.addFeatureInternal(e),this.changed()},s.prototype.addFeatureInternal=function(e){var t=(0,_.getUid)(e);if(this.addToIndex_(t,e)){this.setupChangeEvents_(t,e);var r=e.getGeometry();if(r){var n=r.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,e)}else this.nullGeometryFeatures_[t]=e;this.dispatchEvent(new F(u.default.ADDFEATURE,e))}else this.featuresCollection_&&this.featuresCollection_.remove(e)},s.prototype.setupChangeEvents_=function(e,t){this.featureChangeKeys_[e]=[(0,v.listen)(t,n.default.CHANGE,this.handleFeatureChange_,this),(0,v.listen)(t,i.default.PROPERTYCHANGE,this.handleFeatureChange_,this)]},s.prototype.addToIndex_=function(e,t){var r=!0,n=t.getId();return void 0!==n&&(n.toString()in this.idIndex_?r=!1:this.idIndex_[n.toString()]=t),r&&((0,l.assert)(!(e in this.uidIndex_),30),this.uidIndex_[e]=t),r},s.prototype.addFeatures=function(e){this.addFeaturesInternal(e),this.changed()},s.prototype.addFeaturesInternal=function(e){for(var t=[],r=[],n=[],i=0,o=e.length;i<o;i++){var s=e[i],a=(0,_.getUid)(s);this.addToIndex_(a,s)&&r.push(s)}i=0;for(var d=r.length;i<d;i++){s=r[i],a=(0,_.getUid)(s);this.setupChangeEvents_(a,s);var h=s.getGeometry();if(h){var l=h.getExtent();t.push(l),n.push(s)}else this.nullGeometryFeatures_[a]=s}this.featuresRtree_&&this.featuresRtree_.load(t,n);i=0;for(var f=r.length;i<f;i++)this.dispatchEvent(new F(u.default.ADDFEATURE,r[i]))},s.prototype.bindFeaturesCollection_=function(e){var r=!1;this.addEventListener(u.default.ADDFEATURE,function(t){r||(r=!0,e.push(t.feature),r=!1)}),this.addEventListener(u.default.REMOVEFEATURE,function(t){r||(r=!0,e.remove(t.feature),r=!1)}),e.addEventListener(t.default.ADD,function(e){r||(r=!0,this.addFeature(e.element),r=!1)}.bind(this)),e.addEventListener(t.default.REMOVE,function(e){r||(r=!0,this.removeFeature(e.element),r=!1)}.bind(this)),this.featuresCollection_=e},s.prototype.clear=function(e){if(e){for(var t in this.featureChangeKeys_){this.featureChangeKeys_[t].forEach(v.unlistenByKey)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_)for(var r in this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this)),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[r]);this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var n=new F(u.default.CLEAR);this.dispatchEvent(n),this.changed()},s.prototype.forEachFeature=function(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},s.prototype.forEachFeatureAtCoordinateDirect=function(e,t){var r=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(r,function(r){return r.getGeometry().intersectsCoordinate(e)?t(r):void 0})},s.prototype.forEachFeatureInExtent=function(e,t){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},s.prototype.forEachFeatureIntersectingExtent=function(e,t){return this.forEachFeatureInExtent(e,function(r){if(r.getGeometry().intersectsExtent(e)){var n=t(r);if(n)return n}})},s.prototype.getFeaturesCollection=function(){return this.featuresCollection_},s.prototype.getFeatures=function(){var e;return this.featuresCollection_?e=this.featuresCollection_.getArray():this.featuresRtree_&&(e=this.featuresRtree_.getAll(),(0,p.isEmpty)(this.nullGeometryFeatures_)||(0,c.extend)(e,(0,p.getValues)(this.nullGeometryFeatures_))),e},s.prototype.getFeaturesAtCoordinate=function(e){var t=[];return this.forEachFeatureAtCoordinateDirect(e,function(e){t.push(e)}),t},s.prototype.getFeaturesInExtent=function(e){return this.featuresRtree_?this.featuresRtree_.getInExtent(e):this.featuresCollection_?this.featuresCollection_.getArray():[]},s.prototype.getClosestFeatureToCoordinate=function(e,t){var r=e[0],n=e[1],i=null,o=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],u=t||d.TRUE;return this.featuresRtree_.forEachInExtent(a,function(e){if(u(e)){var t=e.getGeometry(),d=s;if((s=t.closestPointXY(r,n,o,s))<d){i=e;var h=Math.sqrt(s);a[0]=r-h,a[1]=n-h,a[2]=r+h,a[3]=n+h}}}),i},s.prototype.getExtent=function(e){return this.featuresRtree_.getExtent(e)},s.prototype.getFeatureById=function(e){var t=this.idIndex_[e.toString()];return void 0!==t?t:null},s.prototype.getFeatureByUid=function(e){var t=this.uidIndex_[e];return void 0!==t?t:null},s.prototype.getFormat=function(){return this.format_},s.prototype.getOverlaps=function(){return this.overlaps_},s.prototype.getUrl=function(){return this.url_},s.prototype.handleFeatureChange_=function(e){var t=e.target,r=(0,_.getUid)(t),n=t.getGeometry();if(n){var i=n.getExtent();r in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[r],this.featuresRtree_&&this.featuresRtree_.insert(i,t)):this.featuresRtree_&&this.featuresRtree_.update(i,t)}else r in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(t),this.nullGeometryFeatures_[r]=t);var o=t.getId();if(void 0!==o){var s=o.toString();this.idIndex_[s]!==t&&(this.removeFromIdIndex_(t),this.idIndex_[s]=t)}else this.removeFromIdIndex_(t),this.uidIndex_[r]=t;this.changed(),this.dispatchEvent(new F(u.default.CHANGEFEATURE,t))},s.prototype.hasFeature=function(e){var t=e.getId();return void 0!==t?t in this.idIndex_:(0,_.getUid)(e)in this.uidIndex_},s.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&(0,p.isEmpty)(this.nullGeometryFeatures_)},s.prototype.loadFeatures=function(e,t,r){var n=this.loadedExtentsRtree_,i=this.strategy_(e,t);this.loading=!1;for(var o=function(e,o){var a=i[e];n.forEachInExtent(a,function(e){return(0,f.containsExtent)(e.extent,a)})||(s.dispatchEvent(new F(u.default.FEATURESLOADSTART)),s.loader_.call(s,a,t,r,function(e){this.dispatchEvent(new F(u.default.FEATURESLOADEND,void 0,e))}.bind(s),function(){this.dispatchEvent(new F(u.default.FEATURESLOADERROR))}.bind(s)),n.insert(a,{extent:a.slice()}),s.loading=s.loader_!==d.VOID)},s=this,a=0,h=i.length;a<h;++a)o(a)},s.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),r.prototype.refresh.call(this)},s.prototype.removeLoadedExtent=function(e){var t,r=this.loadedExtentsRtree_;r.forEachInExtent(e,function(r){if((0,f.equals)(r.extent,e))return t=r,!0}),t&&r.remove(t)},s.prototype.removeFeature=function(e){var t=(0,_.getUid)(e);t in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[t]:this.featuresRtree_&&this.featuresRtree_.remove(e),this.removeFeatureInternal(e),this.changed()},s.prototype.removeFeatureInternal=function(e){var t=(0,_.getUid)(e);this.featureChangeKeys_[t].forEach(v.unlistenByKey),delete this.featureChangeKeys_[t];var r=e.getId();void 0!==r&&delete this.idIndex_[r.toString()],delete this.uidIndex_[t],this.dispatchEvent(new F(u.default.REMOVEFEATURE,e))},s.prototype.removeFromIdIndex_=function(e){var t=!1;for(var r in this.idIndex_)if(this.idIndex_[r]===e){delete this.idIndex_[r],t=!0;break}return t},s.prototype.setLoader=function(e){this.loader_=e},s.prototype.setUrl=function(e){(0,l.assert)(this.format_,7),this.setLoader((0,E.xhr)(e,this.format_))},s}(s.default),I=x;exports.default=I;
},{"../Collection.js":"FnDa","../CollectionEventType.js":"BTrx","../events/Event.js":"fKNg","../events/EventType.js":"C8cu","../ObjectEventType.js":"zehl","../structs/RBush.js":"MiUH","./Source.js":"H38a","./State.js":"iC8j","./VectorEventType.js":"s8Fc","../functions.js":"RgA2","../loadingstrategy.js":"JpXE","../asserts.js":"fLG6","../extent.js":"QDir","../array.js":"luEr","../util.js":"KniQ","../obj.js":"mH6q","../events.js":"UqnM","../featureloader.js":"U3JP"}],"e7i2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createRegularPolygon=F,exports.createBox=j,exports.default=exports.DrawEvent=void 0;var e=L(require("../geom/Circle.js")),t=L(require("../events/Event.js")),i=L(require("../events/EventType.js")),o=L(require("../Feature.js")),s=L(require("../geom/GeometryType.js")),r=L(require("./Property.js")),n=L(require("../geom/LineString.js")),a=L(require("../MapBrowserEvent.js")),h=L(require("../MapBrowserEventType.js")),d=L(require("../geom/MultiLineString.js")),u=L(require("../geom/MultiPoint.js")),_=L(require("../geom/MultiPolygon.js")),c=L(require("../geom/Point.js")),l=L(require("./Pointer.js")),f=O(require("../geom/Polygon.js")),p=L(require("../layer/Vector.js")),g=L(require("../source/Vector.js")),y=require("../functions.js"),m=require("../events/condition.js"),C=require("../extent.js"),v=require("../style/Style.js"),k=require("../proj.js"),P=require("../Object.js"),T=require("../coordinate.js");function w(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return w=function(){return e},e}function O(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=w();if(t&&t.has(e))return t.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var r=o?Object.getOwnPropertyDescriptor(e,s):null;r&&(r.get||r.set)?Object.defineProperty(i,s,r):i[s]=e[s]}return i.default=e,t&&t.set(e,i),i}function L(e){return e&&e.__esModule?e:{default:e}}var N=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),E={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",CIRCLE:"Circle"},D={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"},I=function(e){function t(t,i){var o=e.call(this,t)||this;return o.feature=i,o}return N(t,e),t}(t.default);exports.DrawEvent=I;var G=function(t){function l(i){var o=this,s=i;s.stopDown||(s.stopDown=y.FALSE),(o=t.call(this,s)||this).shouldHandle_=!1,o.downPx_=null,o.downTimeout_,o.lastDragTime_,o.pointerType_,o.freehand_=!1,o.source_=i.source?i.source:null,o.features_=i.features?i.features:null,o.snapTolerance_=i.snapTolerance?i.snapTolerance:12,o.type_=i.type,o.mode_=M(o.type_),o.stopClick_=!!i.stopClick,o.minPoints_=i.minPoints?i.minPoints:o.mode_===E.POLYGON?3:2,o.maxPoints_=o.mode_===E.CIRCLE?2:i.maxPoints?i.maxPoints:1/0,o.finishCondition_=i.finishCondition?i.finishCondition:y.TRUE;var a=i.geometryFunction;if(!a){var h,d=o.mode_;if(d===E.CIRCLE)a=function(t,i,o){var s=i||new e.default([NaN,NaN]),r=(0,k.fromUserCoordinate)(t[0],o),n=(0,T.squaredDistance)(r,(0,k.fromUserCoordinate)(t[t.length-1],o));s.setCenterAndRadius(r,Math.sqrt(n));var a=(0,k.getUserProjection)();return a&&s.transform(o,a),s};else d===E.POINT?h=c.default:d===E.LINE_STRING?h=n.default:d===E.POLYGON&&(h=f.default),a=function(e,t,i){return t?d===E.POLYGON?e[0].length?t.setCoordinates([e[0].concat([e[0][0]])]):t.setCoordinates([]):t.setCoordinates(e):t=new h(e),t}}return o.geometryFunction_=a,o.dragVertexDelay_=void 0!==i.dragVertexDelay?i.dragVertexDelay:500,o.finishCoordinate_=null,o.sketchFeature_=null,o.sketchPoint_=null,o.sketchCoords_=null,o.sketchLine_=null,o.sketchLineCoords_=null,o.squaredClickTolerance_=i.clickTolerance?i.clickTolerance*i.clickTolerance:36,o.overlay_=new p.default({source:new g.default({useSpatialIndex:!1,wrapX:!!i.wrapX&&i.wrapX}),style:i.style?i.style:R(),updateWhileInteracting:!0}),o.geometryName_=i.geometryName,o.condition_=i.condition?i.condition:m.noModifierKeys,o.freehandCondition_,i.freehand?o.freehandCondition_=m.always:o.freehandCondition_=i.freehandCondition?i.freehandCondition:m.shiftKeyOnly,o.addEventListener((0,P.getChangeEventType)(r.default.ACTIVE),o.updateState_),o}return N(l,t),l.prototype.setMap=function(e){t.prototype.setMap.call(this,e),this.updateState_()},l.prototype.getOverlay=function(){return this.overlay_},l.prototype.handleEvent=function(e){e.originalEvent.type===i.default.CONTEXTMENU&&e.originalEvent.preventDefault(),this.freehand_=this.mode_!==E.POINT&&this.freehandCondition_(e);var o=e.type===h.default.POINTERMOVE,s=!0;!this.freehand_&&this.lastDragTime_&&e.type===h.default.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,o=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0));return this.freehand_&&e.type===h.default.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(e.coordinate),s=!1):this.freehand_&&e.type===h.default.POINTERDOWN?s=!1:o&&this.getPointerCount()<2?(s=e.type===h.default.POINTERMOVE)&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):("mouse"===e.originalEvent.pointerType||e.type===h.default.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(e):e.type===h.default.DBLCLICK&&(s=!1),t.prototype.handleEvent.call(this,e)&&s},l.prototype.handleDownEvent=function(e){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=e.pixel,this.finishCoordinate_||this.startDrawing_(e.coordinate),!0):this.condition_(e)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new a.default(h.default.POINTERMOVE,e.map,e.originalEvent,!1,e.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=e.pixel,!0):(this.lastDragTime_=void 0,!1)},l.prototype.handleUpEvent=function(e){var t=!0;if(0===this.getPointerCount())if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(e),this.shouldHandle_){switch(!0){case!this.finishCoordinate_:if(this.startDrawing_(e.coordinate),this.mode_!==E.POINT)break;case this.freehand_||this.atFinish_(e.pixel)&&this.finishCondition_(e):this.finishDrawing();break;case!this.freehand_:this.addToDrawing_(e.coordinate)}t=!1}else this.freehand_&&this.abortDrawing();return!t&&this.stopClick_&&e.originalEvent.stopPropagation(),t},l.prototype.handlePointerMove_=function(e){if(this.pointerType_=e.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var t=this.downPx_,i=e.pixel,o=t[0]-i[0],s=t[1]-i[1],r=o*o+s*s;if(this.shouldHandle_=this.freehand_?r>this.squaredClickTolerance_:r<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(e.coordinate):this.createOrUpdateSketchPoint_(e)},l.prototype.atFinish_=function(e){var t=!1;if(this.sketchFeature_){var i=!1,o=[this.finishCoordinate_],s=this.mode_;if(s===E.POINT)t=!0;else if(s===E.CIRCLE)t=2===this.sketchCoords_.length;else if(s===E.LINE_STRING)i=this.sketchCoords_.length>this.minPoints_;else if(s===E.POLYGON){var r=this.sketchCoords_;i=r[0].length>this.minPoints_,o=[r[0][0],r[0][r[0].length-2]]}if(i)for(var n=this.getMap(),a=0,h=o.length;a<h;a++){var d=o[a],u=n.getPixelFromCoordinate(d),_=e[0]-u[0],c=e[1]-u[1],l=this.freehand_?1:this.snapTolerance_;if(t=Math.sqrt(_*_+c*c)<=l){this.finishCoordinate_=d;break}}}return t},l.prototype.createOrUpdateSketchPoint_=function(e){var t=e.coordinate.slice();this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(t):(this.sketchPoint_=new o.default(new c.default(t)),this.updateSketchFeatures_())},l.prototype.createOrUpdateCustomSketchLine_=function(e){this.sketchLine_||(this.sketchLine_=new o.default);var t=e.getLinearRing(0),i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(t.getLayout(),t.getFlatCoordinates()),i.changed()):(i=new n.default(t.getFlatCoordinates(),t.getLayout()),this.sketchLine_.setGeometry(i))},l.prototype.startDrawing_=function(e){var t=this.getMap().getView().getProjection();this.finishCoordinate_=e,this.mode_===E.POINT?this.sketchCoords_=e.slice():this.mode_===E.POLYGON?(this.sketchCoords_=[[e.slice(),e.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[e.slice(),e.slice()],this.sketchLineCoords_&&(this.sketchLine_=new o.default(new n.default(this.sketchLineCoords_)));var i=this.geometryFunction_(this.sketchCoords_,void 0,t);this.sketchFeature_=new o.default,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(i),this.updateSketchFeatures_(),this.dispatchEvent(new I(D.DRAWSTART,this.sketchFeature_))},l.prototype.modifyDrawing_=function(e){var t,i,o=this.getMap(),r=this.sketchFeature_.getGeometry(),n=o.getView().getProjection();(this.mode_===E.POINT?i=this.sketchCoords_:this.mode_===E.POLYGON?(i=(t=this.sketchCoords_[0])[t.length-1],this.atFinish_(o.getPixelFromCoordinate(e))&&(e=this.finishCoordinate_.slice())):i=(t=this.sketchCoords_)[t.length-1],i[0]=e[0],i[1]=e[1],this.geometryFunction_(this.sketchCoords_,r,n),this.sketchPoint_)&&this.sketchPoint_.getGeometry().setCoordinates(e);if(r.getType()===s.default.POLYGON&&this.mode_!==E.POLYGON)this.createOrUpdateCustomSketchLine_(r);else if(this.sketchLineCoords_){this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_)}this.updateSketchFeatures_()},l.prototype.addToDrawing_=function(e){var t,i,o=this.sketchFeature_.getGeometry(),s=this.getMap().getView().getProjection(),r=this.mode_;r===E.LINE_STRING||r===E.CIRCLE?(this.finishCoordinate_=e.slice(),(i=this.sketchCoords_).length>=this.maxPoints_&&(this.freehand_?i.pop():t=!0),i.push(e.slice()),this.geometryFunction_(i,o,s)):r===E.POLYGON&&((i=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?i.pop():t=!0),i.push(e.slice()),t&&(this.finishCoordinate_=i[0]),this.geometryFunction_(this.sketchCoords_,o,s)),this.updateSketchFeatures_(),t&&this.finishDrawing()},l.prototype.removeLastPoint=function(){if(this.sketchFeature_){var e,t=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),o=this.mode_;if(o===E.LINE_STRING||o===E.CIRCLE){if((e=this.sketchCoords_).splice(-2,1),e.length>=2){this.finishCoordinate_=e[e.length-2].slice();var r=this.finishCoordinate_.slice();e[e.length-1]=r,this.sketchPoint_.setGeometry(new c.default(r))}this.geometryFunction_(e,t,i),t.getType()===s.default.POLYGON&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(o===E.POLYGON){(e=this.sketchCoords_[0]).splice(-2,1);var n=this.sketchLine_.getGeometry();if(e.length>=2){r=e[e.length-2].slice();e[e.length-1]=r,this.sketchPoint_.setGeometry(new c.default(r))}n.setCoordinates(e),this.geometryFunction_(this.sketchCoords_,t,i)}1===e.length&&this.abortDrawing(),this.updateSketchFeatures_()}},l.prototype.finishDrawing=function(){var e=this.abortDrawing_();if(e){var t=this.sketchCoords_,i=e.getGeometry(),o=this.getMap().getView().getProjection();this.mode_===E.LINE_STRING?(t.pop(),this.geometryFunction_(t,i,o)):this.mode_===E.POLYGON&&(t[0].pop(),this.geometryFunction_(t,i,o),t=i.getCoordinates()),this.type_===s.default.MULTI_POINT?e.setGeometry(new u.default([t])):this.type_===s.default.MULTI_LINE_STRING?e.setGeometry(new d.default([t])):this.type_===s.default.MULTI_POLYGON&&e.setGeometry(new _.default([t])),this.dispatchEvent(new I(D.DRAWEND,e)),this.features_&&this.features_.push(e),this.source_&&this.source_.addFeature(e)}},l.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var e=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),e},l.prototype.abortDrawing=function(){var e=this.abortDrawing_();e&&this.dispatchEvent(new I(D.DRAWABORT,e))},l.prototype.appendCoordinates=function(e){var t,i=this.mode_,o=!this.sketchFeature_;if(o&&this.startDrawing_(e[0]),i===E.LINE_STRING||i===E.CIRCLE)t=this.sketchCoords_;else{if(i!==E.POLYGON)return;t=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}o&&t.shift(),t.pop();for(var s=0;s<e.length;s++)this.addToDrawing_(e[s]);var r=e[e.length-1];this.addToDrawing_(r),this.modifyDrawing_(r)},l.prototype.extend=function(e){var t=e.getGeometry();this.sketchFeature_=e,this.sketchCoords_=t.getCoordinates();var i=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=i.slice(),this.sketchCoords_.push(i.slice()),this.sketchPoint_=new o.default(new c.default(i)),this.updateSketchFeatures_(),this.dispatchEvent(new I(D.DRAWSTART,this.sketchFeature_))},l.prototype.updateSketchFeatures_=function(){var e=[];this.sketchFeature_&&e.push(this.sketchFeature_),this.sketchLine_&&e.push(this.sketchLine_),this.sketchPoint_&&e.push(this.sketchPoint_);var t=this.overlay_.getSource();t.clear(!0),t.addFeatures(e)},l.prototype.updateState_=function(){var e=this.getMap(),t=this.getActive();e&&t||this.abortDrawing(),this.overlay_.setMap(t?e:null)},l}(l.default);function R(){var e=(0,v.createEditingStyle)();return function(t,i){return e[t.getGeometry().getType()]}}function F(t,i){return function(o,s,r){var n=(0,k.fromUserCoordinate)(o[0],r),a=(0,k.fromUserCoordinate)(o[o.length-1],r),h=Math.sqrt((0,T.squaredDistance)(n,a)),d=s||(0,f.fromCircle)(new e.default(n),t),u=i;if(!i&&0!==i){var _=a[0]-n[0],c=a[1]-n[1];u=Math.atan2(c,_)}(0,f.makeRegular)(d,n,h,u);var l=(0,k.getUserProjection)();return l&&d.transform(r,l),d}}function j(){return function(e,t,i){var o=(0,C.boundingExtent)([e[0],e[e.length-1]].map(function(e){return(0,k.fromUserCoordinate)(e,i)})),s=[[(0,C.getBottomLeft)(o),(0,C.getBottomRight)(o),(0,C.getTopRight)(o),(0,C.getTopLeft)(o),(0,C.getBottomLeft)(o)]],r=t;r?r.setCoordinates(s):r=new f.default(s);var n=(0,k.getUserProjection)();return n&&r.transform(i,n),r}}function M(e){var t;return e===s.default.POINT||e===s.default.MULTI_POINT?t=E.POINT:e===s.default.LINE_STRING||e===s.default.MULTI_LINE_STRING?t=E.LINE_STRING:e===s.default.POLYGON||e===s.default.MULTI_POLYGON?t=E.POLYGON:e===s.default.CIRCLE&&(t=E.CIRCLE),t}var S=G;exports.default=S;
},{"../geom/Circle.js":"AyCw","../events/Event.js":"fKNg","../events/EventType.js":"C8cu","../Feature.js":"mYW9","../geom/GeometryType.js":"lmV0","./Property.js":"caOi","../geom/LineString.js":"DfxW","../MapBrowserEvent.js":"HMLS","../MapBrowserEventType.js":"YhDM","../geom/MultiLineString.js":"fbCo","../geom/MultiPoint.js":"dNu5","../geom/MultiPolygon.js":"ouhF","../geom/Point.js":"gLcY","./Pointer.js":"dnA2","../geom/Polygon.js":"Nwwk","../layer/Vector.js":"dflx","../source/Vector.js":"ZS12","../functions.js":"RgA2","../events/condition.js":"YcID","../extent.js":"QDir","../style/Style.js":"he4w","../proj.js":"Diht","../Object.js":"PhPh","../coordinate.js":"nGsj"}],"o7b8":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ExtentEvent=void 0;var e=h(require("../events/Event.js")),t=h(require("../Feature.js")),n=h(require("../geom/GeometryType.js")),r=h(require("../MapBrowserEventType.js")),o=h(require("../geom/Point.js")),i=h(require("./Pointer.js")),a=h(require("../layer/Vector.js")),u=h(require("../source/Vector.js")),l=require("../events/condition.js"),s=require("../extent.js"),p=require("../coordinate.js"),c=require("../style/Style.js"),d=require("../geom/Polygon.js"),x=require("../proj.js");function h(e){return e&&e.__esModule?e:{default:e}}var f=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_={EXTENTCHANGED:"extentchanged"},v=function(e){function t(t){var n=e.call(this,_.EXTENTCHANGED)||this;return n.extent=t,n}return f(t,e),t}(e.default);exports.ExtentEvent=v;var y=function(e){function n(t){var n=this,r=t||{};return(n=e.call(this,r)||this).condition_=r.condition?r.condition:l.always,n.extent_=null,n.pointerHandler_=null,n.pixelTolerance_=void 0!==r.pixelTolerance?r.pixelTolerance:10,n.snappedToVertex_=!1,n.extentFeature_=null,n.vertexFeature_=null,t||(t={}),n.extentOverlay_=new a.default({source:new u.default({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.boxStyle?t.boxStyle:E(),updateWhileAnimating:!0,updateWhileInteracting:!0}),n.vertexOverlay_=new a.default({source:new u.default({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.pointerStyle?t.pointerStyle:g(),updateWhileAnimating:!0,updateWhileInteracting:!0}),t.extent&&n.setExtent(t.extent),n}return f(n,e),n.prototype.snapToVertex_=function(e,t){var n=t.getCoordinateFromPixelInternal(e),r=this.getExtentInternal();if(r){var o=P(r);o.sort(function(e,t){return(0,p.squaredDistanceToSegment)(n,e)-(0,p.squaredDistanceToSegment)(n,t)});var i=o[0],a=(0,p.closestOnSegment)(n,i),u=t.getPixelFromCoordinateInternal(a);if((0,p.distance)(e,u)<=this.pixelTolerance_){var l=t.getPixelFromCoordinateInternal(i[0]),s=t.getPixelFromCoordinateInternal(i[1]),c=(0,p.squaredDistance)(u,l),d=(0,p.squaredDistance)(u,s),x=Math.sqrt(Math.min(c,d));return this.snappedToVertex_=x<=this.pixelTolerance_,this.snappedToVertex_&&(a=c>d?i[1]:i[0]),a}}return null},n.prototype.handlePointerMove_=function(e){var t=e.pixel,n=e.map,r=this.snapToVertex_(t,n);r||(r=n.getCoordinateFromPixelInternal(t)),this.createOrUpdatePointerFeature_(r)},n.prototype.createOrUpdateExtentFeature_=function(e){var n=this.extentFeature_;return n?e?n.setGeometry((0,d.fromExtent)(e)):n.setGeometry(void 0):(n=e?new t.default((0,d.fromExtent)(e)):new t.default({}),this.extentFeature_=n,this.extentOverlay_.getSource().addFeature(n)),n},n.prototype.createOrUpdatePointerFeature_=function(e){var n=this.vertexFeature_;n?n.getGeometry().setCoordinates(e):(n=new t.default(new o.default(e)),this.vertexFeature_=n,this.vertexOverlay_.getSource().addFeature(n));return n},n.prototype.handleEvent=function(t){return!t.originalEvent||!this.condition_(t)||(t.type!=r.default.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(t),e.prototype.handleEvent.call(this,t),!1)},n.prototype.handleDownEvent=function(e){var t=e.pixel,n=e.map,r=this.getExtentInternal(),o=this.snapToVertex_(t,n),i=function(e){var t=null,n=null;return e[0]==r[0]?t=r[2]:e[0]==r[2]&&(t=r[0]),e[1]==r[1]?n=r[3]:e[1]==r[3]&&(n=r[1]),null!==t&&null!==n?[t,n]:null};if(o&&r){var a=o[0]==r[0]||o[0]==r[2]?o[0]:null,u=o[1]==r[1]||o[1]==r[3]?o[1]:null;null!==a&&null!==u?this.pointerHandler_=m(i(o)):null!==a?this.pointerHandler_=O(i([a,r[1]]),i([a,r[3]])):null!==u&&(this.pointerHandler_=O(i([r[0],u]),i([r[2],u])))}else o=n.getCoordinateFromPixelInternal(t),this.setExtent([o[0],o[1],o[0],o[1]]),this.pointerHandler_=m(o);return!0},n.prototype.handleDragEvent=function(e){if(this.pointerHandler_){var t=e.coordinate;this.setExtent(this.pointerHandler_(t)),this.createOrUpdatePointerFeature_(t)}},n.prototype.handleUpEvent=function(e){this.pointerHandler_=null;var t=this.getExtentInternal();return t&&0!==(0,s.getArea)(t)||this.setExtent(null),!1},n.prototype.setMap=function(t){this.extentOverlay_.setMap(t),this.vertexOverlay_.setMap(t),e.prototype.setMap.call(this,t)},n.prototype.getExtent=function(){return(0,x.toUserExtent)(this.getExtentInternal(),this.getMap().getView().getProjection())},n.prototype.getExtentInternal=function(){return this.extent_},n.prototype.setExtent=function(e){this.extent_=e||null,this.createOrUpdateExtentFeature_(e),this.dispatchEvent(new v(this.extent_))},n}(i.default);function E(){var e=(0,c.createEditingStyle)();return function(t,r){return e[n.default.POLYGON]}}function g(){var e=(0,c.createEditingStyle)();return function(t,r){return e[n.default.POINT]}}function m(e){return function(t){return(0,s.boundingExtent)([e,t])}}function O(e,t){return e[0]==t[0]?function(n){return(0,s.boundingExtent)([e,[n[0],t[1]]])}:e[1]==t[1]?function(n){return(0,s.boundingExtent)([e,[t[0],n[1]]])}:null}function P(e){return[[[e[0],e[1]],[e[0],e[3]]],[[e[0],e[3]],[e[2],e[3]]],[[e[2],e[3]],[e[2],e[1]]],[[e[2],e[1]],[e[0],e[1]]]]}var T=y;exports.default=T;
},{"../events/Event.js":"fKNg","../Feature.js":"mYW9","../geom/GeometryType.js":"lmV0","../MapBrowserEventType.js":"YhDM","../geom/Point.js":"gLcY","./Pointer.js":"dnA2","../layer/Vector.js":"dflx","../source/Vector.js":"ZS12","../events/condition.js":"YcID","../extent.js":"QDir","../coordinate.js":"nGsj","../style/Style.js":"he4w","../geom/Polygon.js":"Nwwk","../proj.js":"Diht"}],"qrxo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ModifyEvent=void 0;var e=C(require("../Collection.js")),t=C(require("../CollectionEventType.js")),r=C(require("../events/Event.js")),i=C(require("../events/EventType.js")),n=C(require("../Feature.js")),o=C(require("../geom/GeometryType.js")),a=C(require("../MapBrowserEventType.js")),s=C(require("../geom/Point.js")),u=C(require("./Pointer.js")),d=C(require("../structs/RBush.js")),g=C(require("../source/VectorEventType.js")),l=C(require("../layer/Vector.js")),h=C(require("../source/Vector.js")),f=require("../events/condition.js"),_=require("../extent.js"),c=require("../coordinate.js"),p=require("../style/Style.js"),m=require("../array.js"),v=require("../geom/Polygon.js"),y=require("../proj.js"),x=require("../util.js");function C(e){return e&&e.__esModule?e:{default:e}}var E=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),S=0,F=1,P=[0,0,0,0],T=[],M={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"},I=function(e){function t(t,r,i){var n=e.call(this,t)||this;return n.features=r,n.mapBrowserEvent=i,n}return E(t,e),t}(r.default);exports.ModifyEvent=I;var w=function(r){function u(i){var n,o=r.call(this,i)||this;if(o.boundHandleFeatureChange_=o.handleFeatureChange_.bind(o),o.condition_=i.condition?i.condition:f.primaryAction,o.defaultDeleteCondition_=function(e){return(0,f.altKeyOnly)(e)&&(0,f.singleClick)(e)},o.deleteCondition_=i.deleteCondition?i.deleteCondition:o.defaultDeleteCondition_,o.insertVertexCondition_=i.insertVertexCondition?i.insertVertexCondition:f.always,o.vertexFeature_=null,o.vertexSegments_=null,o.lastPixel_=[0,0],o.ignoreNextSingleClick_=!1,o.featuresBeingModified_=null,o.rBush_=new d.default,o.pixelTolerance_=void 0!==i.pixelTolerance?i.pixelTolerance:10,o.snappedToVertex_=!1,o.changingFeature_=!1,o.dragSegments_=[],o.overlay_=new l.default({source:new h.default({useSpatialIndex:!1,wrapX:!!i.wrapX}),style:i.style?i.style:U(),updateWhileAnimating:!0,updateWhileInteracting:!0}),o.SEGMENT_WRITERS_={Point:o.writePointGeometry_.bind(o),LineString:o.writeLineStringGeometry_.bind(o),LinearRing:o.writeLineStringGeometry_.bind(o),Polygon:o.writePolygonGeometry_.bind(o),MultiPoint:o.writeMultiPointGeometry_.bind(o),MultiLineString:o.writeMultiLineStringGeometry_.bind(o),MultiPolygon:o.writeMultiPolygonGeometry_.bind(o),Circle:o.writeCircleGeometry_.bind(o),GeometryCollection:o.writeGeometryCollectionGeometry_.bind(o)},o.source_=null,o.hitDetection_=null,i.features?n=i.features:i.source&&(o.source_=i.source,n=new e.default(o.source_.getFeatures()),o.source_.addEventListener(g.default.ADDFEATURE,o.handleSourceAdd_.bind(o)),o.source_.addEventListener(g.default.REMOVEFEATURE,o.handleSourceRemove_.bind(o))),!n)throw new Error("The modify interaction requires features, a source or a layer");return i.hitDetection&&(o.hitDetection_=i.hitDetection),o.features_=n,o.features_.forEach(o.addFeature_.bind(o)),o.features_.addEventListener(t.default.ADD,o.handleFeatureAdd_.bind(o)),o.features_.addEventListener(t.default.REMOVE,o.handleFeatureRemove_.bind(o)),o.lastPointerEvent_=null,o.delta_=[0,0],o}return E(u,r),u.prototype.addFeature_=function(e){var t=e.getGeometry();if(t){var r=this.SEGMENT_WRITERS_[t.getType()];r&&r(e,t)}var n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),e.addEventListener(i.default.CHANGE,this.boundHandleFeatureChange_)},u.prototype.willModifyFeatures_=function(t,r){if(!this.featuresBeingModified_){this.featuresBeingModified_=new e.default;for(var i=this.featuresBeingModified_.getArray(),n=0,o=r.length;n<o;++n){var a=r[n][0].feature;-1===i.indexOf(a)&&this.featuresBeingModified_.push(a)}this.dispatchEvent(new I(M.MODIFYSTART,this.featuresBeingModified_,t))}},u.prototype.removeFeature_=function(e){this.removeFeatureSegmentData_(e),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),e.removeEventListener(i.default.CHANGE,this.boundHandleFeatureChange_)},u.prototype.removeFeatureSegmentData_=function(e){var t=this.rBush_,r=[];t.forEach(function(t){e===t.feature&&r.push(t)});for(var i=r.length-1;i>=0;--i){for(var n=r[i],o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===n&&this.dragSegments_.splice(o,1);t.remove(n)}},u.prototype.setActive=function(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),r.prototype.setActive.call(this,e)},u.prototype.setMap=function(e){this.overlay_.setMap(e),r.prototype.setMap.call(this,e)},u.prototype.getOverlay=function(){return this.overlay_},u.prototype.handleSourceAdd_=function(e){e.feature&&this.features_.push(e.feature)},u.prototype.handleSourceRemove_=function(e){e.feature&&this.features_.remove(e.feature)},u.prototype.handleFeatureAdd_=function(e){this.addFeature_(e.element)},u.prototype.handleFeatureChange_=function(e){if(!this.changingFeature_){var t=e.target;this.removeFeature_(t),this.addFeature_(t)}},u.prototype.handleFeatureRemove_=function(e){var t=e.element;this.removeFeature_(t)},u.prototype.writePointGeometry_=function(e,t){var r=t.getCoordinates(),i={feature:e,geometry:t,segment:[r,r]};this.rBush_.insert(t.getExtent(),i)},u.prototype.writeMultiPointGeometry_=function(e,t){for(var r=t.getCoordinates(),i=0,n=r.length;i<n;++i){var o=r[i],a={feature:e,geometry:t,depth:[i],index:i,segment:[o,o]};this.rBush_.insert(t.getExtent(),a)}},u.prototype.writeLineStringGeometry_=function(e,t){for(var r=t.getCoordinates(),i=0,n=r.length-1;i<n;++i){var o=r.slice(i,i+2),a={feature:e,geometry:t,index:i,segment:o};this.rBush_.insert((0,_.boundingExtent)(o),a)}},u.prototype.writeMultiLineStringGeometry_=function(e,t){for(var r=t.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],a=0,s=o.length-1;a<s;++a){var u=o.slice(a,a+2),d={feature:e,geometry:t,depth:[i],index:a,segment:u};this.rBush_.insert((0,_.boundingExtent)(u),d)}},u.prototype.writePolygonGeometry_=function(e,t){for(var r=t.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],a=0,s=o.length-1;a<s;++a){var u=o.slice(a,a+2),d={feature:e,geometry:t,depth:[i],index:a,segment:u};this.rBush_.insert((0,_.boundingExtent)(u),d)}},u.prototype.writeMultiPolygonGeometry_=function(e,t){for(var r=t.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],a=0,s=o.length;a<s;++a)for(var u=o[a],d=0,g=u.length-1;d<g;++d){var l=u.slice(d,d+2),h={feature:e,geometry:t,depth:[a,i],index:d,segment:l};this.rBush_.insert((0,_.boundingExtent)(l),h)}},u.prototype.writeCircleGeometry_=function(e,t){var r=t.getCenter(),i={feature:e,geometry:t,index:S,segment:[r,r]},n={feature:e,geometry:t,index:F,segment:[r,r]},o=[i,n];i.featureSegments=o,n.featureSegments=o,this.rBush_.insert((0,_.createOrUpdateFromCoordinate)(r),i);var a=t,s=(0,y.getUserProjection)();if(s&&this.getMap()){var u=this.getMap().getView().getProjection();a=a.clone().transform(s,u),a=(0,v.fromCircle)(a).transform(u,s)}this.rBush_.insert(a.getExtent(),n)},u.prototype.writeGeometryCollectionGeometry_=function(e,t){for(var r=t.getGeometriesArray(),i=0;i<r.length;++i){var n=r[i];(0,this.SEGMENT_WRITERS_[n.getType()])(e,n)}},u.prototype.createOrUpdateVertexFeature_=function(e,t,r){var i=this.vertexFeature_;i?i.getGeometry().setCoordinates(e):(i=new n.default(new s.default(e)),this.vertexFeature_=i,this.overlay_.getSource().addFeature(i));return i.set("features",t),i.set("geometries",r),i},u.prototype.handleEvent=function(e){return!e.originalEvent||(this.lastPointerEvent_=e,e.map.getView().getInteracting()||e.type!=a.default.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(t=!(e.type!=a.default.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),e.type==a.default.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),r.prototype.handleEvent.call(this,e)&&!t);var t},u.prototype.handleDragEvent=function(e){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(e,this.dragSegments_);for(var t=[e.coordinate[0]+this.delta_[0],e.coordinate[1]+this.delta_[1]],r=[],i=[],n=0,a=this.dragSegments_.length;n<a;++n){var s=this.dragSegments_[n],u=s[0],d=u.feature;-1===r.indexOf(d)&&r.push(d);var g=u.geometry;-1===i.indexOf(g)&&i.push(g);for(var l=u.depth,h=void 0,f=u.segment,_=s[1];t.length<g.getStride();)t.push(f[_][t.length]);switch(g.getType()){case o.default.POINT:h=t,f[0]=t,f[1]=t;break;case o.default.MULTI_POINT:(h=g.getCoordinates())[u.index]=t,f[0]=t,f[1]=t;break;case o.default.LINE_STRING:(h=g.getCoordinates())[u.index+_]=t,f[_]=t;break;case o.default.MULTI_LINE_STRING:case o.default.POLYGON:(h=g.getCoordinates())[l[0]][u.index+_]=t,f[_]=t;break;case o.default.MULTI_POLYGON:(h=g.getCoordinates())[l[1]][l[0]][u.index+_]=t,f[_]=t;break;case o.default.CIRCLE:if(f[0]=t,f[1]=t,u.index===S)this.changingFeature_=!0,g.setCenter(t),this.changingFeature_=!1;else{this.changingFeature_=!0;var p=e.map.getView().getProjection(),m=(0,c.distance)((0,y.fromUserCoordinate)(g.getCenter(),p),(0,y.fromUserCoordinate)(t,p)),v=(0,y.getUserProjection)();if(v){var x=g.clone().transform(v,p);x.setRadius(m),m=x.transform(p,v).getRadius()}g.setRadius(m),this.changingFeature_=!1}}h&&this.setGeometryCoordinates_(g,h)}this.createOrUpdateVertexFeature_(t,r,i)},u.prototype.handleDownEvent=function(e){if(!this.condition_(e))return!1;var t=e.coordinate;this.handlePointerAtPixel_(e.pixel,e.map,t),this.dragSegments_.length=0,this.featuresBeingModified_=null;var r=this.vertexFeature_;if(r){var i=e.map.getView().getProjection(),n=[],a=r.getGeometry().getCoordinates(),s=(0,_.boundingExtent)([a]),u=this.rBush_.getInExtent(s),d={};u.sort(G);for(var g=0,l=u.length;g<l;++g){var h=u[g],f=h.segment,p=(0,x.getUid)(h.geometry),m=h.depth;if(m&&(p+="-"+m.join("-")),d[p]||(d[p]=new Array(2)),h.geometry.getType()!==o.default.CIRCLE||h.index!==F)if(!(0,c.equals)(f[0],a)||d[p][0])if(!(0,c.equals)(f[1],a)||d[p][1])(0,x.getUid)(f)in this.vertexSegments_&&!d[p][0]&&!d[p][1]&&this.insertVertexCondition_(e)&&n.push(h);else{if((h.geometry.getType()===o.default.LINE_STRING||h.geometry.getType()===o.default.MULTI_LINE_STRING)&&d[p][0]&&0===d[p][0].index)continue;this.dragSegments_.push([h,1]),d[p][1]=h}else this.dragSegments_.push([h,0]),d[p][0]=h;else{var v=O(t,h,i);(0,c.equals)(v,a)&&!d[p][0]&&(this.dragSegments_.push([h,0]),d[p][0]=h)}}n.length&&this.willModifyFeatures_(e,[n]);for(var y=n.length-1;y>=0;--y)this.insertVertex_(n[y],a)}return!!this.vertexFeature_},u.prototype.handleUpEvent=function(e){for(var t=this.dragSegments_.length-1;t>=0;--t){var r=this.dragSegments_[t][0],i=r.geometry;if(i.getType()===o.default.CIRCLE){var n=i.getCenter(),a=r.featureSegments[0],s=r.featureSegments[1];a.segment[0]=n,a.segment[1]=n,s.segment[0]=n,s.segment[1]=n,this.rBush_.update((0,_.createOrUpdateFromCoordinate)(n),a);var u=i,d=(0,y.getUserProjection)();if(d){var g=e.map.getView().getProjection();u=u.clone().transform(d,g),u=(0,v.fromCircle)(u).transform(g,d)}this.rBush_.update(u.getExtent(),s)}else this.rBush_.update((0,_.boundingExtent)(r.segment),r)}return this.featuresBeingModified_&&(this.dispatchEvent(new I(M.MODIFYEND,this.featuresBeingModified_,e)),this.featuresBeingModified_=null),!1},u.prototype.handlePointerMove_=function(e){this.lastPixel_=e.pixel,this.handlePointerAtPixel_(e.pixel,e.map,e.coordinate)},u.prototype.handlePointerAtPixel_=function(e,t,r){var i,n,a=this,s=r||t.getCoordinateFromPixel(e),u=t.getView().getProjection();if(this.hitDetection_){var d="object"==typeof this.hitDetection_?function(e){return e===a.hitDetection_}:void 0;t.forEachFeatureAtPixel(e,function(e,t,r){if((r=r||e.getGeometry()).getType()===o.default.POINT){n=r;var a=r.getCoordinates();i=[{feature:e,geometry:r,segment:[a,a]}]}return!0},{layerFilter:d})}if(!i){var g=(0,y.fromUserExtent)((0,_.createOrUpdateFromCoordinate)(s,P),u),l=t.getView().getResolution()*this.pixelTolerance_,h=(0,y.toUserExtent)((0,_.buffer)(g,l,P),u);i=this.rBush_.getInExtent(h)}if(i&&i.length>0){var f=i.sort(function(e,t){return L(s,e,u)-L(s,t,u)})[0],p=f.segment,m=O(s,f,u),v=t.getPixelFromCoordinate(m),C=(0,c.distance)(e,v);if(n||C<=this.pixelTolerance_){var E={};if(E[(0,x.getUid)(p)]=!0,this.delta_[0]=m[0]-s[0],this.delta_[1]=m[1]-s[1],f.geometry.getType()===o.default.CIRCLE&&f.index===F)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(m,[f.feature],[f.geometry]);else{var S=t.getPixelFromCoordinate(p[0]),T=t.getPixelFromCoordinate(p[1]),M=(0,c.squaredDistance)(v,S),I=(0,c.squaredDistance)(v,T);C=Math.sqrt(Math.min(M,I)),this.snappedToVertex_=C<=this.pixelTolerance_,this.snappedToVertex_&&(m=M>I?p[1]:p[0]),this.createOrUpdateVertexFeature_(m,[f.feature],[f.geometry]);var w={};w[(0,x.getUid)(f.geometry)]=!0;for(var G=1,U=i.length;G<U;++G){var b=i[G].segment;if(!((0,c.equals)(p[0],b[0])&&(0,c.equals)(p[1],b[1])||(0,c.equals)(p[0],b[1])&&(0,c.equals)(p[1],b[0])))break;var N=(0,x.getUid)(i[G].geometry);N in w||(w[N]=!0,E[(0,x.getUid)(b)]=!0)}}return void(this.vertexSegments_=E)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},u.prototype.insertVertex_=function(e,t){for(var r,i=e.segment,n=e.feature,a=e.geometry,s=e.depth,u=e.index;t.length<a.getStride();)t.push(0);switch(a.getType()){case o.default.MULTI_LINE_STRING:case o.default.POLYGON:(r=a.getCoordinates())[s[0]].splice(u+1,0,t);break;case o.default.MULTI_POLYGON:(r=a.getCoordinates())[s[1]][s[0]].splice(u+1,0,t);break;case o.default.LINE_STRING:(r=a.getCoordinates()).splice(u+1,0,t);break;default:return}this.setGeometryCoordinates_(a,r);var d=this.rBush_;d.remove(e),this.updateSegmentIndices_(a,u,s,1);var g={segment:[i[0],t],feature:n,geometry:a,depth:s,index:u};d.insert((0,_.boundingExtent)(g.segment),g),this.dragSegments_.push([g,1]);var l={segment:[t,i[1]],feature:n,geometry:a,depth:s,index:u+1};d.insert((0,_.boundingExtent)(l.segment),l),this.dragSegments_.push([l,0]),this.ignoreNextSingleClick_=!0},u.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=a.default.POINTERDRAG){var e=this.lastPointerEvent_;this.willModifyFeatures_(e,this.dragSegments_);var t=this.removeVertex_();return this.dispatchEvent(new I(M.MODIFYEND,this.featuresBeingModified_,e)),this.featuresBeingModified_=null,t}return!1},u.prototype.removeVertex_=function(){var e,t,r,i,n,a,s,u,d,g,l,h=this.dragSegments_,f={},c=!1;for(n=h.length-1;n>=0;--n)g=(r=h[n])[0],l=(0,x.getUid)(g.feature),g.depth&&(l+="-"+g.depth.join("-")),l in f||(f[l]={}),0===r[1]?(f[l].right=g,f[l].index=g.index):1==r[1]&&(f[l].left=g,f[l].index=g.index+1);for(l in f){switch(d=f[l].right,s=f[l].left,(u=(a=f[l].index)-1)<0&&(u=0),e=t=(i=(g=void 0!==s?s:d).geometry).getCoordinates(),c=!1,i.getType()){case o.default.MULTI_LINE_STRING:t[g.depth[0]].length>2&&(t[g.depth[0]].splice(a,1),c=!0);break;case o.default.LINE_STRING:t.length>2&&(t.splice(a,1),c=!0);break;case o.default.MULTI_POLYGON:e=e[g.depth[1]];case o.default.POLYGON:(e=e[g.depth[0]]).length>4&&(a==e.length-1&&(a=0),e.splice(a,1),c=!0,0===a&&(e.pop(),e.push(e[0]),u=e.length-1))}if(c){this.setGeometryCoordinates_(i,t);var p=[];if(void 0!==s&&(this.rBush_.remove(s),p.push(s.segment[0])),void 0!==d&&(this.rBush_.remove(d),p.push(d.segment[1])),void 0!==s&&void 0!==d){var m={depth:g.depth,feature:g.feature,geometry:g.geometry,index:u,segment:p};this.rBush_.insert((0,_.boundingExtent)(m.segment),m)}this.updateSegmentIndices_(i,a,g.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),h.length=0}}return c},u.prototype.setGeometryCoordinates_=function(e,t){this.changingFeature_=!0,e.setCoordinates(t),this.changingFeature_=!1},u.prototype.updateSegmentIndices_=function(e,t,r,i){this.rBush_.forEachInExtent(e.getExtent(),function(n){n.geometry===e&&(void 0===r||void 0===n.depth||(0,m.equals)(n.depth,r))&&n.index>t&&(n.index+=i)})},u}(u.default);function G(e,t){return e.index-t.index}function L(e,t,r){var i=t.geometry;if(i.getType()===o.default.CIRCLE){var n=i;if(t.index===F){var a=(0,y.getUserProjection)();a&&(n=n.clone().transform(a,r));var s=(0,c.squaredDistance)(n.getCenter(),(0,y.fromUserCoordinate)(e,r)),u=Math.sqrt(s)-n.getRadius();return u*u}}var d=(0,y.fromUserCoordinate)(e,r);return T[0]=(0,y.fromUserCoordinate)(t.segment[0],r),T[1]=(0,y.fromUserCoordinate)(t.segment[1],r),(0,c.squaredDistanceToSegment)(d,T)}function O(e,t,r){var i=t.geometry;if(i.getType()===o.default.CIRCLE&&t.index===F){var n=i,a=(0,y.getUserProjection)();return a&&(n=n.clone().transform(a,r)),(0,y.toUserCoordinate)(n.getClosestPoint((0,y.fromUserCoordinate)(e,r)),r)}var s=(0,y.fromUserCoordinate)(e,r);return T[0]=(0,y.fromUserCoordinate)(t.segment[0],r),T[1]=(0,y.fromUserCoordinate)(t.segment[1],r),(0,y.toUserCoordinate)((0,c.closestOnSegment)(s,T),r)}function U(){var e=(0,p.createEditingStyle)();return function(t,r){return e[o.default.POINT]}}var b=w;exports.default=b;
},{"../Collection.js":"FnDa","../CollectionEventType.js":"BTrx","../events/Event.js":"fKNg","../events/EventType.js":"C8cu","../Feature.js":"mYW9","../geom/GeometryType.js":"lmV0","../MapBrowserEventType.js":"YhDM","../geom/Point.js":"gLcY","./Pointer.js":"dnA2","../structs/RBush.js":"MiUH","../source/VectorEventType.js":"s8Fc","../layer/Vector.js":"dflx","../source/Vector.js":"ZS12","../events/condition.js":"YcID","../extent.js":"QDir","../coordinate.js":"nGsj","../style/Style.js":"he4w","../array.js":"luEr","../geom/Polygon.js":"Nwwk","../proj.js":"Diht","../util.js":"KniQ"}],"SMGe":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.SelectEvent=void 0;var e=c(require("../Collection.js")),t=c(require("../CollectionEventType.js")),r=c(require("../events/Event.js")),i=c(require("../geom/GeometryType.js")),n=c(require("./Interaction.js")),o=require("../functions.js"),s=require("../obj.js"),a=require("../style/Style.js"),u=require("../array.js"),l=require("../util.js"),d=require("../events/condition.js");function c(e){return e&&e.__esModule?e:{default:e}}var f=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),h={SELECT:"select"},y=function(e){function t(t,r,i,n){var o=e.call(this,t)||this;return o.selected=r,o.deselected=i,o.mapBrowserEvent=n,o}return f(t,e),t}(r.default);exports.SelectEvent=y;var _={},p=function(r){function i(t){var i,n=r.call(this)||this,s=t||{};if(n.boundAddFeature_=n.addFeature_.bind(n),n.boundRemoveFeature_=n.removeFeature_.bind(n),n.condition_=s.condition?s.condition:d.singleClick,n.addCondition_=s.addCondition?s.addCondition:d.never,n.removeCondition_=s.removeCondition?s.removeCondition:d.never,n.toggleCondition_=s.toggleCondition?s.toggleCondition:d.shiftKeyOnly,n.multi_=!!s.multi&&s.multi,n.filter_=s.filter?s.filter:o.TRUE,n.hitTolerance_=s.hitTolerance?s.hitTolerance:0,n.style_=void 0!==s.style?s.style:v(),n.features_=s.features||new e.default,s.layers)if("function"==typeof s.layers)i=s.layers;else{var a=s.layers;i=function(e){return(0,u.includes)(a,e)}}else i=o.TRUE;return n.layerFilter_=i,n.featureLayerAssociation_={},n}return f(i,r),i.prototype.addFeatureLayerAssociation_=function(e,t){this.featureLayerAssociation_[(0,l.getUid)(e)]=t},i.prototype.getFeatures=function(){return this.features_},i.prototype.getHitTolerance=function(){return this.hitTolerance_},i.prototype.getLayer=function(e){return this.featureLayerAssociation_[(0,l.getUid)(e)]},i.prototype.setHitTolerance=function(e){this.hitTolerance_=e},i.prototype.setMap=function(e){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),r.prototype.setMap.call(this,e),e?(this.features_.addEventListener(t.default.ADD,this.boundAddFeature_),this.features_.addEventListener(t.default.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(t.default.ADD,this.boundAddFeature_),this.features_.removeEventListener(t.default.REMOVE,this.boundRemoveFeature_))},i.prototype.addFeature_=function(e){var t=e.element;this.style_&&this.applySelectedStyle_(t)},i.prototype.removeFeature_=function(e){var t=e.element;this.style_&&this.restorePreviousStyle_(t)},i.prototype.getStyle=function(){return this.style_},i.prototype.applySelectedStyle_=function(e){var t=(0,l.getUid)(e);t in _||(_[t]=e.getStyle()),e.setStyle(this.style_)},i.prototype.restorePreviousStyle_=function(e){for(var t=this.getMap().getInteractions().getArray(),r=t.length-1;r>=0;--r){var n=t[r];if(n!==this&&n instanceof i&&n.getStyle()&&-1!==n.getFeatures().getArray().lastIndexOf(e))return void e.setStyle(n.getStyle())}var o=(0,l.getUid)(e);e.setStyle(_[o]),delete _[o]},i.prototype.removeFeatureLayerAssociation_=function(e){delete this.featureLayerAssociation_[(0,l.getUid)(e)]},i.prototype.handleEvent=function(e){if(!this.condition_(e))return!0;var t=this.addCondition_(e),r=this.removeCondition_(e),i=this.toggleCondition_(e),n=!t&&!r&&!i,o=e.map,a=this.getFeatures(),l=[],d=[];if(n){(0,s.clear)(this.featureLayerAssociation_),o.forEachFeatureAtPixel(e.pixel,function(e,t){if(this.filter_(e,t))return d.push(e),this.addFeatureLayerAssociation_(e,t),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var c=a.getLength()-1;c>=0;--c){var f=a.item(c),_=d.indexOf(f);_>-1?d.splice(_,1):(a.remove(f),l.push(f))}0!==d.length&&a.extend(d)}else{o.forEachFeatureAtPixel(e.pixel,function(e,n){if(this.filter_(e,n))return!t&&!i||(0,u.includes)(a.getArray(),e)?(r||i)&&(0,u.includes)(a.getArray(),e)&&(l.push(e),this.removeFeatureLayerAssociation_(e)):(d.push(e),this.addFeatureLayerAssociation_(e,n)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var p=l.length-1;p>=0;--p)a.remove(l[p]);a.extend(d)}return(d.length>0||l.length>0)&&this.dispatchEvent(new y(h.SELECT,d,l,e)),!0},i}(n.default);function v(){var e=(0,a.createEditingStyle)();return(0,u.extend)(e[i.default.POLYGON],e[i.default.LINE_STRING]),(0,u.extend)(e[i.default.GEOMETRY_COLLECTION],e[i.default.LINE_STRING]),function(t){return t.getGeometry()?e[t.getGeometry().getType()]:null}}var g=p;exports.default=g;
},{"../Collection.js":"FnDa","../CollectionEventType.js":"BTrx","../events/Event.js":"fKNg","../geom/GeometryType.js":"lmV0","./Interaction.js":"jB2p","../functions.js":"RgA2","../obj.js":"mH6q","../style/Style.js":"he4w","../array.js":"luEr","../util.js":"KniQ","../events/condition.js":"YcID"}],"NnGW":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=p(require("../CollectionEventType.js")),t=p(require("../events/EventType.js")),r=p(require("../geom/GeometryType.js")),n=p(require("./Pointer.js")),i=p(require("../structs/RBush.js")),o=p(require("../source/VectorEventType.js")),s=require("../functions.js"),a=require("../extent.js"),u=require("../coordinate.js"),l=require("../geom/Polygon.js"),h=require("../proj.js"),d=require("../util.js"),f=require("../obj.js"),g=require("../events.js");function p(e){return e&&e.__esModule?e:{default:e}}var c=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function _(e){return e.feature?e.feature:e.element?e.element:void 0}var v=[],y=function(n){function p(e){var t=this,r=e||{},o=r;return o.handleDownEvent||(o.handleDownEvent=s.TRUE),o.stopDown||(o.stopDown=s.FALSE),(t=n.call(this,o)||this).source_=r.source?r.source:null,t.vertex_=void 0===r.vertex||r.vertex,t.edge_=void 0===r.edge||r.edge,t.features_=r.features?r.features:null,t.featuresListenerKeys_=[],t.featureChangeListenerKeys_={},t.indexedFeaturesExtents_={},t.pendingFeatures_={},t.pixelTolerance_=void 0!==r.pixelTolerance?r.pixelTolerance:10,t.rBush_=new i.default,t.SEGMENT_WRITERS_={Point:t.writePointGeometry_.bind(t),LineString:t.writeLineStringGeometry_.bind(t),LinearRing:t.writeLineStringGeometry_.bind(t),Polygon:t.writePolygonGeometry_.bind(t),MultiPoint:t.writeMultiPointGeometry_.bind(t),MultiLineString:t.writeMultiLineStringGeometry_.bind(t),MultiPolygon:t.writeMultiPolygonGeometry_.bind(t),GeometryCollection:t.writeGeometryCollectionGeometry_.bind(t),Circle:t.writeCircleGeometry_.bind(t)},t}return c(p,n),p.prototype.addFeature=function(e,r){var n=void 0===r||r,i=(0,d.getUid)(e),o=e.getGeometry();if(o){var s=this.SEGMENT_WRITERS_[o.getType()];s&&(this.indexedFeaturesExtents_[i]=o.getExtent((0,a.createEmpty)()),s(e,o))}n&&(this.featureChangeListenerKeys_[i]=(0,g.listen)(e,t.default.CHANGE,this.handleFeatureChange_,this))},p.prototype.forEachFeatureAdd_=function(e){this.addFeature(e)},p.prototype.forEachFeatureRemove_=function(e){this.removeFeature(e)},p.prototype.getFeatures_=function(){var e;return this.features_?e=this.features_:this.source_&&(e=this.source_.getFeatures()),e},p.prototype.handleEvent=function(e){var t=this.snapTo(e.pixel,e.coordinate,e.map);return t.snapped&&(e.coordinate=t.vertex.slice(0,2),e.pixel=t.vertexPixel),n.prototype.handleEvent.call(this,e)},p.prototype.handleFeatureAdd_=function(e){var t=_(e);this.addFeature(t)},p.prototype.handleFeatureRemove_=function(e){var t=_(e);this.removeFeature(t)},p.prototype.handleFeatureChange_=function(e){var t=e.target;if(this.handlingDownUpSequence){var r=(0,d.getUid)(t);r in this.pendingFeatures_||(this.pendingFeatures_[r]=t)}else this.updateFeature_(t)},p.prototype.handleUpEvent=function(e){var t=(0,f.getValues)(this.pendingFeatures_);return t.length&&(t.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},p.prototype.removeFeature=function(e,t){var r=void 0===t||t,n=(0,d.getUid)(e),i=this.indexedFeaturesExtents_[n];if(i){var o=this.rBush_,s=[];o.forEachInExtent(i,function(t){e===t.feature&&s.push(t)});for(var a=s.length-1;a>=0;--a)o.remove(s[a])}r&&((0,g.unlistenByKey)(this.featureChangeListenerKeys_[n]),delete this.featureChangeListenerKeys_[n])},p.prototype.setMap=function(t){var r=this.getMap(),i=this.featuresListenerKeys_,s=this.getFeatures_();r&&(i.forEach(g.unlistenByKey),i.length=0,s.forEach(this.forEachFeatureRemove_.bind(this))),n.prototype.setMap.call(this,t),t&&(this.features_?i.push((0,g.listen)(this.features_,e.default.ADD,this.handleFeatureAdd_,this),(0,g.listen)(this.features_,e.default.REMOVE,this.handleFeatureRemove_,this)):this.source_&&i.push((0,g.listen)(this.source_,o.default.ADDFEATURE,this.handleFeatureAdd_,this),(0,g.listen)(this.source_,o.default.REMOVEFEATURE,this.handleFeatureRemove_,this)),s.forEach(this.forEachFeatureAdd_.bind(this)))},p.prototype.snapTo=function(e,t,n){var i=n.getCoordinateFromPixel([e[0]-this.pixelTolerance_,e[1]+this.pixelTolerance_]),o=n.getCoordinateFromPixel([e[0]+this.pixelTolerance_,e[1]-this.pixelTolerance_]),s=(0,a.boundingExtent)([i,o]),l=this.rBush_.getInExtent(s);this.vertex_&&!this.edge_&&(l=l.filter(function(e){return e.feature.getGeometry().getType()!==r.default.CIRCLE}));var d=!1,f=null,g=null;if(0===l.length)return{snapped:d,vertex:f,vertexPixel:g};for(var p,c=n.getView().getProjection(),_=(0,h.fromUserCoordinate)(t,c),y=1/0,m=0;m<l.length;++m){var x=l[m];v[0]=(0,h.fromUserCoordinate)(x.segment[0],c),v[1]=(0,h.fromUserCoordinate)(x.segment[1],c);var E=(0,u.squaredDistanceToSegment)(_,v);E<y&&(p=x,y=E)}var F=p.segment;if(this.vertex_&&!this.edge_){var C=n.getPixelFromCoordinate(F[0]),P=n.getPixelFromCoordinate(F[1]),G=(0,u.squaredDistance)(e,C),T=(0,u.squaredDistance)(e,P);Math.sqrt(Math.min(G,T))<=this.pixelTolerance_&&(d=!0,f=G>T?F[1]:F[0],g=n.getPixelFromCoordinate(f))}else if(this.edge_){var w=p.feature.getGeometry().getType()===r.default.CIRCLE;if(w){var M=p.feature.getGeometry(),j=(0,h.getUserProjection)();j&&(M=M.clone().transform(j,c)),f=(0,h.toUserCoordinate)((0,u.closestOnCircle)(_,M),c)}else v[0]=(0,h.fromUserCoordinate)(F[0],c),v[1]=(0,h.fromUserCoordinate)(F[1],c),f=(0,h.toUserCoordinate)((0,u.closestOnSegment)(_,v),c);if(g=n.getPixelFromCoordinate(f),(0,u.distance)(e,g)<=this.pixelTolerance_&&(d=!0,this.vertex_&&!w)){C=n.getPixelFromCoordinate(F[0]),P=n.getPixelFromCoordinate(F[1]),G=(0,u.squaredDistance)(g,C),T=(0,u.squaredDistance)(g,P);Math.sqrt(Math.min(G,T))<=this.pixelTolerance_&&(f=G>T?F[1]:F[0],g=n.getPixelFromCoordinate(f))}}return d&&(g=[Math.round(g[0]),Math.round(g[1])]),{snapped:d,vertex:f,vertexPixel:g}},p.prototype.updateFeature_=function(e){this.removeFeature(e,!1),this.addFeature(e,!1)},p.prototype.writeCircleGeometry_=function(e,t){var r=this.getMap().getView().getProjection(),n=t,i=(0,h.getUserProjection)();i&&(n=n.clone().transform(i,r));var o=(0,l.fromCircle)(n);i&&o.transform(r,i);for(var s=o.getCoordinates()[0],u=0,d=s.length-1;u<d;++u){var f=s.slice(u,u+2),g={feature:e,segment:f};this.rBush_.insert((0,a.boundingExtent)(f),g)}},p.prototype.writeGeometryCollectionGeometry_=function(e,t){for(var r=t.getGeometriesArray(),n=0;n<r.length;++n){var i=this.SEGMENT_WRITERS_[r[n].getType()];i&&i(e,r[n])}},p.prototype.writeLineStringGeometry_=function(e,t){for(var r=t.getCoordinates(),n=0,i=r.length-1;n<i;++n){var o=r.slice(n,n+2),s={feature:e,segment:o};this.rBush_.insert((0,a.boundingExtent)(o),s)}},p.prototype.writeMultiLineStringGeometry_=function(e,t){for(var r=t.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],s=0,u=o.length-1;s<u;++s){var l=o.slice(s,s+2),h={feature:e,segment:l};this.rBush_.insert((0,a.boundingExtent)(l),h)}},p.prototype.writeMultiPointGeometry_=function(e,t){for(var r=t.getCoordinates(),n=0,i=r.length;n<i;++n){var o=r[n],s={feature:e,segment:[o,o]};this.rBush_.insert(t.getExtent(),s)}},p.prototype.writeMultiPolygonGeometry_=function(e,t){for(var r=t.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],s=0,u=o.length;s<u;++s)for(var l=o[s],h=0,d=l.length-1;h<d;++h){var f=l.slice(h,h+2),g={feature:e,segment:f};this.rBush_.insert((0,a.boundingExtent)(f),g)}},p.prototype.writePointGeometry_=function(e,t){var r=t.getCoordinates(),n={feature:e,segment:[r,r]};this.rBush_.insert(t.getExtent(),n)},p.prototype.writePolygonGeometry_=function(e,t){for(var r=t.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],s=0,u=o.length-1;s<u;++s){var l=o.slice(s,s+2),h={feature:e,segment:l};this.rBush_.insert((0,a.boundingExtent)(l),h)}},p}(n.default),m=y;exports.default=m;
},{"../CollectionEventType.js":"BTrx","../events/EventType.js":"C8cu","../geom/GeometryType.js":"lmV0","./Pointer.js":"dnA2","../structs/RBush.js":"MiUH","../source/VectorEventType.js":"s8Fc","../functions.js":"RgA2","../extent.js":"QDir","../coordinate.js":"nGsj","../geom/Polygon.js":"Nwwk","../proj.js":"Diht","../util.js":"KniQ","../obj.js":"mH6q","../events.js":"UqnM"}],"dAAZ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.TranslateEvent=void 0;var t=s(require("../Collection.js")),e=s(require("../events/Event.js")),r=s(require("./Property.js")),a=s(require("./Pointer.js")),n=require("../functions.js"),i=require("../Object.js"),o=require("../array.js");function s(t){return t&&t.__esModule?t:{default:t}}var l=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function a(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}(),u={TRANSLATESTART:"translatestart",TRANSLATING:"translating",TRANSLATEEND:"translateend"},h=function(t){function e(e,r,a,n,i){var o=t.call(this,e)||this;return o.features=r,o.coordinate=a,o.startCoordinate=n,o.mapBrowserEvent=i,o}return l(e,t),e}(e.default);exports.TranslateEvent=h;var c=function(e){function a(t){var a,s=this,l=t||{};if((s=e.call(this,l)||this).lastCoordinate_=null,s.startCoordinate_=null,s.features_=void 0!==l.features?l.features:null,l.layers)if("function"==typeof l.layers)a=l.layers;else{var u=l.layers;a=function(t){return(0,o.includes)(u,t)}}else a=n.TRUE;return s.layerFilter_=a,s.filter_=l.filter?l.filter:n.TRUE,s.hitTolerance_=l.hitTolerance?l.hitTolerance:0,s.lastFeature_=null,s.addEventListener((0,i.getChangeEventType)(r.default.ACTIVE),s.handleActiveChanged_),s}return l(a,e),a.prototype.handleDownEvent=function(e){if(this.lastFeature_=this.featuresAtPixel_(e.pixel,e.map),!this.lastCoordinate_&&this.lastFeature_){this.startCoordinate_=e.coordinate,this.lastCoordinate_=e.coordinate,this.handleMoveEvent(e);var r=this.features_||new t.default([this.lastFeature_]);return this.dispatchEvent(new h(u.TRANSLATESTART,r,e.coordinate,this.startCoordinate_,e)),!0}return!1},a.prototype.handleUpEvent=function(e){if(this.lastCoordinate_){this.lastCoordinate_=null,this.handleMoveEvent(e);var r=this.features_||new t.default([this.lastFeature_]);return this.dispatchEvent(new h(u.TRANSLATEEND,r,e.coordinate,this.startCoordinate_,e)),this.startCoordinate_=null,!0}return!1},a.prototype.handleDragEvent=function(e){if(this.lastCoordinate_){var r=e.coordinate,a=r[0]-this.lastCoordinate_[0],n=r[1]-this.lastCoordinate_[1],i=this.features_||new t.default([this.lastFeature_]);i.forEach(function(t){var e=t.getGeometry();e.translate(a,n),t.setGeometry(e)}),this.lastCoordinate_=r,this.dispatchEvent(new h(u.TRANSLATING,i,r,this.startCoordinate_,e))}},a.prototype.handleMoveEvent=function(t){var e=t.map.getViewport();this.featuresAtPixel_(t.pixel,t.map)?(e.classList.remove(this.lastCoordinate_?"ol-grab":"ol-grabbing"),e.classList.add(this.lastCoordinate_?"ol-grabbing":"ol-grab")):e.classList.remove("ol-grab","ol-grabbing")},a.prototype.featuresAtPixel_=function(t,e){return e.forEachFeatureAtPixel(t,function(t,e){if(this.filter_(t,e)&&(!this.features_||(0,o.includes)(this.features_.getArray(),t)))return t}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})},a.prototype.getHitTolerance=function(){return this.hitTolerance_},a.prototype.setHitTolerance=function(t){this.hitTolerance_=t},a.prototype.setMap=function(t){var r=this.getMap();e.prototype.setMap.call(this,t),this.updateState_(r)},a.prototype.handleActiveChanged_=function(){this.updateState_(null)},a.prototype.updateState_=function(t){var e=this.getMap(),r=this.getActive();e&&r||(e=e||t)&&e.getViewport().classList.remove("ol-grab","ol-grabbing")},a}(a.default),f=c;exports.default=f;
},{"../Collection.js":"FnDa","../events/Event.js":"fKNg","./Property.js":"caOi","./Pointer.js":"dnA2","../functions.js":"RgA2","../Object.js":"PhPh","../array.js":"luEr"}],"aMDX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaults=O,Object.defineProperty(exports,"DoubleClickZoom",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"DragPan",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"DragRotate",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"DragZoom",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"KeyboardPan",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"KeyboardZoom",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"MouseWheelZoom",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(exports,"PinchRotate",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(exports,"PinchZoom",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"DragAndDrop",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(exports,"DragBox",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(exports,"DragRotateAndZoom",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(exports,"Draw",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(exports,"Extent",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(exports,"Interaction",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(exports,"Modify",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(exports,"Pointer",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(exports,"Select",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(exports,"Snap",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(exports,"Translate",{enumerable:!0,get:function(){return x.default}});var e=h(require("./Collection.js")),t=h(require("./interaction/DoubleClickZoom.js")),r=h(require("./interaction/DragPan.js")),n=h(require("./interaction/DragRotate.js")),o=h(require("./interaction/DragZoom.js")),u=h(require("./interaction/KeyboardPan.js")),i=h(require("./interaction/KeyboardZoom.js")),a=h(require("./Kinetic.js")),c=h(require("./interaction/MouseWheelZoom.js")),d=h(require("./interaction/PinchRotate.js")),l=h(require("./interaction/PinchZoom.js")),f=h(require("./interaction/DragAndDrop.js")),s=h(require("./interaction/DragBox.js")),p=h(require("./interaction/DragRotateAndZoom.js")),b=h(require("./interaction/Draw.js")),m=h(require("./interaction/Extent.js")),j=h(require("./interaction/Interaction.js")),g=h(require("./interaction/Modify.js")),y=h(require("./interaction/Pointer.js")),P=h(require("./interaction/Select.js")),D=h(require("./interaction/Snap.js")),x=h(require("./interaction/Translate.js"));function h(e){return e&&e.__esModule?e:{default:e}}function O(f){var s=f||{},p=new e.default,b=new a.default(-.005,.05,100);return(void 0===s.altShiftDragRotate||s.altShiftDragRotate)&&p.push(new n.default),(void 0===s.doubleClickZoom||s.doubleClickZoom)&&p.push(new t.default({delta:s.zoomDelta,duration:s.zoomDuration})),(void 0===s.dragPan||s.dragPan)&&p.push(new r.default({onFocusOnly:s.onFocusOnly,kinetic:b})),(void 0===s.pinchRotate||s.pinchRotate)&&p.push(new d.default),(void 0===s.pinchZoom||s.pinchZoom)&&p.push(new l.default({duration:s.zoomDuration})),(void 0===s.keyboard||s.keyboard)&&(p.push(new u.default),p.push(new i.default({delta:s.zoomDelta,duration:s.zoomDuration}))),(void 0===s.mouseWheelZoom||s.mouseWheelZoom)&&p.push(new c.default({onFocusOnly:s.onFocusOnly,duration:s.zoomDuration})),(void 0===s.shiftDragZoom||s.shiftDragZoom)&&p.push(new o.default({duration:s.zoomDuration})),p}
},{"./Collection.js":"FnDa","./interaction/DoubleClickZoom.js":"NSa4","./interaction/DragPan.js":"N4gU","./interaction/DragRotate.js":"PgBj","./interaction/DragZoom.js":"pTqW","./interaction/KeyboardPan.js":"CFRo","./interaction/KeyboardZoom.js":"S8wR","./Kinetic.js":"gAnK","./interaction/MouseWheelZoom.js":"kPt6","./interaction/PinchRotate.js":"hbGN","./interaction/PinchZoom.js":"rcXm","./interaction/DragAndDrop.js":"IYO6","./interaction/DragBox.js":"AQRw","./interaction/DragRotateAndZoom.js":"ITeC","./interaction/Draw.js":"e7i2","./interaction/Extent.js":"o7b8","./interaction/Interaction.js":"jB2p","./interaction/Modify.js":"qrxo","./interaction/Pointer.js":"dnA2","./interaction/Select.js":"SMGe","./interaction/Snap.js":"NnGW","./interaction/Translate.js":"dAAZ"}],"kYy5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=u(require("./renderer/Composite.js")),e=u(require("./PluggableMap.js")),r=require("./obj.js"),o=require("./control.js"),n=require("./interaction.js");function u(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),s=function(e){function u(t){return(t=(0,r.assign)({},t)).controls||(t.controls=(0,o.defaults)()),t.interactions||(t.interactions=(0,n.defaults)({onFocusOnly:!0})),e.call(this,t)||this}return i(u,e),u.prototype.createRenderer=function(){return new t.default(this)},u}(e.default),c=s;exports.default=c;
},{"./renderer/Composite.js":"MHsB","./PluggableMap.js":"kRwz","./obj.js":"mH6q","./control.js":"ucqx","./interaction.js":"aMDX"}],"rePj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ol_ext_inherits=void 0,window.ol&&!ol.ext&&(ol.ext={});var e=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e};exports.ol_ext_inherits=e,window.ol&&(ol.inherits||(ol.inherits=e)),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.Element&&!Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});var t=e;exports.default=t;
},{}],"vhg2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={create:function(t,n){var o;if(n=n||{},"TEXT"===t)o=document.createTextNode(n.html||""),n.parent&&n.parent.appendChild(o);else for(var a in o=document.createElement(t),/button/i.test(t)&&o.setAttribute("type","button"),n)switch(a){case"className":n.className&&n.className.trim&&o.setAttribute("class",n.className.trim());break;case"html":n.html instanceof Element?o.appendChild(n.html):void 0!==n.html&&(o.innerHTML=n.html);break;case"parent":n.parent&&n.parent.appendChild(o);break;case"style":this.setStyle(o,n.style);break;case"change":case"click":e.addListener(o,a,n[a]);break;case"on":for(var r in n.on)e.addListener(o,r,n.on[r]);break;case"checked":o.checked=!!n.checked;break;default:o.setAttribute(a,n[a])}return o},createSwitch:function(t){var n=e.create("LABEL",{html:t.html,className:"ol-ext-toggle-switch",parent:t.parent}),o=e.create("INPUT",{type:"checkbox",checked:t.checked,click:t.click,change:t.change,on:t.on,parent:n});return e.create("SPAN",{parent:n}),t.after&&n.appendChild(document.createTextNode(t.after)),o},createCheck:function(t){var n=e.create("LABEL",{className:"ol-ext-check "+("radio"===t.type?"ol-ext-radio":"ol-ext-checkbox"),html:t.html,parent:t.parent}),o=e.create("INPUT",{name:t.name,type:"radio"===t.type?"radio":"checkbox",value:t.val,change:t.change,click:t.click,on:t.on,parent:n});return e.create("SPAN",{parent:n}),t.after&&n.appendChild(document.createTextNode(t.after)),o},setHTML:function(e,t){t instanceof Element?e.appendChild(t):void 0!==t&&(e.innerHTML=t)},appendText:function(e,t){e.appendChild(document.createTextNode(t||""))},addListener:function(e,t,n,o){"string"==typeof t&&(t=t.split(" ")),t.forEach(function(t){e.addEventListener(t,n,o)})},removeListener:function(e,t,n){"string"==typeof t&&(t=t.split(" ")),t.forEach(function(t){e.removeEventListener(t,n)})},show:function(e){e.style.display=""},hide:function(e){e.style.display="none"},hidden:function(t){return"none"===e.getStyle(t,"display")},toggle:function(e){e.style.display="none"===e.style.display?"":"none"},setStyle:function(e,t){for(var n in t)switch(n){case"top":case"left":case"bottom":case"right":case"minWidth":case"maxWidth":case"width":case"height":"number"==typeof t[n]?e.style[n]=t[n]+"px":e.style[n]=t[n];break;default:e.style[n]=t[n]}},getStyle:function(e,t){var n,o=(e.ownerDocument||document).defaultView;if(o&&o.getComputedStyle)t=t.replace(/([A-Z])/g,"-$1").toLowerCase(),n=o.getComputedStyle(e,null).getPropertyValue(t);else if(e.currentStyle&&(t=t.replace(/-(\w)/g,function(e,t){return t.toUpperCase()}),n=e.currentStyle[t],/^\d+(em|pt|%|ex)?$/i.test(n)))return function(t){var n=e.style.left,o=e.runtimeStyle.left;return e.runtimeStyle.left=e.currentStyle.left,e.style.left=t||0,t=e.style.pixelLeft+"px",e.style.left=n,e.runtimeStyle.left=o,t}(n);return/px$/.test(n)?parseInt(n):n},outerHeight:function(t){return t.offsetHeight+e.getStyle(t,"marginBottom")},outerWidth:function(t){return t.offsetWidth+e.getStyle(t,"marginLeft")},offsetRect:function(e){var t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0),height:t.height||t.bottom-t.top,width:t.width||t.right-t.left}},scrollDiv:function(t,n){var o,a=!1,r=0,c=0,i="function"==typeof n.onmove?n.onmove:function(){},l=n.vertical?"pageY":"pageX",s=n.vertical?"scrollTop":"scrollLeft",d=!1;t.querySelectorAll("img").forEach(function(e){e.ondragstart=function(){return!1}}),t.style["touch-action"]="none",e.addListener(t,["pointerdown"],function(e){d=!1,a=e[l],c=new Date,t.classList.add("ol-move")}),e.addListener(window,["pointermove"],function(e){if(d=!0,!1!==a){var n=a-e[l];t[s]+=n,(o=new Date)-c&&(r=(r+n/(o-c))/2),a=e[l],c=o,n&&i(!0)}});var u=function(e){var n=e>0?Math.min(100,e/2):Math.max(-100,e/2);e-=n,t[s]+=n,-1<e&&e<1?(d?setTimeout(function(){t.classList.remove("ol-move")}):t.classList.remove("ol-move"),d=!1,i(!1)):setTimeout(function(){u(e)},40)};e.addListener(window,["pointerup","pointercancel"],function(e){(c=new Date-c)>100?r=0:c>0&&(r=((r||0)+(a-e[l])/c)/2),u(!1===n.animate?0:200*r),a=!1,r=0,c=0}),n.mousewheel&&e.addListener(t,["mousewheel","DOMMouseScroll","onmousewheel"],function(e){var n=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));return t.classList.add("ol-move"),t[s]-=30*n,t.classList.remove("ol-move"),!1})},dispatchEvent:function(e,t){var n;try{n=new CustomEvent(e)}catch(o){(n=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,{})}t.dispatchEvent(n)}},t=e;exports.default=t;
},{}],"DeNH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r={getTransform:function(r){var t,e,o=window.getComputedStyle(r,null),n=(o.getPropertyValue("-webkit-transform")||o.getPropertyValue("-moz-transform")||o.getPropertyValue("-ms-transform")||o.getPropertyValue("-o-transform")||o.getPropertyValue("transform")).split("(")[1].split(")")[0].split(","),a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];if(16===n.length)for(t=0;t<4;++t)for(e=0;e<4;++e)a[e][t]=+n[4*t+e];else for(t=0;t<3;++t)for(e=0;e<2;++e)a[e][t]=+n[2*t+e];return a},getTransformOrigin:function(r){for(var t=window.getComputedStyle(r,null),e=(t.getPropertyValue("-webkit-transform-origin")||t.getPropertyValue("-moz-transform-origin")||t.getPropertyValue("-ms-transform-origin")||t.getPropertyValue("-o-transform-origin")||t.getPropertyValue("transform-origin")).split(" "),o=[0,0,0,1],n=0;n<e.length;++n)o[n]=parseInt(e[n]);return o},translateMatrix:function(r,t,e){return[[1,0,0,r],[0,1,0,t],[0,0,1,e],[0,0,0,1]]},identity:function(){return[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]},roundTo:function(r,t){t||(t=1e-10);for(var e=[[],[],[],[]],o=0;o<4;o++)for(var n=0;n<4;n++)e[o][n]=Math.round(r[o][n]/t)*t;return e},multiply:function(r,t){for(var e=[[],[],[],[]],o=0;o<4;++o)for(var n=0;n<4;++n){for(var a=0,i=0;i<4;++i)a+=r[i][o]*t[n][i];e[n][o]=a}return e},computeTransformMatrix:function(t,e){var o=r.translateMatrix(-e[0],-e[1],-e[2]),n=r.translateMatrix(e[0],e[1],e[2]),a=r.multiply(o,t);return r.multiply(a,n)},transformVertex:function(r,t){for(var e=[t[0],t[1],0,1],o=[],n=0;n<4;++n){o[n]=0;for(var a=0;a<4;++a)o[n]+=+r[n][a]*e[a]}return o},projectVertex:function(r){for(var t=[],e=0;e<4;++e)t[e]=r[e]/r[3];return t},inverse:function(r){var t=r[0][0]*r[1][1]-r[1][0]*r[0][1],e=r[0][0]*r[1][2]-r[1][0]*r[0][2],o=r[0][0]*r[1][3]-r[1][0]*r[0][3],n=r[0][1]*r[1][2]-r[1][1]*r[0][2],a=r[0][1]*r[1][3]-r[1][1]*r[0][3],i=r[0][2]*r[1][3]-r[1][2]*r[0][3],u=r[2][2]*r[3][3]-r[3][2]*r[2][3],f=r[2][1]*r[3][3]-r[3][1]*r[2][3],l=r[2][1]*r[3][2]-r[3][1]*r[2][2],s=r[2][0]*r[3][3]-r[3][0]*r[2][3],p=r[2][0]*r[3][2]-r[3][0]*r[2][2],m=r[2][0]*r[3][1]-r[3][0]*r[2][1],g=1/(t*u-e*f+o*l+n*s-a*p+i*m);if(isNaN(g)||g===1/0)throw new Error("Inverse determinant attempted to divide by zero.");return[[(r[1][1]*u-r[1][2]*f+r[1][3]*l)*g,(-r[0][1]*u+r[0][2]*f-r[0][3]*l)*g,(r[3][1]*i-r[3][2]*a+r[3][3]*n)*g,(-r[2][1]*i+r[2][2]*a-r[2][3]*n)*g],[(-r[1][0]*u+r[1][2]*s-r[1][3]*p)*g,(r[0][0]*u-r[0][2]*s+r[0][3]*p)*g,(-r[3][0]*i+r[3][2]*o-r[3][3]*e)*g,(r[2][0]*i-r[2][2]*o+r[2][3]*e)*g],[(r[1][0]*f-r[1][1]*s+r[1][3]*m)*g,(-r[0][0]*f+r[0][1]*s-r[0][3]*m)*g,(r[3][0]*a-r[3][1]*o+r[3][3]*t)*g,(-r[2][0]*a+r[2][1]*o-r[2][3]*t)*g],[(-r[1][0]*l+r[1][1]*p-r[1][2]*m)*g,(r[0][0]*l-r[0][1]*p+r[0][2]*m)*g,(-r[3][0]*n+r[3][1]*e-r[3][2]*t)*g,(r[2][0]*n-r[2][1]*e+r[2][2]*t)*g]]}},t=r;exports.default=t;
},{}],"cqF1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=s(require("ol/Map")),t=require("../util/ext"),i=s(require("../util/element")),r=s(require("ol/Overlay")),a=require("ol/easing"),n=s(require("../util/matrix3D")),o=require("ol/events/condition");function s(e){return e&&e.__esModule?e:{default:e}}var l=function(t){var r=t.target instanceof Element?t.target:document.getElementById(t.target);"absolute"!==window.getComputedStyle(r).position&&(r.style.position="relative"),r.style.overflow="hidden";var a=i.default.create("DIV",{className:"ol-perspective-map",parent:r}),n={};Object.assign(n,t),n.target=a,e.default.call(this,n),this._tiltCondition=t.tiltCondition||o.altKeyOnly};(0,t.ol_ext_inherits)(l,e.default),l.prototype.getPixelRatio=function(){return window.devicePixelRatio},l.prototype.setPerspective=function(e,t){t=t||{},e>30?e=30:e<0&&(e=0);var i=this._angle||0,r=Math.round(10*e)/10,n=this.getTarget().querySelector(".ol-layers").style;cancelAnimationFrame(this._animatedPerspective),requestAnimationFrame(function(e){this._animatePerpective(e,e,n,i,r,t.duration,t.easing||a.inAndOut)}.bind(this))},l.prototype._animatePerpective=function(e,t,i,r,n,o,s){var l,d,u;0===o?(l=1,d=!0):d=(l=(t-e)/(o||500))>=1,l=s(l);var g=(u=this._angle=d?n:r+(n-r)*l)/30;i.transform="translateY(-"+17*g+"%) perspective(200px) rotateX("+u+"deg) scaleY("+(1-g/2)+")",this.getMatrix3D(!0),this.render(),d||requestAnimationFrame(function(t){this._animatePerpective(e,t,i,r,n,o||500,s||a.inAndOut)}.bind(this)),this.dispatchEvent({type:"change:perspective",angle:u,animating:!d})},l.prototype.handleMapBrowserEvent=function(t){if(t.pixel=[t.originalEvent.offsetX/this.getPixelRatio(),t.originalEvent.offsetY/this.getPixelRatio()],t.coordinate=this.getCoordinateFromPixel(t.pixel),e.default.prototype.handleMapBrowserEvent.call(this,t),this._tiltCondition(t))switch(t.type){case"pointerdown":this._dragging=t.originalEvent.offsetY;break;case"pointerup":this._dragging=!1;break;case"pointerdrag":if(!1!==this._dragging){var i=t.originalEvent.offsetY>this._dragging?.5:-.5;i&&this.setPerspective((this._angle||0)+i,{duration:0}),this._dragging=t.originalEvent.offsetY}}else this._dragging=!1},l.prototype.getMatrix3D=function(e){if(e){var t=this.getTarget().querySelector(".ol-layers"),i=n.default.getTransform(t),r=n.default.getTransformOrigin(t);this._matrixTransform=n.default.computeTransformMatrix(i,r)}return this._matrixTransform||(this._matrixTransform=n.default.identity()),this._matrixTransform},l.prototype.getPixelScreenFromCoordinate=function(e){var t=this.getPixelFromCoordinate(e),i=this.getMatrix3D(),r=n.default.transformVertex(i,t);return[(r=n.default.projectVertex(r))[0],r[1]]},l.prototype.getPixelFromPixelScreen=function(e){var t=n.default.inverse(this.getMatrix3D()),i=n.default.transformVertex(t,e);return[(i=n.default.projectVertex(i))[0],i[1]]},function(){var e=r.default.prototype.updatePixelPosition;r.default.prototype.updatePixelPosition=function(){var t=this.getMap();if(t&&t instanceof l){var i=this.getPosition();if(!t||!t.isRendered()||!i)return void this.setVisible(!1);var r=t.getPixelScreenFromCoordinate(i),a=t.getSize();r[0]-=a[0]/4,r[1]-=a[1]/4,this.updateRenderedPosition(r,a)}else e.call(this)}}();var d=l;exports.default=d;
},{"ol/Map":"kYy5","../util/ext":"rePj","../util/element":"vhg2","ol/Overlay":"qWcX","ol/easing":"IeCz","../util/matrix3D":"DeNH","ol/events/condition":"YcID"}],"HvLT":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("../events/EventType.js")),t=o(require("./Geometry.js")),r=o(require("./GeometryType.js")),i=require("../extent.js"),n=require("../events.js");function o(e){return e&&e.__esModule?e:{default:e}}var s=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),a=function(t){function o(e){var r=t.call(this)||this;return r.geometries_=e||null,r.changeEventsKeys_=[],r.listenGeometriesChange_(),r}return s(o,t),o.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(n.unlistenByKey),this.changeEventsKeys_.length=0},o.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,r=this.geometries_.length;t<r;++t)this.changeEventsKeys_.push((0,n.listen)(this.geometries_[t],e.default.CHANGE,this.changed,this))},o.prototype.clone=function(){var e=new o(null);return e.setGeometries(this.geometries_),e.applyProperties(this),e},o.prototype.closestPointXY=function(e,t,r,n){if(n<(0,i.closestSquaredDistanceXY)(this.getExtent(),e,t))return n;for(var o=this.geometries_,s=0,a=o.length;s<a;++s)n=o[s].closestPointXY(e,t,r,n);return n},o.prototype.containsXY=function(e,t){for(var r=this.geometries_,i=0,n=r.length;i<n;++i)if(r[i].containsXY(e,t))return!0;return!1},o.prototype.computeExtent=function(e){(0,i.createOrUpdateEmpty)(e);for(var t=this.geometries_,r=0,n=t.length;r<n;++r)(0,i.extend)(e,t[r].getExtent());return e},o.prototype.getGeometries=function(){return p(this.geometries_)},o.prototype.getGeometriesArray=function(){return this.geometries_},o.prototype.getGeometriesArrayRecursive=function(){for(var e=[],t=this.geometries_,r=0,i=t.length;r<i;++r)t[r].getType()===this.getType()?e=e.concat(t[r].getGeometriesArrayRecursive()):e.push(t[r]);return e},o.prototype.getSimplifiedGeometry=function(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&e<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var t=[],r=this.geometries_,i=!1,n=0,s=r.length;n<s;++n){var a=r[n],p=a.getSimplifiedGeometry(e);t.push(p),p!==a&&(i=!0)}if(i){var u=new o(null);return u.setGeometriesArray(t),u}return this.simplifiedGeometryMaxMinSquaredTolerance=e,this},o.prototype.getType=function(){return r.default.GEOMETRY_COLLECTION},o.prototype.intersectsExtent=function(e){for(var t=this.geometries_,r=0,i=t.length;r<i;++r)if(t[r].intersectsExtent(e))return!0;return!1},o.prototype.isEmpty=function(){return 0===this.geometries_.length},o.prototype.rotate=function(e,t){for(var r=this.geometries_,i=0,n=r.length;i<n;++i)r[i].rotate(e,t);this.changed()},o.prototype.scale=function(e,t,r){var n=r;n||(n=(0,i.getCenter)(this.getExtent()));for(var o=this.geometries_,s=0,a=o.length;s<a;++s)o[s].scale(e,t,n);this.changed()},o.prototype.setGeometries=function(e){this.setGeometriesArray(p(e))},o.prototype.setGeometriesArray=function(e){this.unlistenGeometriesChange_(),this.geometries_=e,this.listenGeometriesChange_(),this.changed()},o.prototype.applyTransform=function(e){for(var t=this.geometries_,r=0,i=t.length;r<i;++r)t[r].applyTransform(e);this.changed()},o.prototype.translate=function(e,t){for(var r=this.geometries_,i=0,n=r.length;i<n;++i)r[i].translate(e,t);this.changed()},o.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),t.prototype.disposeInternal.call(this)},o}(t.default);function p(e){for(var t=[],r=0,i=e.length;r<i;++r)t.push(e[r].clone());return t}var u=a;exports.default=u;
},{"../events/EventType.js":"C8cu","./Geometry.js":"F8sI","./GeometryType.js":"lmV0","../extent.js":"QDir","../events.js":"UqnM"}],"V3SP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Circle",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"Geometry",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"GeometryCollection",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"LinearRing",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"LineString",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"MultiLineString",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"MultiPoint",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"MultiPolygon",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"Point",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(exports,"Polygon",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(exports,"SimpleGeometry",{enumerable:!0,get:function(){return m.default}});var e=c(require("./geom/Circle.js")),r=c(require("./geom/Geometry.js")),t=c(require("./geom/GeometryCollection.js")),n=c(require("./geom/LinearRing.js")),o=c(require("./geom/LineString.js")),u=c(require("./geom/MultiLineString.js")),i=c(require("./geom/MultiPoint.js")),l=c(require("./geom/MultiPolygon.js")),f=c(require("./geom/Point.js")),g=c(require("./geom/Polygon.js")),m=c(require("./geom/SimpleGeometry.js"));function c(e){return e&&e.__esModule?e:{default:e}}
},{"./geom/Circle.js":"AyCw","./geom/Geometry.js":"F8sI","./geom/GeometryCollection.js":"HvLT","./geom/LinearRing.js":"jRgU","./geom/LineString.js":"DfxW","./geom/MultiLineString.js":"fbCo","./geom/MultiPoint.js":"dNu5","./geom/MultiPolygon.js":"ouhF","./geom/Point.js":"gLcY","./geom/Polygon.js":"Nwwk","./geom/SimpleGeometry.js":"pnrv"}],"RvU2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.toContext=a,exports.getVectorContext=s,exports.getRenderPixel=l;var e=n(require("./render/canvas/Immediate.js")),t=require("./has.js"),r=require("./transform.js"),i=require("./renderer/vector.js"),o=require("./proj.js");function n(e){return e&&e.__esModule?e:{default:e}}function a(i,o){var n=i.canvas,a=o||{},s=a.pixelRatio||t.DEVICE_PIXEL_RATIO,l=a.size;l&&(n.width=l[0]*s,n.height=l[1]*s,n.style.width=l[0]+"px",n.style.height=l[1]+"px");var u=[0,0,n.width,n.height],c=(0,r.scale)((0,r.create)(),s,s);return new e.default(i,s,u,c,0)}function s(t){var n,a=t.frameState,s=(0,r.multiply)(t.inversePixelTransform.slice(),a.coordinateToPixelTransform),l=(0,i.getSquaredTolerance)(a.viewState.resolution,a.pixelRatio),u=(0,o.getUserProjection)();return u&&(n=(0,o.getTransformFromProjections)(u,a.viewState.projection)),new e.default(t.context,a.pixelRatio,a.extent,s,a.viewState.rotation,l,n)}function l(e,t){var i=t.slice(0);return(0,r.apply)(e.inversePixelTransform.slice(),i),i}
},{"./render/canvas/Immediate.js":"fo6K","./has.js":"f3Nv","./transform.js":"P4eA","./renderer/vector.js":"UCah","./proj.js":"Diht"}],"w0c6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.greatCircleArc=n,exports.meridian=e,exports.parallel=o;var t=require("../../proj.js"),a=require("../../math.js");function r(t,r,n){for(var e,o,s,i,u,p,h=[],c=t(0),M=t(1),f=r(c),g=r(M),d=[M,c],l=[g,f],v=[1,0],R={},m=1e5;--m>0&&v.length>0;)s=v.pop(),c=d.pop(),f=l.pop(),(p=s.toString())in R||(h.push(f[0],f[1]),R[p]=!0),i=v.pop(),M=d.pop(),g=l.pop(),o=r(e=t(u=(s+i)/2)),(0,a.squaredSegmentDistance)(o[0],o[1],f[0],f[1],g[0],g[1])<n?(h.push(g[0],g[1]),R[p=i.toString()]=!0):(v.push(i,u,u,s),l.push(g,o,o,f),d.push(M,e,e,c));return h}function n(n,e,o,s,i,u){var p=(0,t.get)("EPSG:4326"),h=Math.cos((0,a.toRadians)(e)),c=Math.sin((0,a.toRadians)(e)),M=Math.cos((0,a.toRadians)(s)),f=Math.sin((0,a.toRadians)(s)),g=Math.cos((0,a.toRadians)(o-n)),d=Math.sin((0,a.toRadians)(o-n)),l=c*f+h*M*g;return r(function(t){if(1<=l)return[o,s];var r=t*Math.acos(l),e=Math.cos(r),i=Math.sin(r),u=d*M,p=h*f-c*M*g,v=Math.atan2(u,p),R=Math.asin(c*e+h*i*Math.cos(v)),m=(0,a.toRadians)(n)+Math.atan2(Math.sin(v)*i*h,e-c*Math.sin(R));return[(0,a.toDegrees)(m),(0,a.toDegrees)(R)]},(0,t.getTransform)(p,i),u)}function e(a,n,e,o,s){var i=(0,t.get)("EPSG:4326");return r(function(t){return[a,n+(e-n)*t]},(0,t.getTransform)(i,o),s)}function o(a,n,e,o,s){var i=(0,t.get)("EPSG:4326");return r(function(t){return[n+(e-n)*t,a]},(0,t.getTransform)(i,o),s)}
},{"../../proj.js":"Diht","../../math.js":"B96G"}],"wXs0":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=b(require("../Collection.js")),e=b(require("../render/EventType.js")),a=b(require("../Feature.js")),i=b(require("../style/Fill.js")),r=b(require("../geom/GeometryLayout.js")),s=b(require("../geom/LineString.js")),n=b(require("../geom/Point.js")),l=b(require("../style/Stroke.js")),o=b(require("../style/Style.js")),h=b(require("../style/Text.js")),_=b(require("./Vector.js")),m=b(require("../source/Vector.js")),L=require("../extent.js"),d=require("../obj.js"),u=require("../math.js"),p=require("../coordinate.js"),f=require("../proj.js"),c=require("../render.js"),g=require("../geom/flat/geodesic.js");function b(t){return t&&t.__esModule?t:{default:t}}var x=function(){var t=function(e,a){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])})(e,a)};return function(e,a){function i(){this.constructor=e}t(e,a),e.prototype=null===a?Object.create(a):(i.prototype=a.prototype,new i)}}(),v=new l.default({color:"rgba(0,0,0,0.2)"}),y=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001],S=function(_){function b(a){var r=this,s=a||{},n=(0,d.assign)({updateWhileAnimating:!0,updateWhileInteracting:!0,renderBuffer:0},s);return delete n.maxLines,delete n.strokeStyle,delete n.targetSize,delete n.showLabels,delete n.lonLabelFormatter,delete n.latLabelFormatter,delete n.lonLabelPosition,delete n.latLabelPosition,delete n.lonLabelStyle,delete n.latLabelStyle,delete n.intervals,(r=_.call(this,n)||this).projection_=null,r.maxLat_=1/0,r.maxLon_=1/0,r.minLat_=-1/0,r.minLon_=-1/0,r.maxX_=1/0,r.maxY_=1/0,r.minX_=-1/0,r.minY_=-1/0,r.targetSize_=void 0!==s.targetSize?s.targetSize:100,r.maxLines_=void 0!==s.maxLines?s.maxLines:100,r.meridians_=[],r.parallels_=[],r.strokeStyle_=void 0!==s.strokeStyle?s.strokeStyle:v,r.fromLonLatTransform_=void 0,r.toLonLatTransform_=void 0,r.projectionCenterLonLat_=null,r.bottomLeft_=null,r.bottomRight_=null,r.topLeft_=null,r.topRight_=null,r.meridiansLabels_=null,r.parallelsLabels_=null,s.showLabels&&(r.lonLabelFormatter_=null==s.lonLabelFormatter?p.degreesToStringHDMS.bind(r,"EW"):s.lonLabelFormatter,r.latLabelFormatter_=null==s.latLabelFormatter?p.degreesToStringHDMS.bind(r,"NS"):s.latLabelFormatter,r.lonLabelPosition_=null==s.lonLabelPosition?0:s.lonLabelPosition,r.latLabelPosition_=null==s.latLabelPosition?1:s.latLabelPosition,r.lonLabelStyleBase_=new o.default({text:void 0!==s.lonLabelStyle?s.lonLabelStyle.clone():new h.default({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new i.default({color:"rgba(0,0,0,1)"}),stroke:new l.default({color:"rgba(255,255,255,1)",width:3})})}),r.lonLabelStyle_=function(t){var e=t.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(e),this.lonLabelStyleBase_}.bind(r),r.latLabelStyleBase_=new o.default({text:void 0!==s.latLabelStyle?s.latLabelStyle.clone():new h.default({font:"12px Calibri,sans-serif",textAlign:"right",fill:new i.default({color:"rgba(0,0,0,1)"}),stroke:new l.default({color:"rgba(255,255,255,1)",width:3})})}),r.latLabelStyle_=function(t){var e=t.get("graticule_label");return this.latLabelStyleBase_.getText().setText(e),this.latLabelStyleBase_}.bind(r),r.meridiansLabels_=[],r.parallelsLabels_=[],r.addEventListener(e.default.POSTRENDER,r.drawLabels_.bind(r))),r.intervals_=void 0!==s.intervals?s.intervals:y,r.setSource(new m.default({loader:r.loaderFunction.bind(r),strategy:r.strategyFunction.bind(r),features:new t.default,overlaps:!1,useSpatialIndex:!1,wrapX:s.wrapX})),r.featurePool_=[],r.lineStyle_=new o.default({stroke:r.strokeStyle_}),r.loadedExtent_=null,r.renderedExtent_=null,r.setRenderOrder(null),r}return x(b,_),b.prototype.strategyFunction=function(t,e){var a=t.slice();return this.projection_&&this.getSource().getWrapX()&&(0,L.wrapX)(a,this.projection_),this.loadedExtent_&&((0,L.approximatelyEquals)(this.loadedExtent_,a,e)?a=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[a]},b.prototype.loaderFunction=function(t,e,i){this.loadedExtent_=t;var r=this.getSource(),s=this.getExtent()||[-1/0,-1/0,1/0,1/0],n=(0,L.getIntersection)(s,t);if(!(this.renderedExtent_&&(0,L.equals)(this.renderedExtent_,n)||(this.renderedExtent_=n,(0,L.isEmpty)(n)))){var l=(0,L.getCenter)(n),o=e*e/4;(!this.projection_||!(0,f.equivalent)(this.projection_,i))&&this.updateProjectionInfo_(i),this.createGraticule_(n,l,e,o);var h,_=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(_+=this.meridians_.length),this.parallelsLabels_&&(_+=this.parallels_.length);_>this.featurePool_.length;)h=new a.default,this.featurePool_.push(h);var m=r.getFeaturesCollection();m.clear();var d,u,p=0;for(d=0,u=this.meridians_.length;d<u;++d)(h=this.featurePool_[p++]).setGeometry(this.meridians_[d]),h.setStyle(this.lineStyle_),m.push(h);for(d=0,u=this.parallels_.length;d<u;++d)(h=this.featurePool_[p++]).setGeometry(this.parallels_[d]),h.setStyle(this.lineStyle_),m.push(h)}},b.prototype.addMeridian_=function(t,e,a,i,r,s){var l=this.getMeridian_(t,e,a,i,s);if((0,L.intersects)(l.getExtent(),r)){if(this.meridiansLabels_){var o=this.lonLabelFormatter_(t);s in this.meridiansLabels_?this.meridiansLabels_[s].text=o:this.meridiansLabels_[s]={geom:new n.default([]),text:o}}this.meridians_[s++]=l}return s},b.prototype.addParallel_=function(t,e,a,i,r,s){var l=this.getParallel_(t,e,a,i,s);if((0,L.intersects)(l.getExtent(),r)){if(this.parallelsLabels_){var o=this.latLabelFormatter_(t);s in this.parallelsLabels_?this.parallelsLabels_[s].text=o:this.parallelsLabels_[s]={geom:new n.default([]),text:o}}this.parallels_[s++]=l}return s},b.prototype.drawLabels_=function(t){var e=t.frameState.viewState.rotation,a=t.frameState.extent,i=(0,L.getCenter)(a),r=a;if(e){var s=(0,L.getWidth)(a),n=(0,L.getHeight)(a),l=Math.abs(Math.cos(e)),o=Math.abs(Math.sin(e)),h=(o*n-l*s)/(o*o-l*l),_=(o*s-l*n)/(o*o-l*l);r=[i[0]-h/2,i[1]-_/2,i[0]+h/2,i[1]+_/2]}var m=0,d=0,u=this.latLabelPosition_<.5,p=this.projection_.getExtent(),f=(0,L.getWidth)(p);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!(0,L.containsExtent)(p,a)&&(m=Math.floor((a[0]-p[0])/f),d=Math.ceil((a[2]-p[2])/f),u=u!==Math.abs(e)>Math.PI/2);for(var g=(0,c.getVectorContext)(t),b=m;b<=d;++b){var x=this.meridians_.length+this.parallels_.length,v=void 0,y=void 0,S=void 0,j=void 0;if(this.meridiansLabels_)for(y=0,S=this.meridiansLabels_.length;y<S;++y){var M=this.meridians_[y];if(e||0!==b)(P=M.clone()).translate(b*f,0),P.rotate(-e,i),(j=this.getMeridianPoint_(P,r,y)).rotate(e,i);else j=this.getMeridianPoint_(M,a,y);(v=this.featurePool_[x++]).setGeometry(j),v.set("graticule_label",this.meridiansLabels_[y].text),g.drawFeature(v,this.lonLabelStyle_(v))}if(this.parallelsLabels_&&(b===m&&u||b===d&&!u))for(y=0,S=this.parallels_.length;y<S;++y){var P;M=this.parallels_[y];if(e||0!==b)(P=M.clone()).translate(b*f,0),P.rotate(-e,i),(j=this.getParallelPoint_(P,r,y)).rotate(e,i);else j=this.getParallelPoint_(M,a,y);(v=this.featurePool_[x++]).setGeometry(j),v.set("graticule_label",this.parallelsLabels_[y].text),g.drawFeature(v,this.latLabelStyle_(v))}}},b.prototype.createGraticule_=function(t,e,a,i){var r=this.getInterval_(a);if(-1==r)return this.meridians_.length=0,this.parallels_.length=0,this.meridiansLabels_&&(this.meridiansLabels_.length=0),void(this.parallelsLabels_&&(this.parallelsLabels_.length=0));var s=!1,n=this.projection_.getExtent(),l=(0,L.getWidth)(n);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!(0,L.containsExtent)(n,t)&&((0,L.getWidth)(t)>=l?(t[0]=n[0],t[2]=n[2]):s=!0);var o=[(0,u.clamp)(e[0],this.minX_,this.maxX_),(0,u.clamp)(e[1],this.minY_,this.maxY_)],h=this.toLonLatTransform_(o);isNaN(h[1])&&(h[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);var _,m,d,p,f=(0,u.clamp)(h[0],this.minLon_,this.maxLon_),c=(0,u.clamp)(h[1],this.minLat_,this.maxLat_),g=this.maxLines_,b=t;s||(b=[(0,u.clamp)(t[0],this.minX_,this.maxX_),(0,u.clamp)(t[1],this.minY_,this.maxY_),(0,u.clamp)(t[2],this.minX_,this.maxX_),(0,u.clamp)(t[3],this.minY_,this.maxY_)]);var x=(0,L.applyTransform)(b,this.toLonLatTransform_,void 0,8),v=x[3],y=x[2],S=x[1],j=x[0];if(s||((0,L.containsCoordinate)(b,this.bottomLeft_)&&(j=this.minLon_,S=this.minLat_),(0,L.containsCoordinate)(b,this.bottomRight_)&&(y=this.maxLon_,S=this.minLat_),(0,L.containsCoordinate)(b,this.topLeft_)&&(j=this.minLon_,v=this.maxLat_),(0,L.containsCoordinate)(b,this.topRight_)&&(y=this.maxLon_,v=this.maxLat_),v=(0,u.clamp)(v,c,this.maxLat_),y=(0,u.clamp)(y,f,this.maxLon_),S=(0,u.clamp)(S,this.minLat_,c),j=(0,u.clamp)(j,this.minLon_,f)),f=Math.floor(f/r)*r,p=(0,u.clamp)(f,this.minLon_,this.maxLon_),m=this.addMeridian_(p,S,v,i,t,0),_=0,s)for(;(p-=r)>=j&&_++<g;)m=this.addMeridian_(p,S,v,i,t,m);else for(;p!=this.minLon_&&_++<g;)p=Math.max(p-r,this.minLon_),m=this.addMeridian_(p,S,v,i,t,m);if(p=(0,u.clamp)(f,this.minLon_,this.maxLon_),_=0,s)for(;(p+=r)<=y&&_++<g;)m=this.addMeridian_(p,S,v,i,t,m);else for(;p!=this.maxLon_&&_++<g;)p=Math.min(p+r,this.maxLon_),m=this.addMeridian_(p,S,v,i,t,m);for(this.meridians_.length=m,this.meridiansLabels_&&(this.meridiansLabels_.length=m),c=Math.floor(c/r)*r,d=(0,u.clamp)(c,this.minLat_,this.maxLat_),m=this.addParallel_(d,j,y,i,t,0),_=0;d!=this.minLat_&&_++<g;)d=Math.max(d-r,this.minLat_),m=this.addParallel_(d,j,y,i,t,m);for(d=(0,u.clamp)(c,this.minLat_,this.maxLat_),_=0;d!=this.maxLat_&&_++<g;)d=Math.min(d+r,this.maxLat_),m=this.addParallel_(d,j,y,i,t,m);this.parallels_.length=m,this.parallelsLabels_&&(this.parallelsLabels_.length=m)},b.prototype.getInterval_=function(t){for(var e=this.projectionCenterLonLat_[0],a=this.projectionCenterLonLat_[1],i=-1,r=Math.pow(this.targetSize_*t,2),s=[],n=[],l=0,o=this.intervals_.length;l<o;++l){var h=(0,u.clamp)(this.intervals_[l]/2,0,90),_=(0,u.clamp)(a,-90+h,90-h);if(s[0]=e-h,s[1]=_-h,n[0]=e+h,n[1]=_+h,this.fromLonLatTransform_(s,s),this.fromLonLatTransform_(n,n),Math.pow(n[0]-s[0],2)+Math.pow(n[1]-s[1],2)<=r)break;i=this.intervals_[l]}return i},b.prototype.getMeridian_=function(t,e,a,i,n){var l=(0,g.meridian)(t,e,a,this.projection_,i),o=this.meridians_[n];return o?(o.setFlatCoordinates(r.default.XY,l),o.changed()):(o=new s.default(l,r.default.XY),this.meridians_[n]=o),o},b.prototype.getMeridianPoint_=function(t,e,a){var i=t.getFlatCoordinates(),r=1,s=i.length-1;i[r]>i[s]&&(r=s,s=1);var n=Math.max(e[1],i[r]),l=Math.min(e[3],i[s]),o=(0,u.clamp)(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,n,l),h=[i[r-1]+(i[s-1]-i[r-1])*(o-i[r])/(i[s]-i[r]),o],_=this.meridiansLabels_[a].geom;return _.setCoordinates(h),_},b.prototype.getMeridians=function(){return this.meridians_},b.prototype.getParallel_=function(t,e,a,i,n){var l=(0,g.parallel)(t,e,a,this.projection_,i),o=this.parallels_[n];return o?(o.setFlatCoordinates(r.default.XY,l),o.changed()):o=new s.default(l,r.default.XY),o},b.prototype.getParallelPoint_=function(t,e,a){var i=t.getFlatCoordinates(),r=0,s=i.length-2;i[r]>i[s]&&(r=s,s=0);var n=Math.max(e[0],i[r]),l=Math.min(e[2],i[s]),o=(0,u.clamp)(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,n,l),h=[o,i[r+1]+(i[s+1]-i[r+1])*(o-i[r])/(i[s]-i[r])],_=this.parallelsLabels_[a].geom;return _.setCoordinates(h),_},b.prototype.getParallels=function(){return this.parallels_},b.prototype.updateProjectionInfo_=function(t){var e=(0,f.get)("EPSG:4326"),a=t.getWorldExtent();this.maxLat_=a[3],this.maxLon_=a[2],this.minLat_=a[1],this.minLon_=a[0];var i=(0,f.getTransform)(t,e);if(this.minLon_<this.maxLon_)this.toLonLatTransform_=i;else{var r=this.minLon_+this.maxLon_/2;this.maxLon_+=360,this.toLonLatTransform_=function(t,e,a){for(var s=a||2,n=i(t,e,s),l=0,o=n.length;l<o;l+=s)n[l]<r&&(n[l]+=360);return n}}this.fromLonLatTransform_=(0,f.getTransform)(e,t);var s=(0,L.applyTransform)([this.minLon_,this.minLat_,this.maxLon_,this.maxLat_],this.fromLonLatTransform_,void 0,8);this.minX_=s[0],this.maxX_=s[2],this.minY_=s[1],this.maxY_=s[3],this.bottomLeft_=this.fromLonLatTransform_([this.minLon_,this.minLat_]),this.bottomRight_=this.fromLonLatTransform_([this.maxLon_,this.minLat_]),this.topLeft_=this.fromLonLatTransform_([this.minLon_,this.maxLat_]),this.topRight_=this.fromLonLatTransform_([this.maxLon_,this.maxLat_]),this.projectionCenterLonLat_=this.toLonLatTransform_((0,L.getCenter)(t.getExtent())),isNaN(this.projectionCenterLonLat_[1])&&(this.projectionCenterLonLat_[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t},b}(_.default),j=S;exports.default=j;
},{"../Collection.js":"FnDa","../render/EventType.js":"z39m","../Feature.js":"mYW9","../style/Fill.js":"AFcg","../geom/GeometryLayout.js":"Utvi","../geom/LineString.js":"DfxW","../geom/Point.js":"gLcY","../style/Stroke.js":"TXDt","../style/Style.js":"he4w","../style/Text.js":"RPsG","./Vector.js":"dflx","../source/Vector.js":"ZS12","../extent.js":"QDir","../obj.js":"mH6q","../math.js":"B96G","../coordinate.js":"nGsj","../proj.js":"Diht","../render.js":"RvU2","../geom/flat/geodesic.js":"w0c6"}],"SCyv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getContext=_,exports.getSupportedExtensions=a,exports.FLOAT=exports.UNSIGNED_INT=exports.UNSIGNED_SHORT=exports.UNSIGNED_BYTE=exports.DYNAMIC_DRAW=exports.STATIC_DRAW=exports.STREAM_DRAW=exports.ELEMENT_ARRAY_BUFFER=exports.ARRAY_BUFFER=void 0;var e=34962;exports.ARRAY_BUFFER=e;var t=34963;exports.ELEMENT_ARRAY_BUFFER=t;var r=35040;exports.STREAM_DRAW=r;var o=35044;exports.STATIC_DRAW=o;var s=35048;exports.DYNAMIC_DRAW=s;var p=5121;exports.UNSIGNED_BYTE=p;var x=5123;exports.UNSIGNED_SHORT=x;var E=5125;exports.UNSIGNED_INT=E;var A=5126;exports.FLOAT=A;var R,n=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function _(e,t){for(var r=n.length,o=0;o<r;++o)try{var s=e.getContext(n[o],t);if(s)return s}catch(p){}return null}function a(){if(!R){var e=_(document.createElement("canvas"));e&&(R=e.getSupportedExtensions())}return R}
},{}],"zsRd":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getArrayClassForType=a,exports.default=exports.BufferUsage=void 0;var r=require("../webgl.js"),t=require("../asserts.js"),e={STATIC_DRAW:r.STATIC_DRAW,STREAM_DRAW:r.STREAM_DRAW,DYNAMIC_DRAW:r.DYNAMIC_DRAW};exports.BufferUsage=e;var o=function(){function o(o,a){this.array=null,this.type=o,(0,t.assert)(o===r.ARRAY_BUFFER||o===r.ELEMENT_ARRAY_BUFFER,62),this.usage=void 0!==a?a:e.STATIC_DRAW}return o.prototype.ofSize=function(r){this.array=new(a(this.type))(r)},o.prototype.fromArray=function(r){this.array=a(this.type).from(r)},o.prototype.fromArrayBuffer=function(r){this.array=new(a(this.type))(r)},o.prototype.getType=function(){return this.type},o.prototype.getArray=function(){return this.array},o.prototype.getUsage=function(){return this.usage},o.prototype.getSize=function(){return this.array?this.array.length:0},o}();function a(t){switch(t){case r.ARRAY_BUFFER:return Float32Array;case r.ELEMENT_ARRAY_BUFFER:return Uint32Array;default:return Float32Array}}var s=o;exports.default=s;
},{"../webgl.js":"SCyv","../asserts.js":"fLG6"}],"HqWy":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"};exports.default=e;
},{}],"glXL":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e="\n precision mediump float;\n \n attribute vec2 a_position;\n varying vec2 v_texCoord;\n varying vec2 v_screenCoord;\n \n uniform vec2 u_screenSize;\n \n void main() {\n v_texCoord = a_position * 0.5 + 0.5;\n v_screenCoord = v_texCoord * u_screenSize;\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n",r="\n precision mediump float;\n \n uniform sampler2D u_image;\n \n varying vec2 v_texCoord;\n \n void main() {\n gl_FragColor = texture2D(u_image, v_texCoord);\n }\n",t=function(){function t(t){this.gl_=t.webGlContext;var i=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=i.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=i.createFramebuffer();var a=i.createShader(i.VERTEX_SHADER);i.shaderSource(a,t.vertexShader||e),i.compileShader(a);var n=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(n,t.fragmentShader||r),i.compileShader(n),this.renderTargetProgram_=i.createProgram(),i.attachShader(this.renderTargetProgram_,a),i.attachShader(this.renderTargetProgram_,n),i.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),i.bufferData(i.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),i.STATIC_DRAW),this.renderTargetAttribLocation_=i.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=i.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetTextureLocation_=i.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach(function(e){this.uniforms_.push({value:t.uniforms[e],location:i.getUniformLocation(this.renderTargetProgram_,e)})}.bind(this))}return t.prototype.getGL=function(){return this.gl_},t.prototype.init=function(e){var r=this.getGL(),t=[r.drawingBufferWidth*this.scaleRatio_,r.drawingBufferHeight*this.scaleRatio_];if(r.bindFramebuffer(r.FRAMEBUFFER,this.getFrameBuffer()),r.viewport(0,0,t[0],t[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==t[0]||this.renderTargetTextureSize_[1]!==t[1]){this.renderTargetTextureSize_=t;var i=r.RGBA,a=r.RGBA,n=r.UNSIGNED_BYTE;r.bindTexture(r.TEXTURE_2D,this.renderTargetTexture_),r.texImage2D(r.TEXTURE_2D,0,i,t[0],t[1],0,a,n,null),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,this.renderTargetTexture_,0)}},t.prototype.apply=function(e,r){var t=this.getGL(),i=e.size;t.bindFramebuffer(t.FRAMEBUFFER,r?r.getFrameBuffer():null),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,this.renderTargetTexture_),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),t.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight),t.bindBuffer(t.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),t.useProgram(this.renderTargetProgram_),t.enableVertexAttribArray(this.renderTargetAttribLocation_),t.vertexAttribPointer(this.renderTargetAttribLocation_,2,t.FLOAT,!1,0,0),t.uniform2f(this.renderTargetUniformLocation_,i[0],i[1]),t.uniform1i(this.renderTargetTextureLocation_,0),this.applyUniforms(e),t.drawArrays(t.TRIANGLES,0,6)},t.prototype.getFrameBuffer=function(){return this.frameBuffer_},t.prototype.applyUniforms=function(e){var r,t=this.getGL(),i=1;this.uniforms_.forEach(function(a){if((r="function"==typeof a.value?a.value(e):a.value)instanceof HTMLCanvasElement||r instanceof ImageData)a.texture||(a.texture=t.createTexture()),t.activeTexture(t["TEXTURE"+i]),t.bindTexture(t.TEXTURE_2D,a.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),r instanceof ImageData?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,r.width,r.height,0,t.UNSIGNED_BYTE,new Uint8Array(r.data)):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,r),t.uniform1i(a.location,i++);else if(Array.isArray(r))switch(r.length){case 2:return void t.uniform2f(a.location,r[0],r[1]);case 3:return void t.uniform3f(a.location,r[0],r[1],r[2]);case 4:return void t.uniform4f(a.location,r[0],r[1],r[2],r[3]);default:return}else"number"==typeof r&&t.uniform1f(a.location,r)})},t}(),i=t;exports.default=i;
},{}],"UkOi":[function(require,module,exports) {
"use strict";function e(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r(e,r){return e[0]=r[0],e[1]=r[1],e[4]=r[2],e[5]=r[3],e[12]=r[4],e[13]=r[5],e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.create=e,exports.fromTransform=r;
},{}],"w1WE":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.computeAttributesStride=m,exports.default=exports.AttributeType=exports.DefaultUniform=exports.ShaderType=void 0;var e=_(require("../webgl/ContextEventType.js")),t=_(require("../Disposable.js")),r=_(require("./PostProcessingPass.js")),o=require("../webgl.js"),a=require("../asserts.js"),i=require("../obj.js"),n=require("../transform.js"),s=require("../vec/mat4.js"),u=require("../util.js"),f=require("../array.js");function _(e){return e&&e.__esModule?e:{default:e}}var c=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),l={FRAGMENT_SHADER:35632,VERTEX_SHADER:35633};exports.ShaderType=l;var E={PROJECTION_MATRIX:"u_projectionMatrix",OFFSET_SCALE_MATRIX:"u_offsetScaleMatrix",OFFSET_ROTATION_MATRIX:"u_offsetRotateMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution"};exports.DefaultUniform=E;var p={UNSIGNED_BYTE:o.UNSIGNED_BYTE,UNSIGNED_SHORT:o.UNSIGNED_SHORT,UNSIGNED_INT:o.UNSIGNED_INT,FLOAT:o.FLOAT};exports.AttributeType=p;var h=function(t){function _(i){var u=t.call(this)||this,_=i||{};u.boundHandleWebGLContextLost_=u.handleWebGLContextLost.bind(u),u.boundHandleWebGLContextRestored_=u.handleWebGLContextRestored.bind(u),u.canvas_=document.createElement("canvas"),u.canvas_.style.position="absolute",u.canvas_.style.left="0",u.gl_=(0,o.getContext)(u.canvas_);var c=u.getGL();if(u.bufferCache_={},u.currentProgram_=null,(0,a.assert)((0,f.includes)((0,o.getSupportedExtensions)(),"OES_element_index_uint"),63),c.getExtension("OES_element_index_uint"),u.canvas_.addEventListener(e.default.LOST,u.boundHandleWebGLContextLost_),u.canvas_.addEventListener(e.default.RESTORED,u.boundHandleWebGLContextRestored_),u.offsetRotateMatrix_=(0,n.create)(),u.offsetScaleMatrix_=(0,n.create)(),u.tmpMat4_=(0,s.create)(),u.uniformLocations_={},u.attribLocations_={},u.uniforms_=[],_.uniforms)for(var l in _.uniforms)u.uniforms_.push({name:l,value:_.uniforms[l]});return u.postProcessPasses_=_.postProcesses?_.postProcesses.map(function(e){return new r.default({webGlContext:c,scaleRatio:e.scaleRatio,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms})}):[new r.default({webGlContext:c})],u.shaderCompileErrors_=null,u.startTime_=Date.now(),u}return c(_,t),_.prototype.bindBuffer=function(e){var t=this.getGL(),r=(0,u.getUid)(e),o=this.bufferCache_[r];o||(o={buffer:e,webGlBuffer:t.createBuffer()},this.bufferCache_[r]=o);t.bindBuffer(e.getType(),o.webGlBuffer)},_.prototype.flushBufferData=function(e){var t=this.getGL();this.bindBuffer(e),t.bufferData(e.getType(),e.getArray(),e.getUsage())},_.prototype.deleteBuffer=function(e){var t=this.getGL(),r=(0,u.getUid)(e),o=this.bufferCache_[r];t.isContextLost()||t.deleteBuffer(o.buffer),delete this.bufferCache_[r]},_.prototype.disposeInternal=function(){this.canvas_.removeEventListener(e.default.LOST,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(e.default.RESTORED,this.boundHandleWebGLContextRestored_)},_.prototype.prepareDraw=function(e){var t=this.getGL(),r=this.getCanvas(),o=e.size,a=e.pixelRatio;r.width=o[0]*a,r.height=o[1]*a,r.style.width=o[0]+"px",r.style.height=o[1]+"px",t.useProgram(this.currentProgram_);for(var i=this.postProcessPasses_.length-1;i>=0;i--)this.postProcessPasses_[i].init(e);t.bindTexture(t.TEXTURE_2D,null),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),t.useProgram(this.currentProgram_),this.applyFrameState(e),this.applyUniforms(e)},_.prototype.prepareDrawToRenderTarget=function(e,t,r){var o=this.getGL(),a=t.getSize();o.bindFramebuffer(o.FRAMEBUFFER,t.getFramebuffer()),o.viewport(0,0,a[0],a[1]),o.bindTexture(o.TEXTURE_2D,t.getTexture()),o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT),o.enable(o.BLEND),o.blendFunc(o.ONE,r?o.ZERO:o.ONE_MINUS_SRC_ALPHA),o.useProgram(this.currentProgram_),this.applyFrameState(e),this.applyUniforms(e)},_.prototype.drawElements=function(e,t){var r=this.getGL(),o=r.UNSIGNED_INT,a=t-e,i=4*e;r.drawElements(r.TRIANGLES,a,o,i)},_.prototype.finalizeDraw=function(e){for(var t=0;t<this.postProcessPasses_.length;t++)this.postProcessPasses_[t].apply(e,this.postProcessPasses_[t+1]||null)},_.prototype.getCanvas=function(){return this.canvas_},_.prototype.getGL=function(){return this.gl_},_.prototype.applyFrameState=function(e){var t=e.size,r=e.viewState.rotation,o=(0,n.reset)(this.offsetScaleMatrix_);(0,n.scale)(o,2/t[0],2/t[1]);var a=(0,n.reset)(this.offsetRotateMatrix_);0!==r&&(0,n.rotate)(a,-r),this.setUniformMatrixValue(E.OFFSET_SCALE_MATRIX,(0,s.fromTransform)(this.tmpMat4_,o)),this.setUniformMatrixValue(E.OFFSET_ROTATION_MATRIX,(0,s.fromTransform)(this.tmpMat4_,a)),this.setUniformFloatValue(E.TIME,.001*(Date.now()-this.startTime_)),this.setUniformFloatValue(E.ZOOM,e.viewState.zoom),this.setUniformFloatValue(E.RESOLUTION,e.viewState.resolution)},_.prototype.applyUniforms=function(e){var t,r=this.getGL(),o=0;this.uniforms_.forEach(function(a){if((t="function"==typeof a.value?a.value(e):a.value)instanceof HTMLCanvasElement||t instanceof HTMLImageElement||t instanceof ImageData)a.texture||(a.prevValue=void 0,a.texture=r.createTexture()),r.activeTexture(r["TEXTURE"+o]),r.bindTexture(r.TEXTURE_2D,a.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),(!(t instanceof HTMLImageElement)||t.complete)&&a.prevValue!==t&&(a.prevValue=t,r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t)),r.uniform1i(this.getUniformLocation(a.name),o++);else if(Array.isArray(t)&&6===t.length)this.setUniformMatrixValue(a.name,(0,s.fromTransform)(this.tmpMat4_,t));else if(Array.isArray(t)&&t.length<=4)switch(t.length){case 2:return void r.uniform2f(this.getUniformLocation(a.name),t[0],t[1]);case 3:return void r.uniform3f(this.getUniformLocation(a.name),t[0],t[1],t[2]);case 4:return void r.uniform4f(this.getUniformLocation(a.name),t[0],t[1],t[2],t[3]);default:return}else"number"==typeof t&&r.uniform1f(this.getUniformLocation(a.name),t)}.bind(this))},_.prototype.useProgram=function(e){return e!=this.currentProgram_&&(this.getGL().useProgram(e),this.currentProgram_=e,this.uniformLocations_={},this.attribLocations_={},!0)},_.prototype.compileShader=function(e,t){var r=this.getGL(),o=r.createShader(t);return r.shaderSource(o,e),r.compileShader(o),o},_.prototype.getProgram=function(e,t){var r=this.getGL(),o=this.compileShader(e,r.FRAGMENT_SHADER),a=this.compileShader(t,r.VERTEX_SHADER);this.shaderCompileErrors_=null,r.getShaderInfoLog(o)&&(this.shaderCompileErrors_="Fragment shader compilation failed:\n"+r.getShaderInfoLog(o)),r.getShaderInfoLog(a)&&(this.shaderCompileErrors_=(this.shaderCompileErrors_||"")+"Vertex shader compilation failed:\n"+r.getShaderInfoLog(a));var i=r.createProgram();return r.attachShader(i,o),r.attachShader(i,a),r.linkProgram(i),i},_.prototype.getShaderCompileErrors=function(){return this.shaderCompileErrors_},_.prototype.getUniformLocation=function(e){return void 0===this.uniformLocations_[e]&&(this.uniformLocations_[e]=this.getGL().getUniformLocation(this.currentProgram_,e)),this.uniformLocations_[e]},_.prototype.getAttributeLocation=function(e){return void 0===this.attribLocations_[e]&&(this.attribLocations_[e]=this.getGL().getAttribLocation(this.currentProgram_,e)),this.attribLocations_[e]},_.prototype.makeProjectionTransform=function(e,t){var r=e.size,o=e.viewState.rotation,a=e.viewState.resolution,i=e.viewState.center;return(0,n.reset)(t),(0,n.compose)(t,0,0,2/(a*r[0]),2/(a*r[1]),-o,-i[0],-i[1]),t},_.prototype.setUniformFloatValue=function(e,t){this.getGL().uniform1f(this.getUniformLocation(e),t)},_.prototype.setUniformMatrixValue=function(e,t){this.getGL().uniformMatrix4fv(this.getUniformLocation(e),!1,t)},_.prototype.enableAttributeArray_=function(e,t,r,o,a){var i=this.getAttributeLocation(e);i<0||(this.getGL().enableVertexAttribArray(i),this.getGL().vertexAttribPointer(i,t,r,!1,o,a))},_.prototype.enableAttributes=function(e){for(var t=m(e),r=0,a=0;a<e.length;a++){var i=e[a];this.enableAttributeArray_(i.name,i.size,i.type||o.FLOAT,t,r),r+=i.size*T(i.type)}},_.prototype.handleWebGLContextLost=function(){(0,i.clear)(this.bufferCache_),this.currentProgram_=null},_.prototype.handleWebGLContextRestored=function(){},_.prototype.createTexture=function(e,t,r){var o=this.getGL(),a=r||o.createTexture(),i=o.RGBA,n=o.RGBA,s=o.UNSIGNED_BYTE;return o.bindTexture(o.TEXTURE_2D,a),t?o.texImage2D(o.TEXTURE_2D,0,i,n,s,t):o.texImage2D(o.TEXTURE_2D,0,i,e[0],e[1],0,n,s,null),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),a},_}(t.default);function m(e){for(var t=0,r=0;r<e.length;r++){var o=e[r];t+=o.size*T(o.type)}return t}function T(e){switch(e){case p.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case p.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case p.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case p.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var d=h;exports.default=d;
},{"../webgl/ContextEventType.js":"HqWy","../Disposable.js":"DDda","./PostProcessingPass.js":"glXL","../webgl.js":"SCyv","../asserts.js":"fLG6","../obj.js":"mH6q","../transform.js":"P4eA","../vec/mat4.js":"UkOi","../util.js":"KniQ","../array.js":"luEr"}],"nUxs":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.writePointFeatureToBuffers=c,exports.getBlankImageData=d,exports.colorEncodeId=f,exports.colorDecodeId=h,exports.default=exports.WebGLWorkerMessageType=void 0;var e=n(require("../Layer.js")),t=n(require("../../render/Event.js")),r=n(require("../../render/EventType.js")),o=n(require("../../webgl/Helper.js"));function n(e){return e&&e.__esModule?e:{default:e}}var a=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),s={GENERATE_BUFFERS:"GENERATE_BUFFERS"};exports.WebGLWorkerMessageType=s;var i=function(e){function n(t,r){var n=e.call(this,t)||this,a=r||{};return n.helper=new o.default({postProcesses:a.postProcesses,uniforms:a.uniforms}),void 0!==a.className&&(n.helper.getCanvas().className=a.className),n}return a(n,e),n.prototype.disposeInternal=function(){this.helper.dispose(),e.prototype.disposeInternal.call(this)},n.prototype.getShaderCompileErrors=function(){return this.helper.getShaderCompileErrors()},n.prototype.dispatchRenderEvent_=function(e,r){var o=this.getLayer();if(o.hasListener(e)){var n=new t.default(e,null,r,null);o.dispatchEvent(n)}},n.prototype.preRender=function(e){this.dispatchRenderEvent_(r.default.PRERENDER,e)},n.prototype.postRender=function(e){this.dispatchRenderEvent_(r.default.POSTRENDER,e)},n}(e.default),u=[],p={vertexPosition:0,indexPosition:0};function l(e,t,r,o,n){e[t+0]=r,e[t+1]=o,e[t+2]=n}function c(e,t,r,o,n,a){var s=3+n,i=e[t+0],c=e[t+1],d=u;d.length=n;for(var f=0;f<d.length;f++)d[f]=e[t+2+f];var h=a?a.vertexPosition:0,v=a?a.indexPosition:0,E=h/s;return l(r,h,i,c,0),d.length&&r.set(d,h+3),l(r,h+=s,i,c,1),d.length&&r.set(d,h+3),l(r,h+=s,i,c,2),d.length&&r.set(d,h+3),l(r,h+=s,i,c,3),d.length&&r.set(d,h+3),h+=s,o[v++]=E,o[v++]=E+1,o[v++]=E+3,o[v++]=E+1,o[v++]=E+2,o[v++]=E+3,p.vertexPosition=h,p.indexPosition=v,p}function d(){var e=document.createElement("canvas").getContext("2d").createImageData(1,1);return e.data[0]=255,e.data[1]=255,e.data[2]=255,e.data[3]=255,e}function f(e,t){var r=t||[];return r[0]=Math.floor(e/256/256/256)/255,r[1]=Math.floor(e/256/256)%256/255,r[2]=Math.floor(e/256)%256/255,r[3]=e%256/255,r}function h(e){var t=0;return t+=Math.round(256*e[0]*256*256*255),t+=Math.round(256*e[1]*256*255),t+=Math.round(256*e[2]*255),t+=Math.round(255*e[3])}var v=i;exports.default=v;
},{"../Layer.js":"fpOz","../../render/Event.js":"EB6P","../../render/EventType.js":"z39m","../../webgl/Helper.js":"w1WE"}],"KkPv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../array.js"),e=new Uint8Array(4),r=function(){function r(t,e){this.helper_=t;var r=t.getGL();this.texture_=r.createTexture(),this.framebuffer_=r.createFramebuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}return r.prototype.setSize=function(e){(0,t.equals)(e,this.size_)||(this.size_[0]=e[0],this.size_[1]=e[1],this.updateSize_())},r.prototype.getSize=function(){return this.size_},r.prototype.clearCachedData=function(){this.dataCacheDirty_=!0},r.prototype.readAll=function(){if(this.dataCacheDirty_){var t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_},r.prototype.readPixel=function(t,r){if(t<0||r<0||t>this.size_[0]||r>=this.size_[1])return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e;this.readAll();var i=Math.floor(t)+(this.size_[1]-Math.floor(r)-1)*this.size_[0];return e[0]=this.data_[4*i],e[1]=this.data_[4*i+1],e[2]=this.data_[4*i+2],e[3]=this.data_[4*i+3],e},r.prototype.getTexture=function(){return this.texture_},r.prototype.getFramebuffer=function(){return this.framebuffer_},r.prototype.updateSize_=function(){var t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(t[0]*t[1]*4)},r}(),i=r;exports.default=i;
},{"../array.js":"luEr"}],"z0A1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.create=n;var e='var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n="GENERATE_BUFFERS",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,u){var a=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=u?u.vertexPosition:0,h=u?u.indexPosition:0,d=b/a;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=a,l,v,1),c.length&&i.set(c,b+3),o(i,b+=a,l,v,2),c.length&&i.set(c,b+3),o(i,b+=a,l,v,3),c.length&&i.set(c,b+3),b+=a,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o=r.customAttributesCount,s=2+o,u=new Float32Array(r.renderInstructions),a=u.length/s,l=4*a*(o+3),v=new Uint32Array(6*a),c=new Float32Array(l),g=null,b=0;b<u.length;b+=s)g=i(u,b,c,v,o,g);var h=e({vertexBuffer:c.buffer,indexBuffer:v.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[c.buffer,v.buffer,u.buffer])}};',r=new Blob([e],{type:"application/javascript"}),t=URL.createObjectURL(r);function n(){return new Worker(t)}
},{}],"m8cI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=g(require("../../layer/BaseVector.js")),t=g(require("../../geom/GeometryType.js")),r=g(require("../../source/VectorEventType.js")),i=g(require("../../ViewHint.js")),s=g(require("../../webgl/Buffer.js")),n=y(require("./Layer.js")),o=g(require("../../webgl/RenderTarget.js")),a=require("../../webgl.js"),u=require("../../webgl/Helper.js"),h=require("../../transform.js"),f=require("../../asserts.js"),c=require("../../extent.js"),l=require("../../worker/webgl.js"),d=require("../../util.js"),p=require("../../events.js");function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var n=i?Object.getOwnPropertyDescriptor(e,s):null;n&&(n.get||n.set)?Object.defineProperty(r,s,n):r[s]=e[s]}return r.default=e,t&&t.set(e,r),r}function g(e){return e&&e.__esModule?e:{default:e}}var m=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),b=function(_){function y(e,t){var i=this,f=t.uniforms||{},y=(0,h.create)();f[u.DefaultUniform.PROJECTION_MATRIX]=y,(i=_.call(this,e,{className:t.className,uniforms:f,postProcesses:t.postProcesses})||this).sourceRevision_=-1,i.verticesBuffer_=new s.default(a.ARRAY_BUFFER,a.DYNAMIC_DRAW),i.hitVerticesBuffer_=new s.default(a.ARRAY_BUFFER,a.DYNAMIC_DRAW),i.indicesBuffer_=new s.default(a.ELEMENT_ARRAY_BUFFER,a.DYNAMIC_DRAW),i.program_=i.helper.getProgram(t.fragmentShader,t.vertexShader),i.hitDetectionEnabled_=!(!t.hitFragmentShader||!t.hitVertexShader),i.hitProgram_=i.hitDetectionEnabled_&&i.helper.getProgram(t.hitFragmentShader,t.hitVertexShader);var g=t.attributes?t.attributes.map(function(e){return{name:"a_"+e.name,size:1,type:u.AttributeType.FLOAT}}):[];i.attributes=[{name:"a_position",size:2,type:u.AttributeType.FLOAT},{name:"a_index",size:1,type:u.AttributeType.FLOAT}].concat(g),i.hitDetectionAttributes=[{name:"a_position",size:2,type:u.AttributeType.FLOAT},{name:"a_index",size:1,type:u.AttributeType.FLOAT},{name:"a_hitColor",size:4,type:u.AttributeType.FLOAT},{name:"a_featureUid",size:1,type:u.AttributeType.FLOAT}].concat(g),i.customAttributes=t.attributes?t.attributes:[],i.previousExtent_=(0,c.createEmpty)(),i.currentTransform_=y,i.renderTransform_=(0,h.create)(),i.invertRenderTransform_=(0,h.create)(),i.renderInstructions_=new Float32Array(0),i.hitRenderInstructions_=new Float32Array(0),i.hitRenderTarget_=i.hitDetectionEnabled_&&new o.default(i.helper),i.worker_=(0,l.create)(),i.worker_.addEventListener("message",function(e){var t=e.data;if(t.type===n.WebGLWorkerMessageType.GENERATE_BUFFERS){var r=t.projectionTransform;t.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(t.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(t.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(t.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=r,(0,h.makeInverse)(this.invertRenderTransform_,this.renderTransform_),t.hitDetection?this.hitRenderInstructions_=new Float32Array(e.data.renderInstructions):this.renderInstructions_=new Float32Array(e.data.renderInstructions),this.getLayer().changed()}}.bind(i)),i.featureCache_={},i.featureCount_=0;var m=i.getLayer().getSource();return i.sourceListenKeys_=[(0,p.listen)(m,r.default.ADDFEATURE,i.handleSourceFeatureAdded_,i),(0,p.listen)(m,r.default.CHANGEFEATURE,i.handleSourceFeatureChanged_,i),(0,p.listen)(m,r.default.REMOVEFEATURE,i.handleSourceFeatureDelete_,i),(0,p.listen)(m,r.default.CLEAR,i.handleSourceFeatureClear_,i)],m.forEachFeature(function(e){this.featureCache_[(0,d.getUid)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++}.bind(i)),i}return m(y,_),y.prototype.handleSourceFeatureAdded_=function(e){var t=e.feature;this.featureCache_[(0,d.getUid)(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++},y.prototype.handleSourceFeatureChanged_=function(e){var t=e.feature;this.featureCache_[(0,d.getUid)(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()}},y.prototype.handleSourceFeatureDelete_=function(e){var t=e.feature;delete this.featureCache_[(0,d.getUid)(t)],this.featureCount_--},y.prototype.handleSourceFeatureClear_=function(){this.featureCache_={},this.featureCount_=0},y.prototype.renderFrame=function(e){this.preRender(e);var t=this.indicesBuffer_.getSize();this.helper.drawElements(0,t),this.helper.finalizeDraw(e);var r=this.helper.getCanvas(),i=e.layerStatesArray[e.layerIndex].opacity;return i!==parseFloat(r.style.opacity)&&(r.style.opacity=String(i)),this.hitDetectionEnabled_&&(this.renderHitDetection(e),this.hitRenderTarget_.clearCachedData()),this.postRender(e),r},y.prototype.prepareFrame=function(t){var r=this.getLayer(),s=r.getSource(),n=t.viewState,o=!t.viewHints[i.default.ANIMATING]&&!t.viewHints[i.default.INTERACTING],a=!(0,c.equals)(this.previousExtent_,t.extent),u=this.sourceRevision_<s.getRevision();if(u&&(this.sourceRevision_=s.getRevision()),o&&(a||u)){var f=n.projection,l=n.resolution,d=r instanceof e.default?r.getRenderBuffer():0,p=(0,c.buffer)(t.extent,d*l);s.loadFeatures(p,l,f),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),(0,h.multiply)(this.currentTransform_,this.invertRenderTransform_),this.helper.useProgram(this.program_),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0},y.prototype.rebuildBuffers_=function(e){var r=(0,h.create)();this.helper.makeProjectionTransform(e,r);var i,s,o=(2+this.customAttributes.length)*this.featureCount_;if(this.renderInstructions_&&this.renderInstructions_.length===o||(this.renderInstructions_=new Float32Array(o)),this.hitDetectionEnabled_){var a=(7+this.customAttributes.length)*this.featureCount_;this.hitRenderInstructions_&&this.hitRenderInstructions_.length===a||(this.hitRenderInstructions_=new Float32Array(a))}var u,f=[],c=[],l=0,d=0;for(var p in this.featureCache_)if((s=(i=this.featureCache_[p]).geometry)&&s.getType()===t.default.POINT){f[0]=s.getFlatCoordinates()[0],f[1]=s.getFlatCoordinates()[1],(0,h.apply)(r,f),u=(0,n.colorEncodeId)(d+6,c),this.renderInstructions_[l++]=f[0],this.renderInstructions_[l++]=f[1],this.hitDetectionEnabled_&&(this.hitRenderInstructions_[d++]=f[0],this.hitRenderInstructions_[d++]=f[1],this.hitRenderInstructions_[d++]=u[0],this.hitRenderInstructions_[d++]=u[1],this.hitRenderInstructions_[d++]=u[2],this.hitRenderInstructions_[d++]=u[3],this.hitRenderInstructions_[d++]=Number(p));for(var _=void 0,y=0;y<this.customAttributes.length;y++)_=this.customAttributes[y].callback(i.feature,i.properties),this.renderInstructions_[l++]=_,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[d++]=_)}var g={type:n.WebGLWorkerMessageType.GENERATE_BUFFERS,renderInstructions:this.renderInstructions_.buffer,customAttributesCount:this.customAttributes.length};if(g.projectionTransform=r,this.worker_.postMessage(g,[this.renderInstructions_.buffer]),this.renderInstructions_=null,this.hitDetectionEnabled_){var m={type:n.WebGLWorkerMessageType.GENERATE_BUFFERS,renderInstructions:this.hitRenderInstructions_.buffer,customAttributesCount:5+this.customAttributes.length};m.projectionTransform=r,m.hitDetection=!0,this.worker_.postMessage(m,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},y.prototype.forEachFeatureAtCoordinate=function(e,t,r,i,s){if((0,f.assert)(this.hitDetectionEnabled_,66),this.hitRenderInstructions_){var o=(0,h.apply)(t.coordinateToPixelTransform,e.slice()),a=this.hitRenderTarget_.readPixel(o[0]/2,o[1]/2),u=[a[0]/255,a[1]/255,a[2]/255,a[3]/255],c=(0,n.colorDecodeId)(u),l=this.hitRenderInstructions_[c],d=Math.floor(l).toString(),p=this.getLayer().getSource().getFeatureByUid(d);return p?i(p,this.getLayer(),null):void 0}},y.prototype.renderHitDetection=function(e){if(this.hitVerticesBuffer_.getSize()){this.hitRenderTarget_.setSize([Math.floor(e.size[0]/2),Math.floor(e.size[1]/2)]),this.helper.useProgram(this.hitProgram_),this.helper.prepareDrawToRenderTarget(e,this.hitRenderTarget_,!0),this.helper.bindBuffer(this.hitVerticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.hitDetectionAttributes);var t=this.indicesBuffer_.getSize();this.helper.drawElements(0,t)}},y.prototype.disposeInternal=function(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach(function(e){(0,p.unlistenByKey)(e)}),this.sourceListenKeys_=null,_.prototype.disposeInternal.call(this)},y}(n.default),A=b;exports.default=A;
},{"../../layer/BaseVector.js":"pskK","../../geom/GeometryType.js":"lmV0","../../source/VectorEventType.js":"s8Fc","../../ViewHint.js":"cuLW","../../webgl/Buffer.js":"zsRd","./Layer.js":"nUxs","../../webgl/RenderTarget.js":"KkPv","../../webgl.js":"SCyv","../../webgl/Helper.js":"w1WE","../../transform.js":"P4eA","../../asserts.js":"fLG6","../../extent.js":"QDir","../../worker/webgl.js":"z0A1","../../util.js":"KniQ","../../events.js":"UqnM"}],"I4BI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=a(require("./Vector.js")),e=a(require("../renderer/webgl/PointsLayer.js")),n=require("../obj.js"),o=require("../math.js"),r=require("../dom.js"),i=require("../Object.js");function a(t){return t&&t.__esModule?t:{default:t}}var u=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),s={BLUR:"blur",GRADIENT:"gradient",RADIUS:"radius"},f=["#00f","#0ff","#0f0","#ff0","#f00"],l=function(t){function r(e){var o=this,r=e||{},a=(0,n.assign)({},r);delete a.gradient,delete a.radius,delete a.blur,delete a.weight,(o=t.call(this,a)||this).gradient_=null,o.addEventListener((0,i.getChangeEventType)(s.GRADIENT),o.handleGradientChanged_),o.setGradient(r.gradient?r.gradient:f),o.setBlur(void 0!==r.blur?r.blur:15),o.setRadius(void 0!==r.radius?r.radius:8);var u=r.weight?r.weight:"weight";return o.weightFunction_="string"==typeof u?function(t){return t.get(u)}:u,o.setRenderOrder(null),o}return u(r,t),r.prototype.getBlur=function(){return this.get(s.BLUR)},r.prototype.getGradient=function(){return this.get(s.GRADIENT)},r.prototype.getRadius=function(){return this.get(s.RADIUS)},r.prototype.handleGradientChanged_=function(){this.gradient_=d(this.getGradient())},r.prototype.setBlur=function(t){this.set(s.BLUR,t)},r.prototype.setGradient=function(t){this.set(s.GRADIENT,t)},r.prototype.setRadius=function(t){this.set(s.RADIUS,t)},r.prototype.createRenderer=function(){return new e.default(this,{className:this.getClassName(),attributes:[{name:"weight",callback:function(t){var e=this.weightFunction_(t);return void 0!==e?(0,o.clamp)(e,0,1):1}.bind(this)}],vertexShader:"\n precision mediump float;\n uniform mat4 u_projectionMatrix;\n uniform mat4 u_offsetScaleMatrix;\n uniform float u_size;\n attribute vec2 a_position;\n attribute float a_index;\n attribute float a_weight;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n\n void main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n v_texCoord = vec2(u, v);\n v_weight = a_weight;\n }",fragmentShader:"\n precision mediump float;\n uniform float u_blurSlope;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n\n void main(void) {\n vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n gl_FragColor = vec4(alpha, alpha, alpha, alpha);\n }",hitVertexShader:"\n precision mediump float;\n uniform mat4 u_projectionMatrix;\n uniform mat4 u_offsetScaleMatrix;\n uniform float u_size;\n attribute vec2 a_position;\n attribute float a_index;\n attribute float a_weight;\n attribute vec4 a_hitColor;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n varying vec4 v_hitColor;\n\n void main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n v_texCoord = vec2(u, v);\n v_hitColor = a_hitColor;\n v_weight = a_weight;\n }",hitFragmentShader:"\n precision mediump float;\n uniform float u_blurSlope;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n varying vec4 v_hitColor;\n\n void main(void) {\n vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n if (alpha < 0.05) {\n discard;\n }\n\n gl_FragColor = v_hitColor;\n }",uniforms:{u_size:function(){return 2*(this.get(s.RADIUS)+this.get(s.BLUR))}.bind(this),u_blurSlope:function(){return this.get(s.RADIUS)/Math.max(1,this.get(s.BLUR))}.bind(this)},postProcesses:[{fragmentShader:"\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform sampler2D u_gradientTexture;\n\n varying vec2 v_texCoord;\n\n void main() {\n vec4 color = texture2D(u_image, v_texCoord);\n gl_FragColor.a = color.a;\n gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n gl_FragColor.rgb *= gl_FragColor.a;\n }",uniforms:{u_gradientTexture:function(){return this.gradient_}.bind(this)}}]})},r.prototype.renderDeclutter=function(){},r}(t.default);function d(t){for(var e=(0,r.createCanvasContext2D)(1,256),n=e.createLinearGradient(0,0,1,256),o=1/(t.length-1),i=0,a=t.length;i<a;++i)n.addColorStop(i*o,t[i]);return e.fillStyle=n,e.fillRect(0,0,1,256),e.canvas}var _=l;exports.default=_;
},{"./Vector.js":"dflx","../renderer/webgl/PointsLayer.js":"m8cI","../obj.js":"mH6q","../math.js":"B96G","../dom.js":"Xno5","../Object.js":"PhPh"}],"ZHEI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("./Layer.js"));function e(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),o=function(t){function e(e){var r=e||{};return t.call(this,r)||this}return r(e,t),e}(t.default),n=o;exports.default=n;
},{"./Layer.js":"GCgv"}],"fF5X":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ENABLE_RASTER_REPROJECTION=exports.ERROR_THRESHOLD=void 0;var R=.5;exports.ERROR_THRESHOLD=R;var E=!0;exports.ENABLE_RASTER_REPROJECTION=E;
},{}],"rzNj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=u(require("./Layer.js")),e=u(require("../../ViewHint.js")),r=require("../../reproj/common.js"),i=require("../../obj.js"),o=require("../../transform.js"),n=require("../../extent.js"),a=require("../../render/canvas.js"),s=require("../../proj.js");function u(t){return t&&t.__esModule?t:{default:t}}var h=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),c=function(t){function u(e){var r=t.call(this,e)||this;return r.image_=null,r}return h(u,t),u.prototype.getImage=function(){return this.image_?this.image_.getImage():null},u.prototype.prepareFrame=function(t){var i=t.layerStatesArray[t.layerIndex],o=t.pixelRatio,a=t.viewState,u=a.resolution,h=this.getLayer().getSource(),c=t.viewHints,l=t.extent;if(void 0!==i.extent&&(l=(0,n.getIntersection)(l,(0,s.fromUserExtent)(i.extent,a.projection))),!c[e.default.ANIMATING]&&!c[e.default.INTERACTING]&&!(0,n.isEmpty)(l))if(h){var p=a.projection;if(!r.ENABLE_RASTER_REPROJECTION){var f=h.getProjection();f&&(p=f)}var g=h.getImage(l,u,o,p);g&&this.loadImage(g)&&(this.image_=g)}else this.image_=null;return!!this.image_},u.prototype.renderFrame=function(t,e){var r=this.image_,u=r.getExtent(),h=r.getResolution(),c=r.getPixelRatio(),l=t.layerStatesArray[t.layerIndex],p=t.pixelRatio,f=t.viewState,g=f.center,d=f.resolution,m=t.size,x=p*h/(d*c),v=Math.round(m[0]*p),y=Math.round(m[1]*p),_=f.rotation;if(_){var j=Math.round(Math.sqrt(v*v+y*y));v=j,y=j}(0,o.compose)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/p,1/p,_,-v/2,-y/2),(0,o.makeInverse)(this.inversePixelTransform,this.pixelTransform);var I=(0,a.createTransformString)(this.pixelTransform);this.useContainer(e,I,l.opacity);var R=this.context,w=R.canvas;w.width!=v||w.height!=y?(w.width=v,w.height=y):this.containerReused||R.clearRect(0,0,v,y);var A=!1;if(l.extent){var E=(0,s.fromUserExtent)(l.extent,f.projection);(A=!(0,n.containsExtent)(E,t.extent)&&(0,n.intersects)(E,t.extent))&&this.clipUnrotated(R,t,E)}var M=r.getImage(),T=(0,o.compose)(this.tempTransform,v/2,y/2,x,x,0,c*(u[0]-g[0])/h,c*(g[1]-u[3])/h);this.renderedResolution=h*p/c;var q=T[4],O=T[5],b=M.width*T[0],S=M.height*T[3];if((0,i.assign)(R,this.getLayer().getSource().getContextOptions()),this.preRender(R,t),b>=.5&&S>=.5){var P=l.opacity,N=void 0;1!==P&&(N=this.context.globalAlpha,this.context.globalAlpha=P),this.context.drawImage(M,0,0,+M.width,+M.height,Math.round(q),Math.round(O),Math.round(b),Math.round(S)),1!==P&&(this.context.globalAlpha=N)}return this.postRender(R,t),A&&R.restore(),I!==w.style.transform&&(w.style.transform=I),this.container},u}(t.default),l=c;exports.default=l;
},{"./Layer.js":"vPfl","../../ViewHint.js":"cuLW","../../reproj/common.js":"fF5X","../../obj.js":"mH6q","../../transform.js":"P4eA","../../extent.js":"QDir","../../render/canvas.js":"iAG7","../../proj.js":"Diht"}],"KHBf":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("./BaseImage.js")),t=r(require("../renderer/canvas/ImageLayer.js"));function r(e){return e&&e.__esModule?e:{default:e}}var n=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),o=function(e){function r(t){return e.call(this,t)||this}return n(r,e),r.prototype.createRenderer=function(){return new t.default(this)},r}(e.default),u=o;exports.default=u;
},{"./BaseImage.js":"ZHEI","../renderer/canvas/ImageLayer.js":"rzNj"}],"Kylu":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.transformGeometryWithOptions=u,exports.transformExtentWithOptions=c,exports.default=void 0;var t=n(require("../proj/Units.js")),e=require("../util.js"),r=require("../obj.js"),o=require("../proj.js");function n(t){return t&&t.__esModule?t:{default:t}}var a=function(){function n(){this.dataProjection=null,this.defaultFeatureProjection=null}return n.prototype.getReadOptions=function(e,r){var n;if(r){var a=r.dataProjection?(0,o.get)(r.dataProjection):this.readProjection(e);r.extent&&a&&a.getUnits()===t.default.TILE_PIXELS&&(a=(0,o.get)(a)).setWorldExtent(r.extent),n={dataProjection:a,featureProjection:r.featureProjection}}return this.adaptOptions(n)},n.prototype.adaptOptions=function(t){return(0,r.assign)({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},n.prototype.getType=function(){return(0,e.abstract)()},n.prototype.readFeature=function(t,r){return(0,e.abstract)()},n.prototype.readFeatures=function(t,r){return(0,e.abstract)()},n.prototype.readGeometry=function(t,r){return(0,e.abstract)()},n.prototype.readProjection=function(t){return(0,e.abstract)()},n.prototype.writeFeature=function(t,r){return(0,e.abstract)()},n.prototype.writeFeatures=function(t,r){return(0,e.abstract)()},n.prototype.writeGeometry=function(t,r){return(0,e.abstract)()},n}(),i=a;function u(t,e,r){var n,a=r?(0,o.get)(r.featureProjection):null,i=r?(0,o.get)(r.dataProjection):null;if(n=a&&i&&!(0,o.equivalent)(a,i)?(e?t.clone():t).transform(e?a:i,e?i:a):t,e&&r&&void 0!==r.decimals){var u=Math.pow(10,r.decimals);n===t&&(n=t.clone()),n.applyTransform(function(t){for(var e=0,r=t.length;e<r;++e)t[e]=Math.round(t[e]*u)/u;return t})}return n}function c(t,e){var r=e?(0,o.get)(e.featureProjection):null,n=e?(0,o.get)(e.dataProjection):null;return r&&n&&!(0,o.equivalent)(r,n)?(0,o.transformExtent)(t,n,r):t}exports.default=i;
},{"../proj/Units.js":"yZx6","../util.js":"KniQ","../obj.js":"mH6q","../proj.js":"Diht"}],"Quj6":[function(require,module,exports) {
exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
},{}],"UzHN":[function(require,module,exports) {
"use strict";module.exports=i;var t=require("ieee754");function i(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var e=4294967296,r=1/e,s=12,n="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function o(t,i,e){var r,s,n=e.buf;if(r=(112&(s=n[e.pos++]))>>4,s<128)return a(t,r,i);if(r|=(127&(s=n[e.pos++]))<<3,s<128)return a(t,r,i);if(r|=(127&(s=n[e.pos++]))<<10,s<128)return a(t,r,i);if(r|=(127&(s=n[e.pos++]))<<17,s<128)return a(t,r,i);if(r|=(127&(s=n[e.pos++]))<<24,s<128)return a(t,r,i);if(r|=(1&(s=n[e.pos++]))<<31,s<128)return a(t,r,i);throw new Error("Expected varint not more than 10 bytes")}function h(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function a(t,i,e){return e?4294967296*i+(t>>>0):4294967296*(i>>>0)+(t>>>0)}function u(t,i){var e,r;if(t>=0?(e=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(e=~(-t%4294967296))?e=e+1|0:(e=0,r=r+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");i.realloc(10),f(e,r,i),d(r,i)}function f(t,i,e){e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos]=127&t}function d(t,i){var e=(7&t)<<4;i.buf[i.pos++]|=e|((t>>>=3)?128:0),t&&(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),t&&(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),t&&(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),t&&(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),t&&(i.buf[i.pos++]=127&t)))))}function p(t,i,e){var r=i<=16383?1:i<=2097151?2:i<=268435455?3:Math.floor(Math.log(i)/(7*Math.LN2));e.realloc(r);for(var s=e.pos-1;s>=t;s--)e.buf[s+r]=e.buf[s]}function l(t,i){for(var e=0;e<t.length;e++)i.writeVarint(t[e])}function c(t,i){for(var e=0;e<t.length;e++)i.writeSVarint(t[e])}function w(t,i){for(var e=0;e<t.length;e++)i.writeFloat(t[e])}function F(t,i){for(var e=0;e<t.length;e++)i.writeDouble(t[e])}function g(t,i){for(var e=0;e<t.length;e++)i.writeBoolean(t[e])}function b(t,i){for(var e=0;e<t.length;e++)i.writeFixed32(t[e])}function x(t,i){for(var e=0;e<t.length;e++)i.writeSFixed32(t[e])}function v(t,i){for(var e=0;e<t.length;e++)i.writeFixed64(t[e])}function y(t,i){for(var e=0;e<t.length;e++)i.writeSFixed64(t[e])}function V(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16)+16777216*t[i+3]}function S(t,i,e){t[e]=i,t[e+1]=i>>>8,t[e+2]=i>>>16,t[e+3]=i>>>24}function B(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16)+(t[i+3]<<24)}function k(t,i,e){for(var r="",s=i;s<e;){var n,o,h,a=t[s],u=null,f=a>239?4:a>223?3:a>191?2:1;if(s+f>e)break;1===f?a<128&&(u=a):2===f?128==(192&(n=t[s+1]))&&(u=(31&a)<<6|63&n)<=127&&(u=null):3===f?(n=t[s+1],o=t[s+2],128==(192&n)&&128==(192&o)&&((u=(15&a)<<12|(63&n)<<6|63&o)<=2047||u>=55296&&u<=57343)&&(u=null)):4===f&&(n=t[s+1],o=t[s+2],h=t[s+3],128==(192&n)&&128==(192&o)&&128==(192&h)&&((u=(15&a)<<18|(63&n)<<12|(63&o)<<6|63&h)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,f=1):u>65535&&(u-=65536,r+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),s+=f}return r}function M(t,i,e){return n.decode(t.subarray(i,e))}function P(t,i,e){for(var r,s,n=0;n<i.length;n++){if((r=i.charCodeAt(n))>55295&&r<57344){if(!s){r>56319||n+1===i.length?(t[e++]=239,t[e++]=191,t[e++]=189):s=r;continue}if(r<56320){t[e++]=239,t[e++]=191,t[e++]=189,s=r;continue}r=s-55296<<10|r-56320|65536,s=null}else s&&(t[e++]=239,t[e++]=191,t[e++]=189,s=null);r<128?t[e++]=r:(r<2048?t[e++]=r>>6|192:(r<65536?t[e++]=r>>12|224:(t[e++]=r>>18|240,t[e++]=r>>12&63|128),t[e++]=r>>6&63|128),t[e++]=63&r|128)}return e}i.prototype={destroy:function(){this.buf=null},readFields:function(t,i,e){for(e=e||this.length;this.pos<e;){var r=this.readVarint(),s=r>>3,n=this.pos;this.type=7&r,t(s,i,this),this.pos===n&&this.skip(r)}return i},readMessage:function(t,i){return this.readFields(t,i,this.readVarint()+this.pos)},readFixed32:function(){var t=V(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=B(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=V(this.buf,this.pos)+V(this.buf,this.pos+4)*e;return this.pos+=8,t},readSFixed64:function(){var t=V(this.buf,this.pos)+B(this.buf,this.pos+4)*e;return this.pos+=8,t},readFloat:function(){var i=t.read(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=t.read(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(t){var i,e,r=this.buf;return i=127&(e=r[this.pos++]),e<128?i:(i|=(127&(e=r[this.pos++]))<<7,e<128?i:(i|=(127&(e=r[this.pos++]))<<14,e<128?i:(i|=(127&(e=r[this.pos++]))<<21,e<128?i:o(i|=(15&(e=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,i=this.pos;return this.pos=t,t-i>=s&&n?M(this.buf,i,t):k(this.buf,i,t)},readBytes:function(){var t=this.readVarint()+this.pos,i=this.buf.subarray(this.pos,t);return this.pos=t,i},readPackedVarint:function(t,e){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var r=h(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==i.Bytes)return t.push(this.readSVarint());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==i.Bytes)return t.push(this.readBoolean());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==i.Bytes)return t.push(this.readFloat());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==i.Bytes)return t.push(this.readDouble());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed32());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed32());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed64());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed64());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===i.Varint)for(;this.buf[this.pos++]>127;);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,i){this.writeVarint(t<<3|i)},realloc:function(t){for(var i=this.length||16;i<this.pos+t;)i*=2;if(i!==this.length){var e=new Uint8Array(i);e.set(this.buf),this.buf=e,this.length=i}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),S(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),S(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),S(this.buf,-1&t,this.pos),S(this.buf,Math.floor(t*r),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),S(this.buf,-1&t,this.pos),S(this.buf,Math.floor(t*r),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?u(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var i=this.pos;this.pos=P(this.buf,t,this.pos);var e=this.pos-i;e>=128&&p(i,e,this),this.pos=i-1,this.writeVarint(e),this.pos+=e},writeFloat:function(i){this.realloc(4),t.write(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),t.write(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var i=t.length;this.writeVarint(i),this.realloc(i);for(var e=0;e<i;e++)this.buf[this.pos++]=t[e]},writeRawMessage:function(t,i){this.pos++;var e=this.pos;t(i,this);var r=this.pos-e;r>=128&&p(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,r){this.writeTag(t,i.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,i){i.length&&this.writeMessage(t,l,i)},writePackedSVarint:function(t,i){i.length&&this.writeMessage(t,c,i)},writePackedBoolean:function(t,i){i.length&&this.writeMessage(t,g,i)},writePackedFloat:function(t,i){i.length&&this.writeMessage(t,w,i)},writePackedDouble:function(t,i){i.length&&this.writeMessage(t,F,i)},writePackedFixed32:function(t,i){i.length&&this.writeMessage(t,b,i)},writePackedSFixed32:function(t,i){i.length&&this.writeMessage(t,x,i)},writePackedFixed64:function(t,i){i.length&&this.writeMessage(t,v,i)},writePackedSFixed64:function(t,i){i.length&&this.writeMessage(t,y,i)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,i){this.writeVarintField(t,Boolean(i))}};
},{"ieee754":"Quj6"}],"IFOM":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=f(require("../geom/GeometryType.js")),e=require("../transform.js"),r=require("../extent.js"),i=require("../array.js"),o=require("../geom/flat/interiorpoint.js"),n=require("../proj.js"),s=require("../geom/flat/interpolate.js"),a=require("../geom/flat/center.js"),p=require("../geom/flat/transform.js");function f(t){return t&&t.__esModule?t:{default:t}}var l=(0,e.create)(),d=function(){function f(t,e,r,i,o){this.extent_,this.id_=o,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=r,this.properties_=i}return f.prototype.get=function(t){return this.properties_[t]},f.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_===t.default.POINT?(0,r.createOrUpdateFromCoordinate)(this.flatCoordinates_):(0,r.createOrUpdateFromFlatCoordinates)(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},f.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var t=(0,r.getCenter)(this.getExtent());this.flatInteriorPoints_=(0,o.getInteriorPointOfArray)(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_},f.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var t=(0,a.linearRingss)(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=(0,o.getInteriorPointsOfMultiArray)(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_},f.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=(0,s.interpolatePoint)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},f.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var t=this.flatCoordinates_,e=0,r=this.ends_,o=0,n=r.length;o<n;++o){var a=r[o],p=(0,s.interpolatePoint)(t,e,a,2,.5);(0,i.extend)(this.flatMidpoints_,p),e=a}}return this.flatMidpoints_},f.prototype.getId=function(){return this.id_},f.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},f.prototype.getGeometry=function(){return this},f.prototype.getSimplifiedGeometry=function(t){return this},f.prototype.simplifyTransformed=function(t,e){return this},f.prototype.getProperties=function(){return this.properties_},f.prototype.getStride=function(){return 2},f.prototype.getStyleFunction=function(){},f.prototype.getType=function(){return this.type_},f.prototype.transform=function(t){var i=(t=(0,n.get)(t)).getExtent(),o=t.getWorldExtent();if(i&&o){var s=(0,r.getHeight)(o)/(0,r.getHeight)(i);(0,e.compose)(l,o[0],o[3],s,-s,0,0,0),(0,p.transform2D)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,l,this.flatCoordinates_)}},f.prototype.getEnds=function(){return this.ends_},f}();d.prototype.getEndss=d.prototype.getEnds,d.prototype.getFlatCoordinates=d.prototype.getOrientedFlatCoordinates;var u=d;exports.default=u;
},{"../geom/GeometryType.js":"lmV0","../transform.js":"P4eA","../extent.js":"QDir","../array.js":"luEr","../geom/flat/interiorpoint.js":"UDvN","../proj.js":"Diht","../geom/flat/interpolate.js":"rDTq","../geom/flat/center.js":"VjQP","../geom/flat/transform.js":"LGwr"}],"bjcz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=m(require("./Feature.js")),r=v(require("./FormatType.js")),t=v(require("../geom/GeometryLayout.js")),a=v(require("../geom/GeometryType.js")),n=v(require("../geom/LineString.js")),o=v(require("../geom/MultiLineString.js")),i=v(require("../geom/MultiPoint.js")),u=v(require("../geom/MultiPolygon.js")),s=v(require("pbf")),l=v(require("../geom/Point.js")),f=v(require("../geom/Polygon.js")),d=v(require("../proj/Projection.js")),p=v(require("../render/Feature.js")),y=v(require("../proj/Units.js")),c=require("../asserts.js"),_=require("../proj.js"),h=require("../geom/flat/orient.js");function v(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=g();if(r&&r.has(e))return r.get(e);var t={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=a?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(t,n,o):t[n]=e[n]}return t.default=e,r&&r.set(e,t),t}var j=function(){var e=function(r,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(r,t)};return function(r,t){function a(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}}(),P=function(v){function g(e){var r=v.call(this)||this,t=e||{};return r.dataProjection=new d.default({code:"",units:y.default.TILE_PIXELS}),r.featureClass_=t.featureClass?t.featureClass:p.default,r.geometryName_=t.geometryName,r.layerName_=t.layerName?t.layerName:"layer",r.layers_=t.layers?t.layers:null,r.idProperty_=t.idProperty,r}return j(g,v),g.prototype.readRawGeometry_=function(e,r,t,a){e.pos=r.geometry;for(var n=e.readVarint()+e.pos,o=1,i=0,u=0,s=0,l=0,f=0;e.pos<n;){if(!i){var d=e.readVarint();o=7&d,i=d>>3}i--,1===o||2===o?(u+=e.readSVarint(),s+=e.readSVarint(),1===o&&l>f&&(a.push(l),f=l),t.push(u,s),l+=2):7===o?l>f&&(t.push(t[f],t[f+1]),l+=2):(0,c.assert)(!1,59)}l>f&&(a.push(l),f=l)},g.prototype.createFeature_=function(r,s,d){var y,c=s.type;if(0===c)return null;var _,v=s.properties;this.idProperty_?(_=v[this.idProperty_],delete v[this.idProperty_]):_=s.id,v[this.layerName_]=s.layer.name;var g=[],m=[];this.readRawGeometry_(r,s,g,m);var j=V(c,m.length);if(this.featureClass_===p.default)(y=new this.featureClass_(j,g,m,v,_)).transform(d.dataProjection);else{var P=void 0;if(j==a.default.POLYGON){for(var O=[],N=0,w=0,I=0,q=m.length;I<q;++I){var L=m[I];if((0,h.linearRingIsClockwise)(g,N,L,2)){if(0===O.length)continue;O[O.length-1].push(m[w])}else O.push(m.slice(w,I+1));w=I+1,N=L}P=O.length>1?new u.default(g,t.default.XY,O):new f.default(g,t.default.XY,m)}else P=j===a.default.POINT?new l.default(g,t.default.XY):j===a.default.LINE_STRING?new n.default(g,t.default.XY):j===a.default.POLYGON?new f.default(g,t.default.XY,m):j===a.default.MULTI_POINT?new i.default(g,t.default.XY):j===a.default.MULTI_LINE_STRING?new o.default(g,t.default.XY,m):null;y=new(0,this.featureClass_),this.geometryName_&&y.setGeometryName(this.geometryName_);var T=(0,e.transformGeometryWithOptions)(P,!1,d);y.setGeometry(T),y.setId(_),y.setProperties(v,!0)}return y},g.prototype.getType=function(){return r.default.ARRAY_BUFFER},g.prototype.readFeatures=function(e,r){var t=this.layers_,a=this.adaptOptions(r),n=(0,_.get)(a.dataProjection);n.setWorldExtent(a.extent),a.dataProjection=n;var o=new s.default(e),i=o.readFields(O,{}),u=[];for(var l in i)if(!t||-1!=t.indexOf(l)){var f=i[l],d=f?[0,0,f.extent,f.extent]:null;n.setExtent(d);for(var p=0,y=f.length;p<y;++p){var c=I(o,f,p);u.push(this.createFeature_(o,c,a))}}return u},g.prototype.readProjection=function(e){return this.dataProjection},g.prototype.setLayers=function(e){this.layers_=e},g}(e.default);function O(e,r,t){if(3===e){var a={keys:[],values:[],features:[]},n=t.readVarint()+t.pos;t.readFields(N,a,n),a.length=a.features.length,a.length&&(r[a.name]=a)}}function N(e,r,t){if(15===e)r.version=t.readVarint();else if(1===e)r.name=t.readString();else if(5===e)r.extent=t.readVarint();else if(2===e)r.features.push(t.pos);else if(3===e)r.keys.push(t.readString());else if(4===e){for(var a=null,n=t.readVarint()+t.pos;t.pos<n;)a=1===(e=t.readVarint()>>3)?t.readString():2===e?t.readFloat():3===e?t.readDouble():4===e?t.readVarint64():5===e?t.readVarint():6===e?t.readSVarint():7===e?t.readBoolean():null;r.values.push(a)}}function w(e,r,t){if(1==e)r.id=t.readVarint();else if(2==e)for(var a=t.readVarint()+t.pos;t.pos<a;){var n=r.layer.keys[t.readVarint()],o=r.layer.values[t.readVarint()];r.properties[n]=o}else 3==e?r.type=t.readVarint():4==e&&(r.geometry=t.pos)}function I(e,r,t){e.pos=r.features[t];var a=e.readVarint()+e.pos,n={layer:r,type:0,properties:{}};return e.readFields(w,n,a),n}function V(e,r){var t;return 1===e?t=1===r?a.default.POINT:a.default.MULTI_POINT:2===e?t=1===r?a.default.LINE_STRING:a.default.MULTI_LINE_STRING:3===e&&(t=a.default.POLYGON),t}var q=P;exports.default=q;
},{"./Feature.js":"Kylu","./FormatType.js":"AbO3","../geom/GeometryLayout.js":"Utvi","../geom/GeometryType.js":"lmV0","../geom/LineString.js":"DfxW","../geom/MultiLineString.js":"fbCo","../geom/MultiPoint.js":"dNu5","../geom/MultiPolygon.js":"ouhF","pbf":"UzHN","../geom/Point.js":"gLcY","../geom/Polygon.js":"Nwwk","../proj/Projection.js":"WUar","../render/Feature.js":"IFOM","../proj/Units.js":"yZx6","../asserts.js":"fLG6","../proj.js":"Diht","../geom/flat/orient.js":"cJkE"}],"snev":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createOrUpdate=i,exports.default=void 0;var t=function(){function t(t,i,n,m){this.minX=t,this.maxX=i,this.minY=n,this.maxY=m}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,i){return this.minX<=t&&t<=this.maxX&&this.minY<=i&&i<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function i(i,n,m,e,s){return void 0!==s?(s.minX=i,s.maxX=n,s.minY=m,s.maxY=e,s):new t(i,n,m,e)}var n=t;exports.default=n;
},{}],"hkMV":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("./Layer.js")),t=u(require("../../TileRange.js")),r=u(require("../../TileState.js")),i=require("../../transform.js"),n=require("../../obj.js"),o=require("../../extent.js"),a=require("../../render/canvas.js"),s=require("../../proj.js"),l=require("../../util.js"),d=require("../../array.js");function u(e){return e&&e.__esModule?e:{default:e}}var h=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),p=function(e){function u(r){var i=e.call(this,r)||this;return i.extentChanged=!0,i.renderedExtent_=null,i.renderedPixelRatio,i.renderedProjection=null,i.renderedRevision,i.renderedTiles=[],i.newTiles_=!1,i.tmpExtent=(0,o.createEmpty)(),i.tmpTileRange_=new t.default(0,0,0,0),i}return h(u,e),u.prototype.isDrawableTile=function(e){var t=this.getLayer(),i=e.getState(),n=t.getUseInterimTilesOnError();return i==r.default.LOADED||i==r.default.EMPTY||i==r.default.ERROR&&!n},u.prototype.getTile=function(e,t,i,n){var o=n.pixelRatio,a=n.viewState.projection,s=this.getLayer(),l=s.getSource().getTile(e,t,i,o,a);return l.getState()==r.default.ERROR&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):l.setState(r.default.LOADED)),this.isDrawableTile(l)||(l=l.getInterimTile()),l},u.prototype.loadedTileCallback=function(t,r,i){return!!this.isDrawableTile(i)&&e.prototype.loadedTileCallback.call(this,t,r,i)},u.prototype.prepareFrame=function(e){return!!this.getLayer().getSource()},u.prototype.renderFrame=function(e,t){var u=e.layerStatesArray[e.layerIndex],h=e.viewState,p=h.projection,c=h.resolution,g=h.center,T=h.rotation,f=e.pixelRatio,m=this.getLayer(),v=m.getSource(),x=v.getRevision(),y=v.getTileGridForProjection(p),R=y.getZForResolution(c,v.zDirection),j=y.getResolution(R),w=e.extent,C=u.extent&&(0,s.fromUserExtent)(u.extent,p);C&&(w=(0,o.getIntersection)(w,(0,s.fromUserExtent)(u.extent,p)));var E=v.getTilePixelRatio(f),_=Math.round(e.size[0]*E),P=Math.round(e.size[1]*E);if(T){var S=Math.round(Math.sqrt(_*_+P*P));_=S,P=S}var b=j*_/2/E,O=j*P/2/E,q=[g[0]-b,g[1]-O,g[0]+b,g[1]+O],I=y.getTileRangeForExtentAndZ(w,R),A={};A[R]={};var U=this.createLoadedTileFinder(v,p,A),D=this.tmpExtent,L=this.tmpTileRange_;this.newTiles_=!1;for(var M=I.minX;M<=I.maxX;++M)for(var F=I.minY;F<=I.maxY;++F){var z=this.getTile(R,M,F,e);if(this.isDrawableTile(z)){var Y=(0,l.getUid)(this);if(z.getState()==r.default.LOADED){A[R][z.tileCoord.toString()]=z;var Z=z.inTransition(Y);this.newTiles_||!Z&&-1!==this.renderedTiles.indexOf(z)||(this.newTiles_=!0)}if(1===z.getAlpha(Y,e.time))continue}var k=y.getTileCoordChildTileRange(z.tileCoord,L,D),K=!1;k&&(K=U(R+1,k)),K||y.forEachTileCoordParentTileRange(z.tileCoord,U,L,D)}var X=j/c;(0,i.compose)(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/E,1/E,T,-_/2,-P/2);var G=(0,a.createTransformString)(this.pixelTransform);this.useContainer(t,G,u.opacity);var Q=this.context,N=Q.canvas;(0,i.makeInverse)(this.inversePixelTransform,this.pixelTransform),(0,i.compose)(this.tempTransform,_/2,P/2,X,X,0,-_/2,-P/2),N.width!=_||N.height!=P?(N.width=_,N.height=P):this.containerReused||Q.clearRect(0,0,_,P),C&&this.clipUnrotated(Q,e,C),(0,n.assign)(Q,v.getContextOptions()),this.preRender(Q,e),this.renderedTiles.length=0;var B,H,J,V=Object.keys(A).map(Number);V.sort(d.numberSafeCompareFunction),1!==u.opacity||this.containerReused&&!v.getOpaque(e.viewState.projection)?(B=[],H=[]):V=V.reverse();for(var W=V.length-1;W>=0;--W){var $=V[W],ee=v.getTilePixelSize($,f,p),te=y.getResolution($)/j,re=ee[0]*te*X,ie=ee[1]*te*X,ne=y.getTileCoordForCoordAndZ((0,o.getTopLeft)(q),$),oe=y.getTileCoordExtent(ne),ae=(0,i.apply)(this.tempTransform,[E*(oe[0]-q[0])/j,E*(q[3]-oe[3])/j]),se=E*v.getGutterForProjection(p),le=A[$];for(var de in le){var ue=(z=le[de]).tileCoord,he=ae[0]-(ne[1]-ue[1])*re,pe=Math.round(he+re),ce=ae[1]-(ne[2]-ue[2])*ie,ge=Math.round(ce+ie),Te=pe-(M=Math.round(he)),fe=ge-(F=Math.round(ce)),me=R===$;if(!(Z=me&&1!==z.getAlpha((0,l.getUid)(this),e.time)))if(B){Q.save(),J=[M,F,M+Te,F,M+Te,F+fe,M,F+fe];for(var ve=0,xe=B.length;ve<xe;++ve)if(R!==$&&$<H[ve]){var ye=B[ve];Q.beginPath(),Q.moveTo(J[0],J[1]),Q.lineTo(J[2],J[3]),Q.lineTo(J[4],J[5]),Q.lineTo(J[6],J[7]),Q.moveTo(ye[6],ye[7]),Q.lineTo(ye[4],ye[5]),Q.lineTo(ye[2],ye[3]),Q.lineTo(ye[0],ye[1]),Q.clip()}B.push(J),H.push($)}else Q.clearRect(M,F,Te,fe);this.drawTileImage(z,e,M,F,Te,fe,se,me,u.opacity),B&&!Z&&Q.restore(),this.renderedTiles.push(z),this.updateUsedTiles(e.usedTiles,v,z)}}return this.renderedRevision=x,this.renderedResolution=j,this.extentChanged=!this.renderedExtent_||!(0,o.equals)(this.renderedExtent_,q),this.renderedExtent_=q,this.renderedPixelRatio=f,this.renderedProjection=p,this.manageTilePyramid(e,v,y,f,p,w,R,m.getPreload()),this.scheduleExpireCache(e,v),this.postRender(Q,e),u.extent&&Q.restore(),G!==N.style.transform&&(N.style.transform=G),this.container},u.prototype.drawTileImage=function(e,t,r,i,n,o,a,s,d){var u=this.getTileImage(e);if(u){var h=(0,l.getUid)(this),p=s?e.getAlpha(h,t.time):1,c=d*p,g=c!==this.context.globalAlpha;g&&(this.context.save(),this.context.globalAlpha=c),this.context.drawImage(u,a,a,u.width-2*a,u.height-2*a,r,i,n,o),g&&this.context.restore(),1!==p?t.animate=!0:s&&e.endTransition(h)}},u.prototype.getImage=function(){var e=this.context;return e?e.canvas:null},u.prototype.getTileImage=function(e){return e.getImage()},u.prototype.scheduleExpireCache=function(e,t){if(t.canExpireCache()){var r=function(e,t,r){var i=(0,l.getUid)(e);i in r.usedTiles&&e.expireCache(r.viewState.projection,r.usedTiles[i])}.bind(null,t);e.postRenderFunctions.push(r)}},u.prototype.updateUsedTiles=function(e,t,r){var i=(0,l.getUid)(t);i in e||(e[i]={}),e[i][r.getKey()]=!0},u.prototype.manageTilePyramid=function(e,t,i,n,o,a,s,d,u){var h=(0,l.getUid)(t);h in e.wantedTiles||(e.wantedTiles[h]={});var p,c,g,T,f,m,v=e.wantedTiles[h],x=e.tileQueue,y=0;for(m=i.getMinZoom();m<=s;++m)for(c=i.getTileRangeForExtentAndZ(a,m,c),g=i.getResolution(m),T=c.minX;T<=c.maxX;++T)for(f=c.minY;f<=c.maxY;++f)s-m<=d?(++y,(p=t.getTile(m,T,f,n,o)).getState()==r.default.IDLE&&(v[p.getKey()]=!0,x.isKeyQueued(p.getKey())||x.enqueue([p,h,i.getTileCoordCenter(p.tileCoord),g])),void 0!==u&&u(p)):t.useTile(m,T,f,o);t.updateCacheSize(y,o)},u}(e.default);p.prototype.getLayer;var c=p;exports.default=c;
},{"./Layer.js":"vPfl","../../TileRange.js":"snev","../../TileState.js":"Xz9x","../../transform.js":"P4eA","../../obj.js":"mH6q","../../extent.js":"QDir","../../render/canvas.js":"iAG7","../../proj.js":"Diht","../../util.js":"KniQ","../../array.js":"luEr"}],"Q2C4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"};exports.default=e;
},{}],"UST7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=v(require("../../render/canvas/BuilderGroup.js")),t=v(require("../../render/canvas/ExecutorGroup.js")),r=v(require("./TileLayer.js")),i=v(require("../../events/EventType.js")),n=v(require("../../render/canvas/BuilderType.js")),o=v(require("../../TileState.js")),a=v(require("../../layer/VectorTileRenderType.js")),d=v(require("../../ViewHint.js")),l=require("../../transform.js"),u=require("../../extent.js"),s=require("../../obj.js"),g=require("../../render/canvas/hitdetect.js"),c=require("../vector.js"),f=require("../../util.js"),p=require("../../events.js"),h=require("../../size.js"),T=require("../../coordinate.js");function v(e){return e&&e.__esModule?e:{default:e}}var y=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),R={image:[n.default.POLYGON,n.default.CIRCLE,n.default.LINE_STRING,n.default.IMAGE,n.default.TEXT],hybrid:[n.default.POLYGON,n.default.LINE_STRING],vector:[]},m={image:[n.default.DEFAULT],hybrid:[n.default.IMAGE,n.default.TEXT,n.default.DEFAULT],vector:[n.default.POLYGON,n.default.CIRCLE,n.default.LINE_STRING,n.default.IMAGE,n.default.TEXT,n.default.DEFAULT]},_=function(r){function n(e){var t=r.call(this,e)||this;return t.boundHandleStyleImageChange_=t.handleStyleImageChange_.bind(t),t.dirty_=!1,t.renderedLayerRevision_,t.renderedPixelToCoordinateTransform_=null,t.renderedRotation_,t.renderTileImageQueue_={},t.tileListenerKeys_={},t.tmpTransform_=(0,l.create)(),t}return y(n,r),n.prototype.prepareTile=function(e,t,r,i){var n,a=(0,f.getUid)(e),d=e.getState();return(d===o.default.LOADED&&e.hifi||d===o.default.ERROR)&&a in this.tileListenerKeys_&&((0,p.unlistenByKey)(this.tileListenerKeys_[a]),delete this.tileListenerKeys_[a]),d!==o.default.LOADED&&d!==o.default.ERROR||(this.updateExecutorGroup_(e,t,r),this.tileImageNeedsRender_(e,t,r)&&(n=!0,i&&(this.renderTileImageQueue_[a]=e))),n},n.prototype.getTile=function(e,t,n,l){var u=l.pixelRatio,s=l.viewState,g=s.resolution,c=s.projection,h=this.getLayer(),T=h.getSource().getTile(e,t,n,u,c);if(T.getState()<o.default.LOADED){T.wantedResolution=g;var v=(0,f.getUid)(T);if(!(v in this.tileListenerKeys_)){var y=(0,p.listen)(T,i.default.CHANGE,this.prepareTile.bind(this,T,u,c,!0));this.tileListenerKeys_[v]=y}}else{var R=l.viewHints;!!(R[d.default.ANIMATING]||R[d.default.INTERACTING])&&T.wantedResolution||(T.wantedResolution=g),this.prepareTile(T,u,c,!1)&&h.getRenderMode()!==a.default.VECTOR&&this.renderTileImage_(T,l)}return r.prototype.getTile.call(this,e,t,n,l)},n.prototype.isDrawableTile=function(e){var t=this.getLayer();return r.prototype.isDrawableTile.call(this,e)&&(t.getRenderMode()===a.default.VECTOR?(0,f.getUid)(t)in e.executorGroups:e.hasContext(t))},n.prototype.getTileImage=function(e){return e.getImage(this.getLayer())},n.prototype.prepareFrame=function(e){var t=this.getLayer().getRevision();return this.renderedLayerRevision_!=t&&(this.renderedTiles.length=0),this.renderedLayerRevision_=t,r.prototype.prepareFrame.call(this,e)},n.prototype.updateExecutorGroup_=function(r,i,n){var d=this.getLayer(),l=d.getRevision(),s=d.getRenderOrder()||null,g=r.wantedResolution,p=r.getReplayState(d);if(p.dirty||p.renderedResolution!==g||p.renderedRevision!=l||p.renderedRenderOrder!=s||p.renderedZ!==r.sourceZ){var h=d.getSource(),T=d.getDeclutter(),v=h.getTileGrid(),y=h.getTileGridForProjection(n).getTileCoordExtent(r.wrappedTileCoord),R=h.getSourceTiles(i,n,r),m=(0,f.getUid)(d);delete r.hitDetectionImageData[m],r.executorGroups[m]=[],T&&(r.declutterExecutorGroups[m]=[]);for(var _=function(n,l){var f=R[n];if(f.getState()!=o.default.LOADED)return"continue";var _=f.tileCoord,I=v.getTileCoordExtent(_),x=(0,u.getIntersection)(y,I),C=(0,u.equals)(I,x)?null:(0,u.buffer)(x,d.getRenderBuffer()*g,E.tmpExtent);p.dirty=!1;var S=new e.default(0,x,g,i),L=T?new e.default(0,x,g,i):void 0,w=(0,c.getSquaredTolerance)(g,i),G=function(e){var t,r=e.getStyleFunction()||d.getStyleFunction();if(r&&(t=r(e,g)),t){var i=this.renderFeature(e,w,t,S,L);this.dirty_=this.dirty_||i,p.dirty=p.dirty||i}},j=f.getFeatures();s&&s!==p.renderedRenderOrder&&j.sort(s);for(var O=0,A=j.length;O<A;++O){var D=j[O];C&&!(0,u.intersects)(C,D.getGeometry().getExtent())||G.call(E,D)}var F=S.finish(),b=d.getRenderMode()!==a.default.VECTOR&&T&&1===R.length?null:x,N=new t.default(b,g,i,h.getOverlaps(),F,d.getRenderBuffer());if(r.executorGroups[m].push(N),L){var q=new t.default(b,g,i,h.getOverlaps(),L.finish(),d.getRenderBuffer());r.declutterExecutorGroups[m].push(q)}},E=this,I=0,x=R.length;I<x;++I)_(I);p.renderedRevision=l,p.renderedZ=r.sourceZ,p.renderedRenderOrder=s,p.renderedResolution=g}},n.prototype.forEachFeatureAtCoordinate=function(e,t,r,i,n){var o=t.viewState.resolution,a=t.viewState.rotation;r=null==r?0:r;var d=this.getLayer(),l=d.getSource().getTileGridForProjection(t.viewState.projection),s=(0,u.boundingExtent)([e]);(0,u.buffer)(s,o*r,s);for(var g,c={},p=function(e,t,r){var o=e.getId();void 0===o&&(o=(0,f.getUid)(e));var a=c[o];if(a){if(!0!==a&&r<a.distanceSq){if(0===r)return c[o]=!0,n.splice(n.lastIndexOf(a),1),i(e,d,t);a.geometry=t,a.distanceSq=r}}else{if(0===r)return c[o]=!0,i(e,d,t);n.push(c[o]={feature:e,layer:d,geometry:t,distanceSq:r,callback:i})}},h=this.renderedTiles,T=function(i,n){var c=h[i],T=l.getTileCoordExtent(c.wrappedTileCoord);if(!(0,u.intersects)(T,s))return"continue";var v=(0,f.getUid)(d),y=[c.executorGroups[v]],R=c.declutterExecutorGroups[v];R&&y.push(R),y.some(function(i){for(var n=i===R?t.declutterTree.all().map(function(e){return e.value}):null,d=0,l=i.length;d<l;++d){var u=i[d];if(g=u.forEachFeatureAtCoordinate(e,o,a,r,p,n))return!0}})},v=0,y=h.length;!g&&v<y;++v)T(v);return g},n.prototype.getFeatures=function(e){return new Promise(function(t,r){for(var i,n=this.getLayer(),a=(0,f.getUid)(n),d=n.getSource(),s=this.renderedProjection,c=s.getExtent(),p=this.renderedResolution,v=d.getTileGridForProjection(s),y=(0,l.apply)(this.renderedPixelToCoordinateTransform_,e.slice()),R=v.getTileCoordForCoordAndResolution(y,p),m=0,_=this.renderedTiles.length;m<_;++m)if(R.toString()===this.renderedTiles[m].tileCoord.toString()){if((i=this.renderedTiles[m]).getState()===o.default.LOADED&&i.hifi){var E=v.getTileCoordExtent(i.tileCoord);d.getWrapX()&&s.canWrapX()&&!(0,u.containsExtent)(c,E)&&(0,T.wrapX)(y,s);break}i=void 0}if(!i||i.loadingSourceTiles>0)t([]);else{var I=v.getTileCoordExtent(i.wrappedTileCoord),x=(0,u.getTopLeft)(I),C=[(y[0]-x[0])/p,(x[1]-y[1])/p],S=i.getSourceTiles().reduce(function(e,t){return e.concat(t.getFeatures())},[]),L=i.hitDetectionImageData[a];if(!L&&!this.animatingOrInteracting_){var w=(0,h.toSize)(v.getTileSize(v.getZForResolution(p))),G=[w[0]/2,w[1]/2],j=this.renderedRotation_,O=[this.getRenderTransform(v.getTileCoordCenter(i.wrappedTileCoord),p,0,.5,G[0],G[1],0)];L=(0,g.createHitDetectionImageData)(w,O,S,n.getStyleFunction(),v.getTileCoordExtent(i.wrappedTileCoord),i.getReplayState(n).renderedResolution,j),i.hitDetectionImageData[a]=L}t((0,g.hitDetect)(C,S,L))}}.bind(this))},n.prototype.handleFontsChanged=function(){(0,s.clear)(this.renderTileImageQueue_);var e=this.getLayer();e.getVisible()&&void 0!==this.renderedLayerRevision_&&e.changed()},n.prototype.handleStyleImageChange_=function(e){this.renderIfReadyAndVisible()},n.prototype.renderDeclutter=function(e){for(var t=e.viewHints,r=!(t[d.default.ANIMATING]||t[d.default.INTERACTING]),i=this.renderedTiles,n=0,o=i.length;n<o;++n){var a=i[n],l=a.declutterExecutorGroups[(0,f.getUid)(this.getLayer())];if(l)for(var u=l.length-1;u>=0;--u)l[u].execute(this.context,1,this.getTileRenderTransform(a,e),e.viewState.rotation,r,void 0,e.declutterTree)}},n.prototype.getTileRenderTransform=function(e,t){var r=t.pixelRatio,i=t.viewState,n=i.center,o=i.resolution,a=i.rotation,d=t.size,u=Math.round(d[0]*r),s=Math.round(d[1]*r),g=this.getLayer().getSource().getTileGridForProjection(t.viewState.projection),c=e.tileCoord,f=g.getTileCoordExtent(e.wrappedTileCoord),p=g.getTileCoordExtent(c,this.tmpExtent)[0]-f[0];return(0,l.multiply)((0,l.scale)(this.inversePixelTransform.slice(),1/r,1/r),this.getRenderTransform(n,o,a,r,u,s,p))},n.prototype.renderFrame=function(e,t){var i=e.viewHints,n=!(i[d.default.ANIMATING]||i[d.default.INTERACTING]);this.renderQueuedTileImages_(n,e),r.prototype.renderFrame.call(this,e,t),this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;var o=this.getLayer(),l=o.getRenderMode();if(l===a.default.IMAGE)return this.container;var u=o.getSource(),s=e.usedTiles[(0,f.getUid)(u)];for(var g in this.renderTileImageQueue_)s&&g in s||delete this.renderTileImageQueue_[g];for(var c=this.context,p=m[l],h=e.viewState.rotation,T=this.renderedTiles,v=[],y=[],R=T.length-1;R>=0;--R)for(var _=T[R],E=this.getTileRenderTransform(_,e),I=_.executorGroups[(0,f.getUid)(o)],x=!1,C=0,S=I.length;C<S;++C){var L=I[C];if(L.hasExecutors(p)){var w=_.tileCoord[0],G=void 0;if(!x&&(G=L.getClipCoords(E))){c.save();for(var j=0,O=v.length;j<O;++j){var A=v[j];w<y[j]&&(c.beginPath(),c.moveTo(G[0],G[1]),c.lineTo(G[2],G[3]),c.lineTo(G[4],G[5]),c.lineTo(G[6],G[7]),c.moveTo(A[6],A[7]),c.lineTo(A[4],A[5]),c.lineTo(A[2],A[3]),c.lineTo(A[0],A[1]),c.clip())}}L.execute(c,1,E,h,n,p),!x&&G&&(c.restore(),v.push(G),y.push(w),x=!0)}}return this.container},n.prototype.renderQueuedTileImages_=function(e,t){for(var r in this.renderTileImageQueue_){if(!e&&Date.now()-t.time>8){t.animate=!0;break}var i=this.renderTileImageQueue_[r];delete this.renderTileImageQueue_[r],this.renderTileImage_(i,t)}},n.prototype.renderFeature=function(e,t,r,i,n){if(!r)return!1;var o=!1;if(Array.isArray(r))for(var a=0,d=r.length;a<d;++a)o=(0,c.renderFeature)(i,e,r[a],t,this.boundHandleStyleImageChange_,void 0,n)||o;else o=(0,c.renderFeature)(i,e,r,t,this.boundHandleStyleImageChange_,void 0,n);return o},n.prototype.tileImageNeedsRender_=function(e,t,r){var i=this.getLayer(),n=e.getReplayState(i),o=i.getRevision(),a=e.sourceZ,d=e.wantedResolution;return n.renderedTileResolution!==d||n.renderedTileRevision!==o||n.renderedTileZ!==a},n.prototype.renderTileImage_=function(e,t){var r=this.getLayer(),i=e.getReplayState(r),n=r.getRevision(),o=e.executorGroups[(0,f.getUid)(r)];i.renderedTileRevision=n,i.renderedTileZ=e.sourceZ;var a=e.wrappedTileCoord,d=a[0],u=r.getSource(),s=t.pixelRatio,g=t.viewState.projection,c=u.getTileGridForProjection(g),p=c.getResolution(e.tileCoord[0]),h=t.pixelRatio/e.wantedResolution*p,T=c.getResolution(d),v=e.getContext(r);s=Math.round(Math.max(s,h/s));var y=u.getTilePixelSize(d,s,g);v.canvas.width=y[0],v.canvas.height=y[1];var m=s/h;if(1!==m){var _=(0,l.reset)(this.tmpTransform_);(0,l.scale)(_,m,m),v.setTransform.apply(v,_)}var E=c.getTileCoordExtent(a,this.tmpExtent),I=h/T,x=(0,l.reset)(this.tmpTransform_);(0,l.scale)(x,I,-I),(0,l.translate)(x,-E[0],-E[3]);for(var C=0,S=o.length;C<S;++C){o[C].execute(v,m,x,0,!0,R[r.getRenderMode()])}i.renderedTileResolution=e.wantedResolution},n}(r.default),E=_;exports.default=E;
},{"../../render/canvas/BuilderGroup.js":"vqHd","../../render/canvas/ExecutorGroup.js":"ngEc","./TileLayer.js":"hkMV","../../events/EventType.js":"C8cu","../../render/canvas/BuilderType.js":"irm1","../../TileState.js":"Xz9x","../../layer/VectorTileRenderType.js":"Q2C4","../../ViewHint.js":"cuLW","../../transform.js":"P4eA","../../extent.js":"QDir","../../obj.js":"mH6q","../../render/canvas/hitdetect.js":"MrCe","../vector.js":"UCah","../../util.js":"KniQ","../../events.js":"UqnM","../../size.js":"TAHd","../../coordinate.js":"nGsj"}],"M5pz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};exports.default=e;
},{}],"zOJv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("./BaseVector.js")),t=u(require("../renderer/canvas/VectorTileLayer.js")),r=u(require("./TileProperty.js")),o=u(require("./VectorTileRenderType.js")),n=require("../asserts.js"),s=require("../obj.js");function u(e){return e&&e.__esModule?e:{default:e}}var i=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),a=function(e){function u(t){var r=this,u=t||{},i=(0,s.assign)({},u);delete i.preload,delete i.useInterimTilesOnError,r=e.call(this,i)||this;var a=u.renderMode||o.default.HYBRID;return(0,n.assert)(null==a||a==o.default.IMAGE||a==o.default.HYBRID||a==o.default.VECTOR,28),r.renderMode_=a,r.setPreload(u.preload?u.preload:0),r.setUseInterimTilesOnError(void 0===u.useInterimTilesOnError||u.useInterimTilesOnError),r}return i(u,e),u.prototype.createRenderer=function(){return new t.default(this)},u.prototype.getFeatures=function(t){return e.prototype.getFeatures.call(this,t)},u.prototype.getRenderMode=function(){return this.renderMode_},u.prototype.getPreload=function(){return this.get(r.default.PRELOAD)},u.prototype.getUseInterimTilesOnError=function(){return this.get(r.default.USE_INTERIM_TILES_ON_ERROR)},u.prototype.setPreload=function(e){this.set(r.default.PRELOAD,e)},u.prototype.setUseInterimTilesOnError=function(e){this.set(r.default.USE_INTERIM_TILES_ON_ERROR,e)},u}(e.default),l=a;exports.default=l;
},{"./BaseVector.js":"pskK","../renderer/canvas/VectorTileLayer.js":"UST7","./TileProperty.js":"M5pz","./VectorTileRenderType.js":"Q2C4","../asserts.js":"fLG6","../obj.js":"mH6q"}],"IWZI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("./events/Target.js")),e=o(require("./events/EventType.js")),i=o(require("./TileState.js")),r=require("./util.js"),n=require("./easing.js");function o(t){return t&&t.__esModule?t:{default:t}}var s=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),a=function(t){function o(e,i,r){var n=t.call(this)||this,o=r||{};return n.tileCoord=e,n.state=i,n.interimTile=null,n.hifi=!0,n.key="",n.transition_=void 0===o.transition?250:o.transition,n.transitionStarts_={},n}return s(o,t),o.prototype.changed=function(){this.dispatchEvent(e.default.CHANGE)},o.prototype.release=function(){},o.prototype.getKey=function(){return this.key+"/"+this.tileCoord},o.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==i.default.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this},o.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==i.default.LOADED){t.interimTile=null;break}t.getState()==i.default.LOADING?e=t:t.getState()==i.default.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},o.prototype.getTileCoord=function(){return this.tileCoord},o.prototype.getState=function(){return this.state},o.prototype.setState=function(t){if(this.state!==i.default.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},o.prototype.load=function(){(0,r.abstract)()},o.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;var r=e-i+1e3/60;return r>=this.transition_?1:(0,n.easeIn)(r/this.transition_)},o.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},o.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},o}(t.default),u=a;exports.default=u;
},{"./events/Target.js":"CR4Y","./events/EventType.js":"C8cu","./TileState.js":"Xz9x","./util.js":"KniQ","./easing.js":"IeCz"}],"yj80":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("./Tile.js")),e=o(require("./TileState.js"));function o(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),n=function(t){function o(e,o,r,n,u,i){var s=t.call(this,e,o,i)||this;return s.extent=null,s.format_=n,s.features_=null,s.loader_,s.projection=null,s.resolution,s.tileLoadFunction_=u,s.url_=r,s.key=r,s}return r(o,t),o.prototype.getFormat=function(){return this.format_},o.prototype.getFeatures=function(){return this.features_},o.prototype.load=function(){this.state==e.default.IDLE&&(this.setState(e.default.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))},o.prototype.onLoad=function(t,e){this.setFeatures(t)},o.prototype.onError=function(){this.setState(e.default.ERROR)},o.prototype.setFeatures=function(t){this.features_=t,this.setState(e.default.LOADED)},o.prototype.setLoader=function(t){this.loader_=t},o}(t.default),u=n;exports.default=u;
},{"./Tile.js":"IWZI","./TileState.js":"Xz9x"}],"oMDz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("../asserts.js"),t=function(){function t(e){this.highWaterMark=void 0!==e?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(e){return this.entries_.hasOwnProperty(e)},t.prototype.forEach=function(e){for(var t=this.oldest_;t;)e(t.value_,t.key_,this),t=t.newer},t.prototype.get=function(t,s){var r=this.entries_[t];return(0,e.assert)(void 0!==r,15),r===this.newest_?r.value_:(r===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(r.newer.older=r.older,r.older.newer=r.newer),r.newer=null,r.older=this.newest_,this.newest_.newer=r,this.newest_=r,r.value_)},t.prototype.remove=function(t){var s=this.entries_[t];return(0,e.assert)(void 0!==s,15),s===this.newest_?(this.newest_=s.older,this.newest_&&(this.newest_.newer=null)):s===this.oldest_?(this.oldest_=s.newer,this.oldest_&&(this.oldest_.older=null)):(s.newer.older=s.older,s.older.newer=s.newer),delete this.entries_[t],--this.count_,s.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var e,t=new Array(this.count_),s=0;for(e=this.newest_;e;e=e.older)t[s++]=e.key_;return t},t.prototype.getValues=function(){var e,t=new Array(this.count_),s=0;for(e=this.newest_;e;e=e.older)t[s++]=e.value_;return t},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_},t.prototype.replace=function(e,t){this.get(e),this.entries_[e].value_=t},t.prototype.set=function(t,s){(0,e.assert)(!(t in this.entries_),16);var r={key_:t,newer:null,older:this.newest_,value_:s};this.newest_?this.newest_.newer=r:this.oldest_=r,this.newest_=r,this.entries_[t]=r,++this.count_},t.prototype.setSize=function(e){this.highWaterMark=e},t}(),s=t;exports.default=s;
},{"../asserts.js":"fLG6"}],"faTr":[function(require,module,exports) {
"use strict";function e(e,t,r,n){return void 0!==n?(n[0]=e,n[1]=t,n[2]=r,n):[e,t,r]}function t(e,t,r){return e+"/"+t+"/"+r}function r(e){return t(e[0],e[1],e[2])}function n(e){return e.split("/").map(Number)}function o(e){return(e[1]<<e[0])+e[2]}function u(e,t){var r=e[0],n=e[1],o=e[2];if(t.getMinZoom()>r||r>t.getMaxZoom())return!1;var u=t.getFullTileRange(r);return!u||u.containsXY(n,o)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.createOrUpdate=e,exports.getKeyZXY=t,exports.getKey=r,exports.fromKey=n,exports.hash=o,exports.withinExtentAndZ=u;
},{}],"YFDe":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./structs/LRUCache.js")),e=require("./tilecoord.js");function r(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),n=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return o(r,t),r.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},r.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=this.peekFirstKey(),r=(0,e.fromKey)(t)[0];this.forEach(function(t){t.tileCoord[0]!==r&&(this.remove((0,e.getKey)(t.tileCoord)),t.release())}.bind(this))}},r}(t.default),i=n;exports.default=i;
},{"./structs/LRUCache.js":"oMDz","./tilecoord.js":"faTr"}],"KXhD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};exports.default=e;
},{}],"dpZ6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=h(require("../TileRange.js")),e=require("./common.js"),i=require("../asserts.js"),o=require("../math.js"),r=require("../extent.js"),n=require("../tilecoord.js"),s=require("../array.js"),l=require("../size.js");function a(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return a=function(){return t},t}function h(t){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var e=a();if(e&&e.has(t))return e.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=o?Object.getOwnPropertyDescriptor(t,r):null;n&&(n.get||n.set)?Object.defineProperty(i,r,n):i[r]=t[r]}return i.default=t,e&&e.set(t,i),i}var u=[0,0,0],g=function(){function a(o){var n;if(this.minZoom=void 0!==o.minZoom?o.minZoom:0,this.resolutions_=o.resolutions,(0,i.assert)((0,s.isSorted)(this.resolutions_,function(t,e){return e-t},!0),17),!o.origins)for(var l=0,a=this.resolutions_.length-1;l<a;++l)if(n){if(this.resolutions_[l]/this.resolutions_[l+1]!==n){n=void 0;break}}else n=this.resolutions_[l]/this.resolutions_[l+1];this.zoomFactor_=n,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==o.origin?o.origin:null,this.origins_=null,void 0!==o.origins&&(this.origins_=o.origins,(0,i.assert)(this.origins_.length==this.resolutions_.length,20));var h=o.extent;void 0===h||this.origin_||this.origins_||(this.origin_=(0,r.getTopLeft)(h)),(0,i.assert)(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==o.tileSizes&&(this.tileSizes_=o.tileSizes,(0,i.assert)(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==o.tileSize?o.tileSize:this.tileSizes_?null:e.DEFAULT_TILE_SIZE,(0,i.assert)(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==h?h:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],void 0!==o.sizes?this.fullTileRanges_=o.sizes.map(function(e,i){var o=new t.default(Math.min(0,e[0]),Math.max(e[0]-1,-1),Math.min(0,e[1]),Math.max(e[1]-1,-1));if(h){var r=this.getTileRangeForExtentAndZ(h,i);o.minX=Math.max(r.minX,o.minX),o.maxX=Math.min(r.maxX,o.maxX),o.minY=Math.max(r.minY,o.minY),o.maxY=Math.min(r.maxY,o.maxY)}return o},this):h&&this.calculateTileRanges_(h)}return a.prototype.forEachTileCoord=function(t,e,i){for(var o=this.getTileRangeForExtentAndZ(t,e),r=o.minX,n=o.maxX;r<=n;++r)for(var s=o.minY,l=o.maxY;s<=l;++s)i([e,r,s])},a.prototype.forEachTileCoordParentTileRange=function(e,i,o,r){var n,s,l,a=null,h=e[0]-1;for(2===this.zoomFactor_?(s=e[1],l=e[2]):a=this.getTileCoordExtent(e,r);h>=this.minZoom;){if(2===this.zoomFactor_?(s=Math.floor(s/2),l=Math.floor(l/2),n=(0,t.createOrUpdate)(s,s,l,l,o)):n=this.getTileRangeForExtentAndZ(a,h,o),i(h,n))return!0;--h}return!1},a.prototype.getExtent=function(){return this.extent_},a.prototype.getMaxZoom=function(){return this.maxZoom},a.prototype.getMinZoom=function(){return this.minZoom},a.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},a.prototype.getResolution=function(t){return this.resolutions_[t]},a.prototype.getResolutions=function(){return this.resolutions_},a.prototype.getTileCoordChildTileRange=function(e,i,o){if(e[0]<this.maxZoom){if(2===this.zoomFactor_){var r=2*e[1],n=2*e[2];return(0,t.createOrUpdate)(r,r+1,n,n+1,i)}var s=this.getTileCoordExtent(e,o);return this.getTileRangeForExtentAndZ(s,e[0]+1,i)}return null},a.prototype.getTileRangeExtent=function(t,e,i){var o=this.getOrigin(t),n=this.getResolution(t),s=(0,l.toSize)(this.getTileSize(t),this.tmpSize_),a=o[0]+e.minX*s[0]*n,h=o[0]+(e.maxX+1)*s[0]*n,u=o[1]+e.minY*s[1]*n,g=o[1]+(e.maxY+1)*s[1]*n;return(0,r.createOrUpdate)(a,u,h,g,i)},a.prototype.getTileRangeForExtentAndZ=function(e,i,o){var r=u;this.getTileCoordForXYAndZ_(e[0],e[3],i,!1,r);var n=r[1],s=r[2];return this.getTileCoordForXYAndZ_(e[2],e[1],i,!0,r),(0,t.createOrUpdate)(n,r[1],s,r[2],o)},a.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),i=this.getResolution(t[0]),o=(0,l.toSize)(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*o[0]*i,e[1]-(t[2]+.5)*o[1]*i]},a.prototype.getTileCoordExtent=function(t,e){var i=this.getOrigin(t[0]),o=this.getResolution(t[0]),n=(0,l.toSize)(this.getTileSize(t[0]),this.tmpSize_),s=i[0]+t[1]*n[0]*o,a=i[1]-(t[2]+1)*n[1]*o,h=s+n[0]*o,u=a+n[1]*o;return(0,r.createOrUpdate)(s,a,h,u,e)},a.prototype.getTileCoordForCoordAndResolution=function(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)},a.prototype.getTileCoordForXYAndResolution_=function(t,e,i,o,r){var s=this.getZForResolution(i),a=i/this.getResolution(s),h=this.getOrigin(s),u=(0,l.toSize)(this.getTileSize(s),this.tmpSize_),g=o?.5:0,f=o?.5:0,p=Math.floor((t-h[0])/i+g),_=Math.floor((h[1]-e)/i+f),m=a*p/u[0],c=a*_/u[1];return o?(m=Math.ceil(m)-1,c=Math.ceil(c)-1):(m=Math.floor(m),c=Math.floor(c)),(0,n.createOrUpdate)(s,m,c,r)},a.prototype.getTileCoordForXYAndZ_=function(t,e,i,o,r){var s=this.getOrigin(i),a=this.getResolution(i),h=(0,l.toSize)(this.getTileSize(i),this.tmpSize_),u=o?.5:0,g=o?.5:0,f=Math.floor((t-s[0])/a+u),p=Math.floor((s[1]-e)/a+g),_=f/h[0],m=p/h[1];return o?(_=Math.ceil(_)-1,m=Math.ceil(m)-1):(_=Math.floor(_),m=Math.floor(m)),(0,n.createOrUpdate)(i,_,m,r)},a.prototype.getTileCoordForCoordAndZ=function(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)},a.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},a.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},a.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null},a.prototype.getZForResolution=function(t,e){var i=(0,s.linearFindNearest)(this.resolutions_,t,e||0);return(0,o.clamp)(i,this.minZoom,this.maxZoom)},a.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,i=new Array(e),o=this.minZoom;o<e;++o)i[o]=this.getTileRangeForExtentAndZ(t,o);this.fullTileRanges_=i},a}(),f=g;exports.default=f;
},{"../TileRange.js":"snev","./common.js":"mOEX","../asserts.js":"fLG6","../math.js":"B96G","../extent.js":"QDir","../tilecoord.js":"faTr","../array.js":"luEr","../size.js":"TAHd"}],"ExRx":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getForProjection=s,exports.wrapX=l,exports.createForExtent=d,exports.createXYZ=c,exports.createForProjection=x,exports.extentFromProjection=g;var e=a(require("./extent/Corner.js")),t=a(require("./tilegrid/TileGrid.js")),r=a(require("./proj/Units.js")),o=require("./tilegrid/common.js"),i=require("./proj.js"),n=require("./extent.js"),u=require("./size.js");function a(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=e.getDefaultTileGrid();return t||(t=x(e),e.setDefaultTileGrid(t)),t}function l(e,t,r){var o=t[0],i=e.getTileCoordCenter(t),u=g(r);if((0,n.containsCoordinate)(u,i))return t;var a=(0,n.getWidth)(u),s=Math.ceil((u[0]-i[0])/a);return i[0]+=a*s,e.getTileCoordForCoordAndZ(i,o)}function d(r,o,i,u){var a=void 0!==u?u:e.default.TOP_LEFT,s=f(r,o,i);return new t.default({extent:r,origin:(0,n.getCorner)(r,a),resolutions:s,tileSize:i})}function c(e){var r=e||{},o=r.extent||(0,i.get)("EPSG:3857").getExtent(),n={extent:o,minZoom:r.minZoom,tileSize:r.tileSize,resolutions:f(o,r.maxZoom,r.tileSize,r.maxResolution)};return new t.default(n)}function f(e,t,r,i){for(var a=void 0!==t?t:o.DEFAULT_MAX_ZOOM,s=(0,n.getHeight)(e),l=(0,n.getWidth)(e),d=(0,u.toSize)(void 0!==r?r:o.DEFAULT_TILE_SIZE),c=i>0?i:Math.max(l/d[0],s/d[1]),f=a+1,x=new Array(f),g=0;g<f;++g)x[g]=c/Math.pow(2,g);return x}function x(e,t,r,o){return d(g(e),t,r,o)}function g(e){var t=(e=(0,i.get)(e)).getExtent();if(!t){var o=180*i.METERS_PER_UNIT[r.default.DEGREES]/e.getMetersPerUnit();t=(0,n.createOrUpdate)(-o,-o,o,o)}return t}
},{"./extent/Corner.js":"urGY","./tilegrid/TileGrid.js":"dpZ6","./proj/Units.js":"yZx6","./tilegrid/common.js":"mOEX","./proj.js":"Diht","./extent.js":"QDir","./size.js":"TAHd"}],"JECm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.TileSourceEvent=void 0;var t=s(require("../events/Event.js")),e=s(require("./Source.js")),i=s(require("../TileCache.js")),r=s(require("../TileState.js")),o=require("../util.js"),n=require("../asserts.js"),a=require("../proj.js"),u=require("../tilecoord.js"),c=require("../tilegrid.js"),l=require("../size.js");function s(t){return t&&t.__esModule?t:{default:t}}var p=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),h=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX})||this;r.opaque_=void 0!==e.opaque&&e.opaque,r.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,r.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var o=e.tileGrid;return o&&(0,l.toSize)(o.getTileSize(o.getMinZoom()),[256,256]),r.tileCache=new i.default(e.cacheSize||0),r.tmpSize=[0,0],r.key_=e.key||"",r.tileOptions={transition:e.transition},r.zDirection=e.zDirection?e.zDirection:0,r}return p(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);i&&i.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,i,o){var n=this.getTileCacheForProjection(t);if(!n)return!1;for(var a,c,l,s=!0,p=i.minX;p<=i.maxX;++p)for(var h=i.minY;h<=i.maxY;++h)c=(0,u.getKeyZXY)(e,p,h),l=!1,n.containsKey(c)&&(l=(a=n.get(c)).getState()===r.default.LOADED)&&(l=!1!==o(a)),l||(s=!1);return s},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,i,r,n){return(0,o.abstract)()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:(0,c.getForProjection)(t)},e.prototype.getTileCacheForProjection=function(t){return(0,n.assert)((0,a.equivalent)(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,i){var r=this.getTileGridForProjection(i),o=this.getTilePixelRatio(e),n=(0,l.toSize)(r.getTileSize(t),this.tmpSize);return 1==o?n:(0,l.scale)(n,o,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var i=void 0!==e?e:this.getProjection(),r=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=(0,c.wrapX)(r,t,i)),(0,u.withinExtentAndZ)(t,r)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)},e.prototype.useTile=function(t,e,i,r){},e}(e.default),f=function(t){function e(e,i){var r=t.call(this,e)||this;return r.tile=i,r}return p(e,t),e}(t.default);exports.TileSourceEvent=f;var y=h;exports.default=y;
},{"../events/Event.js":"fKNg","./Source.js":"H38a","../TileCache.js":"YFDe","../TileState.js":"Xz9x","../util.js":"KniQ","../asserts.js":"fLG6","../proj.js":"Diht","../tilecoord.js":"faTr","../tilegrid.js":"ExRx","../size.js":"TAHd"}],"p1vZ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createFromTemplate=n,exports.createFromTemplates=o,exports.createFromTileUrlFunctions=a,exports.nullTileUrlFunction=i,exports.expandUrl=u;var r=require("./asserts.js"),e=require("./math.js"),t=require("./tilecoord.js");function n(e,t){var n=/\{z\}/g,o=/\{x\}/g,a=/\{y\}/g,i=/\{-y\}/g;return function(u,c,l){return u?e.replace(n,u[0].toString()).replace(o,u[1].toString()).replace(a,u[2].toString()).replace(i,function(){var e=u[0],n=t.getFullTileRange(e);return(0,r.assert)(n,55),(n.getHeight()-u[2]-1).toString()}):void 0}}function o(r,e){for(var t=r.length,o=new Array(t),i=0;i<t;++i)o[i]=n(r[i],e);return a(o)}function a(r){return 1===r.length?r[0]:function(n,o,a){if(n){var i=(0,t.hash)(n),u=(0,e.modulo)(i,r.length);return r[u](n,o,a)}}}function i(r,e,t){}function u(r){var e=[],t=/\{([a-z])-([a-z])\}/.exec(r);if(t){var n=t[1].charCodeAt(0),o=t[2].charCodeAt(0),a=void 0;for(a=n;a<=o;++a)e.push(r.replace(t[0],String.fromCharCode(a)));return e}if(t=/\{(\d+)-(\d+)\}/.exec(r)){for(var i=parseInt(t[2],10),u=parseInt(t[1],10);u<=i;u++)e.push(r.replace(t[0],u.toString()));return e}return e.push(r),e}
},{"./asserts.js":"fLG6","./math.js":"B96G","./tilecoord.js":"faTr"}],"uv9E":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=s(require("./TileEventType.js")),e=u(require("./Tile.js")),i=s(require("../TileState.js")),n=require("../tileurlfunction.js"),r=require("../tilecoord.js"),o=require("../util.js");function l(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return l=function(){return t},t}function u(t){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var e=l();if(e&&e.has(t))return e.get(t);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var o=n?Object.getOwnPropertyDescriptor(t,r):null;o&&(o.get||o.set)?Object.defineProperty(i,r,o):i[r]=t[r]}return i.default=t,e&&e.set(t,i),i}function s(t){return t&&t.__esModule?t:{default:t}}var c=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),a=function(l){function u(t){var e=l.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection})||this;return e.generateTileUrlFunction_=e.tileUrlFunction===u.prototype.tileUrlFunction,e.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(e.tileUrlFunction=t.tileUrlFunction),e.urls=null,t.urls?e.setUrls(t.urls):t.url&&e.setUrl(t.url),e.tileLoadingKeys_={},e}return c(u,l),u.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},u.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},u.prototype.getUrls=function(){return this.urls},u.prototype.handleTileChange=function(n){var r,l=n.target,u=(0,o.getUid)(l),s=l.getState();s==i.default.LOADING?(this.tileLoadingKeys_[u]=!0,r=t.default.TILELOADSTART):u in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[u],r=s==i.default.ERROR?t.default.TILELOADERROR:s==i.default.LOADED?t.default.TILELOADEND:void 0),null!=r&&this.dispatchEvent(new e.TileSourceEvent(r,l))},u.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},u.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},u.prototype.setUrl=function(t){var e=(0,n.expandUrl)(t);this.urls=e,this.setUrls(e)},u.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction((0,n.createFromTemplates)(t,this.tileGrid),e):this.setKey(e)},u.prototype.tileUrlFunction=function(t,e,i){},u.prototype.useTile=function(t,e,i){var n=(0,r.getKeyZXY)(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)},u}(e.default),p=a;exports.default=p;
},{"./TileEventType.js":"KXhD","./Tile.js":"JECm","../TileState.js":"Xz9x","../tileurlfunction.js":"p1vZ","../tilecoord.js":"faTr","../util.js":"KniQ"}],"C8Du":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("./Tile.js")),t=require("./dom.js"),r=require("./util.js");function o(e){return e&&e.__esModule?e:{default:e}}var n=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),i=[],u=function(e){function o(t,r,o,n){var i=e.call(this,t,r,{transition:0})||this;return i.context_={},i.executorGroups={},i.declutterExecutorGroups={},i.loadingSourceTiles=0,i.errorSourceTileKeys={},i.hitDetectionImageData={},i.replayState_={},i.sourceTiles=null,i.wantedResolution,i.getSourceTiles=n.bind(void 0,i),i.sourceZ=-1,i.hifi=!1,i.wrappedTileCoord=o,i}return n(o,e),o.prototype.getContext=function(e){var o=(0,r.getUid)(e);return o in this.context_||(this.context_[o]=(0,t.createCanvasContext2D)(1,1,i)),this.context_[o]},o.prototype.hasContext=function(e){return(0,r.getUid)(e)in this.context_},o.prototype.getImage=function(e){return this.hasContext(e)?this.getContext(e).canvas:null},o.prototype.getReplayState=function(e){var t=(0,r.getUid)(e);return t in this.replayState_||(this.replayState_[t]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedZ:-1,renderedTileZ:-1}),this.replayState_[t]},o.prototype.load=function(){this.getSourceTiles()},o.prototype.release=function(){for(var t in this.context_)i.push(this.context_[t].canvas),delete this.context_[t];e.prototype.release.call(this)},o}(e.default),s=u;exports.default=s;
},{"./Tile.js":"IWZI","./dom.js":"Xno5","./util.js":"KniQ"}],"A6uo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaultLoadFunction=T,exports.default=void 0;var e=f(require("../events/EventType.js")),t=f(require("../VectorTile.js")),i=f(require("../TileCache.js")),r=f(require("../TileState.js")),o=f(require("./UrlTile.js")),n=f(require("../VectorRenderTile.js")),l=require("../extent.js"),a=require("../tilegrid.js"),s=require("../array.js"),u=require("../tilecoord.js"),c=require("../featureloader.js"),d=require("../size.js");function f(e){return e&&e.__esModule?e:{default:e}}var h=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),p=function(o){function c(e){var r=this,n=e.projection||"EPSG:3857",l=e.extent||(0,a.extentFromProjection)(n),s=e.tileGrid||(0,a.createXYZ)({extent:l,maxResolution:e.maxResolution,maxZoom:void 0!==e.maxZoom?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});return(r=o.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,opaque:!1,projection:n,state:e.state,tileGrid:s,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:T,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:void 0===e.zDirection?1:e.zDirection})||this).format_=e.format?e.format:null,r.loadingTiles_={},r.sourceTileCache=new i.default(r.tileCache.highWaterMark),r.overlaps_=null==e.overlaps||e.overlaps,r.tileClass=e.tileClass?e.tileClass:t.default,r.tileGrids_={},r}return h(c,o),c.prototype.getFeaturesInExtent=function(e){var t=[],i=this.tileCache;if(0===i.getCount())return t;var o=(0,u.fromKey)(i.peekFirstKey())[0],n=this.tileGrid;return i.forEach(function(i){if(i.tileCoord[0]===o&&i.getState()===r.default.LOADED)for(var a=i.getSourceTiles(),s=0,u=a.length;s<u;++s){var c=a[s],d=c.tileCoord;if((0,l.intersects)(e,n.getTileCoordExtent(d))){var f=c.getFeatures();if(f)for(var h=0,p=f.length;h<p;++h){var g=f[h],T=g.getGeometry();(0,l.intersects)(e,T.getExtent())&&t.push(g)}}}}),t},c.prototype.getOverlaps=function(){return this.overlaps_},c.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},c.prototype.expireCache=function(e,t){o.prototype.expireCache.call(this,e,t),this.sourceTileCache.expireCache({})},c.prototype.getSourceTiles=function(t,i,o){var n=o.wrappedTileCoord,a=this.getTileGridForProjection(i),u=a.getTileCoordExtent(n),c=n[0],d=a.getResolution(c);(0,l.buffer)(u,-d,u);var f=this.tileGrid,h=f.getExtent();h&&(0,l.getIntersection)(u,h,u);var p,g,T,v=f.getZForResolution(d,1),C=f.getMinZoom(),E=o.sourceTiles;if(E&&E.length>0&&E[0].tileCoord[0]===v)p=E,g=!0,T=v;else{p=[],T=v+1;do{--T,g=!0,f.forEachTileCoord(u,T,function(n){var l,a=this.tileUrlFunction(n,t,i);if(void 0!==a)if(this.sourceTileCache.containsKey(a)){var s=(l=this.sourceTileCache.get(a)).getState();if(s===r.default.LOADED||s===r.default.ERROR||s===r.default.EMPTY)return void p.push(l)}else T===v&&((l=new this.tileClass(n,r.default.IDLE,a,this.format_,this.tileLoadFunction)).extent=f.getTileCoordExtent(n),l.projection=i,l.resolution=f.getResolution(n[0]),this.sourceTileCache.set(a,l),l.addEventListener(e.default.CHANGE,this.handleTileChange.bind(this)),l.load());g=g&&l&&l.getState()===r.default.LOADED,l&&l.getState()!==r.default.EMPTY&&o.getState()===r.default.IDLE&&(o.loadingSourceTiles++,l.addEventListener(e.default.CHANGE,function t(){var i=l.getState(),n=l.getKey();if(i===r.default.LOADED||i===r.default.ERROR){i===r.default.LOADED?(l.removeEventListener(e.default.CHANGE,t),o.loadingSourceTiles--,delete o.errorSourceTileKeys[n]):i===r.default.ERROR&&(o.errorSourceTileKeys[n]=!0);var a=Object.keys(o.errorSourceTileKeys).length;o.loadingSourceTiles-a==0&&(o.hifi=0===a,o.sourceZ=v,o.setState(r.default.LOADED))}}))}.bind(this)),g||(p.length=0)}while(!g&&T>C)}return o.getState()===r.default.IDLE&&o.setState(r.default.LOADING),g&&(o.hifi=v===T,o.sourceZ=T,o.getState()<r.default.LOADED?o.setState(r.default.LOADED):E&&(0,s.equals)(p,E)||(o.sourceTiles=p)),p},c.prototype.getTile=function(e,t,i,o,a){var s,c=(0,u.getKeyZXY)(e,t,i),d=this.getKey();if(this.tileCache.containsKey(c)&&(s=this.tileCache.get(c)).key===d)return s;var f=[e,t,i],h=this.getTileCoordForTileUrlFunction(f,a),p=this.getTileGrid().getExtent(),g=this.getTileGridForProjection(a);if(h&&p){var T=g.getTileCoordExtent(h);(0,l.buffer)(T,-g.getResolution(e),T),(0,l.intersects)(p,T)||(h=null)}var v=!0;if(null!==h){var C=this.tileGrid,E=g.getResolution(e),y=C.getZForResolution(E,1),S=g.getTileCoordExtent(h);(0,l.buffer)(S,-E,S),C.forEachTileCoord(S,y,function(e){v=v&&!this.tileUrlFunction(e,o,a)}.bind(this))}var x=new n.default(f,v?r.default.EMPTY:r.default.IDLE,h,this.getSourceTiles.bind(this,o,a));return x.key=d,s?(x.interimTile=s,x.refreshInterimChain(),this.tileCache.replace(c,x)):this.tileCache.set(c,x),x},c.prototype.getTileGridForProjection=function(e){var t=e.getCode(),i=this.tileGrids_[t];if(!i){var r=this.tileGrid;i=(0,a.createForProjection)(e,void 0,r?r.getTileSize(r.getMinZoom()):void 0),this.tileGrids_[t]=i}return i},c.prototype.getTilePixelRatio=function(e){return e},c.prototype.getTilePixelSize=function(e,t,i){var r=this.getTileGridForProjection(i),o=(0,d.toSize)(r.getTileSize(e),this.tmpSize);return[Math.round(o[0]*t),Math.round(o[1]*t)]},c.prototype.updateCacheSize=function(e,t){o.prototype.updateCacheSize.call(this,2*e,t)},c}(o.default),g=p;function T(e,t){e.setLoader(function(i,r,o){(0,c.loadFeaturesXhr)(t,e.getFormat(),i,r,o,e.onLoad.bind(e),e.onError.bind(e))})}exports.default=g;
},{"../events/EventType.js":"C8cu","../VectorTile.js":"yj80","../TileCache.js":"YFDe","../TileState.js":"Xz9x","./UrlTile.js":"uv9E","../VectorRenderTile.js":"C8Du","../extent.js":"QDir","../tilegrid.js":"ExRx","../array.js":"luEr","../tilecoord.js":"faTr","../featureloader.js":"U3JP","../size.js":"TAHd"}],"pt6h":[function(require,module,exports) {
var a={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},e=" ",r=/(italic|oblique)$/i,l={};module.exports=function(o,t,i){var n=l[o];if(!n){Array.isArray(o)||(o=[o]);for(var p=400,b="normal",c=[],h=0,s=o.length;h<s;++h){var u=o[h].split(" "),d=u[u.length-1].toLowerCase();for(var m in"normal"==d||"italic"==d||"oblique"==d?(b=d,u.pop(),d=u[u.length-1].toLowerCase()):r.test(d)&&(d=d.replace(r,""),b=u[u.length-1].replace(d,"")),a)if(d==m||d==m.replace("-","")||d==m.replace("-",e)){p=a[m],u.pop();break}"number"==typeof d&&(p=d);var f=u.join(e).replace("Klokantech Noto Sans","Noto Sans");-1!==f.indexOf(e)&&(f='"'+f+'"'),c.push(f)}n=l[o]=[b,p,c]}return n[0]+e+n[1]+e+t+"px"+(i?"/"+i:"")+e+n[2]};
},{}],"HMCe":[function(require,module,exports) {
"use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o<a;++o)r[o]=n[o],t[n.charCodeAt(o)]=o;function h(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){var n,o,a=h(r),u=a[0],i=a[1],f=new e(c(r,u,i)),A=0,d=i>0?u-4:u;for(o=0;o<d;o+=4)n=t[r.charCodeAt(o)]<<18|t[r.charCodeAt(o+1)]<<12|t[r.charCodeAt(o+2)]<<6|t[r.charCodeAt(o+3)],f[A++]=n>>16&255,f[A++]=n>>8&255,f[A++]=255&n;return 2===i&&(n=t[r.charCodeAt(o)]<<2|t[r.charCodeAt(o+1)]>>4,f[A++]=255&n),1===i&&(n=t[r.charCodeAt(o)]<<10|t[r.charCodeAt(o+1)]<<4|t[r.charCodeAt(o+2)]>>2,f[A++]=n>>8&255,f[A++]=255&n),f}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;a<e;a+=3)n=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(255&r[a+2]),o.push(f(n));return o.join("")}function d(t){for(var e,n=t.length,o=n%3,a=[],h=0,u=n-o;h<u;h+=16383)a.push(A(t,h,h+16383>u?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;
},{}],"muid":[function(require,module,exports) {
var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)};
},{}],"SMKI":[function(require,module,exports) {
var global = arguments[3];
var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=f.prototype:(null===t&&(t=new f(r)),t.length=r),t}function f(t,r,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,e)}function s(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?g(t,r,e,n):"string"==typeof r?l(t,r,e):y(t,r)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function a(t,r,e,n){return h(r),r<=0?u(t,r):void 0!==e?"string"==typeof n?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}function c(t,r){if(h(r),t=u(t,r<0?0:0|w(r)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(r,e),i=(t=u(t,n)).write(r,e);return i!==n&&(t=t.slice(0,i)),t}function p(t,r){var e=r.length<0?0:0|w(r.length);t=u(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function g(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.prototype:t=p(t,r),t}function y(t,r){if(f.isBuffer(r)){var e=0|w(r.length);return 0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||W(r.length)?u(t,0):p(t,r);if("Buffer"===r.type&&n(r.data))return p(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;o<f;o++)if(h(t,o)===h(r,-1===a?0:o-a)){if(-1===a&&(a=o),o-a+1===s)return a*u}else-1!==a&&(o-=o-a),a=-1}else for(e+s>f&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;l<s;l++)if(h(t,o+l)!==h(r,l)){c=!1;break}if(c)return o}return-1}function A(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function m(t,r,e,n){return Q($(r,t.length-e),t,e,n)}function P(t,r,e,n){return Q(G(r),t,e,n)}function T(t,r,e,n){return P(t,r,e,n)}function B(t,r,e,n){return Q(K(r),t,e,n)}function U(t,r,e,n){return Q(H(r,t.length-e),t,e,n)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function Y(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,f,s,h=t[i],a=null,c=h>239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,r){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var i=f.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!f.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i},f.byteLength=v,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)b(this,r,r+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)b(this,r,r+3),b(this,r+1,r+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)b(this,r,r+7),b(this,r+1,r+6),b(this,r+2,r+5),b(this,r+3,r+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Y(this,0,t):E.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=exports.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;c<s;++c)if(h[c]!==a[c]){o=h[c],u=a[c];break}return o<u?-1:u<o?1:0},f.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},f.prototype.indexOf=function(t,r,e){return R(this,t,r,e,!0)},f.prototype.lastIndexOf=function(t,r,e){return R(this,t,r,e,!1)},f.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=I));return e}function L(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function D(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function x(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=Z(t[o]);return i}function C(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),f.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=f.prototype;else{var i=r-t;e=new f(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},f.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},f.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},f.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===f&&0!==this[r+o-1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},f.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var u=f.isBuffer(t)?t:$(new f(t,n).toString()),s=u.length;for(o=0;o<e-r;++o)this[o+r]=u[o%s]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function X(t){if((t=J(t).replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function J(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Z(t){return t<16?"0"+t.toString(16):t.toString(16)}function $(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}function H(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)n=(e=t.charCodeAt(u))>>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t}
},{"base64-js":"HMCe","ieee754":"Quj6","isarray":"muid","buffer":"SMKI"}],"Prd1":[function(require,module,exports) {
var global = arguments[3];
var Buffer = require("buffer").Buffer;
var e=arguments[3],t=require("buffer").Buffer;Object.defineProperty(exports,"__esModule",{value:!0}),exports.composite=_n,exports.convertFilter=vn,exports.derefLayers=In,exports.diff=Un,exports.featureFilter=cn,exports.format=H,exports.migrate=Tn,exports.validate=Si,exports.validateMapboxApiSupported=Mi,exports.visit=exports.v8=exports.latest=exports.function=exports.expression=exports.ValidationError=exports.ParsingError=exports.Color=void 0;var o=8,r={version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},terrain:{type:"terrain",doc:"A global modifier that elevates layers and markers based on a DEM data source."},fog:{type:"fog",doc:"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features."},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},n={"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},i=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],a={type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},s={type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},l={type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},u={type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."}},c={type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},p={type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},d={id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},sky:{doc:"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{js:"2.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},h=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],f={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},y={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"constant"}},m={"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},g={"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},b={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},v={"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},x={"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesnt support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},w={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},k={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},j={type:"array",value:"*",doc:"A filter selects specific features from a layer."},z={type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ... fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},S={type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},T={type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},_={type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},$={doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `["get", "building_type"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `["c", "b"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `"in"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Gets the feature properties object. Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Gets the current zoom level. Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Zoom","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},"sky-radial-progress":{doc:"Gets the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.",group:"sky","sdk-support":{"basic functionality":{js:"2.0.0"}}},accumulated:{doc:"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},A={range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",example:[.5,10],"sdk-support":{"basic functionality":{js:"2.3.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the fog. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{js:"2.3.0"}}},"horizon-blend":{type:"number","property-type":"data-constant",default:.1,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Horizon blend applies a smooth fade from the color of the fog to the color of the sky. A value of zero leaves a sharp transition from fog to sky. Increasing the value blends the color of fog into increasingly high angles of the sky.","sdk-support":{"basic functionality":{js:"2.3.0"}}}},I={anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},q={source:{type:"string",doc:"Name of a source of `raster_dem` type to be used for terrain elevation.",required:!0,"sdk-support":{"basic functionality":{js:"2.0.0"}}},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.","sdk-support":{"basic functionality":{js:"2.0.0"}}}},O=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],C={"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},E={"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},M={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},N={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},P={"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},R={"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},D={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},L={"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},F={"sky-type":{type:"enum",values:{gradient:{doc:"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},atmosphere:{doc:"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},default:"atmosphere",doc:"The type of the sky","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{js:"2.0.0"}},requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,doc:"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,doc:"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],doc:"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.",transition:!1,requires:[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{js:"2.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",doc:"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",doc:"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire sky layer.",transition:!0,"sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},U={duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},J={"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}},G={$version:o,$root:r,sources:n,source:i,source_vector:a,source_raster:s,source_raster_dem:l,source_geojson:u,source_video:c,source_image:p,layer:d,layout:h,layout_background:f,layout_sky:y,layout_fill:m,layout_circle:g,layout_heatmap:b,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:v,layout_symbol:x,layout_raster:w,layout_hillshade:k,filter:j,filter_operator:z,geometry_type:S,function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:T,expression:_,expression_name:$,fog:A,light:I,terrain:q,paint:O,paint_fill:C,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:E,paint_circle:M,paint_heatmap:N,paint_symbol:P,paint_raster:R,paint_hillshade:D,paint_background:L,paint_sky:F,transition:U,"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:J};exports.v8=exports.latest=G;var W=/("(?:[^\\"]|\\.)*")|[:,]/g,B=function(e,t){var o,r,n;return t=t||{},o=JSON.stringify([1],void 0,void 0===t.indent?2:t.indent).slice(2,-3),r=""===o?1/0:void 0===t.maxLength?80:t.maxLength,n=t.replacer,function e(t,i,a){var s,l,u,c,p,d,h,f,y,m,g,b;if(t&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===(g=JSON.stringify(t,n)))return g;if(h=r-i.length-a,g.length<=h&&(y=g.replace(W,function(e,t){return t||e+" "})).length<=h)return y;if(null!=n&&(t=JSON.parse(g),n=void 0),"object"==typeof t&&null!==t){if(f=i+o,u=[],l=0,Array.isArray(t))for(m="[",s="]",h=t.length;l<h;l++)u.push(e(t[l],f,l===h-1?0:1)||"null");else for(m="{",s="}",h=(d=Object.keys(t)).length;l<h;l++)c=d[l],p=JSON.stringify(c)+": ",void 0!==(b=e(t[c],f,p.length+(l===h-1?0:1)))&&u.push(p+b);if(u.length>0)return[m,o+u.join(",\n"+f),s].join("\n"+i)}return g}(e,"",0)};function V(e,t){const o={};for(const r in t)void 0!==e[r]&&(o[r]=e[r]);for(const r in e)void 0===o[r]&&(o[r]=e[r]);return o}function H(e,t=2){return(e=V(e,G.$root)).layers&&(e.layers=e.layers.map(e=>V(e,G.layer))),B(e,{indent:t})}var Z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function X(e){var t={exports:{}};return e(t,t.exports),t.exports}function K(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}var Y=X(function(e,t){!function(o){var r=t&&!t.nodeType&&t,n=e&&!e.nodeType&&e,i="object"==typeof Z&&Z;i.global!==i&&i.window!==i&&i.self!==i||(o=i);var a,s,l=2147483647,u=36,c=1,p=26,d=38,h=700,f=72,y=128,m="-",g=/^xn--/,b=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=u-c,k=Math.floor,j=String.fromCharCode;function z(e){throw RangeError(x[e])}function S(e,t){for(var o=e.length,r=[];o--;)r[o]=t(e[o]);return r}function T(e,t){var o=e.split("@"),r="";return o.length>1&&(r=o[0]+"@",e=o[1]),r+S((e=e.replace(v,".")).split("."),t).join(".")}function _(e){for(var t,o,r=[],n=0,i=e.length;n<i;)(t=e.charCodeAt(n++))>=55296&&t<=56319&&n<i?56320==(64512&(o=e.charCodeAt(n++)))?r.push(((1023&t)<<10)+(1023&o)+65536):(r.push(t),n--):r.push(t);return r}function $(e){return S(e,function(e){var t="";return e>65535&&(t+=j((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=j(e)}).join("")}function A(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function I(e,t,o){var r=0;for(e=o?k(e/h):e>>1,e+=k(e/t);e>w*p>>1;r+=u)e=k(e/w);return k(r+(w+1)*e/(e+d))}function q(e){var t,o,r,n,i,a,s,d,h,g,b,v=[],x=e.length,w=0,j=y,S=f;for((o=e.lastIndexOf(m))<0&&(o=0),r=0;r<o;++r)e.charCodeAt(r)>=128&&z("not-basic"),v.push(e.charCodeAt(r));for(n=o>0?o+1:0;n<x;){for(i=w,a=1,s=u;n>=x&&z("invalid-input"),((d=(b=e.charCodeAt(n++))-48<10?b-22:b-65<26?b-65:b-97<26?b-97:u)>=u||d>k((l-w)/a))&&z("overflow"),w+=d*a,!(d<(h=s<=S?c:s>=S+p?p:s-S));s+=u)a>k(l/(g=u-h))&&z("overflow"),a*=g;S=I(w-i,t=v.length+1,0==i),k(w/t)>l-j&&z("overflow"),j+=k(w/t),w%=t,v.splice(w++,0,j)}return $(v)}function O(e){var t,o,r,n,i,a,s,d,h,g,b,v,x,w,S,T=[];for(v=(e=_(e)).length,t=y,o=0,i=f,a=0;a<v;++a)(b=e[a])<128&&T.push(j(b));for(r=n=T.length,n&&T.push(m);r<v;){for(s=l,a=0;a<v;++a)(b=e[a])>=t&&b<s&&(s=b);for(s-t>k((l-o)/(x=r+1))&&z("overflow"),o+=(s-t)*x,t=s,a=0;a<v;++a)if((b=e[a])<t&&++o>l&&z("overflow"),b==t){for(d=o,h=u;!(d<(g=h<=i?c:h>=i+p?p:h-i));h+=u)S=d-g,w=u-g,T.push(j(A(g+S%w,0))),d=k(S/w);T.push(j(A(d,0))),i=I(o,x,r==n),o=0,++r}++o,++t}return T.join("")}if(a={version:"1.3.2",ucs2:{decode:_,encode:$},decode:q,encode:O,toASCII:function(e){return T(e,function(e){return b.test(e)?"xn--"+O(e):e})},toUnicode:function(e){return T(e,function(e){return g.test(e)?q(e.slice(4).toLowerCase()):e})}},r&&n)if(e.exports==r)n.exports=a;else for(s in a)a.hasOwnProperty(s)&&(r[s]=a[s]);else o.punycode=a}(Z)}),Q={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}};function ee(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var te=function(e,t,o,r){t=t||"&",o=o||"=";var n={};if("string"!=typeof e||0===e.length)return n;var i=/\+/g;e=e.split(t);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var s=e.length;a>0&&s>a&&(s=a);for(var l=0;l<s;++l){var u,c,p,d,h=e[l].replace(i,"%20"),f=h.indexOf(o);f>=0?(u=h.substr(0,f),c=h.substr(f+1)):(u=h,c=""),p=decodeURIComponent(u),d=decodeURIComponent(c),ee(n,p)?Array.isArray(n[p])?n[p].push(d):n[p]=[n[p],d]:n[p]=d}return n},oe=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},re=function(e,t,o,r){return t=t||"&",o=o||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(r){var n=encodeURIComponent(oe(r))+o;return Array.isArray(e[r])?e[r].map(function(e){return n+encodeURIComponent(oe(e))}).join(t):n+encodeURIComponent(oe(e[r]))}).join(t):r?encodeURIComponent(oe(r))+o+encodeURIComponent(oe(e)):""},ne=X(function(e,t){t.decode=t.parse=te,t.encode=t.stringify=re}),ie=Se,ae=_e,se=$e,le=Te,ue=ce;function ce(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var pe=/^([a-z0-9.+-]+:)/i,de=/:[0-9]*$/,he=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,fe=["<",">",'"',"`"," ","\r","\n","\t"],ye=["{","}","|","\\","^","`"].concat(fe),me=["'"].concat(ye),ge=["%","/","?",";","#"].concat(me),be=["/","?","#"],ve=255,xe=/^[+a-z0-9A-Z_-]{0,63}$/,we=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ke={javascript:!0,"javascript:":!0},je={javascript:!0,"javascript:":!0},ze={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Se(e,t,o){if(e&&Q.isObject(e)&&e instanceof ce)return e;var r=new ce;return r.parse(e,t,o),r}function Te(e){return Q.isString(e)&&(e=Se(e)),e instanceof ce?e.format():ce.prototype.format.call(e)}function _e(e,t){return Se(e,!1,!0).resolve(t)}function $e(e,t){return e?Se(e,!1,!0).resolveObject(t):t}ce.prototype.parse=function(e,t,o){if(!Q.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),n=-1!==r&&r<e.indexOf("#")?"?":"#",i=e.split(n);i[0]=i[0].replace(/\\/g,"/");var a=e=i.join(n);if(a=a.trim(),!o&&1===e.split("#").length){var s=he.exec(a);if(s)return this.path=a,this.href=a,this.pathname=s[1],s[2]?(this.search=s[2],this.query=t?ne.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var l=pe.exec(a);if(l){var u=(l=l[0]).toLowerCase();this.protocol=u,a=a.substr(l.length)}if(o||l||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var c="//"===a.substr(0,2);!c||l&&je[l]||(a=a.substr(2),this.slashes=!0)}if(!je[l]&&(c||l&&!ze[l])){for(var p,d,h=-1,f=0;f<be.length;f++){-1!==(y=a.indexOf(be[f]))&&(-1===h||y<h)&&(h=y)}-1!==(d=-1===h?a.lastIndexOf("@"):a.lastIndexOf("@",h))&&(p=a.slice(0,d),a=a.slice(d+1),this.auth=decodeURIComponent(p)),h=-1;for(f=0;f<ge.length;f++){var y;-1!==(y=a.indexOf(ge[f]))&&(-1===h||y<h)&&(h=y)}-1===h&&(h=a.length),this.host=a.slice(0,h),a=a.slice(h),this.parseHost(),this.hostname=this.hostname||"";var m="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!m)for(var g=this.hostname.split(/\./),b=(f=0,g.length);f<b;f++){var v=g[f];if(v&&!v.match(xe)){for(var x="",w=0,k=v.length;w<k;w++)v.charCodeAt(w)>127?x+="x":x+=v[w];if(!x.match(xe)){var j=g.slice(0,f),z=g.slice(f+1),S=v.match(we);S&&(j.push(S[1]),z.unshift(S[2])),z.length&&(a="/"+z.join(".")+a),this.hostname=j.join(".");break}}}this.hostname.length>ve?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=Y.toASCII(this.hostname));var T=this.port?":"+this.port:"",_=this.hostname||"";this.host=_+T,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!ke[u])for(f=0,b=me.length;f<b;f++){var $=me[f];if(-1!==a.indexOf($)){var A=encodeURIComponent($);A===$&&(A=escape($)),a=a.split($).join(A)}}var I=a.indexOf("#");-1!==I&&(this.hash=a.substr(I),a=a.slice(0,I));var q=a.indexOf("?");if(-1!==q?(this.search=a.substr(q),this.query=a.substr(q+1),t&&(this.query=ne.parse(this.query)),a=a.slice(0,q)):t&&(this.search="",this.query={}),a&&(this.pathname=a),ze[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){T=this.pathname||"";var O=this.search||"";this.path=T+O}return this.href=this.format(),this},ce.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",o=this.pathname||"",r=this.hash||"",n=!1,i="";this.host?n=e+this.host:this.hostname&&(n=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&Q.isObject(this.query)&&Object.keys(this.query).length&&(i=ne.stringify(this.query));var a=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||ze[t])&&!1!==n?(n="//"+(n||""),o&&"/"!==o.charAt(0)&&(o="/"+o)):n||(n=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),t+n+(o=o.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(a=a.replace("#","%23"))+r},ce.prototype.resolve=function(e){return this.resolveObject(Se(e,!1,!0)).format()},ce.prototype.resolveObject=function(e){if(Q.isString(e)){var t=new ce;t.parse(e,!1,!0),e=t}for(var o=new ce,r=Object.keys(this),n=0;n<r.length;n++){var i=r[n];o[i]=this[i]}if(o.hash=e.hash,""===e.href)return o.href=o.format(),o;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),s=0;s<a.length;s++){var l=a[s];"protocol"!==l&&(o[l]=e[l])}return ze[o.protocol]&&o.hostname&&!o.pathname&&(o.path=o.pathname="/"),o.href=o.format(),o}if(e.protocol&&e.protocol!==o.protocol){if(!ze[e.protocol]){for(var u=Object.keys(e),c=0;c<u.length;c++){var p=u[c];o[p]=e[p]}return o.href=o.format(),o}if(o.protocol=e.protocol,e.host||je[e.protocol])o.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),o.pathname=d.join("/")}if(o.search=e.search,o.query=e.query,o.host=e.host||"",o.auth=e.auth,o.hostname=e.hostname||e.host,o.port=e.port,o.pathname||o.search){var h=o.pathname||"",f=o.search||"";o.path=h+f}return o.slashes=o.slashes||e.slashes,o.href=o.format(),o}var y=o.pathname&&"/"===o.pathname.charAt(0),m=e.host||e.pathname&&"/"===e.pathname.charAt(0),g=m||y||o.host&&e.pathname,b=g,v=o.pathname&&o.pathname.split("/")||[],x=(d=e.pathname&&e.pathname.split("/")||[],o.protocol&&!ze[o.protocol]);if(x&&(o.hostname="",o.port=null,o.host&&(""===v[0]?v[0]=o.host:v.unshift(o.host)),o.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),g=g&&(""===d[0]||""===v[0])),m)o.host=e.host||""===e.host?e.host:o.host,o.hostname=e.hostname||""===e.hostname?e.hostname:o.hostname,o.search=e.search,o.query=e.query,v=d;else if(d.length)v||(v=[]),v.pop(),v=v.concat(d),o.search=e.search,o.query=e.query;else if(!Q.isNullOrUndefined(e.search)){if(x)o.hostname=o.host=v.shift(),(S=!!(o.host&&o.host.indexOf("@")>0)&&o.host.split("@"))&&(o.auth=S.shift(),o.host=o.hostname=S.shift());return o.search=e.search,o.query=e.query,Q.isNull(o.pathname)&&Q.isNull(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.href=o.format(),o}if(!v.length)return o.pathname=null,o.search?o.path="/"+o.search:o.path=null,o.href=o.format(),o;for(var w=v.slice(-1)[0],k=(o.host||e.host||v.length>1)&&("."===w||".."===w)||""===w,j=0,z=v.length;z>=0;z--)"."===(w=v[z])?v.splice(z,1):".."===w?(v.splice(z,1),j++):j&&(v.splice(z,1),j--);if(!g&&!b)for(;j--;j)v.unshift("..");!g||""===v[0]||v[0]&&"/"===v[0].charAt(0)||v.unshift(""),k&&"/"!==v.join("/").substr(-1)&&v.push("");var S,T=""===v[0]||v[0]&&"/"===v[0].charAt(0);x&&(o.hostname=o.host=T?"":v.length?v.shift():"",(S=!!(o.host&&o.host.indexOf("@")>0)&&o.host.split("@"))&&(o.auth=S.shift(),o.host=o.hostname=S.shift()));return(g=g||o.host&&v.length)&&!T&&v.unshift(""),v.length?o.pathname=v.join("/"):(o.pathname=null,o.path=null),Q.isNull(o.pathname)&&Q.isNull(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.auth=e.auth||o.auth,o.slashes=o.slashes||e.slashes,o.href=o.format(),o},ce.prototype.parseHost=function(){var e=this.host,t=de.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Ae={parse:ie,resolve:ae,resolveObject:se,format:le,Url:ue};function Ie(e){for(let t=0;t<G.layout.length;t++)for(const o in G[G.layout[t]])if(o===e)return G[G.layout[t]][o];for(let t=0;t<G.paint.length;t++)for(const o in G[G.paint[t]])if(o===e)return G[G.paint[t]][o];return null}function qe(e,t){for(const o in e.sources)t(e.sources[o])}function Oe(e,t){for(const o of e.layers)t(o)}function Ce(e,t,o){function r(e,t){const r=e[t];r&&Object.keys(r).forEach(n=>{o({path:[e.id,t,n],key:n,value:r[n],reference:Ie(n),set(e){r[n]=e}})})}Oe(e,e=>{t.paint&&r(e,"paint"),t.layout&&r(e,"layout")})}function Ee(e,t){for(const o in e)0===o.indexOf("layout")&&t(e[o],o)}function Me(e,t){for(const o in e)0===o.indexOf("paint")&&t(e[o],o)}function Ne(e,t){return"string"==typeof t&&"@"===t[0]?Ne(e,e.constants[t]):t}function Pe(e){return Array.isArray(e.stops)}function Re(e,t,o){e[o]=e[t],delete e[t]}function De(e){e.version=8,qe(e,e=>{"video"===e.type&&void 0!==e.url&&Re(e,"url","urls"),"video"===e.type&&e.coordinates.forEach(e=>e.reverse())}),Oe(e,e=>{Ee(e,e=>{void 0!==e["symbol-min-distance"]&&Re(e,"symbol-min-distance","symbol-spacing")}),Me(e,e=>{void 0!==e["background-image"]&&Re(e,"background-image","background-pattern"),void 0!==e["line-image"]&&Re(e,"line-image","line-pattern"),void 0!==e["fill-image"]&&Re(e,"fill-image","fill-pattern")})}),Ce(e,{paint:!0,layout:!0},t=>{const o=Ne(e,t.value);Pe(o)&&o.stops.forEach(t=>{t[1]=Ne(e,t[1])}),t.set(o)}),delete e.constants,Oe(e,e=>{Ee(e,e=>{delete e["text-max-size"],delete e["icon-max-size"]}),Me(e,t=>{t["text-size"]&&(e.layout||(e.layout={}),e.layout["text-size"]=t["text-size"],delete t["text-size"]),t["icon-size"]&&(e.layout||(e.layout={}),e.layout["icon-size"]=t["icon-size"],delete t["icon-size"])})}),e.glyphs&&(e.glyphs=function(e){const t=Ae.parse(e),o=t.pathname.split("/");return"mapbox:"!==t.protocol?e:"fontstack"===t.hostname?"mapbox://fonts/mapbox/{fontstack}/{range}.pbf":"fonts"===t.hostname?`mapbox://fonts/${o[2]}/{fontstack}/{range}.pbf`:void 0}(e.glyphs)),Oe(e,e=>{Ee(e,e=>{e["text-font"]&&(e["text-font"]=function(e){function t(e){return e.split(",").map(e=>e.trim())}if(Array.isArray(e))return e;if("string"==typeof e)return t(e);if("object"==typeof e)return e.stops.forEach(e=>{e[1]=t(e[1])}),e;throw new Error("unexpected font value")}(e["text-font"]))})});let t=0;for(let r=e.layers.length-1;r>=0;r--){if("symbol"!==e.layers[r].type){t=r+1;break}}const o=e.layers.splice(t);return o.reverse(),e.layers=e.layers.concat(o),e}function Le(e,...t){for(const o of t)for(const t in o)e[t]=o[t];return e}class Fe extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}class Ue{constructor(e,t=[]){this.parent=e,this.bindings={};for(const[o,r]of t)this.bindings[o]=r}concat(e){return new Ue(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}const Je={kind:"null"},Ge={kind:"number"},We={kind:"string"},Be={kind:"boolean"},Ve={kind:"color"},He={kind:"object"},Ze={kind:"value"},Xe={kind:"error"},Ke={kind:"collator"},Ye={kind:"formatted"},Qe={kind:"resolvedImage"};function et(e,t){return{kind:"array",itemType:e,N:t}}function tt(e){if("array"===e.kind){const t=tt(e.itemType);return"number"==typeof e.N?`array<${t}, ${e.N}>`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}const ot=[Je,Ge,We,Be,Ve,Ye,He,et(Ze),Qe];function rt(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!rt(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(const e of ot)if(!rt(e,t))return null}return`Expected ${tt(e)} but found ${tt(t)} instead.`}function nt(e,t){return t.some(t=>t.kind===e.kind)}function it(e,t){return t.some(t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e)}var at=X(function(e,t){var o={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function r(e){return(e=Math.round(e))<0?0:e>255?255:e}function n(e){return e<0?0:e>1?1:e}function i(e){return"%"===e[e.length-1]?r(parseFloat(e)/100*255):r(parseInt(e))}function a(e){return"%"===e[e.length-1]?n(parseFloat(e)/100):n(parseFloat(e))}function s(e,t,o){return o<0?o+=1:o>1&&(o-=1),6*o<1?e+(t-e)*o*6:2*o<1?t:3*o<2?e+(t-e)*(2/3-o)*6:e}try{t.parseCSSColor=function(e){var t,n=e.replace(/ /g,"").toLowerCase();if(n in o)return o[n].slice();if("#"===n[0])return 4===n.length?(t=parseInt(n.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===n.length&&(t=parseInt(n.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var l=n.indexOf("("),u=n.indexOf(")");if(-1!==l&&u+1===n.length){var c=n.substr(0,l),p=n.substr(l+1,u-(l+1)).split(","),d=1;switch(c){case"rgba":if(4!==p.length)return null;d=a(p.pop());case"rgb":return 3!==p.length?null:[i(p[0]),i(p[1]),i(p[2]),d];case"hsla":if(4!==p.length)return null;d=a(p.pop());case"hsl":if(3!==p.length)return null;var h=(parseFloat(p[0])%360+360)%360/360,f=a(p[1]),y=a(p[2]),m=y<=.5?y*(f+1):y+f-y*f,g=2*y-m;return[r(255*s(g,m,h+1/3)),r(255*s(g,m,h)),r(255*s(g,m,h-1/3)),d];default:return null}}return null}}catch(l){}});class st{constructor(e,t,o,r=1){this.r=e,this.g=t,this.b=o,this.a=r}static parse(e){if(!e)return;if(e instanceof st)return e;if("string"!=typeof e)return;const t=at.parseCSSColor(e);return t?new st(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,o,r]=this.toArray();return`rgba(${Math.round(e)},${Math.round(t)},${Math.round(o)},${r})`}toArray(){const{r:e,g:t,b:o,a:r}=this;return 0===r?[0,0,0,0]:[255*e/r,255*t/r,255*o/r,r]}}exports.Color=st,st.black=new st(0,0,0,1),st.white=new st(1,1,1,1),st.transparent=new st(0,0,0,0),st.red=new st(1,0,0,1),st.blue=new st(0,0,1,1);class lt{constructor(e,t,o){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=o,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class ut{constructor(e,t,o,r,n){this.text=e,this.image=t,this.scale=o,this.fontStack=r,this.textColor=n}}class ct{constructor(e){this.sections=e}static fromString(e){return new ct([new ut(e,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(e=>0!==e.text.length||e.image&&0!==e.image.name.length)}static factory(e){return e instanceof ct?e:ct.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const t of this.sections){if(t.image){e.push(["image",t.image.name]);continue}e.push(t.text);const o={};t.fontStack&&(o["text-font"]=["literal",t.fontStack.split(",")]),t.scale&&(o["font-scale"]=t.scale),t.textColor&&(o["text-color"]=["rgba"].concat(t.textColor.toArray())),e.push(o)}return e}}class pt{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new pt({name:e,available:!1}):null}serialize(){return["image",this.name]}}function dt(e,t,o,r){if(!("number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof o&&o>=0&&o<=255)){return`Invalid rgba value [${("number"==typeof r?[e,t,o,r]:[e,t,o]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}return void 0===r||"number"==typeof r&&r>=0&&r<=1?null:`Invalid rgba value [${[e,t,o,r].join(", ")}]: 'a' must be between 0 and 1.`}function ht(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof st)return!0;if(e instanceof lt)return!0;if(e instanceof ct)return!0;if(e instanceof pt)return!0;if(Array.isArray(e)){for(const t of e)if(!ht(t))return!1;return!0}if("object"==typeof e){for(const t in e)if(!ht(e[t]))return!1;return!0}return!1}function ft(e){if(null===e)return Je;if("string"==typeof e)return We;if("boolean"==typeof e)return Be;if("number"==typeof e)return Ge;if(e instanceof st)return Ve;if(e instanceof lt)return Ke;if(e instanceof ct)return Ye;if(e instanceof pt)return Qe;if(Array.isArray(e)){const t=e.length;let o;for(const r of e){const e=ft(r);if(o){if(o===e)continue;o=Ze;break}o=e}return et(o||Ze,t)}return He}function yt(e){const t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof st||e instanceof ct||e instanceof pt?e.toString():JSON.stringify(e)}class mt{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!ht(e[1]))return t.error("invalid value");const o=e[1];let r=ft(o);const n=t.expectedType;return"array"!==r.kind||0!==r.N||!n||"array"!==n.kind||"number"==typeof n.N&&0!==n.N||(r=n),new mt(r,o)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof st?["rgba"].concat(this.value.toArray()):this.value instanceof ct?this.value.serialize():this.value}}class gt{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}const bt={string:We,number:Ge,boolean:Be,object:He};class vt{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let o,r=1;const n=e[0];if("array"===n){let n,i;if(e.length>2){const o=e[1];if("string"!=typeof o||!(o in bt)||"object"===o)return t.error('The item type argument of "array" must be one of string, number, boolean',1);n=bt[o],r++}else n=Ze;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);i=e[2],r++}o=et(n,i)}else o=bt[n];const i=[];for(;r<e.length;r++){const o=t.parse(e[r],r,Ze);if(!o)return null;i.push(o)}return new vt(o,i)}evaluate(e){for(let t=0;t<this.args.length;t++){const o=this.args[t].evaluate(e);if(!rt(this.type,ft(o)))return o;if(t===this.args.length-1)throw new gt(`Expected value to be of type ${tt(this.type)}, but found ${tt(ft(o))} instead.`)}return null}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=this.type,t=[e.kind];if("array"===e.kind){const o=e.itemType;if("string"===o.kind||"number"===o.kind||"boolean"===o.kind){t.push(o.kind);const r=e.N;("number"==typeof r||this.args.length>1)&&t.push(r)}}return t.concat(this.args.map(e=>e.serialize()))}}class xt{constructor(e){this.type=Ye,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const o=e[1];if(!Array.isArray(o)&&"object"==typeof o)return t.error("First argument must be an image or text section.");const r=[];let n=!1;for(let i=1;i<=e.length-1;++i){const o=e[i];if(n&&"object"==typeof o&&!Array.isArray(o)){n=!1;let e=null;if(o["font-scale"]&&!(e=t.parse(o["font-scale"],1,Ge)))return null;let i=null;if(o["text-font"]&&!(i=t.parse(o["text-font"],1,et(We))))return null;let a=null;if(o["text-color"]&&!(a=t.parse(o["text-color"],1,Ve)))return null;const s=r[r.length-1];s.scale=e,s.font=i,s.textColor=a}else{const o=t.parse(e[i],1,Ze);if(!o)return null;const a=o.type.kind;if("string"!==a&&"value"!==a&&"null"!==a&&"resolvedImage"!==a)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,r.push({content:o,scale:null,font:null,textColor:null})}}return new xt(r)}evaluate(e){return new ct(this.sections.map(t=>{const o=t.content.evaluate(e);return ft(o)===Qe?new ut("",o,null,null,null):new ut(yt(o),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)}))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const t of this.sections){e.push(t.content.serialize());const o={};t.scale&&(o["font-scale"]=t.scale.serialize()),t.font&&(o["text-font"]=t.font.serialize()),t.textColor&&(o["text-color"]=t.textColor.serialize()),e.push(o)}return e}}class wt{constructor(e){this.type=Qe,this.input=e}static parse(e,t){if(2!==e.length)return t.error("Expected two arguments.");const o=t.parse(e[1],1,We);return o?new wt(o):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),o=pt.fromString(t);return o&&e.availableImages&&(o.available=e.availableImages.indexOf(t)>-1),o}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const kt={"to-boolean":Be,"to-color":Ve,"to-number":Ge,"to-string":We};class jt{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const o=e[0];if(("to-boolean"===o||"to-string"===o)&&2!==e.length)return t.error("Expected one argument.");const r=kt[o],n=[];for(let i=1;i<e.length;i++){const o=t.parse(e[i],i,Ze);if(!o)return null;n.push(o)}return new jt(r,n)}evaluate(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){let t,o;for(const r of this.args){if(t=r.evaluate(e),o=null,t instanceof st)return t;if("string"==typeof t){const o=e.parseColor(t);if(o)return o}else if(Array.isArray(t)&&!(o=t.length<3||t.length>4?`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:dt(t[0],t[1],t[2],t[3])))return new st(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new gt(o||`Could not parse color from value '${"string"==typeof t?t:String(JSON.stringify(t))}'`)}if("number"===this.type.kind){let t=null;for(const o of this.args){if(null===(t=o.evaluate(e)))return 0;const r=Number(t);if(!isNaN(r))return r}throw new gt(`Could not convert ${JSON.stringify(t)} to number.`)}return"formatted"===this.type.kind?ct.fromString(yt(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?pt.fromString(yt(this.args[0].evaluate(e))):yt(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if("formatted"===this.type.kind)return new xt([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new wt(this.args[0]).serialize();const e=[`to-${this.type.kind}`];return this.eachChild(t=>{e.push(t.serialize())}),e}}const zt=["Unknown","Point","LineString","Polygon"];class St{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?zt[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=st.parse(e)),t}}class Tt{constructor(e,t,o,r){this.name=e,this.type=t,this._evaluate=o,this.args=r}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,t){const o=e[0],r=Tt.definitions[o];if(!r)return t.error(`Unknown expression "${o}". If you wanted a literal array, use ["literal", [...]].`,0);const n=Array.isArray(r)?r[0]:r.type,i=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,a=i.filter(([t])=>!Array.isArray(t)||t.length===e.length-1);let s=null;for(const[l,u]of a){s=new no(t.registry,t.path,null,t.scope);const r=[];let i=!1;for(let t=1;t<e.length;t++){const o=e[t],n=Array.isArray(l)?l[t-1]:l.type,a=s.parse(o,1+r.length,n);if(!a){i=!0;break}r.push(a)}if(!i)if(Array.isArray(l)&&l.length!==r.length)s.error(`Expected ${l.length} arguments, but found ${r.length} instead.`);else{for(let e=0;e<r.length;e++){const t=Array.isArray(l)?l[e]:l.type,o=r[e];s.concat(e+1).checkSubtype(t,o.type)}if(0===s.errors.length)return new Tt(o,n,u,r)}}if(1===a.length)t.errors.push(...s.errors);else{const o=(a.length?a:i).map(([e])=>_t(e)).join(" | "),r=[];for(let n=1;n<e.length;n++){const o=t.parse(e[n],1+r.length);if(!o)return null;r.push(tt(o.type))}t.error(`Expected arguments of type ${o}, but found (${r.join(", ")}) instead.`)}return null}static register(e,t){Tt.definitions=t;for(const o in t)e[o]=Tt}}function _t(e){return Array.isArray(e)?`(${e.map(tt).join(", ")})`:`(${tt(e.type)}...)`}class $t{constructor(e,t,o){this.type=Ke,this.locale=o,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(2!==e.length)return t.error("Expected one argument.");const o=e[1];if("object"!=typeof o||Array.isArray(o))return t.error("Collator options argument must be an object.");const r=t.parse(void 0!==o["case-sensitive"]&&o["case-sensitive"],1,Be);if(!r)return null;const n=t.parse(void 0!==o["diacritic-sensitive"]&&o["diacritic-sensitive"],1,Be);if(!n)return null;let i=null;return o.locale&&!(i=t.parse(o.locale,1,We))?null:new $t(r,n,i)}evaluate(e){return new lt(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}serialize(){const e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]}}const At=8192;function It(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function qt(e){return(180+e)/360}function Ot(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Ct(e,t){return!(e[0]<=t[0])&&(!(e[2]>=t[2])&&(!(e[1]<=t[1])&&!(e[3]>=t[3])))}function Et(e,t){const o=qt(e[0]),r=Ot(e[1]),n=Math.pow(2,t.z);return[Math.round(o*n*At),Math.round(r*n*At)]}function Mt(e,t,o){const r=e[0]-t[0],n=e[1]-t[1],i=e[0]-o[0],a=e[1]-o[1];return r*a-i*n==0&&r*i<=0&&n*a<=0}function Nt(e,t,o){return t[1]>e[1]!=o[1]>e[1]&&e[0]<(o[0]-t[0])*(e[1]-t[1])/(o[1]-t[1])+t[0]}function Pt(e,t){let o=!1;for(let r=0,n=t.length;r<n;r++){const n=t[r];for(let t=0,r=n.length;t<r-1;t++){if(Mt(e,n[t],n[t+1]))return!1;Nt(e,n[t],n[t+1])&&(o=!o)}}return o}function Rt(e,t){for(let o=0;o<t.length;o++)if(Pt(e,t[o]))return!0;return!1}function Dt(e,t){return e[0]*t[1]-e[1]*t[0]}function Lt(e,t,o,r){const n=e[0]-o[0],i=e[1]-o[1],a=t[0]-o[0],s=t[1]-o[1],l=r[0]-o[0],u=r[1]-o[1],c=n*u-l*i,p=a*u-l*s;return c>0&&p<0||c<0&&p>0}function Ft(e,t,o,r){const n=[t[0]-e[0],t[1]-e[1]];return 0!==Dt([r[0]-o[0],r[1]-o[1]],n)&&!(!Lt(e,t,o,r)||!Lt(o,r,e,t))}function Ut(e,t,o){for(const r of o)for(let o=0;o<r.length-1;++o)if(Ft(e,t,r[o],r[o+1]))return!0;return!1}function Jt(e,t){for(let o=0;o<e.length;++o)if(!Pt(e[o],t))return!1;for(let o=0;o<e.length-1;++o)if(Ut(e[o],e[o+1],t))return!1;return!0}function Gt(e,t){for(let o=0;o<t.length;o++)if(Jt(e,t[o]))return!0;return!1}function Wt(e,t,o){const r=[];for(let n=0;n<e.length;n++){const i=[];for(let r=0;r<e[n].length;r++){const a=Et(e[n][r],o);It(t,a),i.push(a)}r.push(i)}return r}function Bt(e,t,o){const r=[];for(let n=0;n<e.length;n++){const i=Wt(e[n],t,o);r.push(i)}return r}function Vt(e,t,o,r){if(e[0]<o[0]||e[0]>o[2]){const t=.5*r;let n=e[0]-o[0]>t?-r:o[0]-e[0]>t?r:0;0===n&&(n=e[0]-o[2]>t?-r:o[2]-e[0]>t?r:0),e[0]+=n}It(t,e)}function Ht(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}function Zt(e,t,o,r){const n=Math.pow(2,r.z)*At,i=[r.x*At,r.y*At],a=[];for(const s of e)for(const e of s){const r=[e.x+i[0],e.y+i[1]];Vt(r,t,o,n),a.push(r)}return a}function Xt(e,t,o,r){const n=Math.pow(2,r.z)*At,i=[r.x*At,r.y*At],a=[];for(const s of e){const e=[];for(const o of s){const r=[o.x+i[0],o.y+i[1]];It(t,r),e.push(r)}a.push(e)}if(t[2]-t[0]<=n/2){Ht(t);for(const e of a)for(const r of e)Vt(r,t,o,n)}return a}function Kt(e,t){const o=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if("Polygon"===t.type){const i=Wt(t.coordinates,r,n),a=Zt(e.geometry(),o,r,n);if(!Ct(o,r))return!1;for(const e of a)if(!Pt(e,i))return!1}if("MultiPolygon"===t.type){const i=Bt(t.coordinates,r,n),a=Zt(e.geometry(),o,r,n);if(!Ct(o,r))return!1;for(const e of a)if(!Rt(e,i))return!1}return!0}function Yt(e,t){const o=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if("Polygon"===t.type){const i=Wt(t.coordinates,r,n),a=Xt(e.geometry(),o,r,n);if(!Ct(o,r))return!1;for(const e of a)if(!Jt(e,i))return!1}if("MultiPolygon"===t.type){const i=Bt(t.coordinates,r,n),a=Xt(e.geometry(),o,r,n);if(!Ct(o,r))return!1;for(const e of a)if(!Gt(e,i))return!1}return!0}class Qt{constructor(e,t){this.type=Be,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(ht(e[1])){const t=e[1];if("FeatureCollection"===t.type)for(let e=0;e<t.features.length;++e){const o=t.features[e].geometry.type;if("Polygon"===o||"MultiPolygon"===o)return new Qt(t,t.features[e].geometry)}else if("Feature"===t.type){const e=t.geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new Qt(t,t.geometry)}else if("Polygon"===t.type||"MultiPolygon"===t.type)return new Qt(t,t)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return Kt(e,this.geometries);if("LineString"===e.geometryType())return Yt(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}function eo(e){if(e instanceof Tt){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}if(e instanceof Qt)return!1;let t=!0;return e.eachChild(e=>{t&&!eo(e)&&(t=!1)}),t}function to(e){if(e instanceof Tt&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild(e=>{t&&!to(e)&&(t=!1)}),t}function oo(e,t){if(e instanceof Tt&&t.indexOf(e.name)>=0)return!1;let o=!0;return e.eachChild(e=>{o&&!oo(e,t)&&(o=!1)}),o}class ro{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");const o=e[1];return t.scope.has(o)?new ro(o,t.scope.get(o)):t.error(`Unknown variable "${o}". Make sure "${o}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}class no{constructor(e,t=[],o,r=new Ue,n=[]){this.registry=e,this.path=t,this.key=t.map(e=>`[${e}]`).join(""),this.scope=r,this.errors=n,this.expectedType=o}parse(e,t,o,r,n={}){return t?this.concat(t,o,r)._parse(e,n):this._parse(e,n)}_parse(e,t){function o(e,t,o){return"assert"===o?new vt(t,[e]):"coerce"===o?new jt(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const n=e[0];if("string"!=typeof n)return this.error(`Expression name must be a string, but found ${typeof n} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const i=this.registry[n];if(i){let n=i.parse(e,this);if(!n)return null;if(this.expectedType){const e=this.expectedType,r=n.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==r.kind)if("color"!==e.kind&&"formatted"!==e.kind&&"resolvedImage"!==e.kind||"value"!==r.kind&&"string"!==r.kind){if(this.checkSubtype(e,r))return null}else n=o(n,e,t.typeAnnotation||"coerce");else n=o(n,e,t.typeAnnotation||"assert")}if(!(n instanceof mt)&&"resolvedImage"!==n.type.kind&&io(n)){const e=new St;try{n=new mt(n.type,n.evaluate(e))}catch(r){return this.error(r.message),null}}return n}return this.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,t,o){const r="number"==typeof e?this.path.concat(e):this.path,n=o?this.scope.concat(o):this.scope;return new no(this.registry,r,t||null,n,this.errors)}error(e,...t){const o=`${this.key}${t.map(e=>`[${e}]`).join("")}`;this.errors.push(new Fe(o,e))}checkSubtype(e,t){const o=rt(e,t);return o&&this.error(o),o}}function io(e){if(e instanceof ro)return io(e.boundExpression);if(e instanceof Tt&&"error"===e.name)return!1;if(e instanceof $t)return!1;if(e instanceof Qt)return!1;const t=e instanceof jt||e instanceof vt;let o=!0;return e.eachChild(e=>{o=t?o&&io(e):o&&e instanceof mt}),!!o&&(eo(e)&&oo(e,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script"]))}function ao(e,t){const o=e.length-1;let r,n,i=0,a=o,s=0;for(;i<=a;)if(r=e[s=Math.floor((i+a)/2)],n=e[s+1],r<=t){if(s===o||t<n)return s;i=s+1}else{if(!(r>t))throw new gt("Input is not a number.");a=s-1}return 0}class so{constructor(e,t,o){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[r,n]of o)this.labels.push(r),this.outputs.push(n)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");const o=t.parse(e[1],1,Ge);if(!o)return null;const r=[];let n=null;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(let i=1;i<e.length;i+=2){const o=1===i?-1/0:e[i],a=e[i+1],s=i,l=i+1;if("number"!=typeof o)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',s);if(r.length&&r[r.length-1][0]>=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const u=t.parse(a,l,n);if(!u)return null;n=n||u.type,r.push([o,u])}return new so(n,o,r)}evaluate(e){const t=this.labels,o=this.outputs;if(1===t.length)return o[0].evaluate(e);const r=this.input.evaluate(e);if(r<=t[0])return o[0].evaluate(e);const n=t.length;return r>=t[n-1]?o[n-1].evaluate(e):o[ao(t,r)].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e}}var lo=uo;function uo(e,t,o,r){this.cx=3*e,this.bx=3*(o-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(r-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=r,this.p2x=o,this.p2y=r}function co(e,t,o){return e*(1-o)+t*o}function po(e,t,o){return new st(co(e.r,t.r,o),co(e.g,t.g,o),co(e.b,t.b,o),co(e.a,t.a,o))}function ho(e,t,o){return e.map((e,r)=>co(e,t[r],o))}uo.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},uo.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},uo.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},uo.prototype.solveCurveX=function(e,t){var o,r,n,i,a;for(void 0===t&&(t=1e-6),n=e,a=0;a<8;a++){if(i=this.sampleCurveX(n)-e,Math.abs(i)<t)return n;var s=this.sampleCurveDerivativeX(n);if(Math.abs(s)<1e-6)break;n-=i/s}if((n=e)<(o=0))return o;if(n>(r=1))return r;for(;o<r;){if(i=this.sampleCurveX(n),Math.abs(i-e)<t)return n;e>i?o=n:r=n,n=.5*(r-o)+o}return n},uo.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var fo=Object.freeze({__proto__:null,number:co,color:po,array:ho});const yo=.95047,mo=1,go=1.08883,bo=4/29,vo=6/29,xo=3*vo*vo,wo=vo*vo*vo,ko=Math.PI/180,jo=180/Math.PI;function zo(e){return e>wo?Math.pow(e,1/3):e/xo+bo}function So(e){return e>vo?e*e*e:xo*(e-bo)}function To(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function _o(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function $o(e){const t=_o(e.r),o=_o(e.g),r=_o(e.b),n=zo((.4124564*t+.3575761*o+.1804375*r)/yo),i=zo((.2126729*t+.7151522*o+.072175*r)/mo);return{l:116*i-16,a:500*(n-i),b:200*(i-zo((.0193339*t+.119192*o+.9503041*r)/go)),alpha:e.a}}function Ao(e){let t=(e.l+16)/116,o=isNaN(e.a)?t:t+e.a/500,r=isNaN(e.b)?t:t-e.b/200;return t=mo*So(t),o=yo*So(o),r=go*So(r),new st(To(3.2404542*o-1.5371385*t-.4985314*r),To(-.969266*o+1.8760108*t+.041556*r),To(.0556434*o-.2040259*t+1.0572252*r),e.alpha)}function Io(e,t,o){return{l:co(e.l,t.l,o),a:co(e.a,t.a,o),b:co(e.b,t.b,o),alpha:co(e.alpha,t.alpha,o)}}function qo(e){const{l:t,a:o,b:r}=$o(e),n=Math.atan2(r,o)*jo;return{h:n<0?n+360:n,c:Math.sqrt(o*o+r*r),l:t,alpha:e.a}}function Oo(e){const t=e.h*ko,o=e.c;return Ao({l:e.l,a:Math.cos(t)*o,b:Math.sin(t)*o,alpha:e.alpha})}function Co(e,t,o){const r=t-e;return e+o*(r>180||r<-180?r-360*Math.round(r/360):r)}function Eo(e,t,o){return{h:Co(e.h,t.h,o),c:co(e.c,t.c,o),l:co(e.l,t.l,o),alpha:co(e.alpha,t.alpha,o)}}const Mo={forward:$o,reverse:Ao,interpolate:Io},No={forward:qo,reverse:Oo,interpolate:Eo};var Po=Object.freeze({__proto__:null,lab:Mo,hcl:No});class Ro{constructor(e,t,o,r,n){this.type=e,this.operator=t,this.interpolation=o,this.input=r,this.labels=[],this.outputs=[];for(const[i,a]of n)this.labels.push(i),this.outputs.push(a)}static interpolationFactor(e,t,o,r){let n=0;if("exponential"===e.name)n=Do(t,e.base,o,r);else if("linear"===e.name)n=Do(t,1,o,r);else if("cubic-bezier"===e.name){const i=e.controlPoints;n=new lo(i[0],i[1],i[2],i[3]).solve(Do(t,1,o,r))}return n}static parse(e,t){let[o,r,n,...i]=e;if(!Array.isArray(r)||0===r.length)return t.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){const e=r[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:e}}else{if("cubic-bezier"!==r[0])return t.error(`Unknown interpolation type ${String(r[0])}`,1,0);{const e=r.slice(1);if(4!==e.length||e.some(e=>"number"!=typeof e||e<0||e>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(n=t.parse(n,2,Ge)))return null;const a=[];let s=null;"interpolate-hcl"===o||"interpolate-lab"===o?s=Ve:t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType);for(let l=0;l<i.length;l+=2){const e=i[l],o=i[l+1],r=l+3,n=l+4;if("number"!=typeof e)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',r);if(a.length&&a[a.length-1][0]>=e)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',r);const u=t.parse(o,n,s);if(!u)return null;s=s||u.type,a.push([e,u])}return"number"===s.kind||"color"===s.kind||"array"===s.kind&&"number"===s.itemType.kind&&"number"==typeof s.N?new Ro(s,o,r,n,a):t.error(`Type ${tt(s)} is not interpolatable.`)}evaluate(e){const t=this.labels,o=this.outputs;if(1===t.length)return o[0].evaluate(e);const r=this.input.evaluate(e);if(r<=t[0])return o[0].evaluate(e);const n=t.length;if(r>=t[n-1])return o[n-1].evaluate(e);const i=ao(t,r),a=t[i],s=t[i+1],l=Ro.interpolationFactor(this.interpolation,r,a,s),u=o[i].evaluate(e),c=o[i+1].evaluate(e);return"interpolate"===this.operator?fo[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?No.reverse(No.interpolate(No.forward(u),No.forward(c),l)):Mo.reverse(Mo.interpolate(Mo.forward(u),Mo.forward(c),l))}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const t=[this.operator,e,this.input.serialize()];for(let o=0;o<this.labels.length;o++)t.push(this.labels[o],this.outputs[o].serialize());return t}}function Do(e,t,o,r){const n=r-o,i=e-o;return 0===n?0:1===t?i/n:(Math.pow(t,i)-1)/(Math.pow(t,n)-1)}class Lo{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expectected at least one argument.");let o=null;const r=t.expectedType;r&&"value"!==r.kind&&(o=r);const n=[];for(const a of e.slice(1)){const e=t.parse(a,1+n.length,o,void 0,{typeAnnotation:"omit"});if(!e)return null;o=o||e.type,n.push(e)}const i=r&&n.some(e=>rt(r,e.type));return new Lo(i?Ze:o,n)}evaluate(e){let t,o=null,r=0;for(const n of this.args)if(r++,(o=n.evaluate(e))&&o instanceof pt&&!o.available&&(t||(t=o.name),o=null,r===this.args.length&&(o=t)),null!==o)break;return o}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(t=>{e.push(t.serialize())}),e}}class Fo{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const o=[];for(let n=1;n<e.length-1;n+=2){const r=e[n];if("string"!=typeof r)return t.error(`Expected string, but found ${typeof r} instead.`,n);if(/[^a-zA-Z0-9_]/.test(r))return t.error("Variable names must contain only alphanumeric characters or '_'.",n);const i=t.parse(e[n+1],n+1);if(!i)return null;o.push([r,i])}const r=t.parse(e[e.length-1],e.length-1,t.expectedType,o);return r?new Fo(o,r):null}outputDefined(){return this.result.outputDefined()}serialize(){const e=["let"];for(const[t,o]of this.bindings)e.push(t,o.serialize());return e.push(this.result.serialize()),e}}class Uo{constructor(e,t,o){this.type=e,this.index=t,this.input=o}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const o=t.parse(e[1],1,Ge),r=t.parse(e[2],2,et(t.expectedType||Ze));if(!o||!r)return null;const n=r.type;return new Uo(n.itemType,o,r)}evaluate(e){const t=this.index.evaluate(e),o=this.input.evaluate(e);if(t<0)throw new gt(`Array index out of bounds: ${t} < 0.`);if(t>=o.length)throw new gt(`Array index out of bounds: ${t} > ${o.length-1}.`);if(t!==Math.floor(t))throw new gt(`Array index must be an integer, but found ${t} instead.`);return o[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}class Jo{constructor(e,t){this.type=Be,this.needle=e,this.haystack=t}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const o=t.parse(e[1],1,Ze),r=t.parse(e[2],2,Ze);return o&&r?nt(o.type,[Be,We,Ge,Je,Ze])?new Jo(o,r):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${tt(o.type)} instead`):null}evaluate(e){const t=this.needle.evaluate(e),o=this.haystack.evaluate(e);if(!o)return!1;if(!it(t,["boolean","string","number","null"]))throw new gt(`Expected first argument to be of type boolean, string, number or null, but found ${tt(ft(t))} instead.`);if(!it(o,["string","array"]))throw new gt(`Expected second argument to be of type array or string, but found ${tt(ft(o))} instead.`);return o.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}class Go{constructor(e,t,o){this.type=Ge,this.needle=e,this.haystack=t,this.fromIndex=o}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const o=t.parse(e[1],1,Ze),r=t.parse(e[2],2,Ze);if(!o||!r)return null;if(!nt(o.type,[Be,We,Ge,Je,Ze]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${tt(o.type)} instead`);if(4===e.length){const n=t.parse(e[3],3,Ge);return n?new Go(o,r,n):null}return new Go(o,r)}evaluate(e){const t=this.needle.evaluate(e),o=this.haystack.evaluate(e);if(!it(t,["boolean","string","number","null"]))throw new gt(`Expected first argument to be of type boolean, string, number or null, but found ${tt(ft(t))} instead.`);if(!it(o,["string","array"]))throw new gt(`Expected second argument to be of type array or string, but found ${tt(ft(o))} instead.`);if(this.fromIndex){const r=this.fromIndex.evaluate(e);return o.indexOf(t,r)}return o.indexOf(t)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}class Wo{constructor(e,t,o,r,n,i){this.inputType=e,this.type=t,this.input=o,this.cases=r,this.outputs=n,this.otherwise=i}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return t.error("Expected an even number of arguments.");let o,r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);const n={},i=[];for(let l=2;l<e.length-1;l+=2){let a=e[l];const s=e[l+1];Array.isArray(a)||(a=[a]);const u=t.concat(l);if(0===a.length)return u.error("Expected at least one branch label.");for(const e of a){if("number"!=typeof e&&"string"!=typeof e)return u.error("Branch labels must be numbers or strings.");if("number"==typeof e&&Math.abs(e)>Number.MAX_SAFE_INTEGER)return u.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return u.error("Numeric branch labels must be integer values.");if(o){if(u.checkSubtype(o,ft(e)))return null}else o=ft(e);if(void 0!==n[String(e)])return u.error("Branch labels must be unique.");n[String(e)]=i.length}const c=t.parse(s,l,r);if(!c)return null;r=r||c.type,i.push(c)}const a=t.parse(e[1],1,Ze);if(!a)return null;const s=t.parse(e[e.length-1],e.length-1,r);return s?"value"!==a.type.kind&&t.concat(1).checkSubtype(o,a.type)?null:new Wo(o,r,a,n,i,s):null}evaluate(e){const t=this.input.evaluate(e);return(ft(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],t=Object.keys(this.cases).sort(),o=[],r={};for(const i of t){const e=r[this.cases[i]];void 0===e?(r[this.cases[i]]=o.length,o.push([this.cases[i],[i]])):o[e][1].push(i)}const n=e=>"number"===this.inputType.kind?Number(e):e;for(const[i,a]of o)1===a.length?e.push(n(a[0])):e.push(a.map(n)),e.push(this.outputs[i].serialize());return e.push(this.otherwise.serialize()),e}}class Bo{constructor(e,t,o){this.type=e,this.branches=t,this.otherwise=o}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return t.error("Expected an odd number of arguments.");let o;t.expectedType&&"value"!==t.expectedType.kind&&(o=t.expectedType);const r=[];for(let i=1;i<e.length-1;i+=2){const n=t.parse(e[i],i,Be);if(!n)return null;const a=t.parse(e[i+1],i+1,o);if(!a)return null;r.push([n,a]),o=o||a.type}const n=t.parse(e[e.length-1],e.length-1,o);return n?new Bo(o,r,n):null}evaluate(e){for(const[t,o]of this.branches)if(t.evaluate(e))return o.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[t,o]of this.branches)e(t),e(o);e(this.otherwise)}outputDefined(){return this.branches.every(([e,t])=>t.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(t=>{e.push(t.serialize())}),e}}class Vo{constructor(e,t,o,r){this.type=e,this.input=t,this.beginIndex=o,this.endIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const o=t.parse(e[1],1,Ze),r=t.parse(e[2],2,Ge);if(!o||!r)return null;if(!nt(o.type,[et(Ze),We,Ze]))return t.error(`Expected first argument to be of type array or string, but found ${tt(o.type)} instead`);if(4===e.length){const n=t.parse(e[3],3,Ge);return n?new Vo(o.type,o,r,n):null}return new Vo(o.type,o,r)}evaluate(e){const t=this.input.evaluate(e),o=this.beginIndex.evaluate(e);if(!it(t,["string","array"]))throw new gt(`Expected first argument to be of type array or string, but found ${tt(ft(t))} instead.`);if(this.endIndex){const r=this.endIndex.evaluate(e);return t.slice(o,r)}return t.slice(o)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}function Ho(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function Zo(e,t,o){return t===o}function Xo(e,t,o){return t!==o}function Ko(e,t,o){return t<o}function Yo(e,t,o){return t>o}function Qo(e,t,o){return t<=o}function er(e,t,o){return t>=o}function tr(e,t,o,r){return 0===r.compare(t,o)}function or(e,t,o,r){return!tr(e,t,o,r)}function rr(e,t,o,r){return r.compare(t,o)<0}function nr(e,t,o,r){return r.compare(t,o)>0}function ir(e,t,o,r){return r.compare(t,o)<=0}function ar(e,t,o,r){return r.compare(t,o)>=0}function sr(e,t,o){const r="=="!==e&&"!="!==e;return class n{constructor(e,t,o){this.type=Be,this.lhs=e,this.rhs=t,this.collator=o,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");const o=e[0];let i=t.parse(e[1],1,Ze);if(!i)return null;if(!Ho(o,i.type))return t.concat(1).error(`"${o}" comparisons are not supported for type '${tt(i.type)}'.`);let a=t.parse(e[2],2,Ze);if(!a)return null;if(!Ho(o,a.type))return t.concat(2).error(`"${o}" comparisons are not supported for type '${tt(a.type)}'.`);if(i.type.kind!==a.type.kind&&"value"!==i.type.kind&&"value"!==a.type.kind)return t.error(`Cannot compare types '${tt(i.type)}' and '${tt(a.type)}'.`);r&&("value"===i.type.kind&&"value"!==a.type.kind?i=new vt(a.type,[i]):"value"!==i.type.kind&&"value"===a.type.kind&&(a=new vt(i.type,[a])));let s=null;if(4===e.length){if("string"!==i.type.kind&&"string"!==a.type.kind&&"value"!==i.type.kind&&"value"!==a.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,Ke)))return null}return new n(i,a,s)}evaluate(n){const i=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(r&&this.hasUntypedArgument){const t=ft(i),o=ft(a);if(t.kind!==o.kind||"string"!==t.kind&&"number"!==t.kind)throw new gt(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${o.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const e=ft(i),o=ft(a);if("string"!==e.kind||"string"!==o.kind)return t(n,i,a)}return this.collator?o(n,i,a,this.collator.evaluate(n)):t(n,i,a)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}serialize(){const t=[e];return this.eachChild(e=>{t.push(e.serialize())}),t}}}const lr=sr("==",Zo,tr),ur=sr("!=",Xo,or),cr=sr("<",Ko,rr),pr=sr(">",Yo,nr),dr=sr("<=",Qo,ir),hr=sr(">=",er,ar);class fr{constructor(e,t,o,r,n){this.type=We,this.number=e,this.locale=t,this.currency=o,this.minFractionDigits=r,this.maxFractionDigits=n}static parse(e,t){if(3!==e.length)return t.error("Expected two arguments.");const o=t.parse(e[1],1,Ge);if(!o)return null;const r=e[2];if("object"!=typeof r||Array.isArray(r))return t.error("NumberFormat options argument must be an object.");let n=null;if(r.locale&&!(n=t.parse(r.locale,1,We)))return null;let i=null;if(r.currency&&!(i=t.parse(r.currency,1,We)))return null;let a=null;if(r["min-fraction-digits"]&&!(a=t.parse(r["min-fraction-digits"],1,Ge)))return null;let s=null;return r["max-fraction-digits"]&&!(s=t.parse(r["max-fraction-digits"],1,Ge))?null:new fr(o,n,i,a,s)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class yr{constructor(e){this.type=Ge,this.input=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const o=t.parse(e[1],1);return o?"array"!==o.type.kind&&"string"!==o.type.kind&&"value"!==o.type.kind?t.error(`Expected argument of type string or array, but found ${tt(o.type)} instead.`):new yr(o):null}evaluate(e){const t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new gt(`Expected value to be of type string or array, but found ${tt(ft(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(t=>{e.push(t.serialize())}),e}}const mr={"==":lr,"!=":ur,">":pr,"<":cr,">=":hr,"<=":dr,array:vt,at:Uo,boolean:vt,case:Bo,coalesce:Lo,collator:$t,format:xt,image:wt,in:Jo,"index-of":Go,interpolate:Ro,"interpolate-hcl":Ro,"interpolate-lab":Ro,length:yr,let:Fo,literal:mt,match:Wo,number:vt,"number-format":fr,object:vt,slice:Vo,step:so,string:vt,"to-boolean":jt,"to-color":jt,"to-number":jt,"to-string":jt,var:ro,within:Qt};function gr(e,[t,o,r,n]){t=t.evaluate(e),o=o.evaluate(e),r=r.evaluate(e);const i=n?n.evaluate(e):1,a=dt(t,o,r,i);if(a)throw new gt(a);return new st(t/255*i,o/255*i,r/255*i,i)}function br(e,t){return e in t}function vr(e,t){const o=t[e];return void 0===o?null:o}function xr(e,t,o,r){for(;o<=r;){const n=o+r>>1;if(t[n]===e)return!0;t[n]>e?r=n-1:o=n+1}return!1}function wr(e){return{type:e}}function kr(e){return{result:"success",value:e}}function jr(e){return{result:"error",value:e}}function zr(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function Sr(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function Tr(e){return!!e.expression&&e.expression.interpolated}function _r(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function $r(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Ar(e){return e}function Ir(e,t){const o="color"===t.type,r=e.stops&&"object"==typeof e.stops[0][0],n=r||void 0!==e.property,i=r||!n,a=e.type||(Tr(t)?"exponential":"interval");if(o&&((e=Le({},e)).stops&&(e.stops=e.stops.map(e=>[e[0],st.parse(e[1])])),e.default?e.default=st.parse(e.default):e.default=st.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!Po[e.colorSpace])throw new Error(`Unknown color space: ${e.colorSpace}`);let s,l,u;if("exponential"===a)s=Er;else if("interval"===a)s=Cr;else if("categorical"===a){s=Or,l=Object.create(null);for(const t of e.stops)l[t[0]]=t[1];u=typeof e.stops[0][0]}else{if("identity"!==a)throw new Error(`Unknown function type "${a}"`);s=Mr}if(r){const o={},r=[];for(let t=0;t<e.stops.length;t++){const n=e.stops[t],i=n[0].zoom;void 0===o[i]&&(o[i]={zoom:i,type:e.type,property:e.property,default:e.default,stops:[]},r.push(i)),o[i].stops.push([n[0].value,n[1]])}const n=[];for(const e of r)n.push([o[e].zoom,Ir(o[e],t)]);const i={name:"linear"};return{kind:"composite",interpolationType:i,interpolationFactor:Ro.interpolationFactor.bind(void 0,i),zoomStops:n.map(e=>e[0]),evaluate:({zoom:o},r)=>Er({stops:n,base:e.base},t,o).evaluate(o,r)}}if(i){const o="exponential"===a?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:o,interpolationFactor:Ro.interpolationFactor.bind(void 0,o),zoomStops:e.stops.map(e=>e[0]),evaluate:({zoom:o})=>s(e,t,o,l,u)}}return{kind:"source",evaluate(o,r){const n=r&&r.properties?r.properties[e.property]:void 0;return void 0===n?qr(e.default,t.default):s(e,t,n,l,u)}}}function qr(e,t,o){return void 0!==e?e:void 0!==t?t:void 0!==o?o:void 0}function Or(e,t,o,r,n){return qr(typeof o===n?r[o]:void 0,e.default,t.default)}function Cr(e,t,o){if("number"!==_r(o))return qr(e.default,t.default);const r=e.stops.length;if(1===r)return e.stops[0][1];if(o<=e.stops[0][0])return e.stops[0][1];if(o>=e.stops[r-1][0])return e.stops[r-1][1];const n=ao(e.stops.map(e=>e[0]),o);return e.stops[n][1]}function Er(e,t,o){const r=void 0!==e.base?e.base:1;if("number"!==_r(o))return qr(e.default,t.default);const n=e.stops.length;if(1===n)return e.stops[0][1];if(o<=e.stops[0][0])return e.stops[0][1];if(o>=e.stops[n-1][0])return e.stops[n-1][1];const i=ao(e.stops.map(e=>e[0]),o),a=Nr(o,r,e.stops[i][0],e.stops[i+1][0]),s=e.stops[i][1],l=e.stops[i+1][1];let u=fo[t.type]||Ar;if(e.colorSpace&&"rgb"!==e.colorSpace){const t=Po[e.colorSpace];u=((e,o)=>t.reverse(t.interpolate(t.forward(e),t.forward(o),a)))}return"function"==typeof s.evaluate?{evaluate(...e){const t=s.evaluate.apply(void 0,e),o=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==o)return u(t,o,a)}}:u(s,l,a)}function Mr(e,t,o){return"color"===t.type?o=st.parse(o):"formatted"===t.type?o=ct.fromString(o.toString()):"resolvedImage"===t.type?o=pt.fromString(o.toString()):_r(o)===t.type||"enum"===t.type&&t.values[o]||(o=void 0),qr(o,e.default,t.default)}function Nr(e,t,o,r){const n=r-o,i=e-o;return 0===n?0:1===t?i/n:(Math.pow(t,i)-1)/(Math.pow(t,n)-1)}Tt.register(mr,{error:[Xe,[We],(e,[t])=>{throw new gt(t.evaluate(e))}],typeof:[We,[Ze],(e,[t])=>tt(ft(t.evaluate(e)))],"to-rgba":[et(Ge,4),[Ve],(e,[t])=>t.evaluate(e).toArray()],rgb:[Ve,[Ge,Ge,Ge],gr],rgba:[Ve,[Ge,Ge,Ge,Ge],gr],has:{type:Be,overloads:[[[We],(e,[t])=>br(t.evaluate(e),e.properties())],[[We,He],(e,[t,o])=>br(t.evaluate(e),o.evaluate(e))]]},get:{type:Ze,overloads:[[[We],(e,[t])=>vr(t.evaluate(e),e.properties())],[[We,He],(e,[t,o])=>vr(t.evaluate(e),o.evaluate(e))]]},"feature-state":[Ze,[We],(e,[t])=>vr(t.evaluate(e),e.featureState||{})],properties:[He,[],e=>e.properties()],"geometry-type":[We,[],e=>e.geometryType()],id:[Ze,[],e=>e.id()],zoom:[Ge,[],e=>e.globals.zoom],"heatmap-density":[Ge,[],e=>e.globals.heatmapDensity||0],"line-progress":[Ge,[],e=>e.globals.lineProgress||0],"sky-radial-progress":[Ge,[],e=>e.globals.skyRadialProgress||0],accumulated:[Ze,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[Ge,wr(Ge),(e,t)=>{let o=0;for(const r of t)o+=r.evaluate(e);return o}],"*":[Ge,wr(Ge),(e,t)=>{let o=1;for(const r of t)o*=r.evaluate(e);return o}],"-":{type:Ge,overloads:[[[Ge,Ge],(e,[t,o])=>t.evaluate(e)-o.evaluate(e)],[[Ge],(e,[t])=>-t.evaluate(e)]]},"/":[Ge,[Ge,Ge],(e,[t,o])=>t.evaluate(e)/o.evaluate(e)],"%":[Ge,[Ge,Ge],(e,[t,o])=>t.evaluate(e)%o.evaluate(e)],ln2:[Ge,[],()=>Math.LN2],pi:[Ge,[],()=>Math.PI],e:[Ge,[],()=>Math.E],"^":[Ge,[Ge,Ge],(e,[t,o])=>Math.pow(t.evaluate(e),o.evaluate(e))],sqrt:[Ge,[Ge],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[Ge,[Ge],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[Ge,[Ge],(e,[t])=>Math.log(t.evaluate(e))],log2:[Ge,[Ge],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[Ge,[Ge],(e,[t])=>Math.sin(t.evaluate(e))],cos:[Ge,[Ge],(e,[t])=>Math.cos(t.evaluate(e))],tan:[Ge,[Ge],(e,[t])=>Math.tan(t.evaluate(e))],asin:[Ge,[Ge],(e,[t])=>Math.asin(t.evaluate(e))],acos:[Ge,[Ge],(e,[t])=>Math.acos(t.evaluate(e))],atan:[Ge,[Ge],(e,[t])=>Math.atan(t.evaluate(e))],min:[Ge,wr(Ge),(e,t)=>Math.min(...t.map(t=>t.evaluate(e)))],max:[Ge,wr(Ge),(e,t)=>Math.max(...t.map(t=>t.evaluate(e)))],abs:[Ge,[Ge],(e,[t])=>Math.abs(t.evaluate(e))],round:[Ge,[Ge],(e,[t])=>{const o=t.evaluate(e);return o<0?-Math.round(-o):Math.round(o)}],floor:[Ge,[Ge],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[Ge,[Ge],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[Be,[We,Ze],(e,[t,o])=>e.properties()[t.value]===o.value],"filter-id-==":[Be,[Ze],(e,[t])=>e.id()===t.value],"filter-type-==":[Be,[We],(e,[t])=>e.geometryType()===t.value],"filter-<":[Be,[We,Ze],(e,[t,o])=>{const r=e.properties()[t.value],n=o.value;return typeof r==typeof n&&r<n}],"filter-id-<":[Be,[Ze],(e,[t])=>{const o=e.id(),r=t.value;return typeof o==typeof r&&o<r}],"filter->":[Be,[We,Ze],(e,[t,o])=>{const r=e.properties()[t.value],n=o.value;return typeof r==typeof n&&r>n}],"filter-id->":[Be,[Ze],(e,[t])=>{const o=e.id(),r=t.value;return typeof o==typeof r&&o>r}],"filter-<=":[Be,[We,Ze],(e,[t,o])=>{const r=e.properties()[t.value],n=o.value;return typeof r==typeof n&&r<=n}],"filter-id-<=":[Be,[Ze],(e,[t])=>{const o=e.id(),r=t.value;return typeof o==typeof r&&o<=r}],"filter->=":[Be,[We,Ze],(e,[t,o])=>{const r=e.properties()[t.value],n=o.value;return typeof r==typeof n&&r>=n}],"filter-id->=":[Be,[Ze],(e,[t])=>{const o=e.id(),r=t.value;return typeof o==typeof r&&o>=r}],"filter-has":[Be,[Ze],(e,[t])=>t.value in e.properties()],"filter-has-id":[Be,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[Be,[et(We)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[Be,[et(Ze)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[Be,[We,et(Ze)],(e,[t,o])=>o.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[Be,[We,et(Ze)],(e,[t,o])=>xr(e.properties()[t.value],o.value,0,o.value.length-1)],all:{type:Be,overloads:[[[Be,Be],(e,[t,o])=>t.evaluate(e)&&o.evaluate(e)],[wr(Be),(e,t)=>{for(const o of t)if(!o.evaluate(e))return!1;return!0}]]},any:{type:Be,overloads:[[[Be,Be],(e,[t,o])=>t.evaluate(e)||o.evaluate(e)],[wr(Be),(e,t)=>{for(const o of t)if(o.evaluate(e))return!0;return!1}]]},"!":[Be,[Be],(e,[t])=>!t.evaluate(e)],"is-supported-script":[Be,[We],(e,[t])=>{const o=e.globals&&e.globals.isSupportedScript;return!o||o(t.evaluate(e))}],upcase:[We,[We],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[We,[We],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[We,wr(Ze),(e,t)=>t.map(t=>yt(t.evaluate(e))).join("")],"resolved-locale":[We,[Ke],(e,[t])=>t.evaluate(e).resolvedLocale()]});class Pr{constructor(e,t){this.expression=e,this._warningHistory={},this._evaluator=new St,this._defaultValue=t?Vr(t):null,this._enumValues=t&&"enum"===t.type?t.values:null}evaluateWithoutErrorHandling(e,t,o,r,n,i){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=o,this._evaluator.canonical=r,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=i,this.expression.evaluate(this._evaluator)}evaluate(e,t,o,r,n,i){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=o||null,this._evaluator.canonical=r,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=i||null;try{const e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new gt(`Expected value to be one of ${Object.keys(this._enumValues).map(e=>JSON.stringify(e)).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(a){return this._warningHistory[a.message]||(this._warningHistory[a.message]=!0,"undefined"!=typeof console&&console.warn(a.message)),this._defaultValue}}}function Rr(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in mr}function Dr(e,t){const o=new no(mr,[],t?Br(t):void 0),r=o.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return r?kr(new Pr(r,t)):jr(o.errors)}class Lr{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!to(t.expression)}evaluateWithoutErrorHandling(e,t,o,r,n,i){return this._styleExpression.evaluateWithoutErrorHandling(e,t,o,r,n,i)}evaluate(e,t,o,r,n,i){return this._styleExpression.evaluate(e,t,o,r,n,i)}}class Fr{constructor(e,t,o,r){this.kind=e,this.zoomStops=o,this._styleExpression=t,this.isStateDependent="camera"!==e&&!to(t.expression),this.interpolationType=r}evaluateWithoutErrorHandling(e,t,o,r,n,i){return this._styleExpression.evaluateWithoutErrorHandling(e,t,o,r,n,i)}evaluate(e,t,o,r,n,i){return this._styleExpression.evaluate(e,t,o,r,n,i)}interpolationFactor(e,t,o){return this.interpolationType?Ro.interpolationFactor(this.interpolationType,e,t,o):0}}function Ur(e,t){if("error"===(e=Dr(e,t)).result)return e;const o=e.value.expression,r=eo(o);if(!r&&!zr(t))return jr([new Fe("","data expressions not supported")]);const n=oo(o,["zoom"]);if(!n&&!Sr(t))return jr([new Fe("","zoom expressions not supported")]);const i=Wr(o);if(!i&&!n)return jr([new Fe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(i instanceof Fe)return jr([i]);if(i instanceof Ro&&!Tr(t))return jr([new Fe("",'"interpolate" expressions cannot be used with this property')]);if(!i)return kr(new Lr(r?"constant":"source",e.value));const a=i instanceof Ro?i.interpolation:void 0;return kr(new Fr(r?"camera":"composite",e.value,i.labels,a))}class Jr{constructor(e,t){this._parameters=e,this._specification=t,Le(this,Ir(this._parameters,this._specification))}static deserialize(e){return new Jr(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Gr(e,t){if($r(e))return new Jr(e,t);if(Rr(e)){const o=Ur(e,t);if("error"===o.result)throw new Error(o.value.map(e=>`${e.key}: ${e.message}`).join(", "));return o.value}{let o=e;return"string"==typeof e&&"color"===t.type&&(o=st.parse(e)),{kind:"constant",evaluate:()=>o}}}function Wr(e){let t=null;if(e instanceof Fo)t=Wr(e.result);else if(e instanceof Lo){for(const o of e.args)if(t=Wr(o))break}else(e instanceof so||e instanceof Ro)&&e.input instanceof Tt&&"zoom"===e.input.name&&(t=e);return t instanceof Fe?t:(e.eachChild(e=>{const o=Wr(e);o instanceof Fe?t=o:!t&&o?t=new Fe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&o&&t!==o&&(t=new Fe("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t)}function Br(e){const t={color:Ve,string:We,number:Ge,enum:We,boolean:Be,formatted:Ye,resolvedImage:Qe};return"array"===e.type?et(t[e.value]||Ze,e.length):t[e.type]}function Vr(e){return"color"===e.type&&$r(e.default)?new st(0,0,0,0):"color"===e.type?st.parse(e.default)||null:void 0===e.default?null:e.default}function Hr(e){return"object"==typeof e?["literal",e]:e}function Zr(e,t){let o=e.stops;if(!o)return Xr(e,t);const r=o&&"object"==typeof o[0][0],n=r||void 0!==e.property,i=r||!n;return o=o.map(e=>!n&&t.tokens&&"string"==typeof e[1]?[e[0],sn(e[1])]:[e[0],Hr(e[1])]),r?Yr(e,t,o):i?on(e,t,o):tn(e,t,o)}function Xr(e,t){const o=["get",e.property];if(void 0===e.default)return"string"===t.type?["string",o]:o;if("enum"===t.type)return["match",o,Object.keys(t.values),o,e.default];{const r=["color"===t.type?"to-color":t.type,o,Hr(e.default)];return"array"===t.type&&r.splice(1,0,t.value,t.length||null),r}}function Kr(e){switch(e.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Yr(e,t,o){const r={},n={},i=[];for(let a=0;a<o.length;a++){const t=o[a],s=t[0].zoom;void 0===r[s]&&(r[s]={zoom:s,type:e.type,property:e.property,default:e.default},n[s]=[],i.push(s)),n[s].push([t[0].value,t[1]])}if("exponential"===an({},t)){const o=[Kr(e),["linear"],["zoom"]];for(const e of i){nn(o,e,tn(r[e],t,n[e]),!1)}return o}{const e=["step",["zoom"]];for(const o of i){nn(e,o,tn(r[o],t,n[o]),!0)}return rn(e),e}}function Qr(e,t){return void 0!==e?e:void 0!==t?t:void 0}function en(e,t){const o=Hr(Qr(e.default,t.default));return void 0===o&&"resolvedImage"===t.type?"":o}function tn(e,t,o){const r=an(e,t),n=["get",e.property];if("categorical"===r&&"boolean"==typeof o[0][0]){const r=["case"];for(const e of o)r.push(["==",n,e[0]],e[1]);return r.push(en(e,t)),r}if("categorical"===r){const r=["match",n];for(const e of o)nn(r,e[0],e[1],!1);return r.push(en(e,t)),r}if("interval"===r){const t=["step",["number",n]];for(const e of o)nn(t,e[0],e[1],!0);return rn(t),void 0===e.default?t:["case",["==",["typeof",n],"number"],t,Hr(e.default)]}if("exponential"===r){const t=void 0!==e.base?e.base:1,r=[Kr(e),1===t?["linear"]:["exponential",t],["number",n]];for(const e of o)nn(r,e[0],e[1],!1);return void 0===e.default?r:["case",["==",["typeof",n],"number"],r,Hr(e.default)]}throw new Error(`Unknown property function type ${r}`)}function on(e,t,o,r=["zoom"]){const n=an(e,t);let i,a=!1;if("interval"===n)i=["step",r],a=!0;else{if("exponential"!==n)throw new Error(`Unknown zoom function type "${n}"`);{const t=void 0!==e.base?e.base:1;i=[Kr(e),1===t?["linear"]:["exponential",t],r]}}for(const s of o)nn(i,s[0],s[1],a);return rn(i),i}function rn(e){"step"===e[0]&&3===e.length&&(e.push(0),e.push(e[3]))}function nn(e,t,o,r){e.length>3&&t===e[e.length-2]||(r&&2===e.length||e.push(t),e.push(o))}function an(e,t){return e.type?e.type:t.expression.interpolated?"exponential":"interval"}function sn(e){const t=["concat"],o=/{([^{}]+)}/g;let r=0;for(let n=o.exec(e);null!==n;n=o.exec(e)){const i=e.slice(r,o.lastIndex-n[0].length);r=o.lastIndex,i.length>0&&t.push(i),t.push(["get",n[1]])}if(1===t.length)return e;if(r<e.length)t.push(e.slice(r));else if(2===t.length)return["to-string",t[1]];return t}function ln(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(const t of e.slice(1))if(!ln(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}const un={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function cn(e){if(null==e)return{filter:()=>!0,needGeometry:!1};ln(e)||(e=hn(e));const t=Dr(e,un);if("error"===t.result)throw new Error(t.value.map(e=>`${e.key}: ${e.message}`).join(", "));return{filter:(e,o,r)=>t.value.evaluate(e,o,{},r),needGeometry:dn(e)}}function pn(e,t){return e<t?-1:e>t?1:0}function dn(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(let t=1;t<e.length;t++)if(dn(e[t]))return!0;return!1}function hn(e){if(!e)return!0;const t=e[0];return e.length<=1?"any"!==t:"=="===t?fn(e[1],e[2],"=="):"!="===t?bn(fn(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?fn(e[1],e[2],t):"any"===t?yn(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(hn)):"none"===t?["all"].concat(e.slice(1).map(hn).map(bn)):"in"===t?mn(e[1],e.slice(2)):"!in"===t?bn(mn(e[1],e.slice(2))):"has"===t?gn(e[1]):"!has"===t?bn(gn(e[1])):"within"!==t||e}function fn(e,t,o){switch(e){case"$type":return[`filter-type-${o}`,t];case"$id":return[`filter-id-${o}`,t];default:return[`filter-${o}`,e,t]}}function yn(e){return["any"].concat(e.map(hn))}function mn(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(e=>typeof e!=typeof t[0])?["filter-in-large",e,["literal",t.sort(pn)]]:["filter-in-small",e,["literal",t]]}}function gn(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function bn(e){return["!",e]}function vn(e){return xn(e,{})}function xn(e,t){if(ln(e))return e;if(!e)return!0;const o=e[0];if(e.length<=1)return"any"!==o;let r;if("=="===o||"!="===o||"<"===o||">"===o||"<="===o||">="===o){const[,n,i]=e;r=kn(n,i,o,t)}else{if("any"===o){const t=e.slice(1).map(e=>{const t={},o=xn(e,t),r=wn(t);return!0===r?o:["case",r,o,!1]});return["any"].concat(t)}if("all"===o){const o=e.slice(1).map(e=>xn(e,t));return o.length>1?["all"].concat(o):[].concat(...o)}if("none"===o)return["!",xn(["any"].concat(e.slice(1)),{})];r="in"===o?jn(e[1],e.slice(2)):"!in"===o?jn(e[1],e.slice(2),!0):"has"===o?zn(e[1]):"!has"!==o||["!",zn(e[1])]}return r}function wn(e){const t=[];for(const o in e){const r="$id"===o?["id"]:["get",o];t.push(["==",["typeof",r],e[o]])}return 0===t.length||(1===t.length?t[0]:["all"].concat(t))}function kn(e,t,o,r){let n;if("$type"===e)return[o,["geometry-type"],t];if(n="$id"===e?["id"]:["get",e],r&&null!==t){const o=typeof t;r[e]=o}return"=="===o&&"$id"!==e&&null===t?["all",["has",e],["==",n,null]]:"!="===o&&"$id"!==e&&null===t?["any",["!",["has",e]],["!=",n,null]]:[o,n,t]}function jn(e,t,o=!1){if(0===t.length)return o;let r;r="$type"===e?["geometry-type"]:"$id"===e?["id"]:["get",e];let n=!0;const i=typeof t[0];for(const a of t)if(typeof a!==i){n=!1;break}if(n&&("string"===i||"number"===i)){const e=t.sort().filter((e,o)=>0===o||t[o-1]!==e);return["match",r,e,!o,o]}return[o?"all":"any"].concat(t.map(e=>[o?"!=":"==",r,e]))}function zn(e){return"$type"===e||("$id"===e?["!=",["id"],null]:["has",e])}function Sn(e){const t=[];return Oe(e,e=>{e.filter&&(e.filter=vn(e.filter))}),Ce(e,{paint:!0,layout:!0},({path:e,value:o,reference:r,set:n})=>{Rr(o)||("object"!=typeof o||Array.isArray(o)?r.tokens&&"string"==typeof o&&n(sn(o)):(n(Zr(o,r)),t.push(e.join("."))))}),e}function Tn(e){let t=!1;if(7===e.version&&(e=De(e),t=!0),8===e.version&&(t=Sn(e),t=!0),!t)throw new Error("cannot migrate from",e.version);return e}function _n(e){const t=[],o=[],r=[];for(const i in e.sources){const r=e.sources[i];if("vector"!==r.type)continue;const n=/^mapbox:\/\/(.*)/.exec(r.url);n&&(t.push(i),o.push(n[1]))}if(t.length<2)return e;t.forEach(t=>{delete e.sources[t]});const n=o.join(",");return e.sources[n]={type:"vector",url:`mapbox://${n}`},e.layers.forEach(e=>{if(t.indexOf(e.source)>=0&&(e.source=n,"source-layer"in e)){if(r.indexOf(e["source-layer"])>=0)throw new Error("Conflicting source layer names");r.push(e["source-layer"])}}),e}var $n=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function An(e,t){const o={};for(const r in e)"ref"!==r&&(o[r]=e[r]);return $n.forEach(e=>{e in t&&(o[e]=t[e])}),o}function In(e){e=e.slice();const t=Object.create(null);for(let o=0;o<e.length;o++)t[e[o].id]=e[o];for(let o=0;o<e.length;o++)"ref"in e[o]&&(e[o]=An(e[o],t[e[o].ref]));return e}function qn(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!qn(e[o],t[o]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==t){if("object"!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const o in e)if(!qn(e[o],t[o]))return!1;return!0}return e===t}const On={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight",setTerrain:"setTerrain",setFog:"setFog"};function Cn(e,t,o){o.push({command:On.addSource,args:[e,t[e]]})}function En(e,t,o){t.push({command:On.removeSource,args:[e]}),o[e]=!0}function Mn(e,t,o,r){En(e,o,r),Cn(e,t,o)}function Nn(e,t,o){let r;for(r in e[o])if(e[o].hasOwnProperty(r)&&"data"!==r&&!qn(e[o][r],t[o][r]))return!1;for(r in t[o])if(t[o].hasOwnProperty(r)&&"data"!==r&&!qn(e[o][r],t[o][r]))return!1;return!0}function Pn(e,t,o,r){let n;for(n in t=t||{},e=e||{})e.hasOwnProperty(n)&&(t.hasOwnProperty(n)||En(n,o,r));for(n in t)t.hasOwnProperty(n)&&(e.hasOwnProperty(n)?qn(e[n],t[n])||("geojson"===e[n].type&&"geojson"===t[n].type&&Nn(e,t,n)?o.push({command:On.setGeoJSONSourceData,args:[n,t[n].data]}):Mn(n,t,o,r)):Cn(n,t,o))}function Rn(e,t,o,r,n,i){let a;for(a in t=t||{},e=e||{})e.hasOwnProperty(a)&&(qn(e[a],t[a])||o.push({command:i,args:[r,a,t[a],n]}));for(a in t)t.hasOwnProperty(a)&&!e.hasOwnProperty(a)&&(qn(e[a],t[a])||o.push({command:i,args:[r,a,t[a],n]}))}function Dn(e){return e.id}function Ln(e,t){return e[t.id]=t,e}function Fn(e,t,o){t=t||[];const r=(e=e||[]).map(Dn),n=t.map(Dn),i=e.reduce(Ln,{}),a=t.reduce(Ln,{}),s=r.slice(),l=Object.create(null);let u,c,p,d,h,f,y;for(u=0,c=0;u<r.length;u++)p=r[u],a.hasOwnProperty(p)?c++:(o.push({command:On.removeLayer,args:[p]}),s.splice(s.indexOf(p,c),1));for(u=0,c=0;u<n.length;u++)p=n[n.length-1-u],s[s.length-1-u]!==p&&(i.hasOwnProperty(p)?(o.push({command:On.removeLayer,args:[p]}),s.splice(s.lastIndexOf(p,s.length-c),1)):c++,f=s[s.length-u],o.push({command:On.addLayer,args:[a[p],f]}),s.splice(s.length-u,0,p),l[p]=!0);for(u=0;u<n.length;u++)if(d=i[p=n[u]],h=a[p],!l[p]&&!qn(d,h))if(qn(d.source,h.source)&&qn(d["source-layer"],h["source-layer"])&&qn(d.type,h.type)){for(y in Rn(d.layout,h.layout,o,p,null,On.setLayoutProperty),Rn(d.paint,h.paint,o,p,null,On.setPaintProperty),qn(d.filter,h.filter)||o.push({command:On.setFilter,args:[p,h.filter]}),qn(d.minzoom,h.minzoom)&&qn(d.maxzoom,h.maxzoom)||o.push({command:On.setLayerZoomRange,args:[p,h.minzoom,h.maxzoom]}),d)d.hasOwnProperty(y)&&"layout"!==y&&"paint"!==y&&"filter"!==y&&"metadata"!==y&&"minzoom"!==y&&"maxzoom"!==y&&(0===y.indexOf("paint.")?Rn(d[y],h[y],o,p,y.slice(6),On.setPaintProperty):qn(d[y],h[y])||o.push({command:On.setLayerProperty,args:[p,y,h[y]]}));for(y in h)h.hasOwnProperty(y)&&!d.hasOwnProperty(y)&&"layout"!==y&&"paint"!==y&&"filter"!==y&&"metadata"!==y&&"minzoom"!==y&&"maxzoom"!==y&&(0===y.indexOf("paint.")?Rn(d[y],h[y],o,p,y.slice(6),On.setPaintProperty):qn(d[y],h[y])||o.push({command:On.setLayerProperty,args:[p,y,h[y]]}))}else o.push({command:On.removeLayer,args:[p]}),f=s[s.lastIndexOf(p)+1],o.push({command:On.addLayer,args:[h,f]})}function Un(e,t){if(!e)return[{command:On.setStyle,args:[t]}];let o=[];try{if(!qn(e.version,t.version))return[{command:On.setStyle,args:[t]}];qn(e.center,t.center)||o.push({command:On.setCenter,args:[t.center]}),qn(e.zoom,t.zoom)||o.push({command:On.setZoom,args:[t.zoom]}),qn(e.bearing,t.bearing)||o.push({command:On.setBearing,args:[t.bearing]}),qn(e.pitch,t.pitch)||o.push({command:On.setPitch,args:[t.pitch]}),qn(e.sprite,t.sprite)||o.push({command:On.setSprite,args:[t.sprite]}),qn(e.glyphs,t.glyphs)||o.push({command:On.setGlyphs,args:[t.glyphs]}),qn(e.transition,t.transition)||o.push({command:On.setTransition,args:[t.transition]}),qn(e.light,t.light)||o.push({command:On.setLight,args:[t.light]}),qn(e.fog,t.fog)||o.push({command:On.setFog,args:[t.fog]});const n={},i=[];Pn(e.sources,t.sources,i,n);const a=[];e.layers&&e.layers.forEach(e=>{n[e.source]?o.push({command:On.removeLayer,args:[e.id]}):a.push(e)});let s=e.terrain;s&&n[s.source]&&(o.push({command:On.setTerrain,args:[void 0]}),s=void 0),o=o.concat(i),qn(s,t.terrain)||o.push({command:On.setTerrain,args:[t.terrain]}),Fn(a,t.layers,o)}catch(r){console.warn("Unable to compute style diff:",r),o=[{command:On.setStyle,args:[t]}]}return o}class Jn{constructor(e,t,o,r){this.message=(e?`${e}: `:"")+o,r&&(this.identifier=r),null!=t&&t.__line__&&(this.line=t.__line__)}}exports.ValidationError=Jn;class Gn{constructor(e){this.error=e,this.message=e.message;const t=e.message.match(/line (\d+)/);this.line=t?parseInt(t[1],10):0}}function Wn(e){const t=e.key,o=e.value;return o?[new Jn(t,o,"constants have been deprecated as of v8")]:[]}function Bn(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function Vn(e){if(Array.isArray(e))return e.map(Vn);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){const t={};for(const o in e)t[o]=Vn(e[o]);return t}return Bn(e)}function Hn(e){const t=e.key,o=e.value,r=e.valueSpec||{},n=e.objectElementValidators||{},i=e.style,a=e.styleSpec;let s=[];const l=_r(o);if("object"!==l)return[new Jn(t,o,`object expected, ${l} found`)];for(const u in o){const e=u.split(".")[0],l=r[e]||r["*"];let c;if(n[e])c=n[e];else if(r[e])c=bi;else if(n["*"])c=n["*"];else{if(!r["*"]){s.push(new Jn(t,o[u],`unknown property "${u}"`));continue}c=bi}s=s.concat(c({key:(t?`${t}.`:t)+u,value:o[u],valueSpec:l,style:i,styleSpec:a,object:o,objectKey:u},o))}for(const u in r)n[u]||r[u].required&&void 0===r[u].default&&void 0===o[u]&&s.push(new Jn(t,o,`missing required property "${u}"`));return s}function Zn(e){const t=e.value,o=e.valueSpec,r=e.style,n=e.styleSpec,i=e.key,a=e.arrayElementValidator||bi;if("array"!==_r(t))return[new Jn(i,t,`array expected, ${_r(t)} found`)];if(o.length&&t.length!==o.length)return[new Jn(i,t,`array length ${o.length} expected, length ${t.length} found`)];if(o["min-length"]&&t.length<o["min-length"])return[new Jn(i,t,`array length at least ${o["min-length"]} expected, length ${t.length} found`)];let s={type:o.value,values:o.values,minimum:o.minimum,maximum:o.maximum};n.$version<7&&(s.function=o.function),"object"===_r(o.value)&&(s=o.value);let l=[];for(let u=0;u<t.length;u++)l=l.concat(a({array:t,arrayIndex:u,value:t[u],valueSpec:s,style:r,styleSpec:n,key:`${i}[${u}]`}));return l}function Xn(e){const t=e.key,o=e.value,r=e.valueSpec;let n=_r(o);if("number"===n&&o!=o&&(n="NaN"),"number"!==n)return[new Jn(t,o,`number expected, ${n} found`)];if("minimum"in r){let n=r.minimum;if("array"===_r(r.minimum)){const t=e.arrayIndex;n=r.minimum[t]}if(o<n)return[new Jn(t,o,`${o} is less than the minimum value ${n}`)]}if("maximum"in r){let n=r.maximum;if("array"===_r(r.maximum)){const t=e.arrayIndex;n=r.maximum[t]}if(o>n)return[new Jn(t,o,`${o} is greater than the maximum value ${n}`)]}return[]}function Kn(e){const t=e.valueSpec,o=Bn(e.value.type);let r,n,i,a={};const s="categorical"!==o&&void 0===e.value.property,l=!s,u="array"===_r(e.value.stops)&&"array"===_r(e.value.stops[0])&&"object"===_r(e.value.stops[0][0]),c=Hn({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===o)return[new Jn(e.key,e.value,'identity function may not have a "stops" property')];let t=[];const r=e.value;t=t.concat(Zn({key:e.key,value:r,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:p})),"array"===_r(r)&&0===r.length&&t.push(new Jn(e.key,r,"array must have at least one stop"));return t},default:function(e){return bi({key:e.key,value:e.value,valueSpec:t,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===o&&s&&c.push(new Jn(e.key,e.value,'missing required property "property"')),"identity"===o||e.value.stops||c.push(new Jn(e.key,e.value,'missing required property "stops"')),"exponential"===o&&e.valueSpec.expression&&!Tr(e.valueSpec)&&c.push(new Jn(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!zr(e.valueSpec)?c.push(new Jn(e.key,e.value,"property functions not supported")):s&&!Sr(e.valueSpec)&&c.push(new Jn(e.key,e.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==e.value.property||c.push(new Jn(e.key,e.value,'"property" property is required')),c;function p(e){let o=[];const r=e.value,s=e.key;if("array"!==_r(r))return[new Jn(s,r,`array expected, ${_r(r)} found`)];if(2!==r.length)return[new Jn(s,r,`array length 2 expected, length ${r.length} found`)];if(u){if("object"!==_r(r[0]))return[new Jn(s,r,`object expected, ${_r(r[0])} found`)];if(void 0===r[0].zoom)return[new Jn(s,r,"object stop key must have zoom")];if(void 0===r[0].value)return[new Jn(s,r,"object stop key must have value")];if(i&&i>Bn(r[0].zoom))return[new Jn(s,r[0].zoom,"stop zoom values must appear in ascending order")];Bn(r[0].zoom)!==i&&(i=Bn(r[0].zoom),n=void 0,a={}),o=o.concat(Hn({key:`${s}[0]`,value:r[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:Xn,value:d}}))}else o=o.concat(d({key:`${s}[0]`,value:r[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},r));return Rr(Vn(r[1]))?o.concat([new Jn(`${s}[1]`,r[1],"expressions are not allowed in function stops.")]):o.concat(bi({key:`${s}[1]`,value:r[1],valueSpec:t,style:e.style,styleSpec:e.styleSpec}))}function d(e,i){const s=_r(e.value),l=Bn(e.value),u=null!==e.value?e.value:i;if(r){if(s!==r)return[new Jn(e.key,u,`${s} stop domain type must match previous stop domain type ${r}`)]}else r=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Jn(e.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){let r=`number expected, ${s} found`;return zr(t)&&void 0===o&&(r+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Jn(e.key,u,r)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==n&&l<n?[new Jn(e.key,u,"stop domain values must appear in ascending order")]:(n=l,"categorical"===o&&l in a?[new Jn(e.key,u,"stop domain values must be unique")]:(a[l]=!0,[])):[new Jn(e.key,u,`integer expected, found ${l}`)]}}function Yn(e){const t=("property"===e.expressionContext?Ur:Dr)(Vn(e.value),e.valueSpec);if("error"===t.result)return t.value.map(t=>new Jn(`${e.key}${t.key}`,e.value,t.message));const o=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!o.outputDefined())return[new Jn(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!to(o))return[new Jn(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!to(o))return[new Jn(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!oo(o,["zoom","feature-state"]))return[new Jn(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!eo(o))return[new Jn(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Qn(e){const t=e.value,o=e.key,r=_r(t);return"boolean"!==r?[new Jn(o,t,`boolean expected, ${r} found`)]:[]}function ei(e){const t=e.key,o=e.value,r=_r(o);return"string"!==r?[new Jn(t,o,`color expected, ${r} found`)]:null===at.parseCSSColor(o)?[new Jn(t,o,`color expected, "${o}" found`)]:[]}function ti(e){const t=e.key,o=e.value,r=e.valueSpec,n=[];return Array.isArray(r.values)?-1===r.values.indexOf(Bn(o))&&n.push(new Jn(t,o,`expected one of [${r.values.join(", ")}], ${JSON.stringify(o)} found`)):-1===Object.keys(r.values).indexOf(Bn(o))&&n.push(new Jn(t,o,`expected one of [${Object.keys(r.values).join(", ")}], ${JSON.stringify(o)} found`)),n}function oi(e){return ln(Vn(e.value))?Yn(Le({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):ri(e)}function ri(e){const t=e.value,o=e.key;if("array"!==_r(t))return[new Jn(o,t,`array expected, ${_r(t)} found`)];const r=e.styleSpec;let n,i=[];if(t.length<1)return[new Jn(o,t,"filter array must have at least 1 element")];switch(i=i.concat(ti({key:`${o}[0]`,value:t[0],valueSpec:r.filter_operator,style:e.style,styleSpec:e.styleSpec})),Bn(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===Bn(t[1])&&i.push(new Jn(o,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":3!==t.length&&i.push(new Jn(o,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&"string"!==(n=_r(t[1]))&&i.push(new Jn(`${o}[1]`,t[1],`string expected, ${n} found`));for(let a=2;a<t.length;a++)n=_r(t[a]),"$type"===Bn(t[1])?i=i.concat(ti({key:`${o}[${a}]`,value:t[a],valueSpec:r.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==n&&"number"!==n&&"boolean"!==n&&i.push(new Jn(`${o}[${a}]`,t[a],`string, number, or boolean expected, ${n} found`));break;case"any":case"all":case"none":for(let r=1;r<t.length;r++)i=i.concat(ri({key:`${o}[${r}]`,value:t[r],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":n=_r(t[1]),2!==t.length?i.push(new Jn(o,t,`filter array for "${t[0]}" operator must have 2 elements`)):"string"!==n&&i.push(new Jn(`${o}[1]`,t[1],`string expected, ${n} found`));break;case"within":n=_r(t[1]),2!==t.length?i.push(new Jn(o,t,`filter array for "${t[0]}" operator must have 2 elements`)):"object"!==n&&i.push(new Jn(`${o}[1]`,t[1],`object expected, ${n} found`))}return i}function ni(e,t){const o=e.key,r=e.style,n=e.styleSpec,i=e.value,a=e.objectKey,s=n[`${t}_${e.layerType}`];if(!s)return[];const l=a.match(/^(.*)-transition$/);if("paint"===t&&l&&s[l[1]]&&s[l[1]].transition)return bi({key:o,value:i,valueSpec:n.transition,style:r,styleSpec:n});const u=e.valueSpec||s[a];if(!u)return[new Jn(o,i,`unknown property "${a}"`)];let c;if("string"===_r(i)&&zr(u)&&!u.tokens&&(c=/^{([^}]+)}$/.exec(i)))return[new Jn(o,i,`"${a}" does not support interpolation syntax\n`+`Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(c[1])} }\`.`)];const p=[];return"symbol"===e.layerType&&("text-field"===a&&r&&!r.glyphs&&p.push(new Jn(o,i,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&$r(Vn(i))&&"identity"===Bn(i.type)&&p.push(new Jn(o,i,'"text-font" does not support identity functions'))),p.concat(bi({key:e.key,value:i,valueSpec:u,style:r,styleSpec:n,expressionContext:"property",propertyType:t,propertyKey:a}))}function ii(e){return ni(e,"paint")}function ai(e){return ni(e,"layout")}function si(e){let t=[];const o=e.value,r=e.key,n=e.style,i=e.styleSpec;o.type||o.ref||t.push(new Jn(r,o,'either "type" or "ref" is required'));let a=Bn(o.type);const s=Bn(o.ref);if(o.id){const i=Bn(o.id);for(let a=0;a<e.arrayIndex;a++){const e=n.layers[a];Bn(e.id)===i&&t.push(new Jn(r,o.id,`duplicate layer id "${o.id}", previously used at line ${e.id.__line__}`))}}if("ref"in o){let e;["type","source","source-layer","filter","layout"].forEach(e=>{e in o&&t.push(new Jn(r,o[e],`"${e}" is prohibited for ref layers`))}),n.layers.forEach(t=>{Bn(t.id)===s&&(e=t)}),e?e.ref?t.push(new Jn(r,o.ref,"ref cannot reference another ref layer")):a=Bn(e.type):t.push(new Jn(r,o.ref,`ref layer "${s}" not found`))}else if("background"!==a&&"sky"!==a)if(o.source){const e=n.sources&&n.sources[o.source],i=e&&Bn(e.type);e?"vector"===i&&"raster"===a?t.push(new Jn(r,o.source,`layer "${o.id}" requires a raster source`)):"raster"===i&&"raster"!==a?t.push(new Jn(r,o.source,`layer "${o.id}" requires a vector source`)):"vector"!==i||o["source-layer"]?"raster-dem"===i&&"hillshade"!==a?t.push(new Jn(r,o.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==a||!o.paint||!o.paint["line-gradient"]||"geojson"===i&&e.lineMetrics||t.push(new Jn(r,o,`layer "${o.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new Jn(r,o,`layer "${o.id}" must specify a "source-layer"`)):t.push(new Jn(r,o.source,`source "${o.source}" not found`))}else t.push(new Jn(r,o,'missing required property "source"'));return t=t.concat(Hn({key:r,value:o,valueSpec:i.layer,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":()=>[],type:()=>bi({key:`${r}.type`,value:o.type,valueSpec:i.layer.type,style:e.style,styleSpec:e.styleSpec,object:o,objectKey:"type"}),filter:oi,layout:e=>Hn({layer:o,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":e=>ai(Le({layerType:a},e))}}),paint:e=>Hn({layer:o,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":e=>ii(Le({layerType:a},e))}})}}))}function li(e){const t=e.value,o=e.key,r=_r(t);return"string"!==r?[new Jn(o,t,`string expected, ${r} found`)]:[]}exports.ParsingError=Gn;const ui={promoteId:pi};function ci(e){const t=e.value,o=e.key,r=e.styleSpec,n=e.style;if(!t.type)return[new Jn(o,t,'"type" is required')];const i=Bn(t.type);let a;switch(i){case"vector":case"raster":case"raster-dem":return a=Hn({key:o,value:t,valueSpec:r[`source_${i.replace("-","_")}`],style:e.style,styleSpec:r,objectElementValidators:ui});case"geojson":if(a=Hn({key:o,value:t,valueSpec:r.source_geojson,style:n,styleSpec:r,objectElementValidators:ui}),t.cluster)for(const e in t.clusterProperties){const[r,n]=t.clusterProperties[e],i="string"==typeof r?[r,["accumulated"],["get",e]]:r;a.push(...Yn({key:`${o}.${e}.map`,value:n,expressionContext:"cluster-map"})),a.push(...Yn({key:`${o}.${e}.reduce`,value:i,expressionContext:"cluster-reduce"}))}return a;case"video":return Hn({key:o,value:t,valueSpec:r.source_video,style:n,styleSpec:r});case"image":return Hn({key:o,value:t,valueSpec:r.source_image,style:n,styleSpec:r});case"canvas":return[new Jn(o,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ti({key:`${o}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,styleSpec:r})}}function pi({key:e,value:t}){if("string"===_r(t))return li({key:e,value:t});{const o=[];for(const r in t)o.push(...li({key:`${e}.${r}`,value:t[r]}));return o}}function di(e){const t=e.value,o=e.styleSpec,r=o.light,n=e.style;let i=[];const a=_r(t);if(void 0===t)return i;if("object"!==a)return i=i.concat([new Jn("light",t,`object expected, ${a} found`)]);for(const s in t){const e=s.match(/^(.*)-transition$/);i=e&&r[e[1]]&&r[e[1]].transition?i.concat(bi({key:s,value:t[s],valueSpec:o.transition,style:n,styleSpec:o})):r[s]?i.concat(bi({key:s,value:t[s],valueSpec:r[s],style:n,styleSpec:o})):i.concat([new Jn(s,t[s],`unknown property "${s}"`)])}return i}function hi(e){const t=e.value,o=e.key,r=e.style,n=e.styleSpec,i=n.terrain;let a=[];const s=_r(t);if(void 0===t)return a;if("object"!==s)return a=a.concat([new Jn("terrain",t,`object expected, ${s} found`)]);for(const l in t){const e=l.match(/^(.*)-transition$/);a=e&&i[e[1]]&&i[e[1]].transition?a.concat(bi({key:l,value:t[l],valueSpec:n.transition,style:r,styleSpec:n})):i[l]?a.concat(bi({key:l,value:t[l],valueSpec:i[l],style:r,styleSpec:n})):a.concat([new Jn(l,t[l],`unknown property "${l}"`)])}if(t.source){const e=r.sources&&r.sources[t.source],n=e&&Bn(e.type);e?"raster-dem"!==n&&a.push(new Jn(o,t.source,`terrain cannot be used with a source of type ${n}, it only be used with a "raster-dem" source type`)):a.push(new Jn(o,t.source,`source "${t.source}" not found`))}else a.push(new Jn(o,t,'terrain is missing required property "source"'));return a}function fi(e){const t=e.value,o=e.style,r=e.styleSpec,n=r.fog;let i=[];const a=_r(t);if(void 0===t)return i;if("object"!==a)return i=i.concat([new Jn("fog",t,`object expected, ${a} found`)]);for(const s in t){const e=s.match(/^(.*)-transition$/);i=e&&n[e[1]]&&n[e[1]].transition?i.concat(bi({key:s,value:t[s],valueSpec:r.transition,style:o,styleSpec:r})):n[s]?i.concat(bi({key:s,value:t[s],valueSpec:n[s],style:o,styleSpec:r})):i.concat([new Jn(s,t[s],`unknown property "${s}"`)])}return i}function yi(e){return 0===li(e).length?[]:Yn(e)}function mi(e){return 0===li(e).length?[]:Yn(e)}const gi={"*":()=>[],array:Zn,boolean:Qn,number:Xn,color:ei,constants:Wn,enum:ti,filter:oi,function:Kn,layer:si,object:Hn,source:ci,light:di,terrain:hi,fog:fi,string:li,formatted:yi,resolvedImage:mi};function bi(e){const t=e.value,o=e.valueSpec,r=e.styleSpec;if(o.expression&&$r(Bn(t)))return Kn(e);if(o.expression&&Rr(Vn(t)))return Yn(e);if(o.type&&gi[o.type])return gi[o.type](e);return Hn(Le({},e,{valueSpec:o.type?r[o.type]:o}))}function vi(e){const t=e.value,o=e.key,r=li(e);return r.length?r:(-1===t.indexOf("{fontstack}")&&r.push(new Jn(o,t,'"glyphs" url must include a "{fontstack}" token')),-1===t.indexOf("{range}")&&r.push(new Jn(o,t,'"glyphs" url must include a "{range}" token')),r)}function xi(e,t=G){let o=[];return o=o.concat(bi({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,objectElementValidators:{glyphs:vi,"*":()=>[]}})),e.constants&&(o=o.concat(Wn({key:"constants",value:e.constants,style:e,styleSpec:t}))),wi(o)}function wi(e){return[].concat(e).sort((e,t)=>e.line-t.line)}function ki(e){return function(...t){return wi(e.apply(this,t))}}xi.source=ki(ci),xi.light=ki(di),xi.terrain=ki(hi),xi.fog=ki(fi),xi.layer=ki(si),xi.filter=ki(oi),xi.paintProperty=ki(ii),xi.layoutProperty=ki(ai);var ji=X(function(e,t){var o=function(){var e=function(e,t,o,r){for(o=o||{},r=e.length;r--;o[e[r]]=t);return o},t=[1,12],o=[1,13],r=[1,9],n=[1,10],i=[1,11],a=[1,14],s=[1,15],l=[14,18,22,24],u=[18,22],c=[22,24],p={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(e,t,o,r,n,i,a){var s=i.length-1;switch(n){case 1:this.$=new String(e.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b")),this.$.__line__=this._$.first_line;break;case 2:this.$=new Number(e),this.$.__line__=this._$.first_line;break;case 3:this.$=null;break;case 4:this.$=new Boolean(!0),this.$.__line__=this._$.first_line;break;case 5:this.$=new Boolean(!1),this.$.__line__=this._$.first_line;break;case 6:return this.$=i[s-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=i[s-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[i[s-2],i[s]];break;case 16:this.$={},this.$[i[s][0]]=i[s][1];break;case 17:this.$=i[s-2],i[s-2][i[s][0]]=i[s][1];break;case 18:this.$=[],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[i[s]];break;case 21:this.$=i[s-2],i[s-2].push(i[s])}},table:[{3:5,4:t,5:6,6:o,7:3,8:r,9:4,10:n,11:i,12:1,13:2,15:7,16:8,17:a,23:s},{1:[3]},{14:[1,16]},e(l,[2,7]),e(l,[2,8]),e(l,[2,9]),e(l,[2,10]),e(l,[2,11]),e(l,[2,12]),e(l,[2,3]),e(l,[2,4]),e(l,[2,5]),e([14,18,21,22,24],[2,1]),e(l,[2,2]),{3:20,4:t,18:[1,17],19:18,20:19},{3:5,4:t,5:6,6:o,7:3,8:r,9:4,10:n,11:i,13:23,15:7,16:8,17:a,23:s,24:[1,21],25:22},{1:[2,6]},e(l,[2,13]),{18:[1,24],22:[1,25]},e(u,[2,16]),{21:[1,26]},e(l,[2,18]),{22:[1,28],24:[1,27]},e(c,[2,20]),e(l,[2,14]),{3:20,4:t,20:29},{3:5,4:t,5:6,6:o,7:3,8:r,9:4,10:n,11:i,13:30,15:7,16:8,17:a,23:s},e(l,[2,19]),{3:5,4:t,5:6,6:o,7:3,8:r,9:4,10:n,11:i,13:31,15:7,16:8,17:a,23:s},e(u,[2,17]),e(u,[2,15]),e(c,[2,21])],defaultActions:{16:[2,6]},parseError:function(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){var t=this,o=[0],r=[null],n=[],i=this.table,a="",s=0,l=0,u=1,c=n.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(d.yy[h]=this.yy[h]);p.setInput(e,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;n.push(f);var y=p.options&&p.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,g,b,v,x,w,k,j,z,S={};;){if(g=o[o.length-1],this.defaultActions[g]?b=this.defaultActions[g]:(null==m&&(z=void 0,"number"!=typeof(z=p.lex()||u)&&(z=t.symbols_[z]||z),m=z),b=i[g]&&i[g][m]),void 0===b||!b.length||!b[0]){var T="";for(x in j=[],i[g])this.terminals_[x]&&x>2&&j.push("'"+this.terminals_[x]+"'");T=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+j.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(s+1)+": Unexpected "+(m==u?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(T,{text:p.match,token:this.terminals_[m]||m,line:p.yylineno,loc:f,expected:j})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+m);switch(b[0]){case 1:o.push(m),r.push(p.yytext),n.push(p.yylloc),o.push(b[1]),m=null,l=p.yyleng,a=p.yytext,s=p.yylineno,f=p.yylloc;break;case 2:if(w=this.productions_[b[1]][1],S.$=r[r.length-w],S._$={first_line:n[n.length-(w||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(w||1)].first_column,last_column:n[n.length-1].last_column},y&&(S._$.range=[n[n.length-(w||1)].range[0],n[n.length-1].range[1]]),void 0!==(v=this.performAction.apply(S,[a,l,s,d.yy,b[1],r,n].concat(c))))return v;w&&(o=o.slice(0,-1*w*2),r=r.slice(0,-1*w),n=n.slice(0,-1*w)),o.push(this.productions_[b[1]][0]),r.push(S.$),n.push(S._$),k=i[o[o.length-2]][o[o.length-1]],o.push(k);break;case 3:return!0}}return!0}},d={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,o=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===r.length?this.yylloc.first_column:0)+r[r.length-o.length].length-o[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var o,r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],o=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var i in n)this[i]=n[i];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,o,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),i=0;i<n.length;i++)if((o=this._input.match(this.rules[n[i]]))&&(!t||o[0].length>t[0].length)){if(t=o,r=i,this.options.backtrack_lexer){if(!1!==(e=this.test_match(o,n[i])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,o,r){switch(o){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function h(){this.yy={}}return p.lexer=d,h.prototype=p,p.Parser=h,new h}();void 0!==K&&(t.parser=o,t.Parser=o.Parser,t.parse=function(){return o.parse.apply(o,arguments)})});function zi(e){if(e instanceof String||"string"==typeof e||e instanceof t)try{return ji.parse(e.toString())}catch(o){throw new Gn(o)}return e}function Si(e,t=G){let o=e;try{o=zi(o)}catch(r){return[r]}return xi(o,t)}const Ti=8,_i=15;function $i(e,t){return!e||"string"!==_r(e)||!!e.match(t)}function Ai(e){return e.url?e.url.split(",").length:0}function Ii(e,t,o){const r=new Set(t),n=[];return Object.keys(e).forEach(t=>{if(!r.has(t)){const r=o?`${o}.${t}`:null;n.push(new Jn(r,e[t],`Unsupported property "${t}"`))}}),n}const qi=new Set(["vector","raster","raster-dem"]);function Oi(e,t){const o=[];o.push(...Ii(e,["type","url","tileSize"],"source")),qi.has(String(e.type))||o.push(new Jn(`sources[${t}].type`,e.type,`Expected one of [${Array.from(qi).join(", ")}]`));return e.url&&$i(e.url,/^mapbox:\/\/([^/]*)$/)||o.push(new Jn(`sources[${t}].url`,e.url,"Expected a valid Mapbox tileset url")),o}function Ci(e){const t=[];let o=0;return Object.keys(e).forEach((r,n)=>{const i=Oi(e[r],n);i.length||(o+=Ai(e[r])),t.push(...i)}),o>_i&&t.push(new Jn("sources",null,`Styles must contain ${_i} or fewer sources`)),t}function Ei(e,t){const o=[],r=Ii(e,[...t,"owner","id","cacheControl","draft","created","modified","visibility"]);o.push(...r),(e.version>Ti||e.version<Ti)&&o.push(new Jn("version",e.version,`Style version must be ${Ti}`));$i(e.glyphs,/^mapbox:\/\/fonts\/([^/]*)\/{fontstack}\/{range}.pbf$/)||o.push(new Jn("glyphs",e.glyphs,"Styles must reference glyphs hosted by Mapbox"));$i(e.sprite,/^mapbox:\/\/sprites\/([^/]*)\/([^/]*)\/?([^/]*)?$/)||o.push(new Jn("sprite",e.sprite,"Styles must reference sprites hosted by Mapbox"));return $i(e.visibility,/^(public|private)$/)||o.push(new Jn("visibility",e.visibility,"Style visibility must be public or private")),o}function Mi(e){let t=e;try{t=zi(t)}catch(r){return[r]}let o=xi(t,G).concat(Ei(t,Object.keys(G.$root)));return t.sources&&(o=o.concat(Ci(t.sources))),o}const Ni={StyleExpression:Pr,isExpression:Rr,isExpressionFilter:ln,createExpression:Dr,createPropertyExpression:Ur,normalizePropertyExpression:Gr,ZoomConstantExpression:Lr,ZoomDependentExpression:Fr,StylePropertyFunction:Jr};exports.expression=Ni;const Pi={convertFunction:Zr,createFunction:Ir,isFunction:$r};exports.function=Pi;const Ri={eachSource:qe,eachLayer:Oe,eachProperty:Ce};exports.visit=Ri,Si.parsed=Si,Si.latest=Si;
},{"buffer":"SMKI"}],"N0IJ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.deg2rad=a,exports.createCanvas=s,exports.getZoomForResolution=u,exports.applyLetterSpacing=p,exports.wrapText=d,exports.defaultResolutions=exports.assign=void 0;var e=require("ol/events"),r=t(require("ol/events/EventType")),n=require("ol/render/canvas");function t(e){return e&&e.__esModule?e:{default:e}}var o="function"==typeof Object.assign?Object.assign:function(e,r){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),t=1,o=arguments.length;t<o;++t){var a=arguments[t];if(null!=a)for(var i in a)a.hasOwnProperty(i)&&(n[i]=a[i])}return n};function a(e){return e*Math.PI/180}exports.assign=o;var i=function(){for(var e=[],r=78271.51696402048;e.length<=24;r/=2)e.push(r);return e}();function s(e,r){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(e,r);var n=document.createElement("canvas");return n.width=e,n.height=r,n}function u(e,r){for(var n=0,t=r.length;n<t;++n){if(r[n]<e&&n+1<t){var o=r[n]/r[n+1];return n+Math.log(r[n]/e)/Math.log(o)}}return t-1}exports.defaultResolutions=i;var l,f=Array(256).join("");function p(e,r){if(r>=.05){for(var n="",t=e.split("\n"),o=f.slice(0,Math.round(r/.1)),a=0,i=t.length;a<i;++a)a>0&&(n+="\n"),n+=t[a].split("").join(o);return n}return e}function c(){return l||(l=s(1,1).getContext("2d")),l}function v(e,r){return c().measureText(e).width+(e.length-1)*r}var h={};function d(e,r,n,t){if(-1!==e.indexOf("\n")){for(var o=e.split("\n"),a=[],i=0,s=o.length;i<s;++i)a.push(d(o[i],r,n,t));return a.join("\n")}var u=n+","+r+","+e+","+t,l=h[u];if(!l){var f=e.split(" ");if(f.length>1){var g=c();g.font=r;var x=g.measureText("M").width*n,j="";for(a=[],i=0,s=f.length;i<s;++i){var b=f[i],y=j+(j?" ":"")+b;v(y,t)<=x?j=y:(j&&a.push(j),j=b)}j&&a.push(j);for(i=0,s=a.length;i<s&&s>1;++i){var w=a[i];if(v(w,t)<.35*x){var C=i>0?v(a[i-1],t):1/0,O=i<s-1?v(a[i+1],t):1/0;a.splice(i,1),s-=1,C<O?(a[i-1]+=" "+w,i-=1):a[i]=w+" "+a[i]}}for(i=0,s=a.length-1;i<s;++i){var M=a[i],m=a[i+1];if(v(M,t)>.7*x&&v(m,t)<.6*x){var T=M.split(" "),E=T.pop();v(E,t)<.2*x&&(a[i]=T.join(" "),a[i+1]=E+" "+m),s-=1}}l=a.join("\n")}else l=e;l=p(l,t),h[u]=l}return l}n.labelCache&&(0,e.listen)(n.labelCache,r.default.CLEAR,function(){h={}});
},{"ol/events":"UqnM","ol/events/EventType":"C8cu","ol/render/canvas":"iAG7"}],"Fj7k":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._getValue=exports.getValue=b,exports.recordStyleLayer=O,exports.default=_,exports._colorWithOpacity=C,exports._evaluateFilter=k,exports._fromTemplate=I,exports._functionCache=exports._filterCache=void 0;var e=u(require("ol/style/Style")),t=u(require("ol/style/Fill")),i=u(require("ol/style/Stroke")),o=u(require("ol/style/Icon")),a=u(require("ol/style/Text")),r=u(require("ol/style/Circle")),n=u(require("ol/render/Feature")),l=require("@mapbox/mapbox-gl-style-spec"),s=u(require("mapbox-to-css-font")),d=require("./util");function u(e){return e&&e.__esModule?e:{default:e}}var f,p,g=l.function.isFunction,c=l.function.convertFunction,v=l.expression.isExpression,y=l.expression.createPropertyExpression,h={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},x={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},m=function(e,t){var i=y(e,t);if("error"===i.result)throw new Error(i.value.map(function(e){return e.key+": "+e.message}).join(", "));return i.value},w={},S={zoom:0},M={};function b(e,t,i,o,a){var r=e.id;M[r]||(M[r]={});var n=M[r];if(!n[i]){var s=(e[t]||w)[i],d=l.latest[t+"_"+e.type][i];void 0===s&&(s=d.default);var u=v(s);if(!u&&g(s)&&(s=c(s,d),u=!0),u){var f=m(s,d);n[i]=f.evaluate.bind(f)}else"color"==d.type&&(s=l.Color.parse(s)),n[i]=function(){return s}}return S.zoom=o,n[i](S,a)}exports._functionCache=M;var F={};function k(e,t,i,o){return e in F||(F[e]=(0,l.featureFilter)(t).filter),S.zoom=o,F[e](S,i)}function C(e,t){if(e){if(0===e.a||0===t)return;var i=e.a;return t=void 0===t?1:t,"rgba("+Math.round(255*e.r/i)+","+Math.round(255*e.g/i)+","+Math.round(255*e.b/i)+","+i*t+")"}return e}exports._filterCache=F;var T=/^([^]*)\{(.*)\}([^]*)$/;function I(e,t){var i;do{if(i=e.match(T)){var o=t[i[2]]||"";e=i[1]+o+i[3]}}while(i);return e}var L=!1;function O(e){L=e}function _(u,g,c,v,y,m,S){if(void 0===v&&(v=d.defaultResolutions),"string"==typeof g&&(g=JSON.parse(g)),8!=g.version)throw new Error("glStyle version 8 required.");var T,O;if(m)if("undefined"!=typeof Image){var _=new Image;_.crossOrigin="anonymous",_.onload=function(){T=_,O=[_.width,_.height],u.changed(),_.onload=null},_.src=m}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var q=self;q.postMessage({action:"loadImage",src:m}),q.addEventListener("message",function(e){"imageLoaded"===e.data.action&&e.data.src===m&&(T=e.data.image,O=[T.width,T.height])})}for(var z,P=(0,l.derefLayers)(g.layers),W={},E=[],R=0,G=P.length;R<G;++R){var Z=P[R],j=Z.id;if("string"==typeof c&&Z.source==c||-1!==c.indexOf(j)){var A=Z["source-layer"];if(!z){z=Z.source;var N=g.sources[z];if(!N)throw new Error('Source "'+z+'" is not defined');var V=N.type;if("vector"!==V&&"geojson"!==V)throw new Error('Source "'+z+'" is not of type "vector" or "geojson", but "'+V+'"')}var D=W[A];D||(D=W[A]=[]),D.push({layer:Z,index:R}),E.push(j)}delete M[j],delete F[j]}var J=new i.default,B=new t.default,U={},X={},Y=[],$=function(l,u){var g=l.getProperties(),c=W[g.layer];if(c){var m=v.indexOf(u);-1==m&&(m=(0,d.getZoomForResolution)(u,v));for(var M,F=h[l.getGeometry().getType()],_={properties:g,type:F},q=-1,z=function(v,h){var L=c[v],z=L.layer,P=z.id,W=z.layout||w,E=z.paint||w;if("none"===W.visibility||"minzoom"in z&&m<z.minzoom||"maxzoom"in z&&m>=z.maxzoom)return"continue";var R=z.filter;if(!R||k(P,R,_,m)){M=z;var G=void 0,Z=void 0,j=void 0,A=void 0,N=void 0,V=void 0,D=L.index;if(3==F&&("fill"==z.type||"fill-extrusion"==z.type))if(Z=b(z,"paint",z.type+"-opacity",m,_),z.type+"-pattern"in E){var $=b(z,"paint",z.type+"-pattern",m,_);if($){var H="string"==typeof $?I($,g):$.toString();if(T&&y&&y[H]){(V=Y[++q])&&V.getFill()&&!V.getStroke()&&!V.getText()||(V=Y[q]=new e.default({fill:new t.default})),j=V.getFill(),V.setZIndex(D);var K=X[Te=H+"."+Z];if(!K){var Q=y[H];(Le=(Ie=(0,d.createCanvas)(Q.width,Q.height)).getContext("2d")).globalAlpha=Z,Le.drawImage(T,Q.x,Q.y,Q.width,Q.height,0,0,Q.width,Q.height),K=Le.createPattern(Ie,"repeat"),X[Te]=K}j.setColor(K)}}}else(G=C(b(z,"paint",z.type+"-color",m,_),Z))&&(z.type+"-outline-color"in E&&(N=C(b(z,"paint",z.type+"-outline-color",m,_),Z)),N||(N=G),(V=Y[++q])&&V.getFill()&&V.getStroke()&&!V.getText()||(V=Y[q]=new e.default({fill:new t.default,stroke:new i.default})),(j=V.getFill()).setColor(G),(A=V.getStroke()).setColor(N),A.setWidth(1),V.setZIndex(D));if(1!=F&&"line"==z.type){G=!("line-pattern"in E)&&"line-color"in E?C(b(z,"paint","line-color",m,_),b(z,"paint","line-opacity",m,_)):void 0;var ee=b(z,"paint","line-width",m,_);G&&ee>0&&((V=Y[++q])&&V.getStroke()&&!V.getFill()&&!V.getText()||(V=Y[q]=new e.default({stroke:new i.default})),(A=V.getStroke()).setLineCap(b(z,"layout","line-cap",m,_)),A.setLineJoin(b(z,"layout","line-join",m,_)),A.setMiterLimit(b(z,"layout","line-miter-limit",m,_)),A.setColor(G),A.setWidth(ee),A.setLineDash(E["line-dasharray"]?b(z,"paint","line-dasharray",m,_).map(function(e){return e*ee}):null),V.setZIndex(D))}var te=!1,ie=null,oe=0,ae=void 0,re=void 0,ne=void 0;if((1==F||2==F)&&"icon-image"in W){var le=b(z,"layout","icon-image",m,_);if(le){ae="string"==typeof le?I(le,g):le.toString();var se=void 0;if(T&&y&&y[ae]){var de=b(z,"layout","icon-rotation-alignment",m,_);if(2==F){var ue=l.getGeometry();if(ue.getFlatMidpoint||ue.getFlatMidpoints){var fe=ue.getExtent();if(Math.sqrt(Math.max(Math.pow((fe[2]-fe[0])/u,2),Math.pow((fe[3]-fe[1])/u,2)))>150){var pe="MultiLineString"===ue.getType()?ue.getFlatMidpoints():ue.getFlatMidpoint();if(p||(f=[NaN,NaN],p=new n.default("Point",f,[],{},null)),se=p,f[0]=pe[0],f[1]=pe[1],"line"===(Ye=b(z,"layout","symbol-placement",m,_))&&"map"===de)for(var ge=ue.getStride(),ce=ue.getFlatCoordinates(),ve=0,ye=ce.length-ge;ve<ye;ve+=ge){var he=ce[ve],xe=ce[ve+1],me=ce[ve+ge],we=ce[ve+ge+1],Se=Math.min(he,me),Me=Math.min(xe,we),be=Math.max(he,me),Fe=Math.max(xe,we);if(pe[0]>=Se&&pe[0]<=be&&pe[1]>=Me&&pe[1]<=Fe){oe=Math.atan2(xe-we,me-he);break}}}}}if(2!==F||se){var ke=b(z,"layout","icon-size",m,_),Ce=void 0!==E["icon-color"]?b(z,"paint","icon-color",m,_):null;if(!Ce||0!==Ce.a){var Te=ae+"."+ke;if(null!==Ce&&(Te+="."+Ce),!(re=U[Te])){Q=y[ae];if(null!==Ce){var Ie,Le;(Le=(Ie=(0,d.createCanvas)(Q.width,Q.height)).getContext("2d")).drawImage(T,Q.x,Q.y,Q.width,Q.height,0,0,Q.width,Q.height);for(var Oe=Le.getImageData(0,0,Ie.width,Ie.height),_e=0,qe=Oe.data.length;_e<qe;_e+=4){var ze=Ce.a;0!==ze&&(Oe.data[_e]=255*Ce.r/ze,Oe.data[_e+1]=255*Ce.g/ze,Oe.data[_e+2]=255*Ce.b/ze),Oe.data[_e+3]=ze}Le.putImageData(Oe,0,0),re=U[Te]=new o.default({img:Ie,imgSize:[Ie.width,Ie.height],scale:ke/Q.pixelRatio})}else re=U[Te]=new o.default({img:T,imgSize:O,size:[Q.width,Q.height],offset:[Q.x,Q.y],rotateWithView:"map"===de,scale:ke/Q.pixelRatio})}}re&&((V=Y[++q])&&V.getImage()&&!V.getFill()&&!V.getStroke()||(V=Y[q]=new e.default),V.setGeometry(se),re.setRotation(oe+(0,d.deg2rad)(b(z,"layout","icon-rotate",m,_))),re.setOpacity(b(z,"paint","icon-opacity",m,_)),re.setAnchor(x[b(z,"layout","icon-anchor",m,_)]),V.setImage(re),ie=V.getText(),V.setText(void 0),V.setZIndex(D),te=!0,ne=!1)}else ne=!0}}}if(1==F&&"circle-radius"in E){(V=Y[++q])&&V.getImage()&&!V.getFill()&&!V.getStroke()||(V=Y[q]=new e.default);var Pe=b(z,"paint","circle-radius",m,_),We=C(b(z,"paint","circle-stroke-color",m,_),b(z,"paint","circle-stroke-opacity",m,_)),Ee=C(b(z,"paint","circle-color",m,_),b(z,"paint","circle-opacity",m,_)),Re=b(z,"paint","circle-stroke-width",m,_),Ge=Pe+"."+We+"."+Ee+"."+Re;(re=U[Ge])||(re=U[Ge]=new r.default({radius:Pe,stroke:We&&Re>0?new i.default({width:Re,color:We}):void 0,fill:Ee?new t.default({color:Ee}):void 0})),V.setImage(re),ie=V.getText(),V.setText(void 0),V.setGeometry(void 0),V.setZIndex(D),te=!0}var Ze=void 0;if("text-field"in W)Ze=I(b(z,"layout","text-field",m,_).toString(),g).trim(),Z=b(z,"paint","text-opacity",m,_);if(Ze&&Z&&!ne){te||((V=Y[++q])&&V.getText()&&!V.getFill()&&!V.getStroke()||(V=Y[q]=new e.default),V.setImage(void 0),V.setGeometry(void 0)),V.getText()||V.setText(ie||new a.default({padding:[2,2,2,2]})),ie=V.getText();var je=Math.round(b(z,"layout","text-size",m,_)),Ae=b(z,"layout","text-font",m,_),Ne=b(z,"layout","text-line-height",m,_),Ve=(0,s.default)(S?S(Ae):Ae,je,Ne),De=W["text-transform"];"uppercase"==De?Ze=Ze.toUpperCase():"lowercase"==De&&(Ze=Ze.toLowerCase());var Je=b(z,"layout","text-max-width",m,_),Be=b(z,"layout","text-letter-spacing",m,_),Ue=2==F?(0,d.applyLetterSpacing)(Ze,Be):(0,d.wrapText)(Ze,Ve,Je,Be);ie.setText(Ue),ie.setFont(Ve),ie.setRotation((0,d.deg2rad)(b(z,"layout","text-rotate",m,_)));var Xe=b(z,"layout","text-anchor",m,_),Ye=te||1==F?"point":b(z,"layout","symbol-placement",m,_);ie.setPlacement(Ye);var $e=b(z,"paint","text-halo-width",m,_),He=b(z,"layout","text-offset",m,_),Ke=b(z,"paint","text-translate",m,_),Qe=0,et=0;if("point"==Ye){var tt="center";-1!==Xe.indexOf("left")?(tt="left",et=$e):-1!==Xe.indexOf("right")&&(tt="right",et=-$e),ie.setTextAlign(tt);var it=b(z,"layout","text-rotation-alignment",m,_);ie.setRotateWithView("map"==it)}else ie.setMaxAngle((0,d.deg2rad)(b(z,"layout","text-max-angle",m,_))*Ze.length/Ue.length),ie.setTextAlign(),ie.setRotateWithView(!1);var ot="middle";0==Xe.indexOf("bottom")?(ot="bottom",Qe=-$e-.5*(Ne-1)*je):0==Xe.indexOf("top")&&(ot="top",Qe=$e+.5*(Ne-1)*je),ie.setTextBaseline(ot),ie.setOffsetX(He[0]*je+et+Ke[0]),ie.setOffsetY(He[1]*je+Qe+Ke[1]),B.setColor(C(b(z,"paint","text-color",m,_),Z)),ie.setFill(B);var at=C(b(z,"paint","text-halo-color",m,_),Z);if(at){J.setColor(at),$e*=2;var rt=.5*je;J.setWidth($e<=rt?$e:rt),ie.setStroke(J)}else ie.setStroke(void 0);var nt=b(z,"layout","text-padding",m,_),lt=ie.getPadding();nt!==lt[0]&&(lt[0]=lt[1]=lt[2]=lt[3]=nt),V.setZIndex(D)}}},P=0,E=c.length;P<E;++P)z(P);return q>-1?(Y.length=q+1,L&&("function"==typeof l.set?l.set("mapbox-layer",M):l.getProperties()["mapbox-layer"]=M),Y):void 0}};return u.setStyle($),u.set("mapbox-source",z),u.set("mapbox-layers",E),$}
},{"ol/style/Style":"he4w","ol/style/Fill":"AFcg","ol/style/Stroke":"TXDt","ol/style/Icon":"z2xv","ol/style/Text":"RPsG","ol/style/Circle":"cdf1","ol/render/Feature":"IFOM","@mapbox/mapbox-gl-style-spec":"Prd1","mapbox-to-css-font":"pt6h","./util":"N0IJ"}],"jVC7":[function(require,module,exports) {
(function(){var a;module.exports={icon:"icons/google.svg",name:"google",title:"Google Fonts",link:"google.com/fonts",getNames:function(){return a},getLink:function(a){return"https://fonts.google.com/specimen/"+a.replace(/( )/g,"+")},normalizeName:function(a){return a}},a=["ABeeZee","Abel","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akronim","Aladin","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allura","Almendra","Almendra Display","Almendra SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiri","Amita","Anaheim","Andada","Andika","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo Black","Archivo Narrow","Arimo","Arizonia","Armata","Artifika","Arvo","Arya","Asap","Asar","Asset","Astloch","Asul","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Bad Script","Balthazar","Bangers","Basic","Battambang","Baumans","Bayon","Belgrano","Belleza","BenchNine","Bentham","Berkshire Swash","Bevan","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","Biryani","Bitter","Black Ops One","Bokor","Bonbon","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Bubblegum Sans","Bubbler One","Buda","Buenard","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Changa One","Chango","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Coda","Coda Caption","Codystar","Combo","Comfortaa","Coming Soon","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Courgette","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Text","Croissant One","Crushed","Cuprum","Cutive","Cutive Mono","Damion","Dancing Script","Dangrek","Dawning of a New Day","Days One","Dekko","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Domine","Donegal One","Doppio One","Dorsa","Dosis","Dr Sugiyama","Droid Sans","Droid Sans Mono","Droid Serif","Duru Sans","Dynalight","EB Garamond","Eagle Lake","Eater","Economica","Eczar","Ek Mukta","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Engagement","Englebert","Enriqueta","Erica One","Esteban","Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Fanwood Text","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Federant","Federo","Felipa","Fenix","Finger Paint","Fira Mono","Fira Sans","Fjalla One","Fjord One","Flamenco","Flavors","Fondamento","Fontdiner Swanky","Forum","Francois One","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","GFS Didot","GFS Neohellenic","Gabriela","Gafata","Galdeano","Galindo","Gentium Basic","Gentium Book Basic","Geo","Geostar","Geostar Fill","Germania One","Gidugu","Gilda Display","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Goblin One","Gochi Hand","Gorditas","Goudy Bookletter 1911","Graduate","Grand Hotel","Gravitas One","Great Vibes","Griffy","Gruppo","Gudea","Gurajada","Habibi","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Headland One","Henny Penny","Herr Von Muellerhoff","Hind","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iceberg","Iceland","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","Jim Nightshade","Jockey One","Jolly Lodger","Josefin Sans","Josefin Slab","Joti One","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","Kadwa","Kalam","Kameron","Kantumruy","Karla","Karma","Kaushan Script","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kite One","Knewave","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Kurale","La Belle Aurore","Laila","Lakki Reddy","Lancelot","Lateef","Lato","League Script","Leckerli One","Ledger","Lekton","Lemon","Libre Baskerville","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","Macondo","Macondo Swash Caps","Magra","Maiden Orange","Mako","Mallanna","Mandali","Marcellus","Marcellus SC","Marck Script","Margarine","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Miniver","Miss Fajardose","Modak","Modern Antiqua","Molengo","Molle","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Muli","Mystery Quest","NTR","Neucha","Neuton","New Rocker","News Cycle","Niconne","Nixie One","Nobile","Nokora","Norican","Nosifer","Nothing You Could Do","Noticia Text","Noto Sans","Noto Serif","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Odor Mean Chey","Offside","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orienta","Original Surfer","Oswald","Over the Rainbow","Overlock","Overlock SC","Ovo","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Palanquin","Palanquin Dark","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Patua One","Paytone One","Peddana","Peralta","Permanent Marker","Petit Formal Script","Petrona","Philosopher","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poppins","Port Lligat Sans","Port Lligat Slab","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Princess Sofia","Prociono","Prosto One","Puritan","Purple Purse","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Ranchers","Rancho","Ranga","Rationale","Ravi Prakash","Redressed","Reenie Beanie","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rozha One","Rubik","Rubik Mono One","Rubik One","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","Sacramento","Sahitya","Sail","Salsa","Sanchez","Sancreek","Sansita One","Sarala","Sarina","Sarpanch","Satisfy","Scada","Scheherazade","Schoolbell","Seaweed Script","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shojumaru","Short Stack","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sonsie One","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Special Elite","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Stalemate","Stalinist One","Stardos Stencil","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Sue Ellen Francisco","Sumana","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Tangerine","Taprom","Tauri","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","The Girl Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Trade Winds","Trocchi","Trochut","Trykker","Tulpen One","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","VT323","Vampiro One","Varela","Varela Round","Vast Shadow","Vesper Libre","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","Wire One","Work Sans","Yanone Kaffeesatz","Yantramanav","Yellowtail","Yeseva One","Yesteryear","Zeyada"]}).call(this);
},{}],"RA7M":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("./Feature.js")),e=o(require("./FormatType.js")),r=require("../util.js");function o(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),u=function(t){function o(){return t.call(this)||this}return n(o,t),o.prototype.getType=function(){return e.default.JSON},o.prototype.readFeature=function(t,e){return this.readFeatureFromObject(i(t),this.getReadOptions(t,e))},o.prototype.readFeatures=function(t,e){return this.readFeaturesFromObject(i(t),this.getReadOptions(t,e))},o.prototype.readFeatureFromObject=function(t,e){return(0,r.abstract)()},o.prototype.readFeaturesFromObject=function(t,e){return(0,r.abstract)()},o.prototype.readGeometry=function(t,e){return this.readGeometryFromObject(i(t),this.getReadOptions(t,e))},o.prototype.readGeometryFromObject=function(t,e){return(0,r.abstract)()},o.prototype.readProjection=function(t){return this.readProjectionFromObject(i(t))},o.prototype.readProjectionFromObject=function(t){return(0,r.abstract)()},o.prototype.writeFeature=function(t,e){return JSON.stringify(this.writeFeatureObject(t,e))},o.prototype.writeFeatureObject=function(t,e){return(0,r.abstract)()},o.prototype.writeFeatures=function(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))},o.prototype.writeFeaturesObject=function(t,e){return(0,r.abstract)()},o.prototype.writeGeometry=function(t,e){return JSON.stringify(this.writeGeometryObject(t,e))},o.prototype.writeGeometryObject=function(t,e){return(0,r.abstract)()},o}(t.default);function i(t){if("string"==typeof t){var e=JSON.parse(t);return e||null}return null!==t?t:null}var a=u;exports.default=a;
},{"./Feature.js":"Kylu","./FormatType.js":"AbO3","../util.js":"KniQ"}],"qBlb":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=y(require("../Feature.js")),t=y(require("../geom/GeometryCollection.js")),r=y(require("../geom/GeometryType.js")),o=y(require("./JSONFeature.js")),n=y(require("../geom/LineString.js")),a=y(require("../geom/MultiLineString.js")),i=y(require("../geom/MultiPoint.js")),u=y(require("../geom/MultiPolygon.js")),s=y(require("../geom/Point.js")),c=y(require("../geom/Polygon.js")),p=require("../asserts.js"),d=require("../obj.js"),f=require("../proj.js"),l=require("./Feature.js");function y(e){return e&&e.__esModule?e:{default:e}}var m=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),g=function(t){function r(e){var r=this,o=e||{};return(r=t.call(this)||this).dataProjection=(0,f.get)(o.dataProjection?o.dataProjection:"EPSG:4326"),o.featureProjection&&(r.defaultFeatureProjection=(0,f.get)(o.featureProjection)),r.geometryName_=o.geometryName,r.extractGeometryName_=o.extractGeometryName,r}return m(r,t),r.prototype.readFeatureFromObject=function(t,r){var o=null,n=O((o="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,r),a=new e.default;return this.geometryName_?a.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in o!==void 0&&a.setGeometryName(o.geometry_name),a.setGeometry(n),"id"in o&&a.setId(o.id),o.properties&&a.setProperties(o.properties,!0),a},r.prototype.readFeaturesFromObject=function(e,t){var r=null;if("FeatureCollection"===e.type){r=[];for(var o=e.features,n=0,a=o.length;n<a;++n)r.push(this.readFeatureFromObject(o[n],t))}else r=[this.readFeatureFromObject(e,t)];return r},r.prototype.readGeometryFromObject=function(e,t){return O(e,t)},r.prototype.readProjectionFromObject=function(e){var t,r=e.crs;return r?"name"==r.type?t=(0,f.get)(r.properties.name):"EPSG"===r.type?t=(0,f.get)("EPSG:"+r.properties.code):(0,p.assert)(!1,36):t=this.dataProjection,t},r.prototype.writeFeatureObject=function(e,t){t=this.adaptOptions(t);var r={type:"Feature",geometry:null,properties:null},o=e.getId();if(void 0!==o&&(r.id=o),!e.hasProperties())return r;var n=e.getProperties(),a=e.getGeometry();return a&&(r.geometry=v(a,t),delete n[e.getGeometryName()]),(0,d.isEmpty)(n)||(r.properties=n),r},r.prototype.writeFeaturesObject=function(e,t){t=this.adaptOptions(t);for(var r=[],o=0,n=e.length;o<n;++o)r.push(this.writeFeatureObject(e[o],t));return{type:"FeatureCollection",features:r}},r.prototype.writeGeometryObject=function(e,t){return v(e,this.adaptOptions(t))},r}(o.default);function O(e,t){if(!e)return null;var o;switch(e.type){case r.default.POINT:o=P(e);break;case r.default.LINE_STRING:o=G(e);break;case r.default.POLYGON:o=h(e);break;case r.default.MULTI_POINT:o=b(e);break;case r.default.MULTI_LINE_STRING:o=_(e);break;case r.default.MULTI_POLYGON:o=N(e);break;case r.default.GEOMETRY_COLLECTION:o=j(e);break;default:throw new Error("Unsupported GeoJSON type: "+e.type)}return(0,l.transformGeometryWithOptions)(o,!1,t)}function j(e,r){var o=e.geometries.map(function(e){return O(e,r)});return new t.default(o)}function P(e){return new s.default(e.coordinates)}function G(e){return new n.default(e.coordinates)}function _(e){return new a.default(e.coordinates)}function b(e){return new i.default(e.coordinates)}function N(e){return new u.default(e.coordinates)}function h(e){return new c.default(e.coordinates)}function v(e,t){var o,n=(e=(0,l.transformGeometryWithOptions)(e,!0,t)).getType();switch(n){case r.default.POINT:o=C(e,t);break;case r.default.LINE_STRING:o=L(e,t);break;case r.default.POLYGON:o=E(e,t);break;case r.default.MULTI_POINT:o=w(e,t);break;case r.default.MULTI_LINE_STRING:o=F(e,t);break;case r.default.MULTI_POLYGON:o=T(e,t);break;case r.default.GEOMETRY_COLLECTION:o=I(e,t);break;case r.default.CIRCLE:o={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+n)}return o}function I(e,t){return{type:"GeometryCollection",geometries:e.getGeometriesArray().map(function(e){var r=(0,d.assign)({},t);return delete r.featureProjection,v(e,r)})}}function L(e,t){return{type:"LineString",coordinates:e.getCoordinates()}}function F(e,t){return{type:"MultiLineString",coordinates:e.getCoordinates()}}function w(e,t){return{type:"MultiPoint",coordinates:e.getCoordinates()}}function T(e,t){var r;return t&&(r=t.rightHanded),{type:"MultiPolygon",coordinates:e.getCoordinates(r)}}function C(e,t){return{type:"Point",coordinates:e.getCoordinates()}}function E(e,t){var r;return t&&(r=t.rightHanded),{type:"Polygon",coordinates:e.getCoordinates(r)}}var M=g;exports.default=M;
},{"../Feature.js":"mYW9","../geom/GeometryCollection.js":"HvLT","../geom/GeometryType.js":"lmV0","./JSONFeature.js":"RA7M","../geom/LineString.js":"DfxW","../geom/MultiLineString.js":"fbCo","../geom/MultiPoint.js":"dNu5","../geom/MultiPolygon.js":"ouhF","../geom/Point.js":"gLcY","../geom/Polygon.js":"Nwwk","../asserts.js":"fLG6","../obj.js":"mH6q","../proj.js":"Diht","./Feature.js":"Kylu"}],"HTO1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("./Layer.js")),t=o(require("./TileProperty.js")),r=require("../obj.js");function o(e){return e&&e.__esModule?e:{default:e}}var n=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),i=function(e){function o(t){var o=this,n=t||{},i=(0,r.assign)({},n);return delete i.preload,delete i.useInterimTilesOnError,(o=e.call(this,i)||this).setPreload(void 0!==n.preload?n.preload:0),o.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),o}return n(o,e),o.prototype.getPreload=function(){return this.get(t.default.PRELOAD)},o.prototype.setPreload=function(e){this.set(t.default.PRELOAD,e)},o.prototype.getUseInterimTilesOnError=function(){return this.get(t.default.USE_INTERIM_TILES_ON_ERROR)},o.prototype.setUseInterimTilesOnError=function(e){this.set(t.default.USE_INTERIM_TILES_ON_ERROR,e)},o}(e.default),s=i;exports.default=s;
},{"./Layer.js":"GCgv","./TileProperty.js":"M5pz","../obj.js":"mH6q"}],"BUEc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("./BaseTile.js")),t=r(require("../renderer/canvas/TileLayer.js"));function r(e){return e&&e.__esModule?e:{default:e}}var n=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),o=function(e){function r(t){return e.call(this,t)||this}return n(r,e),r.prototype.createRenderer=function(){return new t.default(this)},r}(e.default),u=o;exports.default=u;
},{"./BaseTile.js":"HTO1","../renderer/canvas/TileLayer.js":"hkMV"}],"TOsW":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=s(require("./Tile.js")),e=s(require("./TileState.js")),i=require("./dom.js"),n=require("./Image.js");function s(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),a=function(t){function i(e,i,n,s,r,a){var o=t.call(this,e,i,a)||this;return o.crossOrigin_=s,o.src_=n,o.key=n,o.image_=new Image,null!==s&&(o.image_.crossOrigin=s),o.unlisten_=null,o.tileLoadFunction_=r,o}return r(i,t),i.prototype.getImage=function(){return this.image_},i.prototype.handleImageError_=function(){this.state=e.default.ERROR,this.unlistenImage_(),this.image_=o(),this.changed()},i.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=e.default.LOADED:this.state=e.default.EMPTY,this.unlistenImage_(),this.changed()},i.prototype.load=function(){this.state==e.default.ERROR&&(this.state=e.default.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==e.default.IDLE&&(this.state=e.default.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=(0,n.listenImage)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},i.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},i}(t.default);function o(){var t=(0,i.createCanvasContext2D)(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}var u=a;exports.default=u;
},{"./Tile.js":"IWZI","./TileState.js":"Xz9x","./dom.js":"Xno5","./Image.js":"DHWK"}],"BiRY":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../extent.js"),i=require("../proj.js"),r=require("../math.js"),e=10,s=.25,o=function(){function o(s,o,n,a,h,u){this.sourceProj_=s,this.targetProj_=o;var d={},c=(0,i.getTransform)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var i=t[0]+"/"+t[1];return d[i]||(d[i]=c(t)),d[i]},this.maxSourceExtent_=a,this.errorThresholdSquared_=h*h,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!a&&!!this.sourceProj_.getExtent()&&(0,t.getWidth)(a)==(0,t.getWidth)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,t.getWidth)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,t.getWidth)(this.targetProj_.getExtent()):null;var _=(0,t.getTopLeft)(n),l=(0,t.getTopRight)(n),g=(0,t.getBottomRight)(n),f=(0,t.getBottomLeft)(n),W=this.transformInv_(_),v=this.transformInv_(l),m=this.transformInv_(g),x=this.transformInv_(f),p=e+(u?Math.max(0,Math.ceil((0,r.log2)((0,t.getArea)(n)/(u*u*256*256)))):0);if(this.addQuad_(_,l,g,f,W,v,m,x,p),this.wrapsXInSource_){var F=1/0;this.triangles_.forEach(function(t,i,r){F=Math.min(F,t.source[0][0],t.source[1][0],t.source[2][0])}),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-F>this.sourceWorldWidth_/2){var i=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];i[0][0]-F>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-F>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-F>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);var r=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-r<this.sourceWorldWidth_/2&&(t.source=i)}}.bind(this))}d={}}return o.prototype.addTriangle_=function(t,i,r,e,s,o){this.triangles_.push({source:[e,s,o],target:[t,i,r]})},o.prototype.addQuad_=function(i,e,o,n,a,h,u,d,c){var _=(0,t.boundingExtent)([a,h,u,d]),l=this.sourceWorldWidth_?(0,t.getWidth)(_)/this.sourceWorldWidth_:null,g=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&l>.5&&l<1,W=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var v=(0,t.boundingExtent)([i,e,o,n]);W=(0,t.getWidth)(v)/this.targetWorldWidth_>s||W}!f&&this.sourceProj_.isGlobal()&&l&&(W=l>s||W)}if(!(!W&&this.maxSourceExtent_&&isFinite(_[0])&&isFinite(_[1])&&isFinite(_[2])&&isFinite(_[3]))||(0,t.intersects)(_,this.maxSourceExtent_)){var m=0;if(!(W||isFinite(a[0])&&isFinite(a[1])&&isFinite(h[0])&&isFinite(h[1])&&isFinite(u[0])&&isFinite(u[1])&&isFinite(d[0])&&isFinite(d[1])))if(c>0)W=!0;else if(1!=(m=(isFinite(a[0])&&isFinite(a[1])?0:8)+(isFinite(h[0])&&isFinite(h[1])?0:4)+(isFinite(u[0])&&isFinite(u[1])?0:2)+(isFinite(d[0])&&isFinite(d[1])?0:1))&&2!=m&&4!=m&&8!=m)return;if(c>0){if(!W){var x=[(i[0]+o[0])/2,(i[1]+o[1])/2],p=this.transformInv_(x),F=void 0;if(f)F=((0,r.modulo)(a[0],g)+(0,r.modulo)(u[0],g))/2-(0,r.modulo)(p[0],g);else F=(a[0]+u[0])/2-p[0];var j=(a[1]+u[1])/2-p[1];W=F*F+j*j>this.errorThresholdSquared_}if(W){if(Math.abs(i[0]-o[0])<=Math.abs(i[1]-o[1])){var E=[(e[0]+o[0])/2,(e[1]+o[1])/2],I=this.transformInv_(E),P=[(n[0]+i[0])/2,(n[1]+i[1])/2],S=this.transformInv_(P);this.addQuad_(i,e,E,P,a,h,I,S,c-1),this.addQuad_(P,E,o,n,S,I,u,d,c-1)}else{var T=[(i[0]+e[0])/2,(i[1]+e[1])/2],M=this.transformInv_(T),b=[(o[0]+n[0])/2,(o[1]+n[1])/2],X=this.transformInv_(b);this.addQuad_(i,T,b,n,a,M,X,d,c-1),this.addQuad_(T,e,o,b,M,h,u,X,c-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&m)&&this.addTriangle_(i,o,n,a,u,d),0==(14&m)&&this.addTriangle_(i,o,e,a,u,h),m&&(0==(13&m)&&this.addTriangle_(e,n,i,h,d,a),0==(7&m)&&this.addTriangle_(e,n,o,h,d,u))}},o.prototype.calculateSourceExtent=function(){var i=(0,t.createEmpty)();return this.triangles_.forEach(function(r,e,s){var o=r.source;(0,t.extendCoordinate)(i,o[0]),(0,t.extendCoordinate)(i,o[1]),(0,t.extendCoordinate)(i,o[2])}),i},o.prototype.getTriangles=function(){return this.triangles_},o}(),n=o;exports.default=n;
},{"../extent.js":"QDir","../proj.js":"Diht","../math.js":"B96G"}],"a8mu":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.IMAGE_SMOOTHING_DISABLED=exports.DEFAULT_WMS_VERSION=void 0;var e="1.3.0";exports.DEFAULT_WMS_VERSION=e;var o={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1};exports.IMAGE_SMOOTHING_DISABLED=o;
},{}],"U255":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.calculateSourceResolution=u,exports.calculateSourceExtentResolution=g,exports.render=v;var e,t=require("./source/common.js"),r=require("./obj.js"),a=require("./extent.js"),n=require("./dom.js"),o=require("./proj.js"),i=require("./math.js");function s(e,t,r,a,n){e.beginPath(),e.moveTo(0,0),e.lineTo(t,r),e.lineTo(a,n),e.closePath(),e.save(),e.clip(),e.fillRect(0,0,Math.max(t,a)+1,Math.max(r,n)),e.restore()}function l(e,t){return Math.abs(e[4*t]-210)>2||Math.abs(e[4*t+3]-191.25)>2}function c(){if(void 0===e){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",s(t,4,5,4,0),s(t,4,5,0,5);var r=t.getImageData(0,0,3,3).data;e=l(r,0)||l(r,4)||l(r,8)}return e}function u(e,t,r,n){var i=(0,o.transform)(r,t,e),s=(0,o.getPointResolution)(t,n,r),l=t.getMetersPerUnit();void 0!==l&&(s*=l);var c=e.getMetersPerUnit();void 0!==c&&(s/=c);var u=e.getExtent();if(!u||(0,a.containsCoordinate)(u,i)){var g=(0,o.getPointResolution)(e,s,i)/s;isFinite(g)&&g>0&&(s/=g)}return s}function g(e,t,r,n){var o=(0,a.getCenter)(r),i=u(e,t,o,n);return(!isFinite(i)||i<=0)&&(0,a.forEachCorner)(r,function(r){return i=u(e,t,r,n),isFinite(i)&&i>0}),i}function v(e,o,s,l,u,g,v,h,f,m,d,x){var T=(0,n.createCanvasContext2D)(Math.round(s*e),Math.round(s*o));if((0,r.assign)(T,x),0===f.length)return T.canvas;function p(e){return Math.round(e*s)/s}T.scale(s,s),T.globalCompositeOperation="lighter";var M=(0,a.createEmpty)();f.forEach(function(e,t,r){(0,a.extend)(M,e.extent)});var b=(0,a.getWidth)(M),C=(0,a.getHeight)(M),E=(0,n.createCanvasContext2D)(Math.round(s*b/l),Math.round(s*C/l));(0,r.assign)(E,x);var P=s/l;f.forEach(function(e,t,r){var n=e.extent[0]-M[0],o=-(e.extent[3]-M[3]),i=(0,a.getWidth)(e.extent),s=(0,a.getHeight)(e.extent);e.image.width>0&&e.image.height>0&&E.drawImage(e.image,m,m,e.image.width-2*m,e.image.height-2*m,n*P,o*P,i*P,s*P)});var j=(0,a.getTopLeft)(v);return h.getTriangles().forEach(function(e,r,a){var n=e.source,o=e.target,u=n[0][0],v=n[0][1],h=n[1][0],f=n[1][1],m=n[2][0],d=n[2][1],b=p((o[0][0]-j[0])/g),C=p(-(o[0][1]-j[1])/g),P=p((o[1][0]-j[0])/g),S=p(-(o[1][1]-j[1])/g),q=p((o[2][0]-j[0])/g),I=p(-(o[2][1]-j[1])/g),O=u,y=v;u=0,v=0;var D=[[h-=O,f-=y,0,0,P-b],[m-=O,d-=y,0,0,q-b],[0,0,h,f,S-C],[0,0,m,d,I-C]],R=(0,i.solveLinearSystem)(D);if(R){if(T.save(),T.beginPath(),c()||x===t.IMAGE_SMOOTHING_DISABLED){T.moveTo(P,S);for(var w=b-P,_=C-S,k=0;k<4;k++)T.lineTo(P+p((k+1)*w/4),S+p(k*_/3)),3!=k&&T.lineTo(P+p((k+1)*w/4),S+p((k+1)*_/3));T.lineTo(q,I)}else T.moveTo(P,S),T.lineTo(b,C),T.lineTo(q,I);T.clip(),T.transform(R[0],R[2],R[1],R[3],b,C),T.translate(M[0]-O,M[3]-y),T.scale(l/s,-l/s),T.drawImage(E.canvas,0,0),T.restore()}}),d&&(T.save(),T.globalCompositeOperation="source-over",T.strokeStyle="black",T.lineWidth=1,h.getTriangles().forEach(function(e,t,r){var a=e.target,n=(a[0][0]-j[0])/g,o=-(a[0][1]-j[1])/g,i=(a[1][0]-j[0])/g,s=-(a[1][1]-j[1])/g,l=(a[2][0]-j[0])/g,c=-(a[2][1]-j[1])/g;T.beginPath(),T.moveTo(i,s),T.lineTo(n,o),T.lineTo(l,c),T.closePath(),T.stroke()}),T.restore()),T.canvas}
},{"./source/common.js":"a8mu","./obj.js":"mH6q","./extent.js":"QDir","./dom.js":"Xno5","./proj.js":"Diht","./math.js":"B96G"}],"WlOd":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("./common.js"),t=l(require("../events/EventType.js")),r=l(require("../Tile.js")),i=l(require("../TileState.js")),s=l(require("./Triangulation.js")),o=require("../reproj.js"),n=require("../math.js"),a=require("../extent.js"),u=require("../events.js");function l(e){return e&&e.__esModule?e:{default:e}}var c=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),d=function(r){function l(t,u,l,c,d,_,f,h,p,g,T,E){var v=r.call(this,d,i.default.IDLE)||this;v.renderEdges_=void 0!==T&&T,v.contextOptions_=E,v.pixelRatio_=f,v.gutter_=h,v.canvas_=null,v.sourceTileGrid_=u,v.targetTileGrid_=c,v.wrappedTileCoord_=_||d,v.sourceTiles_=[],v.sourcesListenerKeys_=null,v.sourceZ_=0;var y=c.getTileCoordExtent(v.wrappedTileCoord_),x=v.targetTileGrid_.getExtent(),R=v.sourceTileGrid_.getExtent(),j=x?(0,a.getIntersection)(y,x):y;if(0===(0,a.getArea)(j))return v.state=i.default.EMPTY,v;var O=t.getExtent();O&&(R=R?(0,a.getIntersection)(R,O):O);var m=c.getResolution(v.wrappedTileCoord_[0]),L=(0,o.calculateSourceExtentResolution)(t,l,j,m);if(!isFinite(L)||L<=0)return v.state=i.default.EMPTY,v;var D=void 0!==g?g:e.ERROR_THRESHOLD;if(v.triangulation_=new s.default(t,l,j,R,L*D,m),0===v.triangulation_.getTriangles().length)return v.state=i.default.EMPTY,v;v.sourceZ_=u.getZForResolution(L);var G=v.triangulation_.calculateSourceExtent();if(R&&(t.canWrapX()?(G[1]=(0,n.clamp)(G[1],R[1],R[3]),G[3]=(0,n.clamp)(G[3],R[1],R[3])):G=(0,a.getIntersection)(G,R)),(0,a.getArea)(G)){for(var I=u.getTileRangeForExtentAndZ(G,v.sourceZ_),S=I.minX;S<=I.maxX;S++)for(var A=I.minY;A<=I.maxY;A++){var C=p(v.sourceZ_,S,A,f);C&&v.sourceTiles_.push(C)}0===v.sourceTiles_.length&&(v.state=i.default.EMPTY)}else v.state=i.default.EMPTY;return v}return c(l,r),l.prototype.getImage=function(){return this.canvas_},l.prototype.reproject_=function(){var e=[];if(this.sourceTiles_.forEach(function(t,r,s){t&&t.getState()==i.default.LOADED&&e.push({extent:this.sourceTileGrid_.getTileCoordExtent(t.tileCoord),image:t.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===e.length)this.state=i.default.ERROR;else{var t=this.wrappedTileCoord_[0],r=this.targetTileGrid_.getTileSize(t),s="number"==typeof r?r:r[0],n="number"==typeof r?r:r[1],a=this.targetTileGrid_.getResolution(t),u=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=(0,o.render)(s,n,this.pixelRatio_,u,this.sourceTileGrid_.getExtent(),a,l,this.triangulation_,e,this.gutter_,this.renderEdges_,this.contextOptions_),this.state=i.default.LOADED}this.changed()},l.prototype.load=function(){if(this.state==i.default.IDLE){this.state=i.default.LOADING,this.changed();var e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(r,s,o){var n=r.getState();if(n==i.default.IDLE||n==i.default.LOADING){e++;var a=(0,u.listen)(r,t.default.CHANGE,function(t){var s=r.getState();s!=i.default.LOADED&&s!=i.default.ERROR&&s!=i.default.EMPTY||((0,u.unlistenByKey)(a),0===--e&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(a)}}.bind(this)),this.sourceTiles_.forEach(function(e,t,r){e.getState()==i.default.IDLE&&e.load()}),0===e&&setTimeout(this.reproject_.bind(this),0)}},l.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(u.unlistenByKey),this.sourcesListenerKeys_=null},l}(r.default),_=d;exports.default=_;
},{"./common.js":"fF5X","../events/EventType.js":"C8cu","../Tile.js":"IWZI","../TileState.js":"Xz9x","./Triangulation.js":"BiRY","../reproj.js":"U255","../math.js":"B96G","../extent.js":"QDir","../events.js":"UqnM"}],"udAI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=p(require("../events/EventType.js")),t=p(require("../ImageTile.js")),i=p(require("../reproj/Tile.js")),r=p(require("../TileCache.js")),o=p(require("../TileState.js")),n=p(require("./UrlTile.js")),c=require("../reproj/common.js"),l=require("./common.js"),s=require("../proj.js"),a=require("../tilecoord.js"),h=require("../tilegrid.js"),u=require("../util.js");function p(e){return e&&e.__esModule?e:{default:e}}var d=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),E=function(n){function p(e){var i=n.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:j,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return i.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,i.tileClass=void 0!==e.tileClass?e.tileClass:t.default,i.tileCacheForProjection={},i.tileGridForProjection={},i.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,i.contextOptions_=!1===e.imageSmoothing?l.IMAGE_SMOOTHING_DISABLED:void 0,i.renderReprojectionEdges_=!1,i}return d(p,n),p.prototype.canExpireCache=function(){if(!c.ENABLE_RASTER_REPROJECTION)return n.prototype.canExpireCache.call(this);if(this.tileCache.canExpireCache())return!0;for(var e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1},p.prototype.expireCache=function(e,t){if(c.ENABLE_RASTER_REPROJECTION){var i=this.getTileCacheForProjection(e);for(var r in this.tileCache.expireCache(this.tileCache==i?t:{}),this.tileCacheForProjection){var o=this.tileCacheForProjection[r];o.expireCache(o==i?t:{})}}else n.prototype.expireCache.call(this,e,t)},p.prototype.getContextOptions=function(){return this.contextOptions_},p.prototype.getGutterForProjection=function(e){return c.ENABLE_RASTER_REPROJECTION&&this.getProjection()&&e&&!(0,s.equivalent)(this.getProjection(),e)?0:this.getGutter()},p.prototype.getGutter=function(){return 0},p.prototype.getKey=function(){return n.prototype.getKey.call(this)+(this.contextOptions_?"\n"+JSON.stringify(this.contextOptions_):"")},p.prototype.getOpaque=function(e){return!(c.ENABLE_RASTER_REPROJECTION&&this.getProjection()&&e&&!(0,s.equivalent)(this.getProjection(),e))&&n.prototype.getOpaque.call(this,e)},p.prototype.getTileGridForProjection=function(e){if(!c.ENABLE_RASTER_REPROJECTION)return n.prototype.getTileGridForProjection.call(this,e);var t=this.getProjection();if(!this.tileGrid||t&&!(0,s.equivalent)(t,e)){var i=(0,u.getUid)(e);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=(0,h.getForProjection)(e)),this.tileGridForProjection[i]}return this.tileGrid},p.prototype.getTileCacheForProjection=function(e){if(!c.ENABLE_RASTER_REPROJECTION)return n.prototype.getTileCacheForProjection.call(this,e);var t=this.getProjection();if(!t||(0,s.equivalent)(t,e))return this.tileCache;var i=(0,u.getUid)(e);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new r.default(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},p.prototype.createTile_=function(t,i,r,n,c,l){var s=[t,i,r],a=this.getTileCoordForTileUrlFunction(s,c),h=a?this.tileUrlFunction(a,n,c):void 0,u=new this.tileClass(s,void 0!==h?o.default.IDLE:o.default.EMPTY,void 0!==h?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=l,u.addEventListener(e.default.CHANGE,this.handleTileChange.bind(this)),u},p.prototype.getTile=function(e,t,r,o,n){var l=this.getProjection();if(c.ENABLE_RASTER_REPROJECTION&&l&&n&&!(0,s.equivalent)(l,n)){var h=this.getTileCacheForProjection(n),u=[e,t,r],p=void 0,d=(0,a.getKey)(u);h.containsKey(d)&&(p=h.get(d));var E=this.getKey();if(p&&p.key==E)return p;var j=this.getTileGridForProjection(l),g=this.getTileGridForProjection(n),f=this.getTileCoordForTileUrlFunction(u,n),T=new i.default(l,j,n,g,u,f,this.getTilePixelRatio(o),this.getGutter(),function(e,t,i,r){return this.getTileInternal(e,t,i,r,l)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.contextOptions_);return T.key=E,p?(T.interimTile=p,T.refreshInterimChain(),h.replace(d,T)):h.set(d,T),T}return this.getTileInternal(e,t,r,o,l||n)},p.prototype.getTileInternal=function(e,t,i,r,n){var c=null,l=(0,a.getKeyZXY)(e,t,i),s=this.getKey();if(this.tileCache.containsKey(l)){if((c=this.tileCache.get(l)).key!=s){var h=c;c=this.createTile_(e,t,i,r,n,s),h.getState()==o.default.IDLE?c.interimTile=h.interimTile:c.interimTile=h,c.refreshInterimChain(),this.tileCache.replace(l,c)}}else c=this.createTile_(e,t,i,r,n,s),this.tileCache.set(l,c);return c},p.prototype.setRenderReprojectionEdges=function(e){if(c.ENABLE_RASTER_REPROJECTION&&this.renderReprojectionEdges_!=e){for(var t in this.renderReprojectionEdges_=e,this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}},p.prototype.setTileGridForProjection=function(e,t){if(c.ENABLE_RASTER_REPROJECTION){var i=(0,s.get)(e);if(i){var r=(0,u.getUid)(i);r in this.tileGridForProjection||(this.tileGridForProjection[r]=t)}}},p}(n.default);function j(e,t){e.getImage().src=t}var g=E;exports.default=g;
},{"../events/EventType.js":"C8cu","../ImageTile.js":"TOsW","../reproj/Tile.js":"WlOd","../TileCache.js":"YFDe","../TileState.js":"Xz9x","./UrlTile.js":"uv9E","../reproj/common.js":"fF5X","./common.js":"a8mu","../proj.js":"Diht","../tilecoord.js":"faTr","../tilegrid.js":"ExRx","../util.js":"KniQ"}],"SU9K":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.jsonp=t;var e=require("./util.js");function t(t,n,o,i){var c=document.createElement("script"),r="olc_"+(0,e.getUid)(n);function a(){delete window[r],c.parentNode.removeChild(c)}c.async=!0,c.src=t+(-1==t.indexOf("?")?"?":"&")+(i||"callback")+"="+r;var d=setTimeout(function(){a(),o&&o()},1e4);window[r]=function(e){clearTimeout(d),a(),n(e)},document.getElementsByTagName("head")[0].appendChild(c)}
},{"./util.js":"KniQ"}],"V9RY":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=l(require("./State.js")),e=l(require("./TileImage.js")),r=require("../extent.js"),i=require("../asserts.js"),o=require("../tileurlfunction.js"),n=require("../tilegrid.js"),s=require("../proj.js"),a=require("../net.js");function l(t){return t&&t.__esModule?t:{default:t}}var u=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),c=function(e){function l(r){var o=e.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,imageSmoothing:r.imageSmoothing,projection:(0,s.get)("EPSG:3857"),reprojectionErrorThreshold:r.reprojectionErrorThreshold,state:t.default.LOADING,tileLoadFunction:r.tileLoadFunction,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition})||this;if(o.tileJSON_=null,o.tileSize_=r.tileSize,r.url)if(r.jsonp)(0,a.jsonp)(r.url,o.handleTileJSONResponse.bind(o),o.handleTileJSONError.bind(o));else{var n=new XMLHttpRequest;n.addEventListener("load",o.onXHRLoad_.bind(o)),n.addEventListener("error",o.onXHRError_.bind(o)),n.open("GET",r.url),n.send()}else r.tileJSON?o.handleTileJSONResponse(r.tileJSON):(0,i.assert)(!1,51);return o}return u(l,e),l.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(i){return void this.handleTileJSONError()}this.handleTileJSONResponse(r)}else this.handleTileJSONError()},l.prototype.onXHRError_=function(t){this.handleTileJSONError()},l.prototype.getTileJSON=function(){return this.tileJSON_},l.prototype.handleTileJSONResponse=function(e){var i,a=(0,s.get)("EPSG:4326"),l=this.getProjection();if(void 0!==e.bounds){var u=(0,s.getTransformFromProjections)(a,l);i=(0,r.applyTransform)(e.bounds,u)}var c=e.minzoom||0,d=e.maxzoom||22,p=(0,n.createXYZ)({extent:(0,n.extentFromProjection)(l),maxZoom:d,minZoom:c,tileSize:this.tileSize_});if(this.tileGrid=p,this.tileUrlFunction=(0,o.createFromTemplates)(e.tiles,p),void 0!==e.attribution&&!this.getAttributions()){var h=void 0!==i?i:a.getExtent();this.setAttributions(function(t){return(0,r.intersects)(h,t.extent)?[e.attribution]:null})}this.tileJSON_=e,this.setState(t.default.READY)},l.prototype.handleTileJSONError=function(){this.setState(t.default.ERROR)},l}(e.default),d=c;exports.default=d;
},{"./State.js":"iC8j","./TileImage.js":"udAI","../extent.js":"QDir","../asserts.js":"fLG6","../tileurlfunction.js":"p1vZ","../tilegrid.js":"ExRx","../proj.js":"Diht","../net.js":"SU9K"}],"CreQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.applyStyle=V,exports.applyBackground=C,exports.default=F,exports.apply=H,exports.getLayer=$,exports.getLayers=I,exports.getSource=X,exports._finalizeLayer=W,exports._getFonts=j;var e=w(require("mapbox-to-css-font")),t=x(require("./stylefunction")),r=w(require("webfont-matcher/lib/fonts/google")),o=require("ol/proj"),n=require("ol/tilegrid"),i=w(require("ol/tilegrid/TileGrid")),a=w(require("ol/Map")),u=w(require("ol/View")),s=w(require("ol/format/GeoJSON")),l=w(require("ol/format/MVT")),c=require("ol/Observable"),f=w(require("ol/layer/Tile")),g=w(require("ol/layer/Vector")),p=w(require("ol/layer/VectorTile")),d=w(require("ol/source/TileJSON")),y=w(require("ol/source/Vector")),m=w(require("ol/source/VectorTile")),v=require("@mapbox/mapbox-gl-style-spec"),h=require("./util");function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function x(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=o?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(r,n,i):r[n]=e[n]}return r.default=e,t&&t.set(e,r),r}function w(e){return e&&e.__esModule?e:{default:e}}var S,O={},T=/font-family: ?([^;]*);/,q=/("|')/g;function E(e){if(!S){S={};for(var t=document.styleSheets,r=0,o=t.length;r<o;++r){var n=t[r];try{var i=n.rules||n.cssRules;if(i)for(var a=0,u=i.length;a<u;++a){var s=i[a];if(5==s.type){var l=s.cssText.match(T);S[l[1].replace(q,"")]=!0}}}catch(c){}}}return e in S}var z={},L=r.default.getNames();function j(t){var r=t.toString();if(r in z)return t;for(var o=t.map(function(t){var r=(0,e.default)(t,1).split(" ");return[r.slice(3).join(" ").replace(/"/g,""),r[1]+r[0]]}),n=0,i=o.length;n<i;++n){var a=o[n],u=a[0];if(!E(u)&&-1!==L.indexOf(u)){var s="https://fonts.googleapis.com/css?family="+u.replace(/ /g,"+")+":"+a[1];if(!document.querySelector('link[href="'+s+'"]')){var l=document.createElement("link");l.href=s,l.rel="stylesheet",document.head.appendChild(l)}}}return z[r]=!0,t}var k=/^(.*)(\?.*)$/;function M(e,t){return t&&0===e.indexOf(".")&&(e=t+e),e}function P(e,t,r){var o=(e=M(e,t)).match(k);return o?o[1]+r+(o.length>2?o[2]:""):e+r}function V(e,r,o,n,i){return new Promise(function(a,u){if("object"!=typeof r&&(r=JSON.parse(r)),8!=r.version)return u(new Error("glStyle version 8 required."));if(!(e instanceof g.default||e instanceof p.default))return u(new Error("Can only apply to VectorLayer or VectorTileLayer"));var s,l,c;function f(){c||r.sprite&&!s?c?(e.setStyle(c),a()):u(new Error("Something went wrong trying to apply style.")):(c=(0,t.default)(e,r,o,i,s,l,j),e.getStyle()?a():u(new Error("Nothing to show for source ["+o+"]")))}if(r.sprite){var d=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",y=P(r.sprite,n,d+".json");fetch(y,{credentials:"same-origin"}).then(function(e){return e.ok||""===d?e:(y=P(r.sprite,n,".json"),fetch(y,{credentials:"same-origin"}))}).then(function(e){if(e.ok)return e.json();u(new Error("Problem fetching sprite from "+y+": "+e.statusText))}).then(function(e){if(void 0===e)return u(new Error("No sprites found."));s=e,l=P(r.sprite,n,d+".png"),f()}).catch(function(e){u(new Error("Sprites cannot be loaded: "+y+": "+e.message))})}else f()})}var R={};function N(e,r){var o={type:r.type};function n(){var n=e.getTargetElement();if(n){var i=r.layout||{},a=r.paint||{};o.paint=a,o.id="olms-bg-"+a["background-opacity"]+a["background-color"];var u=e.getView().getZoom();if(void 0!==a["background-color"]){var s=(0,t.getValue)(o,"paint","background-color",u,R);n.style.background=v.Color.parse(s).toString()}void 0!==a["background-opacity"]&&(n.style.opacity=(0,t.getValue)(o,"paint","background-opacity",u,R)),"none"==i.visibility&&(n.style.backgroundColor="",n.style.opacity="")}}e.getTargetElement()&&n(),e.on(["change:resolution","change:target"],n)}function C(e,t){t.layers.some(function(t){if("background"==t.type)return N(e,t),!0})}function G(e,t){var r;return e.some(function(e){if(e.id==t)return r=e.source,!0}),r}function Z(e){var t=e.bounds;if(t){var r=(0,o.fromLonLat)([t[0],t[1]]),n=(0,o.fromLonLat)([t[2],t[3]]);return[r[0],r[1],n[0],n[1]]}}function A(e,t,r){e=(0,h.assign)({},e);var o=new p.default({declutter:!0,visible:!1}),n=JSON.stringify(e),a=O[n];a||(a=O[n]=new d.default({url:e.tiles?void 0:r,tileJSON:e.tiles?e:void 0}));var u=a.on("change",function(){var e=a.getState();if("ready"===e){var t=a.getTileJSON(),n=Array.isArray(t.tiles)?t.tiles:[t.tiles];if(r)for(var s=0,f=n.length;s<f;++s){var g=n[s];0!=g.indexOf("http")&&(n[s]=r.replace(/\/?$/,"/")+g.replace(/^\//,""))}var p=a.getTileGrid(),d=Z(t),y=t.minzoom||0,v=t.maxzoom||22,b=a.get("ol-source");void 0===b&&(b=new m.default({attributions:a.getAttributions(),format:new l.default,tileGrid:new i.default({origin:p.getOrigin(0),extent:d||p.getExtent(),minZoom:y,resolutions:h.defaultResolutions.slice(0,v+1),tileSize:512}),urls:n}),a.set("ol-source",b)),(0,c.unByKey)(u),o.setSource(b)}else"error"===e&&(a.set("ol-source",null),(0,c.unByKey)(u),o.setSource(void 0))});return"ready"===a.getState()&&a.changed(),o}function J(e,t){var r=new f.default,o=new d.default({transition:0,url:e.tiles?void 0:t,tileJSON:e.tiles?e:void 0,crossOrigin:"anonymous"}),a=o.on("change",function(){var t=o.getState();if("ready"===t){(0,c.unByKey)(a);var u=o.getTileJSON(),s=Z(u),l=o.getTileGrid(),f=e.tileSize||u.tileSize||512,g=u.minzoom||0,p=u.maxzoom||22;o.tileGrid=new i.default({origin:l.getOrigin(0),extent:s||l.getExtent(),minZoom:g,resolutions:(0,n.createXYZ)({maxZoom:p,tileSize:f}).getResolutions(),tileSize:f}),r.setSource(o)}else"error"===t&&((0,c.unByKey)(a),r.setSource(void 0))});return o.setTileLoadFunction(function(e,t){if(-1!=t.indexOf("{bbox-epsg-3857}")){var r=o.getTileGrid().getTileCoordExtent(e.getTileCoord());t=t.replace("{bbox-epsg-3857}",r.toString())}e.getImage().src=t}),r}var _=new s.default;function B(e,t){var r,o,n=e.data;return"string"==typeof n?o=M(n,t):r=_.readFeatures(n,{featureProjection:"EPSG:3857"}),new g.default({source:new y.default({attributions:e.attribution,features:r,format:_,url:o}),visible:!1})}function K(e,r,o){var n=o.getZoom(),i=(0,t.getValue)(e,"paint","raster-opacity",n,R);r.setOpacity(i)}function D(e,t,r,n,i,a){void 0===a&&(a="");var s=[],l=t.getView();l.isDef()||l.getRotation()||l.getResolutions()||(l=new u.default({maxResolution:h.defaultResolutions[0]}),t.setView(l)),"center"in e&&!l.getCenter()&&l.setCenter((0,o.fromLonLat)(e.center)),"zoom"in e&&void 0===l.getZoom()&&l.setResolution(h.defaultResolutions[0]/Math.pow(2,e.zoom)),l.getCenter()&&void 0!==l.getZoom()||l.fit(l.getProjection().getExtent(),{nearest:!0,size:t.getSize()}),e.sprite&&(0==e.sprite.indexOf("mapbox://")?e.sprite=r+"/sprite"+a:0!=e.sprite.indexOf("http")&&(e.sprite=(n?n+i:"")+e.sprite+a));for(var c,f,g,p,d,y,m=e.layers,v=[],b=function(r,o){var u=(c=m[r]).type;if("heatmap"==u||"hillshade"==u);else if("background"==u)N(t,c);else{if((p=c.source||G(m,c.ref))!=g){if(v.length&&(s.push(W(d,v,e,i,t)),v=[]),f=e.sources[p],y=f.url)if(0==(y=M(y,i)).indexOf("mapbox://")){var h=y.replace("mapbox://","");f.tiles=["a","b","c","d"].map(function(e){return"https://"+e+".tiles.mapbox.com/v4/"+h+"/{z}/{x}/{y}."+("vector"==f.type?"vector.pbf":"png")+a})}else 0===y.indexOf("/")&&0===n.indexOf("http")&&(y=n+y);f.tiles&&(f.tiles=f.tiles.map(function(e){return M(e,i)})),"vector"==f.type?d=A(f,a,y):"raster"==f.type?((d=J(f,y)).setVisible(!c.layout||"none"!==c.layout.visibility),l.on("change:resolution",K.bind(x,c,d,l)),K(c,d,l)):"geojson"==f.type&&(d=B(f,i)),g=p,d&&d.set("mapbox-source",g)}v.push(c.id)}},x=this,w=0,S=m.length;w<S;++w)b(w);return s.push(W(d,v,e,i,t)),t.set("mapbox-style",e),Promise.all(s)}function F(e,t){var r,o,n,i,u;if(r=o=n=i="",("string"==typeof e||e instanceof HTMLElement)&&(e=new a.default({target:e})),"string"==typeof t){var s=t.match(k);s&&(o=s[1],r=s.length>2?s[2]:""),u=new Promise(function(a,u){fetch(t,{credentials:"same-origin"}).then(function(e){return e.json()}).then(function(s){var l=document.createElement("A");l.href=t;var c=l.href;i=l.pathname.split("/").slice(0,-1).join("/")+"/",n=c.substr(0,c.indexOf(i)),D(s,e,o,n,i,r).then(function(){a(e)}).catch(u)}).catch(function(e){u(new Error("Could not load "+t+": "+e.message))})})}else u=new Promise(function(r,o){D(t,e).then(function(){r(e)}).catch(o)});return u}function H(e,t){return("string"==typeof e||e instanceof HTMLElement)&&(e=new a.default({target:e})),setTimeout(function(){F(e,t)},0),e}function W(e,t,r,o,n){for(var i=24,a=0,u=r.layers,s=0,l=u.length;s<l;++s){var c=u[s];-1!==t.indexOf(c.id)&&(i=Math.min("minzoom"in c?c.minzoom:0,i),a=Math.max("maxzoom"in c?c.maxzoom:24,a))}return new Promise(function(u,s){var l=function(){var n=e.getSource();if(n&&"error"!==n.getState()){if("function"==typeof n.getTileGrid){var l=n.getTileGrid();if(l){var c=l.getMinZoom();(i>0||c>0)&&e.setMaxResolution(Math.min(h.defaultResolutions[i],l.getResolution(c))+1e-9),a<24&&e.setMinResolution(h.defaultResolutions[a]+1e-9)}}n instanceof y.default||n instanceof m.default?V(e,r,t,o).then(function(){e.setVisible(!0),u()},function(e){s(e)}):u()}else s(new Error("Error accessing data for source "+e.get("mapbox-source")))};e.set("mapbox-layers",t),-1===n.getLayers().getArray().indexOf(e)&&n.addLayer(e),e.getSource()?l():e.once("change:source",l)})}function $(e,t){for(var r=e.getLayers().getArray(),o=0,n=r.length;o<n;++o){var i=r[o].get("mapbox-layers");if(i&&-1!==i.indexOf(t))return r[o]}}function I(e,t){for(var r=[],o=e.getLayers().getArray(),n=0,i=o.length;n<i;++n)o[n].get("mapbox-source")===t&&r.push(o[n]);return r}function X(e,t){for(var r=e.getLayers().getArray(),o=0,n=r.length;o<n;++o){var i=r[o].getSource();if(r[o].get("mapbox-source")===t)return i}}
},{"mapbox-to-css-font":"pt6h","./stylefunction":"Fj7k","webfont-matcher/lib/fonts/google":"jVC7","ol/proj":"Diht","ol/tilegrid":"ExRx","ol/tilegrid/TileGrid":"dpZ6","ol/Map":"kYy5","ol/View":"hNqE","ol/format/GeoJSON":"qBlb","ol/format/MVT":"bjcz","ol/Observable":"IdSm","ol/layer/Tile":"BUEc","ol/layer/Vector":"dflx","ol/layer/VectorTile":"zOJv","ol/source/TileJSON":"V9RY","ol/source/Vector":"ZS12","ol/source/VectorTile":"A6uo","@mapbox/mapbox-gl-style-spec":"Prd1","./util":"N0IJ"}],"VqZN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMapboxPath=c,exports.normalizeSpriteUrl=f,exports.normalizeGlyphsUrl=p,exports.normalizeStyleUrl=d,exports.normalizeSourceUrl=h,exports.default=void 0;var e=a(require("../events/Event.js")),r=a(require("../events/EventType.js")),t=a(require("../format/MVT.js")),n=a(require("../source/State.js")),o=a(require("../layer/VectorTile.js")),s=a(require("../source/VectorTile.js")),i=require("ol-mapbox-style");function a(e){return e&&e.__esModule?e:{default:e}}var l=function(){var e=function(r,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(r,t)};return function(r,t){function n(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),u="https://api.mapbox.com";function c(e){return 0!==e.indexOf("mapbox://")?"":e.slice("mapbox://".length)}function f(e,r){var t=c(e);if(!t)return e;if(0!==t.indexOf("sprites/"))throw new Error("unexpected sprites url: "+e);var n=t.slice("sprites/".length);return u+"/styles/v1/"+n+"/sprite?access_token="+r}function p(e,r){var t=c(e);if(!t)return e;if(0!==t.indexOf("fonts/"))throw new Error("unexpected fonts url: "+e);var n=t.slice("fonts/".length);return u+"/fonts/v1/"+n+"/0-255.pbf?access_token="+r}function d(e,r){var t=c(e);if(!t)return e;if(0!==t.indexOf("styles/"))throw new Error("unexpected style url: "+e);var n=t.slice("styles/".length);return u+"/styles/v1/"+n+"?&access_token="+r}function h(e,r){var t=c(e);return t?"https://{a-d}.tiles.mapbox.com/v4/"+t+"/{z}/{x}/{y}.vector.pbf?access_token="+r:e}var y=function(e){function t(t){var n=e.call(this,r.default.ERROR)||this;return n.error=t,n}return l(t,e),t}(e.default),v={VECTOR:"vector"},m=function(e){function r(r){var o=this,i=!("declutter"in r)||r.declutter,a=new s.default({state:n.default.LOADING,format:new t.default});return(o=e.call(this,{source:a,declutter:i,className:r.className,opacity:r.opacity,visible:r.visible,zIndex:r.zIndex,minResolution:r.minResolution,maxResolution:r.maxResolution,minZoom:r.minZoom,maxZoom:r.maxZoom,renderOrder:r.renderOrder,renderBuffer:r.renderBuffer,renderMode:r.renderMode,map:r.map,updateWhileAnimating:r.updateWhileAnimating,updateWhileInteracting:r.updateWhileInteracting,preload:r.preload,useInterimTilesOnError:r.useInterimTilesOnError})||this).sourceId=r.source,o.layers=r.layers,o.accessToken=r.accessToken,o.fetchStyle(r.styleUrl),o}return l(r,e),r.prototype.fetchStyle=function(e){var r=this,t=d(e,this.accessToken);fetch(t).then(function(e){if(!e.ok)throw new Error("unexpected response when fetching style: "+e.status);return e.json()}).then(function(e){r.onStyleLoad(e)}).catch(function(e){r.handleError(e)})},r.prototype.onStyleLoad=function(e){var r,t,o=this;if(this.layers){for(var s={},a=0;a<e.layers.length;++a){var l=e.layers[a];l.source&&(s[l.id]=l.source)}var u=void 0;for(a=0;a<this.layers.length;++a){var c=s[this.layers[a]];if(!c)return void this.handleError(new Error("could not find source for "+this.layers[a]));if(u){if(u!==c)return void this.handleError(new Error("layers can only use a single source, found "+u+" and "+c))}else u=c}r=u,t=this.layers}else t=r=this.sourceId;t||(t=r=Object.keys(e.sources)[0]),e.sprite&&(e.sprite=f(e.sprite,this.accessToken)),e.glyphs&&(e.glyphs=p(e.glyphs,this.accessToken));var d=e.sources[r];if(d.type===v.VECTOR){var y=this.getSource();y.setUrl(h(d.url,this.accessToken)),(0,i.applyStyle)(this,e,t).then(function(){y.setState(n.default.READY)}).catch(function(e){o.handleError(e)})}else this.handleError(new Error("only works for vector sources, found "+d.type))},r.prototype.handleError=function(e){this.dispatchEvent(new y(e)),this.getSource().setState(n.default.ERROR)},r}(o.default),x=m;exports.default=x;
},{"../events/Event.js":"fKNg","../events/EventType.js":"C8cu","../format/MVT.js":"bjcz","../source/State.js":"iC8j","../layer/VectorTile.js":"zOJv","../source/VectorTile.js":"A6uo","ol-mapbox-style":"CreQ"}],"K7j2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./ImageBase.js")),e=r(require("./ImageState.js"));function r(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),n=function(t){function r(r,o,n,a,u){var i=this,s=void 0!==u?e.default.IDLE:e.default.LOADED;return(i=t.call(this,r,o,n,s)||this).loader_=void 0!==u?u:null,i.canvas_=a,i.error_=null,i}return o(r,t),r.prototype.getError=function(){return this.error_},r.prototype.handleLoad_=function(t){t?(this.error_=t,this.state=e.default.ERROR):this.state=e.default.LOADED,this.changed()},r.prototype.load=function(){this.state==e.default.IDLE&&(this.state=e.default.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))},r.prototype.getImage=function(){return this.canvas_},r}(t.default),a=n;exports.default=a;
},{"./ImageBase.js":"Ojbp","./ImageState.js":"Xz9x"}],"GITV":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=l(require("./ImageLayer.js")),t=l(require("./VectorLayer.js")),r=l(require("../../events/EventType.js")),o=l(require("../../ImageCanvas.js")),n=l(require("../../ImageState.js")),i=l(require("rbush")),a=l(require("../../ViewHint.js")),s=require("../../transform.js"),u=require("../../obj.js"),c=require("../../extent.js");function l(e){return e&&e.__esModule?e:{default:e}}var d=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),p=function(e){function l(r){var o=e.call(this,r)||this;return o.vectorRenderer_=new t.default(r),o.layerImageRatio_=r.getImageRatio(),o.coordinateToVectorPixelTransform_=(0,s.create)(),o.renderedPixelToCoordinateTransform_=null,o}return d(l,e),l.prototype.disposeInternal=function(){this.vectorRenderer_.dispose(),e.prototype.disposeInternal.call(this)},l.prototype.getFeatures=function(e){if(this.vectorRenderer_){var t=(0,s.apply)(this.coordinateToVectorPixelTransform_,(0,s.apply)(this.renderedPixelToCoordinateTransform_,e.slice()));return this.vectorRenderer_.getFeatures(t)}return new Promise(function(e,t){e([])})},l.prototype.handleFontsChanged=function(){this.vectorRenderer_.handleFontsChanged()},l.prototype.prepareFrame=function(e){var t=e.pixelRatio,l=e.viewState,d=l.resolution,p=e.viewHints,f=this.vectorRenderer_,h=e.extent;1!==this.layerImageRatio_&&(h=h.slice(0),(0,c.scaleFromCenter)(h,this.layerImageRatio_));var _=(0,c.getWidth)(h)/d,v=(0,c.getHeight)(h)/d;if(!p[a.default.ANIMATING]&&!p[a.default.INTERACTING]&&!(0,c.isEmpty)(h)){f.useContainer(null,null,1);var y=f.context,m=(0,u.assign)({},e,{declutterTree:new i.default(9),extent:h,size:[_,v],viewState:(0,u.assign)({},e.viewState,{rotation:0})}),g=new o.default(h,d,t,y.canvas,function(e){f.prepareFrame(m)&&f.replayGroupChanged&&(f.clipping=!1,f.renderFrame(m,null),f.renderDeclutter(m),e())});g.addEventListener(r.default.CHANGE,function(){if(g.getState()===n.default.LOADED){this.image_=g;var e=g.getResolution(),r=g.getPixelRatio(),o=e*t/r;this.renderedResolution=o,this.coordinateToVectorPixelTransform_=(0,s.compose)(this.coordinateToVectorPixelTransform_,_/2,v/2,1/o,-1/o,0,-l.center[0],-l.center[1])}}.bind(this)),g.load()}return this.image_&&(this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice()),!!this.image_},l.prototype.preRender=function(){},l.prototype.postRender=function(){},l.prototype.renderDeclutter=function(){},l.prototype.forEachFeatureAtCoordinate=function(t,r,o,n,i){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(t,r,o,n,i):e.prototype.forEachFeatureAtCoordinate.call(this,t,r,o,n,i)},l}(e.default),f=p;exports.default=f;
},{"./ImageLayer.js":"rzNj","./VectorLayer.js":"F2e3","../../events/EventType.js":"C8cu","../../ImageCanvas.js":"K7j2","../../ImageState.js":"Xz9x","rbush":"XGea","../../ViewHint.js":"cuLW","../../transform.js":"P4eA","../../obj.js":"mH6q","../../extent.js":"QDir"}],"VV4h":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("./BaseVector.js")),e=o(require("../renderer/canvas/VectorImageLayer.js")),r=require("../obj.js");function o(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),i=function(t){function o(e){var o=this,n=e||{},i=(0,r.assign)({},n);return delete i.imageRatio,(o=t.call(this,i)||this).imageRatio_=void 0!==n.imageRatio?n.imageRatio:1,o}return n(o,t),o.prototype.getImageRatio=function(){return this.imageRatio_},o.prototype.createRenderer=function(){return new e.default(this)},o}(t.default),a=i;exports.default=a;
},{"./BaseVector.js":"pskK","../renderer/canvas/VectorImageLayer.js":"GITV","../obj.js":"mH6q"}],"xlCh":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getValueType=e,exports.isTypeUnique=o,exports.numberToGlsl=u,exports.arrayToGlsl=i,exports.colorToGlsl=l,exports.getStringNumberEquivalent=f,exports.stringToGlsl=a,exports.expressionToGlsl=s,exports.Operators=exports.ValueTypes=void 0;var t=require("../color.js"),r={NUMBER:1,STRING:2,COLOR:4,BOOLEAN:8,NUMBER_ARRAY:16,ANY:31,NONE:0};exports.ValueTypes=r;var n={};function e(e){if("number"==typeof e)return r.NUMBER;if("boolean"==typeof e)return r.BOOLEAN;if("string"==typeof e)return(0,t.isStringColor)(e)?r.COLOR|r.STRING:r.STRING;if(!Array.isArray(e))throw new Error("Unhandled value type: "+JSON.stringify(e));var o=e;if(o.every(function(t){return"number"==typeof t}))return 3===o.length||4===o.length?r.COLOR|r.NUMBER_ARRAY:r.NUMBER_ARRAY;if("string"!=typeof o[0])throw new Error("Expected an expression operator but received: "+JSON.stringify(o));var u=n[o[0]];if(void 0===u)throw new Error("Unrecognized expression operator: "+JSON.stringify(o));return u.getReturnType(o.slice(1))}function o(t){return Math.log2(t)%1==0}function u(t){var r=t.toString();return-1===r.indexOf(".")?r+".0":r}function i(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec"+t.length+"("+t.map(u).join(", ")+")"}function l(r){var n=(0,t.asArray)(r).slice();return n.length<4&&n.push(1),i(n.map(function(t,r){return r<3?t/255:t}))}function f(t,r){return void 0===t.stringLiteralsMap[r]&&(t.stringLiteralsMap[r]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[r]}function a(t,r){return u(f(t,r))}function s(t,o,f){if(Array.isArray(o)&&"string"==typeof o[0]){var s=n[o[0]];if(void 0===s)throw new Error("Unrecognized expression operator: "+JSON.stringify(o));return s.toGlsl(t,o.slice(1),f)}var c=e(o);return(c&r.NUMBER)>0?u(o):(c&r.BOOLEAN)>0?o.toString():(c&r.STRING)>0&&(void 0===f||f==r.STRING)?a(t,o.toString()):(c&r.COLOR)>0&&(void 0===f||f==r.COLOR)?l(o):(c&r.NUMBER_ARRAY)>0?i(o):void 0}function c(t){if(!(e(t)&r.NUMBER))throw new Error("A numeric value was expected, got "+JSON.stringify(t)+" instead")}function g(t){for(var r=0;r<t.length;r++)c(t[r])}function p(t){if(!(e(t)&r.STRING))throw new Error("A string value was expected, got "+JSON.stringify(t)+" instead")}function R(t){if(!(e(t)&r.BOOLEAN))throw new Error("A boolean value was expected, got "+JSON.stringify(t)+" instead")}function y(t,r){if(t.length!==r)throw new Error("Exactly "+r+" arguments were expected, got "+t.length+" instead")}function N(t,r){if(t.length<r)throw new Error("At least "+r+" arguments were expected, got "+t.length+" instead")}function v(t,r){if(t.length>r)throw new Error("At most "+r+" arguments were expected, got "+t.length+" instead")}function h(t){if(t.length%2!=0)throw new Error("An even amount of arguments was expected, got "+t+" instead")}function O(t){if(t.length%2==0)throw new Error("An odd amount of arguments was expected, got "+t+" instead")}function E(t,r){if(!o(r))throw new Error("Could not infer only one type from the following expression: "+JSON.stringify(t))}function d(t){return{getReturnType:function(t){return r.BOOLEAN},toGlsl:function(n,o){y(o,2);for(var u=r.ANY,i=0;i<o.length;i++)u&=e(o[i]);if(0===u)throw new Error("All arguments should be of compatible type, got "+JSON.stringify(o)+" instead");return"("+s(n,o[0],u)+" "+t+" "+s(n,o[1],u)+")"}}}function w(t){return{getReturnType:function(t){return r.BOOLEAN},toGlsl:function(r,n){N(n,2);for(var e=0;e<n.length;e++)R(n[e]);return"("+n.map(function(t){return s(r,t)}).join(" "+t+" ")+")"}}}exports.Operators=n,n.get={getReturnType:function(t){return r.ANY},toGlsl:function(t,r){y(r,1),p(r[0]);var n=r[0].toString();return-1===t.attributes.indexOf(n)&&t.attributes.push(n),(t.inFragmentShader?"v_":"a_")+n}},n.var={getReturnType:function(t){return r.ANY},toGlsl:function(t,r){y(r,1),p(r[0]);var n=r[0].toString();return-1===t.variables.indexOf(n)&&t.variables.push(n),"u_"+n}},n.time={getReturnType:function(t){return r.NUMBER},toGlsl:function(t,r){return y(r,0),"u_time"}},n.zoom={getReturnType:function(t){return r.NUMBER},toGlsl:function(t,r){return y(r,0),"u_zoom"}},n.resolution={getReturnType:function(t){return r.NUMBER},toGlsl:function(t,r){return y(r,0),"u_resolution"}},n["*"]={getReturnType:function(t){return r.NUMBER},toGlsl:function(t,r){return y(r,2),g(r),"("+s(t,r[0])+" * "+s(t,r[1])+")"}},n["/"]={getReturnType:function(t){return r.NUMBER},toGlsl:function(t,r){return y(r,2),g(r),"("+s(t,r[0])+" / "+s(t,r[1])+")"}},n["+"]={getReturnType:function(t){return r.NUMBER},toGlsl:function(t,r){return y(r,2),g(r),"("+s(t,r[0])+" + "+s(t,r[1])+")"}},n["-"]={getReturnType:function(t){return r.NUMBER},toGlsl:function(t,r){return y(r,2),g(r),"("+s(t,r[0])+" - "+s(t,r[1])+")"}},n.clamp={getReturnType:function(t){return r.NUMBER},toGlsl:function(t,r){y(r,3),g(r);var n=s(t,r[1]),e=s(t,r[2]);return"clamp("+s(t,r[0])+", "+n+", "+e+")"}},n["%"]={getReturnType:function(t){return r.NUMBER},toGlsl:function(t,r){return y(r,2),g(r),"mod("+s(t,r[0])+", "+s(t,r[1])+")"}},n["^"]={getReturnType:function(t){return r.NUMBER},toGlsl:function(t,r){return y(r,2),g(r),"pow("+s(t,r[0])+", "+s(t,r[1])+")"}},n[">"]={getReturnType:function(t){return r.BOOLEAN},toGlsl:function(t,r){return y(r,2),g(r),"("+s(t,r[0])+" > "+s(t,r[1])+")"}},n[">="]={getReturnType:function(t){return r.BOOLEAN},toGlsl:function(t,r){return y(r,2),g(r),"("+s(t,r[0])+" >= "+s(t,r[1])+")"}},n["<"]={getReturnType:function(t){return r.BOOLEAN},toGlsl:function(t,r){return y(r,2),g(r),"("+s(t,r[0])+" < "+s(t,r[1])+")"}},n["<="]={getReturnType:function(t){return r.BOOLEAN},toGlsl:function(t,r){return y(r,2),g(r),"("+s(t,r[0])+" <= "+s(t,r[1])+")"}},n["=="]=d("=="),n["!="]=d("!="),n["!"]={getReturnType:function(t){return r.BOOLEAN},toGlsl:function(t,r){return y(r,1),R(r[0]),"(!"+s(t,r[0])+")"}},n.all=w("&&"),n.any=w("||"),n.between={getReturnType:function(t){return r.BOOLEAN},toGlsl:function(t,r){y(r,3),g(r);var n=s(t,r[1]),e=s(t,r[2]),o=s(t,r[0]);return"("+o+" >= "+n+" && "+o+" <= "+e+")"}},n.array={getReturnType:function(t){return r.NUMBER_ARRAY},toGlsl:function(t,n){N(n,2),v(n,4),g(n);var e=n.map(function(n){return s(t,n,r.NUMBER)});return"vec"+n.length+"("+e.join(", ")+")"}},n.color={getReturnType:function(t){return r.COLOR},toGlsl:function(t,n){N(n,3),v(n,4),g(n);var e=n;3===n.length&&e.push(1);var o=n.map(function(n,e){return s(t,n,r.NUMBER)+(e<3?" / 255.0":"")});return"vec"+n.length+"("+o.join(", ")+")"}},n.interpolate={getReturnType:function(t){for(var n=r.COLOR|r.NUMBER,o=3;o<t.length;o+=2)n&=e(t[o]);return n},toGlsl:function(t,e,o){h(e),N(e,6);var i,l=e[0];switch(l[0]){case"linear":i=1;break;case"exponential":i=l[1];break;default:i=null}if(!i)throw new Error('Invalid interpolation type for "interpolate" operator, received: '+JSON.stringify(l));var f=void 0!==o?o:r.ANY,a=n.interpolate.getReturnType(e)&f;E(e,a);for(var c=s(t,e[1]),g=null,p=2;p<e.length-2;p+=2){var R=s(t,e[p]),y=s(t,e[p+1],a),v=s(t,e[p+2]);g="mix("+(g||y)+", "+s(t,e[p+3],a)+", pow(clamp(("+c+" - "+R+") / ("+v+" - "+R+"), 0.0, 1.0), "+u(i)+"))"}return g}},n.match={getReturnType:function(t){for(var n=r.ANY,o=2;o<t.length;o+=2)n&=e(t[o]);return n&=e(t[t.length-1])},toGlsl:function(t,e,o){h(e),N(e,4);var u=void 0!==o?o:r.ANY,i=n.match.getReturnType(e)&u;E(e,i);for(var l=s(t,e[0]),f=s(t,e[e.length-1],i),a=null,c=e.length-3;c>=1;c-=2){a="("+l+" == "+s(t,e[c])+" ? "+s(t,e[c+1],i)+" : "+(a||f)+")"}return a}},n.case={getReturnType:function(t){for(var n=r.ANY,o=1;o<t.length;o+=2)n&=e(t[o]);return n&=e(t[t.length-1])},toGlsl:function(t,e,o){O(e),N(e,3);var u=void 0!==o?o:r.ANY,i=n.case.getReturnType(e)&u;E(e,i);for(var l=0;l<e.length-1;l+=2)R(e[l]);var f=s(t,e[e.length-1],i),a=null;for(l=e.length-3;l>=0;l-=2){a="("+s(t,e[l])+" ? "+s(t,e[l+1],i)+" : "+(a||f)+")"}return a}};
},{"../color.js":"eucy"}],"iRdz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseLiteralStyle=o,exports.ShaderBuilder=void 0;var e=require("../style/expressions.js"),t=function(){function e(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}return e.prototype.addUniform=function(e){return this.uniforms.push(e),this},e.prototype.addAttribute=function(e){return this.attributes.push(e),this},e.prototype.addVarying=function(e,t,o){return this.varyings.push({name:e,type:t,expression:o}),this},e.prototype.setSizeExpression=function(e){return this.sizeExpression=e,this},e.prototype.setRotationExpression=function(e){return this.rotationExpression=e,this},e.prototype.setSymbolOffsetExpression=function(e){return this.offsetExpression=e,this},e.prototype.setColorExpression=function(e){return this.colorExpression=e,this},e.prototype.setTextureCoordinateExpression=function(e){return this.texCoordExpression=e,this},e.prototype.setFragmentDiscardExpression=function(e){return this.discardExpression=e,this},e.prototype.setSymbolRotateWithView=function(e){return this.rotateWithView=e,this},e.prototype.getSizeExpression=function(){return this.sizeExpression},e.prototype.getOffsetExpression=function(){return this.offsetExpression},e.prototype.getColorExpression=function(){return this.colorExpression},e.prototype.getTextureCoordinateExpression=function(){return this.texCoordExpression},e.prototype.getFragmentDiscardExpression=function(){return this.discardExpression},e.prototype.getSymbolVertexShader=function(e){var t=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix",o=this.attributes,i=this.varyings;return e&&(o=o.concat("vec4 a_hitColor"),i=i.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n"+this.uniforms.map(function(e){return"uniform "+e+";"}).join("\n")+"\nattribute vec2 a_position;\nattribute float a_index;\n"+o.map(function(e){return"attribute "+e+";"}).join("\n")+"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n"+i.map(function(e){return"varying "+e.type+" "+e.name+";"}).join("\n")+"\nvoid main(void) {\n mat4 offsetMatrix = "+t+";\n vec2 halfSize = "+this.sizeExpression+" * 0.5;\n vec2 offset = "+this.offsetExpression+";\n float angle = "+this.rotationExpression+";\n float offsetX;\n float offsetY;\n if (a_index == 0.0) {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n } else if (a_index == 1.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else if (a_index == 2.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n }\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n vec4 texCoord = "+this.texCoordExpression+";\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n v_texCoord = vec2(u, v);\n u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n v_quadCoord = vec2(u, v);\n"+i.map(function(e){return" "+e.name+" = "+e.expression+";"}).join("\n")+"\n}"},e.prototype.getSymbolFragmentShader=function(e){var t=e?" if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"",o=this.varyings;return e&&(o=o.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n"+this.uniforms.map(function(e){return"uniform "+e+";"}).join("\n")+"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n"+o.map(function(e){return"varying "+e.type+" "+e.name+";"}).join("\n")+"\nvoid main(void) {\n if ("+this.discardExpression+") { discard; }\n gl_FragColor = "+this.colorExpression+";\n gl_FragColor.rgb *= gl_FragColor.a;\n"+t+"\n}"},e}();function o(o){var i=o.symbol,s=void 0!==i.size?i.size:1,r=i.color||"white",n=i.textureCoord||[0,0,1,1],a=i.offset||[0,0],f=void 0!==i.opacity?i.opacity:1,u=void 0!==i.rotation?i.rotation:0,l={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{}},p=(0,e.expressionToGlsl)(l,s,e.ValueTypes.NUMBER_ARRAY|e.ValueTypes.NUMBER),x=(0,e.expressionToGlsl)(l,a,e.ValueTypes.NUMBER_ARRAY),c=(0,e.expressionToGlsl)(l,n,e.ValueTypes.NUMBER_ARRAY),d=(0,e.expressionToGlsl)(l,u,e.ValueTypes.NUMBER),h={inFragmentShader:!0,variables:l.variables,attributes:[],stringLiteralsMap:l.stringLiteralsMap},v=(0,e.expressionToGlsl)(h,r,e.ValueTypes.COLOR),y=(0,e.expressionToGlsl)(h,f,e.ValueTypes.NUMBER),m="1.0",g="vec2("+(0,e.expressionToGlsl)(h,s,e.ValueTypes.NUMBER_ARRAY|e.ValueTypes.NUMBER)+").x";switch(i.symbolType){case"square":case"image":break;case"circle":m="(1.0-smoothstep(1.-4./"+g+",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))";break;case"triangle":var _="(v_quadCoord*2.-1.)",E="(atan("+_+".x,"+_+".y))";m="(1.0-smoothstep(.5-3./"+g+",.5,cos(floor(.5+"+E+"/2.094395102)*2.094395102-"+E+")*length("+_+")))";break;default:throw new Error("Unexpected symbol type: "+i.symbolType)}var b=(new t).setSizeExpression("vec2("+p+")").setRotationExpression(d).setSymbolOffsetExpression(x).setTextureCoordinateExpression(c).setSymbolRotateWithView(!!i.rotateWithView).setColorExpression("vec4("+v+".rgb, "+v+".a * "+y+" * "+m+")");if(o.filter){var C=(0,e.expressionToGlsl)(h,o.filter,e.ValueTypes.BOOLEAN);b.setFragmentDiscardExpression("!"+C)}var S={};if(h.variables.forEach(function(t){b.addUniform("float u_"+t),S["u_"+t]=function(){if(!o.variables||void 0===o.variables[t])throw new Error("The following variable is missing from the style: "+t);var i=o.variables[t];return"string"==typeof i&&(i=(0,e.getStringNumberEquivalent)(l,i)),void 0!==i?i:-9999999}}),"image"===i.symbolType&&i.src){var z=new Image;z.src=i.src,b.addUniform("sampler2D u_texture").setColorExpression(b.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),S.u_texture=z}return h.attributes.forEach(function(e){-1===l.attributes.indexOf(e)&&l.attributes.push(e),b.addVarying("v_"+e,"float","a_"+e)}),l.attributes.forEach(function(e){b.addAttribute("float a_"+e)}),{builder:b,attributes:l.attributes.map(function(t){return{name:t,callback:function(o,i){var s=i[t];return"string"==typeof s&&(s=(0,e.getStringNumberEquivalent)(l,s)),void 0!==s?s:-9999999}}}),uniforms:S}}exports.ShaderBuilder=t;
},{"../style/expressions.js":"xlCh"}],"sCa7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("./Layer.js")),t=i(require("../renderer/webgl/PointsLayer.js")),r=require("../obj.js"),s=require("../webgl/ShaderBuilder.js");function i(e){return e&&e.__esModule?e:{default:e}}var n=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function s(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(s.prototype=r.prototype,new s)}}(),o=function(e){function i(t){var i=this,n=(0,r.assign)({},t);return(i=e.call(this,n)||this).parseResult_=(0,s.parseLiteralStyle)(t.style),i.hitDetectionDisabled_=!!t.disableHitDetection,i}return n(i,e),i.prototype.createRenderer=function(){return new t.default(this,{className:this.getClassName(),vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitVertexShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolVertexShader(!0),hitFragmentShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolFragmentShader(!0),uniforms:this.parseResult_.uniforms,attributes:this.parseResult_.attributes})},i.prototype.disposeInternal=function(){this.getRenderer().disposeInternal(),e.prototype.disposeInternal.call(this)},i}(e.default),a=o;exports.default=a;
},{"./Layer.js":"GCgv","../renderer/webgl/PointsLayer.js":"m8cI","../obj.js":"mH6q","../webgl/ShaderBuilder.js":"iRdz"}],"ZVaS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Graticule",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"Group",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"Heatmap",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"Image",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"Layer",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"MapboxVector",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"Tile",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(exports,"Vector",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"VectorImage",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"VectorTile",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(exports,"WebGLPoints",{enumerable:!0,get:function(){return c.default}});var e=p(require("./layer/Graticule.js")),r=p(require("./layer/Group.js")),t=p(require("./layer/Heatmap.js")),u=p(require("./layer/Image.js")),n=p(require("./layer/Layer.js")),o=p(require("./layer/MapboxVector.js")),a=p(require("./layer/Tile.js")),i=p(require("./layer/Vector.js")),l=p(require("./layer/VectorImage.js")),f=p(require("./layer/VectorTile.js")),c=p(require("./layer/WebGLPoints.js"));function p(e){return e&&e.__esModule?e:{default:e}}
},{"./layer/Graticule.js":"wXs0","./layer/Group.js":"q0nK","./layer/Heatmap.js":"I4BI","./layer/Image.js":"KHBf","./layer/Layer.js":"GCgv","./layer/MapboxVector.js":"VqZN","./layer/Tile.js":"BUEc","./layer/Vector.js":"dflx","./layer/VectorImage.js":"VV4h","./layer/VectorTile.js":"zOJv","./layer/WebGLPoints.js":"sCa7"}],"KSjo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.quadKey=l,exports.default=void 0;var e=u(require("./State.js")),t=u(require("./TileImage.js")),r=require("../extent.js"),i=require("../tileurlfunction.js"),o=require("../tilecoord.js"),a=require("../tilegrid.js"),n=require("../proj.js"),s=require("../net.js");function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function l(e){var t,r,i=e[0],o=new Array(i),a=1<<i-1;for(t=0;t<i;++t)r=48,e[1]&a&&(r+=1),e[2]&a&&(r+=2),o[t]=String.fromCharCode(r),a>>=1;return o.join("")}var d='<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>',p=function(t){function u(r){var i=this,o=void 0!==r.hidpi&&r.hidpi;(i=t.call(this,{cacheSize:r.cacheSize,crossOrigin:"anonymous",imageSmoothing:r.imageSmoothing,opaque:!0,projection:(0,n.get)("EPSG:3857"),reprojectionErrorThreshold:r.reprojectionErrorThreshold,state:e.default.LOADING,tileLoadFunction:r.tileLoadFunction,tilePixelRatio:o?2:1,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition})||this).hidpi_=o,i.culture_=void 0!==r.culture?r.culture:"en-us",i.maxZoom_=void 0!==r.maxZoom?r.maxZoom:-1,i.apiKey_=r.key,i.imagerySet_=r.imagerySet;var a="https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+i.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+i.apiKey_+"&c="+i.culture_;return(0,s.jsonp)(a,i.handleImageryMetadataResponse.bind(i),void 0,"jsonp"),i}return c(u,t),u.prototype.getApiKey=function(){return this.apiKey_},u.prototype.getImagerySet=function(){return this.imagerySet_},u.prototype.handleImageryMetadataResponse=function(t){if(200==t.statusCode&&"OK"==t.statusDescription&&"ValidCredentials"==t.authenticationResultCode&&1==t.resourceSets.length&&1==t.resourceSets[0].resources.length){var s=t.resourceSets[0].resources[0],u=-1==this.maxZoom_?s.zoomMax:this.maxZoom_,c=this.getProjection(),p=(0,a.extentFromProjection)(c),m=this.hidpi_?2:1,h=s.imageWidth==s.imageHeight?s.imageWidth/m:[s.imageWidth/m,s.imageHeight/m],g=(0,a.createXYZ)({extent:p,minZoom:s.zoomMin,maxZoom:u,tileSize:h});this.tileGrid=g;var f=this.culture_,v=this.hidpi_;if(this.tileUrlFunction=(0,i.createFromTileUrlFunctions)(s.imageUrlSubdomains.map(function(e){var t=[0,0,0],r=s.imageUrl.replace("{subdomain}",e).replace("{culture}",f);return function(e,i,a){if(e){(0,o.createOrUpdate)(e[0],e[1],e[2],t);var n=r;return v&&(n+="&dpi=d1&device=mobile"),n.replace("{quadkey}",l(t))}}})),s.imageryProviders){var y=(0,n.getTransformFromProjections)((0,n.get)("EPSG:4326"),this.getProjection());this.setAttributions(function(e){var t=[],i=e.viewState,o=this.getTileGrid(),a=o.getZForResolution(i.resolution,this.zDirection),n=o.getTileCoordForCoordAndZ(i.center,a)[0];return s.imageryProviders.map(function(i){for(var o=!1,a=i.coverageAreas,s=0,u=a.length;s<u;++s){var c=a[s];if(n>=c.zoomMin&&n<=c.zoomMax){var l=c.bbox,d=[l[1],l[0],l[3],l[2]],p=(0,r.applyTransform)(d,y);if((0,r.intersects)(p,e.extent)){o=!0;break}}}o&&t.push(i.attribution)}),t.push(d),t}.bind(this))}this.setState(e.default.READY)}else this.setState(e.default.ERROR)},u}(t.default),m=p;exports.default=m;
},{"./State.js":"iC8j","./TileImage.js":"udAI","../extent.js":"QDir","../tileurlfunction.js":"p1vZ","../tilecoord.js":"faTr","../tilegrid.js":"ExRx","../proj.js":"Diht","../net.js":"SU9K"}],"knlU":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("./TileImage.js")),o=require("../tilegrid.js");function e(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(o,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])})(o,e)};return function(o,e){function i(){this.constructor=o}t(o,e),o.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}}(),r=function(t){function e(e){var i=e||{},r=void 0!==i.projection?i.projection:"EPSG:3857",n=void 0!==i.tileGrid?i.tileGrid:(0,o.createXYZ)({extent:(0,o.extentFromProjection)(r),maxResolution:i.maxResolution,maxZoom:i.maxZoom,minZoom:i.minZoom,tileSize:i.tileSize});return t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,imageSmoothing:i.imageSmoothing,opaque:i.opaque,projection:r,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this}return i(e,t),e}(t.default),n=r;exports.default=n;
},{"./TileImage.js":"udAI","../tilegrid.js":"ExRx"}],"WJrq":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("./State.js")),e=o(require("./XYZ.js")),i=require("../obj.js");function o(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),a=function(e){function o(t){var i=e.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,maxZoom:void 0!==t.maxZoom?t.maxZoom:18,minZoom:t.minZoom,projection:t.projection,transition:t.transition,wrapX:t.wrapX})||this;return i.account_=t.account,i.mapId_=t.map||"",i.config_=t.config||{},i.templateCache_={},i.initializeMap_(),i}return n(o,e),o.prototype.getConfig=function(){return this.config_},o.prototype.updateConfig=function(t){(0,i.assign)(this.config_,t),this.initializeMap_()},o.prototype.setConfig=function(t){this.config_=t||{},this.initializeMap_()},o.prototype.initializeMap_=function(){var t=JSON.stringify(this.config_);if(this.templateCache_[t])this.applyTemplate_(this.templateCache_[t]);else{var e="https://"+this.account_+".carto.com/api/v1/map";this.mapId_&&(e+="/named/"+this.mapId_);var i=new XMLHttpRequest;i.addEventListener("load",this.handleInitResponse_.bind(this,t)),i.addEventListener("error",this.handleInitError_.bind(this)),i.open("POST",e),i.setRequestHeader("Content-type","application/json"),i.send(JSON.stringify(this.config_))}},o.prototype.handleInitResponse_=function(e,i){var o=i.target;if(!o.status||o.status>=200&&o.status<300){var n=void 0;try{n=JSON.parse(o.responseText)}catch(a){return void this.setState(t.default.ERROR)}this.applyTemplate_(n),this.templateCache_[e]=n,this.setState(t.default.READY)}else this.setState(t.default.ERROR)},o.prototype.handleInitError_=function(e){this.setState(t.default.ERROR)},o.prototype.applyTemplate_=function(t){var e="https://"+t.cdn_url.https+"/"+this.account_+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(e)},o}(e.default),r=a;exports.default=r;
},{"./State.js":"iC8j","./XYZ.js":"knlU","../obj.js":"mH6q"}],"sV2m":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=c(require("../events/EventType.js")),t=c(require("../Feature.js")),r=c(require("../geom/GeometryType.js")),o=c(require("../geom/Point.js")),s=c(require("./Vector.js")),i=require("../coordinate.js"),n=require("../asserts.js"),u=require("../extent.js"),a=require("../util.js");function c(e){return e&&e.__esModule?e:{default:e}}var f=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),h=function(s){function c(e){var t=s.call(this,{attributions:e.attributions,wrapX:e.wrapX})||this;return t.resolution=void 0,t.distance=void 0!==e.distance?e.distance:20,t.features=[],t.geometryFunction=e.geometryFunction||function(e){var t=e.getGeometry();return(0,n.assert)(t.getType()==r.default.POINT,10),t},t.boundRefresh_=t.refresh.bind(t),t.setSource(e.source||null),t}return f(c,s),c.prototype.clear=function(e){this.features.length=0,s.prototype.clear.call(this,e)},c.prototype.getDistance=function(){return this.distance},c.prototype.getSource=function(){return this.source},c.prototype.loadFeatures=function(e,t,r){this.source.loadFeatures(e,t,r),t!==this.resolution&&(this.clear(),this.resolution=t,this.cluster(),this.addFeatures(this.features))},c.prototype.setDistance=function(e){this.distance=e,this.refresh()},c.prototype.setSource=function(t){this.source&&this.source.removeEventListener(e.default.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(e.default.CHANGE,this.boundRefresh_),this.refresh()},c.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},c.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var e=(0,u.createEmpty)(),t=this.distance*this.resolution,r=this.source.getFeatures(),o={},s=0,i=r.length;s<i;s++){var n=r[s];if(!((0,a.getUid)(n)in o)){var c=this.geometryFunction(n);if(c){var f=c.getCoordinates();(0,u.createOrUpdateFromCoordinate)(f,e),(0,u.buffer)(e,t,e);var h=this.source.getFeaturesInExtent(e);h=h.filter(function(e){var t=(0,a.getUid)(e);return!(t in o)&&(o[t]=!0,!0)}),this.features.push(this.createCluster(h))}}}},c.prototype.createCluster=function(e){for(var r=[0,0],s=e.length-1;s>=0;--s){var n=this.geometryFunction(e[s]);n?(0,i.add)(r,n.getCoordinates()):e.splice(s,1)}(0,i.scale)(r,1/e.length);var u=new t.default(new o.default(r));return u.set("features",e),u},c}(s.default),l=h;exports.default=l;
},{"../events/EventType.js":"C8cu","../Feature.js":"mYW9","../geom/GeometryType.js":"lmV0","../geom/Point.js":"gLcY","./Vector.js":"ZS12","../coordinate.js":"nGsj","../asserts.js":"fLG6","../extent.js":"QDir","../util.js":"KniQ"}],"aDh3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.CustomTile=void 0;var e=require("../tilegrid/common.js"),t=c(require("../ImageTile.js")),r=c(require("../tilegrid/TileGrid.js")),i=c(require("./TileImage.js")),o=c(require("../TileState.js")),n=require("../asserts.js"),a=require("../dom.js"),u=require("../tileurlfunction.js"),s=require("../extent.js"),l=require("../size.js");function c(e){return e&&e.__esModule?e:{default:e}}var f=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),h={DEFAULT:"default",TRUNCATED:"truncated"},p=function(e){function t(t,r,i,o,n,a,u){var s=e.call(this,r,i,o,n,a,u)||this;return s.zoomifyImage_=null,s.tileSize_=t,s}return f(t,e),t.prototype.getImage=function(){if(this.zoomifyImage_)return this.zoomifyImage_;var t=e.prototype.getImage.call(this);if(this.state==o.default.LOADED){var r=this.tileSize_;if(t.width==r[0]&&t.height==r[1])return this.zoomifyImage_=t,t;var i=(0,a.createCanvasContext2D)(r[0],r[1]);return i.drawImage(t,0,0),this.zoomifyImage_=i.canvas,i.canvas}return t},t}(t.default);exports.CustomTile=p;var d=function(t){function i(i){var o=this,a=i,c=a.size,f=void 0!==a.tierSizeCalculation?a.tierSizeCalculation:h.DEFAULT,d=a.tilePixelRatio||1,g=c[0],m=c[1],v=[],T=a.tileSize||e.DEFAULT_TILE_SIZE,_=T*d;switch(f){case h.DEFAULT:for(;g>_||m>_;)v.push([Math.ceil(g/_),Math.ceil(m/_)]),_+=_;break;case h.TRUNCATED:for(var z=g,j=m;z>_||j>_;)v.push([Math.ceil(z/_),Math.ceil(j/_)]),z>>=1,j>>=1;break;default:(0,n.assert)(!1,53)}v.push([1,1]),v.reverse();for(var x=[d],y=[0],I=1,E=v.length;I<E;I++)x.push(d<<I),y.push(v[I-1][0]*v[I-1][1]+y[I-1]);x.reverse();var S=new r.default({tileSize:T,extent:a.extent||[0,-m,g,0],resolutions:x}),C=a.url;C&&-1==C.indexOf("{TileGroup}")&&-1==C.indexOf("{tileIndex}")&&(C+="{TileGroup}/{z}-{x}-{y}.jpg");var D=(0,u.expandUrl)(C),O=T*d;var b=(0,u.createFromTileUrlFunctions)(D.map(function(e){return function(t,r,i){if(t){var o=t[0],n=t[1],a=t[2],u=n+a*v[o][0],s={z:o,x:n,y:a,tileIndex:u,TileGroup:"TileGroup"+((u+y[o])/O|0)};return e.replace(/\{(\w+?)\}/g,function(e,t){return s[t]})}}})),q=p.bind(null,(0,l.toSize)(T*d));(o=t.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,imageSmoothing:a.imageSmoothing,projection:a.projection,tilePixelRatio:d,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileClass:q,tileGrid:S,tileUrlFunction:b,transition:a.transition})||this).zDirection=a.zDirection;var A=b(S.getTileCoordForCoordAndResolution((0,s.getCenter)(S.getExtent()),x[x.length-1]),1,null),U=new Image;return U.addEventListener("error",function(){O=T,this.changed()}.bind(o)),U.src=A,o}return f(i,t),i}(i.default),g=d;exports.default=g;
},{"../tilegrid/common.js":"mOEX","../ImageTile.js":"TOsW","../tilegrid/TileGrid.js":"dpZ6","./TileImage.js":"udAI","../TileState.js":"Xz9x","../asserts.js":"fLG6","../dom.js":"Xno5","../tileurlfunction.js":"p1vZ","../extent.js":"QDir","../size.js":"TAHd"}],"FFf1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Versions=void 0;var e=require("../asserts.js"),i=function(){for(var e=0,i=0,t=arguments.length;i<t;i++)e+=arguments[i].length;var o=Array(e),r=0;for(i=0;i<t;i++)for(var s=arguments[i],a=0,n=s.length;a<n;a++,r++)o[r]=s[a];return o},t={VERSION1:"version1",VERSION2:"version2",VERSION3:"version3"};exports.Versions=t;var o={};o[t.VERSION1]={level0:{supports:[],formats:[],qualities:["native"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["native"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["native","color","grey","bitonal"]}},o[t.VERSION2]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}},o[t.VERSION3]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","regionSquare","sizeByW","sizeByH","sizeByWh"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionSquare","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["default"]}},o.none={none:{supports:[],formats:[],qualities:[]}};var r=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,s=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,a=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;function n(e){var r=e.getComplianceLevelSupportedFeatures();return void 0===r&&(r=o[t.VERSION1].level0),{url:void 0===e.imageInfo["@id"]?void 0:e.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:r.supports,formats:i(r.formats,[void 0===e.imageInfo.formats?[]:e.imageInfo.formats]),qualities:i(r.qualities,[void 0===e.imageInfo.qualities?[]:e.imageInfo.qualities]),resolutions:e.imageInfo.scale_factors,tileSize:void 0!==e.imageInfo.tile_width?void 0!==e.imageInfo.tile_height?[e.imageInfo.tile_width,e.imageInfo.tile_height]:[e.imageInfo.tile_width,e.imageInfo.tile_width]:null!=e.imageInfo.tile_height?[e.imageInfo.tile_height,e.imageInfo.tile_height]:void 0}}function f(e){var t=e.getComplianceLevelSupportedFeatures(),o=Array.isArray(e.imageInfo.profile)&&e.imageInfo.profile.length>1,r=o&&e.imageInfo.profile[1].supports?e.imageInfo.profile[1].supports:[],s=o&&e.imageInfo.profile[1].formats?e.imageInfo.profile[1].formats:[],a=o&&e.imageInfo.profile[1].qualities?e.imageInfo.profile[1].qualities:[];return{url:e.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===e.imageInfo.sizes?void 0:e.imageInfo.sizes.map(function(e){return[e.width,e.height]}),tileSize:void 0===e.imageInfo.tiles?void 0:[e.imageInfo.tiles.map(function(e){return e.width})[0],e.imageInfo.tiles.map(function(e){return void 0===e.height?e.width:e.height})[0]],resolutions:void 0===e.imageInfo.tiles?void 0:e.imageInfo.tiles.map(function(e){return e.scaleFactors})[0],supports:i(t.supports,r),formats:i(t.formats,s),qualities:i(t.qualities,a)}}function l(e){var t=e.getComplianceLevelSupportedFeatures(),o=void 0===e.imageInfo.extraFormats?t.formats:i(t.formats,e.imageInfo.extraFormats),r=void 0!==e.imageInfo.preferredFormats&&Array.isArray(e.imageInfo.preferredFormats)&&e.imageInfo.preferredFormats.length>0?e.imageInfo.preferredFormats.filter(function(e){return["jpg","png","gif"].includes(e)}).reduce(function(e,i){return void 0===e&&o.includes(i)?i:e},void 0):void 0;return{url:e.imageInfo.id,sizes:void 0===e.imageInfo.sizes?void 0:e.imageInfo.sizes.map(function(e){return[e.width,e.height]}),tileSize:void 0===e.imageInfo.tiles?void 0:[e.imageInfo.tiles.map(function(e){return e.width})[0],e.imageInfo.tiles.map(function(e){return e.height})[0]],resolutions:void 0===e.imageInfo.tiles?void 0:e.imageInfo.tiles.map(function(e){return e.scaleFactors})[0],supports:void 0===e.imageInfo.extraFeatures?t.supports:i(t.supports,e.imageInfo.extraFeatures),formats:o,qualities:void 0===e.imageInfo.extraQualities?t.qualities:i(t.qualities,e.imageInfo.extraQualities),preferredFormat:r}}var p={};p[t.VERSION1]=n,p[t.VERSION2]=f,p[t.VERSION3]=l;var g=function(){function i(e){this.setImageInfo(e)}return i.prototype.setImageInfo=function(e){this.imageInfo="string"==typeof e?JSON.parse(e):e},i.prototype.getImageApiVersion=function(){if(void 0!==this.imageInfo){var i=this.imageInfo["@context"]||"ol-no-context";"string"==typeof i&&(i=[i]);for(var o=0;o<i.length;o++)switch(i[o]){case"http://library.stanford.edu/iiif/image-api/1.1/context.json":case"http://iiif.io/api/image/1/context.json":return t.VERSION1;case"http://iiif.io/api/image/2/context.json":return t.VERSION2;case"http://iiif.io/api/image/3/context.json":return t.VERSION3;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(t.VERSION1)&&this.imageInfo.identifier)return t.VERSION1}(0,e.assert)(!1,61)}},i.prototype.getComplianceLevelEntryFromProfile=function(e){if(void 0!==this.imageInfo&&void 0!==this.imageInfo.profile)switch(void 0===e&&(e=this.getImageApiVersion()),e){case t.VERSION1:if(r.test(this.imageInfo.profile))return this.imageInfo.profile;break;case t.VERSION3:if(a.test(this.imageInfo.profile))return this.imageInfo.profile;break;case t.VERSION2:if("string"==typeof this.imageInfo.profile&&s.test(this.imageInfo.profile))return this.imageInfo.profile;if(Array.isArray(this.imageInfo.profile)&&this.imageInfo.profile.length>0&&"string"==typeof this.imageInfo.profile[0]&&s.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}},i.prototype.getComplianceLevelFromProfile=function(e){var i=this.getComplianceLevelEntryFromProfile(e);if(void 0!==i){var t=i.match(/level[0-2](?:\.json)?$/g);return Array.isArray(t)?t[0].replace(".json",""):void 0}},i.prototype.getComplianceLevelSupportedFeatures=function(){if(void 0!==this.imageInfo){var e=this.getImageApiVersion(),i=this.getComplianceLevelFromProfile(e);return void 0===i?o.none.none:o[e][i]}},i.prototype.getTileSourceOptions=function(e){var i=e||{},t=this.getImageApiVersion();if(void 0!==t){var o=void 0===t?void 0:p[t](this);if(void 0!==o)return{url:o.url,version:t,size:[this.imageInfo.width,this.imageInfo.height],sizes:o.sizes,format:void 0!==i.format&&o.formats.includes(i.format)?i.format:void 0!==o.preferredFormat?o.preferredFormat:"jpg",supports:o.supports,quality:i.quality&&o.qualities.includes(i.quality)?i.quality:o.qualities.includes("native")?"native":"default",resolutions:Array.isArray(o.resolutions)?o.resolutions.sort(function(e,i){return i-e}):void 0,tileSize:o.tileSize}}},i}(),u=g;exports.default=u;
},{"../asserts.js":"fLG6"}],"oF4i":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=a(require("../tilegrid/TileGrid.js")),t=a(require("./TileImage.js")),i=require("./Zoomify.js"),r=require("../tilegrid/common.js"),n=require("../format/IIIFInfo.js"),o=require("../asserts.js"),s=require("../extent.js"),l=require("../size.js");function a(e){return e&&e.__esModule?e:{default:e}}var u=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function c(e){return e.toLocaleString("en",{maximumFractionDigits:10})}var h=function(t){function a(a){var u=this,h=a||{},f=h.url||"";f+=f.lastIndexOf("/")===f.length-1||""===f?"":"/";var g=h.version||n.Versions.VERSION2,p=h.sizes||[],d=h.size;(0,o.assert)(null!=d&&Array.isArray(d)&&2==d.length&&!isNaN(d[0])&&d[0]>0&&!isNaN(d[1])&&d[1]>0,60);var y,v,m,I=d[0],b=d[1],z=h.tileSize,M=h.tilePixelRatio||1,N=h.format||"jpg",j=h.quality||(h.version==n.Versions.VERSION1?"native":"default"),x=h.resolutions||[],_=h.supports||[],S=h.extent||[0,-b,I,0],O=null!=p&&Array.isArray(p)&&p.length>0,A=void 0!==z&&("number"==typeof z&&Number.isInteger(z)&&z>0||Array.isArray(z)&&z.length>0),B=null!=_&&Array.isArray(_)&&(_.includes("regionByPx")||_.includes("regionByPct"))&&(_.includes("sizeByWh")||_.includes("sizeByH")||_.includes("sizeByW")||_.includes("sizeByPct"));if(x.sort(function(e,t){return t-e}),A||B)if(null!=z&&("number"==typeof z&&Number.isInteger(z)&&z>0?(y=z,v=z):Array.isArray(z)&&z.length>0&&((1==z.length||null==z[1]&&Number.isInteger(z[0]))&&(y=z[0],v=z[0]),2==z.length&&(Number.isInteger(z[0])&&Number.isInteger(z[1])?(y=z[0],v=z[1]):null==z[0]&&Number.isInteger(z[1])&&(y=z[1],v=z[1])))),void 0!==y&&void 0!==v||(y=r.DEFAULT_TILE_SIZE,v=r.DEFAULT_TILE_SIZE),0==x.length)for(var E=m=Math.max(Math.ceil(Math.log(I/y)/Math.LN2),Math.ceil(Math.log(b/v)/Math.LN2));E>=0;E--)x.push(Math.pow(2,E));else{var P=Math.max.apply(Math,x);m=Math.round(Math.log(P)/Math.LN2)}else if(y=I,v=b,x=[],O){p.sort(function(e,t){return e[0]-t[0]}),m=-1;var T=[];for(E=0;E<p.length;E++){var V=I/p[E][0];x.length>0&&x[x.length-1]==V?T.push(E):(x.push(V),m++)}if(T.length>0)for(E=0;E<T.length;E++)p.splice(T[E]-E,1)}else x.push(1),p.push([I,b]),m=0;var q=new e.default({tileSize:[y,v],extent:S,origin:(0,s.getTopLeft)(S),resolutions:x}),L=i.CustomTile.bind(null,(0,l.toSize)(z||256).map(function(e){return e*M}));return(u=t.call(this,{attributions:h.attributions,attributionsCollapsible:h.attributionsCollapsible,cacheSize:h.cacheSize,crossOrigin:h.crossOrigin,imageSmoothing:h.imageSmoothing,projection:h.projection,reprojectionErrorThreshold:h.reprojectionErrorThreshold,state:h.state,tileClass:L,tileGrid:q,tilePixelRatio:h.tilePixelRatio,tileUrlFunction:function(e,t,i){var r,o,s=e[0];if(!(s>m)){var l=e[1],a=e[2],u=x[s];if(!(void 0===l||void 0===a||void 0===u||l<0||Math.ceil(I/u/y)<=l||a<0||Math.ceil(b/u/v)<=a)){if(B||A){var h=l*y*u,d=a*v*u,z=y*u,M=v*u,S=y,E=v;h+z>I&&(z=I-h),d+M>b&&(M=b-d),h+y*u>I&&(S=Math.floor((I-h+u-1)/u)),d+v*u>b&&(E=Math.floor((b-d+u-1)/u)),0==h&&z==I&&0==d&&M==b?r="full":!B||_.includes("regionByPx")?r=h+","+d+","+z+","+M:_.includes("regionByPct")&&(r="pct:"+c(h/I*100)+","+c(d/b*100)+","+c(z/I*100)+","+c(M/b*100)),g!=n.Versions.VERSION3||B&&!_.includes("sizeByWh")?!B||_.includes("sizeByW")?o=S+",":_.includes("sizeByH")?o=","+E:_.includes("sizeByWh")?o=S+","+E:_.includes("sizeByPct")&&(o="pct:"+c(100/u)):o=S+","+E}else if(r="full",O){var P=p[s][0],T=p[s][1];o=g==n.Versions.VERSION3?P==I&&T==b?"max":P+","+T:P==I?"full":P+","}else o=g==n.Versions.VERSION3?"max":"full";return f+r+"/"+o+"/0/"+j+"."+N}}},transition:h.transition})||this).zDirection=h.zDirection,u}return u(a,t),a}(t.default),f=h;exports.default=f;
},{"../tilegrid/TileGrid.js":"dpZ6","./TileImage.js":"udAI","./Zoomify.js":"aDh3","../tilegrid/common.js":"mOEX","../format/IIIFInfo.js":"FFf1","../asserts.js":"fLG6","../extent.js":"QDir","../size.js":"TAHd"}],"rc7I":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("./common.js"),e=u(require("../events/EventType.js")),r=u(require("../ImageBase.js")),o=u(require("../ImageState.js")),n=u(require("./Triangulation.js")),i=require("../reproj.js"),s=require("../extent.js"),a=require("../events.js");function u(t){return t&&t.__esModule?t:{default:t}}var c=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),l=function(r){function u(e,a,u,c,l,_,g){var h=this,p=e.getExtent(),f=a.getExtent(),d=f?(0,s.getIntersection)(u,f):u,x=(0,s.getCenter)(d),y=(0,i.calculateSourceResolution)(e,a,x,c),E=t.ERROR_THRESHOLD,I=new n.default(e,a,d,p,y*E,c),j=_(I.calculateSourceExtent(),y,l),R=j?o.default.IDLE:o.default.EMPTY,m=j?j.getPixelRatio():1;return(h=r.call(this,u,c,m,R)||this).targetProj_=a,h.maxSourceExtent_=p,h.triangulation_=I,h.targetResolution_=c,h.targetExtent_=u,h.sourceImage_=j,h.sourcePixelRatio_=m,h.contextOptions_=g,h.canvas_=null,h.sourceListenerKey_=null,h}return c(u,r),u.prototype.disposeInternal=function(){this.state==o.default.LOADING&&this.unlistenSource_(),r.prototype.disposeInternal.call(this)},u.prototype.getImage=function(){return this.canvas_},u.prototype.getProjection=function(){return this.targetProj_},u.prototype.reproject_=function(){var t=this.sourceImage_.getState();if(t==o.default.LOADED){var e=(0,s.getWidth)(this.targetExtent_)/this.targetResolution_,r=(0,s.getHeight)(this.targetExtent_)/this.targetResolution_;this.canvas_=(0,i.render)(e,r,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.contextOptions_)}this.state=t,this.changed()},u.prototype.load=function(){if(this.state==o.default.IDLE){this.state=o.default.LOADING,this.changed();var t=this.sourceImage_.getState();t==o.default.LOADED||t==o.default.ERROR?this.reproject_():(this.sourceListenerKey_=(0,a.listen)(this.sourceImage_,e.default.CHANGE,function(t){var e=this.sourceImage_.getState();e!=o.default.LOADED&&e!=o.default.ERROR||(this.unlistenSource_(),this.reproject_())},this),this.sourceImage_.load())}},u.prototype.unlistenSource_=function(){(0,a.unlistenByKey)(this.sourceListenerKey_),this.sourceListenerKey_=null},u}(r.default),_=l;exports.default=_;
},{"./common.js":"fF5X","../events/EventType.js":"C8cu","../ImageBase.js":"Ojbp","../ImageState.js":"Xz9x","./Triangulation.js":"BiRY","../reproj.js":"U255","../extent.js":"QDir","../events.js":"UqnM"}],"XHvt":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaultImageLoadFunction=f,exports.default=exports.ImageSourceEvent=exports.ImageSourceEventType=void 0;var e=p(require("../events/Event.js")),t=p(require("../ImageState.js")),r=p(require("../reproj/Image.js")),o=p(require("./Source.js")),n=require("../reproj/common.js"),i=require("./common.js"),s=require("../util.js"),a=require("../extent.js"),u=require("../proj.js"),c=require("../array.js");function p(e){return e&&e.__esModule?e:{default:e}}var l=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),g={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"};exports.ImageSourceEventType=g;var d=function(e){function t(t,r){var o=e.call(this,t)||this;return o.image=r,o}return l(t,e),t}(e.default);exports.ImageSourceEvent=d;var h=function(e){function o(t){var r=e.call(this,{attributions:t.attributions,projection:t.projection,state:t.state})||this;return r.resolutions_=void 0!==t.resolutions?t.resolutions:null,r.reprojectedImage_=null,r.reprojectedRevision_=0,r.contextOptions_=!1===t.imageSmoothing?i.IMAGE_SMOOTHING_DISABLED:void 0,r}return l(o,e),o.prototype.getResolutions=function(){return this.resolutions_},o.prototype.getContextOptions=function(){return this.contextOptions_},o.prototype.findNearestResolution=function(e){if(this.resolutions_){var t=(0,c.linearFindNearest)(this.resolutions_,e,0);e=this.resolutions_[t]}return e},o.prototype.getImage=function(e,t,o,i){var s=this.getProjection();if(n.ENABLE_RASTER_REPROJECTION&&s&&i&&!(0,u.equivalent)(s,i)){if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&(0,u.equivalent)(this.reprojectedImage_.getProjection(),i)&&this.reprojectedImage_.getResolution()==t&&(0,a.equals)(this.reprojectedImage_.getExtent(),e))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new r.default(s,i,e,t,o,function(e,t,r){return this.getImageInternal(e,t,r,s)}.bind(this),this.contextOptions_),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}return s&&(i=s),this.getImageInternal(e,t,o,i)},o.prototype.getImageInternal=function(e,t,r,o){return(0,s.abstract)()},o.prototype.handleImageChange=function(e){var r=e.target;switch(r.getState()){case t.default.LOADING:this.loading=!0,this.dispatchEvent(new d(g.IMAGELOADSTART,r));break;case t.default.LOADED:this.loading=!1,this.dispatchEvent(new d(g.IMAGELOADEND,r));break;case t.default.ERROR:this.loading=!1,this.dispatchEvent(new d(g.IMAGELOADERROR,r))}},o}(o.default);function f(e,t){e.getImage().src=t}var I=h;exports.default=I;
},{"../events/Event.js":"fKNg","../ImageState.js":"Xz9x","../reproj/Image.js":"rc7I","./Source.js":"H38a","../reproj/common.js":"fF5X","./common.js":"a8mu","../util.js":"KniQ","../extent.js":"QDir","../proj.js":"Diht","../array.js":"luEr"}],"n7G7":[function(require,module,exports) {
"use strict";function e(e,n){var o=[];Object.keys(n).forEach(function(e){null!==n[e]&&void 0!==n[e]&&o.push(e+"="+encodeURIComponent(n[e]))});var r=o.join("&");return(e=-1===(e=e.replace(/[?&]$/,"")).indexOf("?")?e+"?":e+"&")+r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.appendParams=e;
},{}],"P20y":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=p(require("../events/EventType.js")),e=u(require("./Image.js")),i=p(require("../Image.js")),r=require("../uri.js"),n=require("../asserts.js"),o=require("../obj.js"),a=require("../extent.js");function s(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return s=function(){return t},t}function u(t){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var e=s();if(e&&e.has(t))return e.get(t);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var o=r?Object.getOwnPropertyDescriptor(t,n):null;o&&(o.get||o.set)?Object.defineProperty(i,n,o):i[n]=t[n]}return i.default=t,e&&e.set(t,i),i}function p(t){return t&&t.__esModule?t:{default:t}}var c=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),g=function(s){function u(t){var i=this,r=t||{};return(i=s.call(this,{attributions:r.attributions,imageSmoothing:r.imageSmoothing,projection:r.projection,resolutions:r.resolutions})||this).crossOrigin_=void 0!==r.crossOrigin?r.crossOrigin:null,i.hidpi_=void 0===r.hidpi||r.hidpi,i.url_=r.url,i.imageLoadFunction_=void 0!==r.imageLoadFunction?r.imageLoadFunction:e.defaultImageLoadFunction,i.params_=r.params||{},i.image_=null,i.imageSize_=[0,0],i.renderedRevision_=0,i.ratio_=void 0!==r.ratio?r.ratio:1.5,i}return c(u,s),u.prototype.getParams=function(){return this.params_},u.prototype.getImageInternal=function(e,r,n,s){if(void 0===this.url_)return null;r=this.findNearestResolution(r),n=this.hidpi_?n:1;var u=this.image_;if(u&&this.renderedRevision_==this.getRevision()&&u.getResolution()==r&&u.getPixelRatio()==n&&(0,a.containsExtent)(u.getExtent(),e))return u;var p={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};(0,o.assign)(p,this.params_);var c=((e=e.slice())[0]+e[2])/2,g=(e[1]+e[3])/2;if(1!=this.ratio_){var l=this.ratio_*(0,a.getWidth)(e)/2,h=this.ratio_*(0,a.getHeight)(e)/2;e[0]=c-l,e[1]=g-h,e[2]=c+l,e[3]=g+h}var d=r/n,_=Math.ceil((0,a.getWidth)(e)/d),f=Math.ceil((0,a.getHeight)(e)/d);e[0]=c-d*_/2,e[2]=c+d*_/2,e[1]=g-d*f/2,e[3]=g+d*f/2,this.imageSize_[0]=_,this.imageSize_[1]=f;var m=this.getRequestUrl_(e,this.imageSize_,n,s,p);return this.image_=new i.default(e,r,n,m,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(t.default.CHANGE,this.handleImageChange.bind(this)),this.image_},u.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},u.prototype.getRequestUrl_=function(t,e,i,o,a){var s=o.getCode().split(":").pop();a.SIZE=e[0]+","+e[1],a.BBOX=t.join(","),a.BBOXSR=s,a.IMAGESR=s,a.DPI=Math.round(90*i);var u=this.url_,p=u.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return p==u&&(0,n.assert)(!1,50),(0,r.appendParams)(p,a)},u.prototype.getUrl=function(){return this.url_},u.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},u.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},u.prototype.updateParams=function(t){(0,o.assign)(this.params_,t),this.image_=null,this.changed()},u}(e.default),l=g;exports.default=l;
},{"../events/EventType.js":"C8cu","./Image.js":"XHvt","../Image.js":"DHWK","../uri.js":"n7G7","../asserts.js":"fLG6","../obj.js":"mH6q","../extent.js":"QDir"}],"Y2uN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=i(require("../ImageCanvas.js")),e=i(require("./Image.js")),n=require("../extent.js");function i(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=function(e){function i(t){var n=this,i=t||{};return(n=e.call(this,{attributions:i.attributions,imageSmoothing:i.imageSmoothing,projection:i.projection,resolutions:i.resolutions,state:i.state})||this).canvasFunction_=i.canvasFunction,n.canvas_=null,n.renderedRevision_=0,n.ratio_=void 0!==i.ratio?i.ratio:1.5,n}return o(i,e),i.prototype.getImageInternal=function(e,i,o,r){i=this.findNearestResolution(i);var s=this.canvas_;if(s&&this.renderedRevision_==this.getRevision()&&s.getResolution()==i&&s.getPixelRatio()==o&&(0,n.containsExtent)(s.getExtent(),e))return s;e=e.slice(),(0,n.scaleFromCenter)(e,this.ratio_);var a=[(0,n.getWidth)(e)/i*o,(0,n.getHeight)(e)/i*o],u=this.canvasFunction_.call(this,e,i,o,a,r);return u&&(s=new t.default(e,i,o,u)),this.canvas_=s,this.renderedRevision_=this.getRevision(),s},i}(e.default),s=r;exports.default=s;
},{"../ImageCanvas.js":"K7j2","./Image.js":"XHvt","../extent.js":"QDir"}],"C9PY":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("../events/EventType.js")),t=s(require("./Image.js")),i=u(require("../Image.js")),r=require("../uri.js"),n=require("../obj.js"),o=require("../extent.js");function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=r?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(i,n,o):i[n]=e[n]}return i.default=e,t&&t.set(e,i),i}function u(e){return e&&e.__esModule?e:{default:e}}var p=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),c=function(a){function s(e){var i=a.call(this,{imageSmoothing:e.imageSmoothing,projection:e.projection,resolutions:e.resolutions})||this;return i.crossOrigin_=void 0!==e.crossOrigin?e.crossOrigin:null,i.displayDpi_=void 0!==e.displayDpi?e.displayDpi:96,i.params_=e.params||{},i.url_=e.url,i.imageLoadFunction_=void 0!==e.imageLoadFunction?e.imageLoadFunction:t.defaultImageLoadFunction,i.hidpi_=void 0===e.hidpi||e.hidpi,i.metersPerUnit_=void 0!==e.metersPerUnit?e.metersPerUnit:1,i.ratio_=void 0!==e.ratio?e.ratio:1,i.useOverlay_=void 0!==e.useOverlay&&e.useOverlay,i.image_=null,i.renderedRevision_=0,i}return p(s,a),s.prototype.getParams=function(){return this.params_},s.prototype.getImageInternal=function(t,r,n,a){r=this.findNearestResolution(r),n=this.hidpi_?n:1;var s=this.image_;if(s&&this.renderedRevision_==this.getRevision()&&s.getResolution()==r&&s.getPixelRatio()==n&&(0,o.containsExtent)(s.getExtent(),t))return s;1!=this.ratio_&&(t=t.slice(),(0,o.scaleFromCenter)(t,this.ratio_));var u=[(0,o.getWidth)(t)/r*n,(0,o.getHeight)(t)/r*n];if(void 0!==this.url_){var p=this.getUrl(this.url_,this.params_,t,u,a);(s=new i.default(t,r,n,p,this.crossOrigin_,this.imageLoadFunction_)).addEventListener(e.default.CHANGE,this.handleImageChange.bind(this))}else s=null;return this.image_=s,this.renderedRevision_=this.getRevision(),s},s.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},s.prototype.updateParams=function(e){(0,n.assign)(this.params_,e),this.changed()},s.prototype.getUrl=function(e,t,i,a,s){var u=d(i,a,this.metersPerUnit_,this.displayDpi_),p=(0,o.getCenter)(i),c={OPERATION:this.useOverlay_?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.displayDpi_,SETDISPLAYWIDTH:Math.round(a[0]),SETDISPLAYHEIGHT:Math.round(a[1]),SETVIEWSCALE:u,SETVIEWCENTERX:p[0],SETVIEWCENTERY:p[1]};return(0,n.assign)(c,t),(0,r.appendParams)(e,c)},s.prototype.setImageLoadFunction=function(e){this.image_=null,this.imageLoadFunction_=e,this.changed()},s}(t.default);function d(e,t,i,r){var n=(0,o.getWidth)(e),a=(0,o.getHeight)(e),s=t[0],u=t[1],p=.0254/r;return u*n>s*a?n*i/(s*p):a*i/(u*p)}var l=c;exports.default=l;
},{"../events/EventType.js":"C8cu","./Image.js":"XHvt","../Image.js":"DHWK","../uri.js":"n7G7","../obj.js":"mH6q","../extent.js":"QDir"}],"zK6j":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=c(require("../events/EventType.js")),t=s(require("./Image.js")),r=c(require("../ImageState.js")),i=c(require("../Image.js")),n=require("../obj.js"),o=require("../dom.js"),a=require("../extent.js"),u=require("../proj.js");function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=i?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(r,n,o):r[n]=e[n]}return r.default=e,t&&t.set(e,r),r}function c(e){return e&&e.__esModule?e:{default:e}}var l=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),f=function(g){function s(r){var n=this,o=void 0!==r.crossOrigin?r.crossOrigin:null,a=void 0!==r.imageLoadFunction?r.imageLoadFunction:t.defaultImageLoadFunction;return(n=g.call(this,{attributions:r.attributions,imageSmoothing:r.imageSmoothing,projection:(0,u.get)(r.projection)})||this).url_=r.url,n.imageExtent_=r.imageExtent,n.image_=new i.default(n.imageExtent_,void 0,1,n.url_,o,a),n.imageSize_=r.imageSize?r.imageSize:null,n.image_.addEventListener(e.default.CHANGE,n.handleImageChange.bind(n)),n}return l(s,g),s.prototype.getImageExtent=function(){return this.imageExtent_},s.prototype.getImageInternal=function(e,t,r,i){return(0,a.intersects)(e,this.image_.getExtent())?this.image_:null},s.prototype.getUrl=function(){return this.url_},s.prototype.handleImageChange=function(e){if(this.image_.getState()==r.default.LOADED){var t=this.image_.getExtent(),i=this.image_.getImage(),u=void 0,s=void 0;this.imageSize_?(u=this.imageSize_[0],s=this.imageSize_[1]):(u=i.width,s=i.height);var c=(0,a.getHeight)(t)/s,l=Math.ceil((0,a.getWidth)(t)/c);if(l!=u){var f=(0,o.createCanvasContext2D)(l,s);(0,n.assign)(f,this.getContextOptions());var p=f.canvas;f.drawImage(i,0,0,u,s,0,0,p.width,p.height),this.image_.setImage(p)}}g.prototype.handleImageChange.call(this,e)},s}(t.default),p=f;exports.default=p;
},{"../events/EventType.js":"C8cu","./Image.js":"XHvt","../ImageState.js":"Xz9x","../Image.js":"DHWK","../obj.js":"mH6q","../dom.js":"Xno5","../extent.js":"QDir","../proj.js":"Diht"}],"mXwm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={CARMENTA_SERVER:"carmentaserver",GEOSERVER:"geoserver",MAPSERVER:"mapserver",QGIS:"qgis"};exports.default=e;
},{}],"e4Kb":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("./common.js"),t=d(require("../events/EventType.js")),i=c(require("./Image.js")),r=d(require("../Image.js")),n=d(require("./WMSServerType.js")),o=require("../uri.js"),a=require("../asserts.js"),s=require("../obj.js"),u=require("../reproj.js"),h=require("../string.js"),p=require("../extent.js"),g=require("../proj.js");function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=r?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(i,n,o):i[n]=e[n]}return i.default=e,t&&t.set(e,i),i}function d(e){return e&&e.__esModule?e:{default:e}}var l=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),f=[101,101],v=function(_){function c(e){var t=this,r=e||{};return(t=_.call(this,{attributions:r.attributions,imageSmoothing:r.imageSmoothing,projection:r.projection,resolutions:r.resolutions})||this).crossOrigin_=void 0!==r.crossOrigin?r.crossOrigin:null,t.url_=r.url,t.imageLoadFunction_=void 0!==r.imageLoadFunction?r.imageLoadFunction:i.defaultImageLoadFunction,t.params_=r.params||{},t.v13_=!0,t.updateV13_(),t.serverType_=r.serverType,t.hidpi_=void 0===r.hidpi||r.hidpi,t.image_=null,t.imageSize_=[0,0],t.renderedRevision_=0,t.ratio_=void 0!==r.ratio?r.ratio:1.5,t}return l(c,_),c.prototype.getFeatureInfoUrl=function(t,i,r,n){if(void 0!==this.url_){var o=(0,g.get)(r),a=this.getProjection();a&&a!==o&&(i=(0,u.calculateSourceResolution)(a,o,t,i),t=(0,g.transform)(t,o,a));var h=(0,p.getForViewAndSize)(t,i,0,f),_={SERVICE:"WMS",VERSION:e.DEFAULT_WMS_VERSION,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};(0,s.assign)(_,this.params_,n);var c=Math.floor((t[0]-h[0])/i),d=Math.floor((h[3]-t[1])/i);return _[this.v13_?"I":"X"]=c,_[this.v13_?"J":"Y"]=d,this.getRequestUrl_(h,f,1,a||o,_)}},c.prototype.getLegendUrl=function(t,i){if(void 0!==this.url_){var r={SERVICE:"WMS",VERSION:e.DEFAULT_WMS_VERSION,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===i||void 0===i.LAYER){var n=this.params_.LAYERS;if(!(!Array.isArray(n)||1===n.length))return;r.LAYER=n}if(void 0!==t){var a=this.getProjection()?this.getProjection().getMetersPerUnit():1;r.SCALE=t*a/28e-5}return(0,s.assign)(r,i),(0,o.appendParams)(this.url_,r)}},c.prototype.getParams=function(){return this.params_},c.prototype.getImageInternal=function(i,n,o,a){if(void 0===this.url_)return null;n=this.findNearestResolution(n),1==o||this.hidpi_&&void 0!==this.serverType_||(o=1);var u=n/o,h=(0,p.getCenter)(i),g=Math.ceil((0,p.getWidth)(i)/u),_=Math.ceil((0,p.getHeight)(i)/u),c=(0,p.getForViewAndSize)(h,u,0,[g,_]),d=Math.ceil(this.ratio_*(0,p.getWidth)(i)/u),l=Math.ceil(this.ratio_*(0,p.getHeight)(i)/u),f=(0,p.getForViewAndSize)(h,u,0,[d,l]),v=this.image_;if(v&&this.renderedRevision_==this.getRevision()&&v.getResolution()==n&&v.getPixelRatio()==o&&(0,p.containsExtent)(v.getExtent(),c))return v;var S={SERVICE:"WMS",VERSION:e.DEFAULT_WMS_VERSION,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};(0,s.assign)(S,this.params_),this.imageSize_[0]=Math.round((0,p.getWidth)(f)/u),this.imageSize_[1]=Math.round((0,p.getHeight)(f)/u);var R=this.getRequestUrl_(f,this.imageSize_,o,a,S);return this.image_=new r.default(f,n,o,R,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(t.default.CHANGE,this.handleImageChange.bind(this)),this.image_},c.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},c.prototype.getRequestUrl_=function(e,t,i,r,s){if((0,a.assert)(void 0!==this.url_,9),s[this.v13_?"CRS":"SRS"]=r.getCode(),"STYLES"in this.params_||(s.STYLES=""),1!=i)switch(this.serverType_){case n.default.GEOSERVER:var u=90*i+.5|0;"FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+=";dpi:"+u:s.FORMAT_OPTIONS="dpi:"+u;break;case n.default.MAPSERVER:s.MAP_RESOLUTION=90*i;break;case n.default.CARMENTA_SERVER:case n.default.QGIS:s.DPI=90*i;break;default:(0,a.assert)(!1,8)}s.WIDTH=t[0],s.HEIGHT=t[1];var h,p=r.getAxisOrientation();return h=this.v13_&&"ne"==p.substr(0,2)?[e[1],e[0],e[3],e[2]]:e,s.BBOX=h.join(","),(0,o.appendParams)(this.url_,s)},c.prototype.getUrl=function(){return this.url_},c.prototype.setImageLoadFunction=function(e){this.image_=null,this.imageLoadFunction_=e,this.changed()},c.prototype.setUrl=function(e){e!=this.url_&&(this.url_=e,this.image_=null,this.changed())},c.prototype.updateParams=function(e){(0,s.assign)(this.params_,e),this.updateV13_(),this.image_=null,this.changed()},c.prototype.updateV13_=function(){var t=this.params_.VERSION||e.DEFAULT_WMS_VERSION;this.v13_=(0,h.compareVersions)(t,"1.3")>=0},c}(i.default),S=v;exports.default=S;
},{"./common.js":"a8mu","../events/EventType.js":"C8cu","./Image.js":"XHvt","../Image.js":"DHWK","./WMSServerType.js":"mXwm","../uri.js":"n7G7","../asserts.js":"fLG6","../obj.js":"mH6q","../reproj.js":"U255","../string.js":"AiCK","../extent.js":"QDir","../proj.js":"Diht"}],"Rmo4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ATTRIBUTION=void 0;var t=o(require("./XYZ.js"));function o(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(o,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])})(o,r)};return function(o,r){function e(){this.constructor=o}t(o,r),o.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}}(),e='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';exports.ATTRIBUTION=e;var n=function(t){function o(o){var r,n=o||{};r=void 0!==n.attributions?n.attributions:[e];var i=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",a=void 0!==n.url?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:r,attributionsCollapsible:!1,cacheSize:n.cacheSize,crossOrigin:i,imageSmoothing:n.imageSmoothing,maxZoom:void 0!==n.maxZoom?n.maxZoom:19,opaque:void 0===n.opaque||n.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:a,wrapX:n.wrapX})||this}return r(o,t),o}(t.default),i=n;exports.default=i;
},{"./XYZ.js":"knlU"}],"w95b":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.newImageData=y,exports.default=exports.RasterSourceEvent=exports.Processor=void 0;var e=_(require("../Disposable.js")),t=_(require("../events/Event.js")),r=_(require("../events/EventType.js")),a=_(require("../ImageCanvas.js")),n=_(require("../layer/Image.js")),i=_(require("./Image.js")),s=_(require("./Source.js")),o=_(require("./State.js")),u=_(require("../layer/Tile.js")),l=_(require("../TileQueue.js")),h=_(require("./Tile.js")),p=require("../obj.js"),d=require("../dom.js"),f=require("../transform.js"),c=require("../extent.js");function _(e){return e&&e.__esModule?e:{default:e}}var v=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function a(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}(),g=!0;try{new ImageData(10,10)}catch(L){g=!1}var m=document.createElement("canvas").getContext("2d");function y(e,t,r){if(g)return new ImageData(e,t,r);var a=m.createImageData(t,r);return a.data.set(e),a}function w(e){var t=!0;try{new ImageData(10,10)}catch(L){t=!1}function r(e,r,a){return t?new ImageData(e,r,a):{data:e,width:r,height:a}}return function(t){var a,n,i=t.buffers,s=t.meta,o=t.imageOps,u=t.width,l=t.height,h=i.length,p=i[0].byteLength;if(o){var d=new Array(h);for(n=0;n<h;++n)d[n]=r(new Uint8ClampedArray(i[n]),u,l);a=e(d,s).data}else{a=new Uint8ClampedArray(p);var f=new Array(h),c=new Array(h);for(n=0;n<h;++n)f[n]=new Uint8ClampedArray(i[n]),c[n]=[0,0,0,0];for(var _=0;_<p;_+=4){for(var v=0;v<h;++v){var g=f[v];c[v][0]=g[_],c[v][1]=g[_+1],c[v][2]=g[_+2],c[v][3]=g[_+3]}var m=e(c,s);a[_]=m[0],a[_+1]=m[1],a[_+2]=m[2],a[_+3]=m[3]}}return a.buffer}}function b(e,t){var r=Object.keys(e.lib||{}).map(function(t){return"var "+t+" = "+e.lib[t].toString()+";"}).concat(["var __minion__ = ("+w.toString()+")(",e.operation.toString(),");",'self.addEventListener("message", function(event) {'," var buffer = __minion__(event.data);"," self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),a=new Blob(r,{type:"text/javascript"}),n=URL.createObjectURL(a),i=new Worker(n);return i.addEventListener("message",t),i}function I(e,t){var r=w(e.operation),a=!1;return{postMessage:function(e){setTimeout(function(){a||t({data:{buffer:r(e),meta:e.meta}})},0)},terminate:function(){a=!0}}}var S=function(e){function t(t){var r,a=e.call(this)||this;a._imageOps=!!t.imageOps;var n=[];if(r=0===t.threads?0:a._imageOps?1:t.threads||1)for(var i=0;i<r;++i)n[i]=b(t,a._onWorkerMessage.bind(a,i));else n[0]=I(t,a._onWorkerMessage.bind(a,0));return a._workers=n,a._queue=[],a._maxQueueLength=t.queue||1/0,a._running=0,a._dataLookup={},a._job=null,a}return v(t,e),t.prototype.process=function(e,t,r){this._enqueue({inputs:e,meta:t,callback:r}),this._dispatch()},t.prototype._enqueue=function(e){for(this._queue.push(e);this._queue.length>this._maxQueueLength;)this._queue.shift().callback(null,null)},t.prototype._dispatch=function(){if(0===this._running&&this._queue.length>0){var e=this._queue.shift();this._job=e;var t=e.inputs[0].width,r=e.inputs[0].height,a=e.inputs.map(function(e){return e.data.buffer}),n=this._workers.length;if(this._running=n,1===n)this._workers[0].postMessage({buffers:a,meta:e.meta,imageOps:this._imageOps,width:t,height:r},a);else for(var i=e.inputs[0].data.length,s=4*Math.ceil(i/4/n),o=0;o<n;++o){for(var u=o*s,l=[],h=0,p=a.length;h<p;++h)l.push(a[h].slice(u,u+s));this._workers[o].postMessage({buffers:l,meta:e.meta,imageOps:this._imageOps,width:t,height:r},l)}}},t.prototype._onWorkerMessage=function(e,t){this.disposed||(this._dataLookup[e]=t.data,--this._running,0===this._running&&this._resolveJob())},t.prototype._resolveJob=function(){var e,t,r=this._job,a=this._workers.length;if(1===a)e=new Uint8ClampedArray(this._dataLookup[0].buffer),t=this._dataLookup[0].meta;else{var n=r.inputs[0].data.length;e=new Uint8ClampedArray(n),t=new Array(n);for(var i=4*Math.ceil(n/4/a),s=0;s<a;++s){var o=this._dataLookup[s].buffer,u=s*i;e.set(new Uint8ClampedArray(o),u),t[s]=this._dataLookup[s].meta}}this._job=null,this._dataLookup={},r.callback(null,y(e,r.inputs[0].width,r.inputs[0].height),t),this._dispatch()},t.prototype.disposeInternal=function(){for(var e=0;e<this._workers.length;++e)this._workers[e].terminate();this._workers.length=0},t}(e.default);exports.Processor=S;var q={BEFOREOPERATIONS:"beforeoperations",AFTEROPERATIONS:"afteroperations"},x={PIXEL:"pixel",IMAGE:"image"},C=function(e){function t(t,r,a){var n=e.call(this,t)||this;return n.extent=r.extent,n.resolution=r.viewState.resolution/r.pixelRatio,n.data=a,n}return v(t,e),t}(t.default);exports.RasterSourceEvent=C;var E=function(e){function t(t){var a=e.call(this,{projection:null})||this;a.processor_=null,a.operationType_=void 0!==t.operationType?t.operationType:x.PIXEL,a.threads_=void 0!==t.threads?t.threads:1,a.layers_=k(t.sources);for(var n=a.changed.bind(a),i=0,o=a.layers_.length;i<o;++i)a.layers_[i].addEventListener(r.default.CHANGE,n);return a.tileQueue_=new l.default(function(){return 1},a.changed.bind(a)),a.requestedFrameState_,a.renderedImageCanvas_=null,a.renderedRevision_,a.frameState_={animate:!1,coordinateToPixelTransform:(0,f.create)(),declutterTree:null,extent:null,index:0,layerIndex:0,layerStatesArray:A(a.layers_),pixelRatio:1,pixelToCoordinateTransform:(0,f.create)(),postRenderFunctions:[],size:[0,0],tileQueue:a.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{}},a.setAttributions(function(e){for(var r=[],a=0,n=t.sources.length;a<n;++a){var i=t.sources[a],o=(i instanceof s.default?i:i.getSource()).getAttributions();if("function"==typeof o){var u=o(e);r.push.apply(r,u)}}return 0!==r.length?r:null}),void 0!==t.operation&&a.setOperation(t.operation,t.lib),a}return v(t,e),t.prototype.setOperation=function(e,t){this.processor_&&this.processor_.dispose(),this.processor_=new S({operation:e,imageOps:this.operationType_===x.IMAGE,queue:1,lib:t,threads:this.threads_}),this.changed()},t.prototype.updateFrameState_=function(e,t,r){var a=(0,p.assign)({},this.frameState_);a.viewState=(0,p.assign)({},a.viewState);var n=(0,c.getCenter)(e);a.extent=e.slice(),a.size[0]=Math.round((0,c.getWidth)(e)/t),a.size[1]=Math.round((0,c.getHeight)(e)/t),a.time=1/0;var i=a.viewState;return i.center=n,i.projection=r,i.resolution=t,a},t.prototype.allSourcesReady_=function(){for(var e=!0,t=0,r=this.layers_.length;t<r;++t)if(this.layers_[t].getSource().getState()!==o.default.READY){e=!1;break}return e},t.prototype.getImage=function(e,t,r,a){if(!this.allSourcesReady_())return null;var n=this.updateFrameState_(e,t,a);if(this.requestedFrameState_=n,this.renderedImageCanvas_){var i=this.renderedImageCanvas_.getResolution(),s=this.renderedImageCanvas_.getExtent();t===i&&(0,c.equals)(e,s)||(this.renderedImageCanvas_=null)}return this.renderedImageCanvas_&&this.getRevision()===this.renderedRevision_||this.processSources_(),n.tileQueue.loadMoreTiles(16,16),n.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_},t.prototype.processSources_=function(){for(var e=this.requestedFrameState_,t=this.layers_.length,r=new Array(t),a=0;a<t;++a){e.layerIndex=a;var n=O(this.layers_[a],e);if(!n)return;r[a]=n}var i={};this.dispatchEvent(new C(q.BEFOREOPERATIONS,e,i)),this.processor_.process(r,i,this.onWorkerComplete_.bind(this,e))},t.prototype.onWorkerComplete_=function(e,t,r,n){if(!t&&r){var i=e.extent,s=e.viewState.resolution;if(s===this.requestedFrameState_.viewState.resolution&&(0,c.equals)(i,this.requestedFrameState_.extent)){var o;if(this.renderedImageCanvas_)o=this.renderedImageCanvas_.getImage().getContext("2d");else{var u=Math.round((0,c.getWidth)(i)/s),l=Math.round((0,c.getHeight)(i)/s);o=(0,d.createCanvasContext2D)(u,l),this.renderedImageCanvas_=new a.default(i,s,1,o.canvas)}o.putImageData(r,0,0),this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new C(q.AFTEROPERATIONS,e,n))}}},t.prototype.getImageInternal=function(){return null},t.prototype.disposeInternal=function(){this.processor_&&this.processor_.dispose(),e.prototype.disposeInternal.call(this)},t}(i.default);E.prototype.dispose;var j=null;function O(e,t){var r=e.getRenderer();if(!r)throw new Error("Unsupported layer type: "+e);if(!r.prepareFrame(t))return null;var a=t.size[0],n=t.size[1];if(0===a||0===n)return null;var i,s=r.renderFrame(t,null);if(s&&(i=s.firstElementChild),!(i instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+i);if(i.width===a&&i.height===n)return i.getContext("2d").getImageData(0,0,a,n);if(j){var o=j.canvas;o.width!==a||o.height!==n?j=(0,d.createCanvasContext2D)(a,n):j.clearRect(0,0,a,n)}else j=(0,d.createCanvasContext2D)(a,n);return j.drawImage(i,0,0,a,n),j.getImageData(0,0,a,n)}function A(e){return e.map(function(e){return e.getLayerState()})}function k(e){for(var t=e.length,r=new Array(t),a=0;a<t;++a)r[a]=R(e[a]);return r}function R(e){var t;return e instanceof s.default?e instanceof h.default?t=new u.default({source:e}):e instanceof i.default&&(t=new n.default({source:e})):t=e,t}var T=E;exports.default=T;
},{"../Disposable.js":"DDda","../events/Event.js":"fKNg","../events/EventType.js":"C8cu","../ImageCanvas.js":"K7j2","../layer/Image.js":"KHBf","./Image.js":"XHvt","./Source.js":"H38a","./State.js":"iC8j","../layer/Tile.js":"BUEc","../TileQueue.js":"tHOl","./Tile.js":"JECm","../obj.js":"mH6q","../dom.js":"Xno5","../transform.js":"P4eA","../extent.js":"QDir"}],"ehVO":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=n(require("./XYZ.js")),o=require("./OSM.js");function n(e){return e&&e.__esModule?e:{default:e}}var t=function(){var e=function(o,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])})(o,n)};return function(o,n){function t(){this.constructor=o}e(o,n),o.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}}(),r=['Map tiles by <a href="https://stamen.com/" target="_blank">Stamen Design</a>, under <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.',o.ATTRIBUTION],a={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},i={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},s=function(e){function o(o){var n=o.layer.indexOf("-"),t=-1==n?o.layer:o.layer.slice(0,n),s=i[t],u=a[o.layer],p=void 0!==o.url?o.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+o.layer+"/{z}/{x}/{y}."+u.extension;return e.call(this,{attributions:r,cacheSize:o.cacheSize,crossOrigin:"anonymous",imageSmoothing:o.imageSmoothing,maxZoom:null!=o.maxZoom?o.maxZoom:s.maxZoom,minZoom:null!=o.minZoom?o.minZoom:s.minZoom,opaque:u.opaque,reprojectionErrorThreshold:o.reprojectionErrorThreshold,tileLoadFunction:o.tileLoadFunction,transition:o.transition,url:p,wrapX:o.wrapX})||this}return t(o,e),o}(e.default),u=s;exports.default=u;
},{"./XYZ.js":"knlU","./OSM.js":"Rmo4"}],"XUos":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=s(require("./TileImage.js")),e=require("../uri.js"),r=require("../obj.js"),i=require("../extent.js"),o=require("../math.js"),n=require("../size.js"),a=require("../tilecoord.js");function s(t){return t&&t.__esModule?t:{default:t}}var p=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),u=function(t){function s(e){var r=this,o=e||{};return(r=t.call(this,{attributions:o.attributions,cacheSize:o.cacheSize,crossOrigin:o.crossOrigin,imageSmoothing:o.imageSmoothing,projection:o.projection,reprojectionErrorThreshold:o.reprojectionErrorThreshold,tileGrid:o.tileGrid,tileLoadFunction:o.tileLoadFunction,url:o.url,urls:o.urls,wrapX:void 0===o.wrapX||o.wrapX,transition:o.transition})||this).params_=o.params||{},r.hidpi_=void 0===o.hidpi||o.hidpi,r.tmpExtent_=(0,i.createEmpty)(),r.setKey(r.getKeyForParams_()),r}return p(s,t),s.prototype.getKeyForParams_=function(){var t=0,e=[];for(var r in this.params_)e[t++]=r+"-"+this.params_[r];return e.join("/")},s.prototype.getParams=function(){return this.params_},s.prototype.getRequestUrl_=function(t,r,i,n,s,p){var u=this.urls;if(u){var l,c=s.getCode().split(":").pop();if(p.SIZE=r[0]+","+r[1],p.BBOX=i.join(","),p.BBOXSR=c,p.IMAGESR=c,p.DPI=Math.round(p.DPI?p.DPI*n:90*n),1==u.length)l=u[0];else l=u[(0,o.modulo)((0,a.hash)(t),u.length)];var h=l.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return(0,e.appendParams)(h,p)}},s.prototype.getTilePixelRatio=function(t){return this.hidpi_?t:1},s.prototype.updateParams=function(t){(0,r.assign)(this.params_,t),this.setKey(this.getKeyForParams_())},s.prototype.tileUrlFunction=function(t,e,i){var o=this.getTileGrid();if(o||(o=this.getTileGridForProjection(i)),!(o.getResolutions().length<=t[0])){1==e||this.hidpi_||(e=1);var a=o.getTileCoordExtent(t,this.tmpExtent_),s=(0,n.toSize)(o.getTileSize(t[0]),this.tmpSize);1!=e&&(s=(0,n.scale)(s,e,this.tmpSize));var p={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return(0,r.assign)(p,this.params_),this.getRequestUrl_(t,s,a,e,i,p)}},s}(t.default),l=u;exports.default=l;
},{"./TileImage.js":"udAI","../uri.js":"n7G7","../obj.js":"mH6q","../extent.js":"QDir","../math.js":"B96G","../size.js":"TAHd","../tilecoord.js":"faTr"}],"dQMP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=a(require("../Tile.js")),e=a(require("../TileState.js")),r=a(require("./XYZ.js")),i=require("../dom.js"),n=require("../tilecoord.js"),o=require("../size.js");function a(t){return t&&t.__esModule?t:{default:t}}var s=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),l=function(t){function r(r,i,n){var o=t.call(this,r,e.default.LOADED)||this;return o.tileSize_=i,o.text_=n,o.canvas_=null,o}return s(r,t),r.prototype.getImage=function(){if(this.canvas_)return this.canvas_;var t=this.tileSize_,e=(0,i.createCanvasContext2D)(t[0],t[1]);return e.strokeStyle="grey",e.strokeRect(.5,.5,t[0]+.5,t[1]+.5),e.fillStyle="grey",e.strokeStyle="white",e.textAlign="center",e.textBaseline="middle",e.font="24px sans-serif",e.lineWidth=4,e.strokeText(this.text_,t[0]/2,t[1]/2,t[0]),e.fillText(this.text_,t[0]/2,t[1]/2,t[0]),this.canvas_=e.canvas,e.canvas},r.prototype.load=function(){},r}(t.default),u=function(t){function e(e){var r=e||{};return t.call(this,{opaque:!1,projection:r.projection,tileGrid:r.tileGrid,wrapX:void 0===r.wrapX||r.wrapX,zDirection:r.zDirection})||this}return s(e,t),e.prototype.getTile=function(t,e,r){var i=(0,n.getKeyZXY)(t,e,r);if(this.tileCache.containsKey(i))return this.tileCache.get(i);var a=(0,o.toSize)(this.tileGrid.getTileSize(t)),s=[t,e,r],u=this.getTileCoordForTileUrlFunction(s),c=void 0;c=u?"z:"+u[0]+" x:"+u[1]+" y:"+u[2]:"none";var f=new l(s,a,c);return this.tileCache.set(i,f),f},e}(r.default),c=u;exports.default=c;
},{"../Tile.js":"IWZI","../TileState.js":"Xz9x","./XYZ.js":"knlU","../dom.js":"Xno5","../tilecoord.js":"faTr","../size.js":"TAHd"}],"IcO7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("./common.js"),e=c(require("./TileImage.js")),r=c(require("./WMSServerType.js")),i=require("../uri.js"),o=require("../asserts.js"),s=require("../obj.js"),a=require("../extent.js"),n=require("../size.js"),u=require("../reproj.js"),p=require("../string.js"),h=require("../proj.js"),l=require("../math.js"),_=require("../tilecoord.js");function c(t){return t&&t.__esModule?t:{default:t}}var g=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),S=function(e){function c(t){var r=this,i=t||{},o=i.params||{},s=!("TRANSPARENT"in o)||o.TRANSPARENT;return(r=e.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,imageSmoothing:i.imageSmoothing,opaque:!s,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition})||this).gutter_=void 0!==i.gutter?i.gutter:0,r.params_=o,r.v13_=!0,r.serverType_=i.serverType,r.hidpi_=void 0===i.hidpi||i.hidpi,r.tmpExtent_=(0,a.createEmpty)(),r.updateV13_(),r.setKey(r.getKeyForParams_()),r}return g(c,e),c.prototype.getFeatureInfoUrl=function(e,r,i,o){var p=(0,h.get)(i),l=this.getProjection(),_=this.getTileGrid();_||(_=this.getTileGridForProjection(p));var c=_.getZForResolution(r,this.zDirection),g=_.getTileCoordForCoordAndZ(e,c);if(!(_.getResolutions().length<=g[0])){var S=_.getResolution(g[0]),f=_.getTileCoordExtent(g,this.tmpExtent_),d=(0,n.toSize)(_.getTileSize(g[0]),this.tmpSize),E=this.gutter_;0!==E&&(d=(0,n.buffer)(d,E,this.tmpSize),f=(0,a.buffer)(f,S*E,f)),l&&l!==p&&(S=(0,u.calculateSourceResolution)(l,p,e,S),f=(0,h.transformExtent)(f,p,l),e=(0,h.transform)(e,p,l));var R={SERVICE:"WMS",VERSION:t.DEFAULT_WMS_VERSION,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};(0,s.assign)(R,this.params_,o);var T=Math.floor((e[0]-f[0])/S),v=Math.floor((f[3]-e[1])/S);return R[this.v13_?"I":"X"]=T,R[this.v13_?"J":"Y"]=v,this.getRequestUrl_(g,d,f,1,l||p,R)}},c.prototype.getLegendUrl=function(e,r){if(void 0!==this.urls[0]){var o={SERVICE:"WMS",VERSION:t.DEFAULT_WMS_VERSION,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===r||void 0===r.LAYER){var a=this.params_.LAYERS;if(!(!Array.isArray(a)||1===a.length))return;o.LAYER=a}if(void 0!==e){var n=this.getProjection()?this.getProjection().getMetersPerUnit():1;o.SCALE=e*n/28e-5}return(0,s.assign)(o,r),(0,i.appendParams)(this.urls[0],o)}},c.prototype.getGutter=function(){return this.gutter_},c.prototype.getParams=function(){return this.params_},c.prototype.getRequestUrl_=function(t,e,s,a,n,u){var p=this.urls;if(p){if(u.WIDTH=e[0],u.HEIGHT=e[1],u[this.v13_?"CRS":"SRS"]=n.getCode(),"STYLES"in this.params_||(u.STYLES=""),1!=a)switch(this.serverType_){case r.default.GEOSERVER:var h=90*a+.5|0;"FORMAT_OPTIONS"in u?u.FORMAT_OPTIONS+=";dpi:"+h:u.FORMAT_OPTIONS="dpi:"+h;break;case r.default.MAPSERVER:u.MAP_RESOLUTION=90*a;break;case r.default.CARMENTA_SERVER:case r.default.QGIS:u.DPI=90*a;break;default:(0,o.assert)(!1,52)}var c,g=n.getAxisOrientation(),S=s;if(this.v13_&&"ne"==g.substr(0,2)){var f=void 0;f=s[0],S[0]=s[1],S[1]=f,f=s[2],S[2]=s[3],S[3]=f}if(u.BBOX=S.join(","),1==p.length)c=p[0];else c=p[(0,l.modulo)((0,_.hash)(t),p.length)];return(0,i.appendParams)(c,u)}},c.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},c.prototype.getKeyForParams_=function(){var t=0,e=[];for(var r in this.params_)e[t++]=r+"-"+this.params_[r];return e.join("/")},c.prototype.updateParams=function(t){(0,s.assign)(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},c.prototype.updateV13_=function(){var e=this.params_.VERSION||t.DEFAULT_WMS_VERSION;this.v13_=(0,p.compareVersions)(e,"1.3")>=0},c.prototype.tileUrlFunction=function(e,r,i){var o=this.getTileGrid();if(o||(o=this.getTileGridForProjection(i)),!(o.getResolutions().length<=e[0])){1==r||this.hidpi_&&void 0!==this.serverType_||(r=1);var u=o.getResolution(e[0]),p=o.getTileCoordExtent(e,this.tmpExtent_),h=(0,n.toSize)(o.getTileSize(e[0]),this.tmpSize),l=this.gutter_;0!==l&&(h=(0,n.buffer)(h,l,this.tmpSize),p=(0,a.buffer)(p,u*l,p)),1!=r&&(h=(0,n.scale)(h,r,this.tmpSize));var _={SERVICE:"WMS",VERSION:t.DEFAULT_WMS_VERSION,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return(0,s.assign)(_,this.params_),this.getRequestUrl_(e,h,p,r,i,_)}},c}(e.default),f=S;exports.default=f;
},{"./common.js":"a8mu","./TileImage.js":"udAI","./WMSServerType.js":"mXwm","../uri.js":"n7G7","../asserts.js":"fLG6","../obj.js":"mH6q","../extent.js":"QDir","../size.js":"TAHd","../reproj.js":"U255","../string.js":"AiCK","../proj.js":"Diht","../math.js":"B96G","../tilecoord.js":"faTr"}],"oCPk":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.CustomTile=void 0;var t=c(require("../events/EventType.js")),e=c(require("./State.js")),i=c(require("../Tile.js")),r=c(require("./Tile.js")),n=c(require("../TileState.js")),o=require("../extent.js"),s=require("../asserts.js"),a=require("../tileurlfunction.js"),l=require("../tilegrid.js"),u=require("../tilecoord.js"),h=require("../proj.js"),d=require("../events.js"),p=require("../net.js");function c(t){return t&&t.__esModule?t:{default:t}}var f=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_=function(e){function i(t,i,r,n,o,s){var a=e.call(this,t,i)||this;return a.src_=r,a.extent_=n,a.preemptive_=o,a.grid_=null,a.keys_=null,a.data_=null,a.jsonp_=s,a}return f(i,e),i.prototype.getImage=function(){return null},i.prototype.getData=function(t){if(!this.grid_||!this.keys_)return null;var e=(t[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),i=(t[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),r=this.grid_[Math.floor((1-i)*this.grid_.length)];if("string"!=typeof r)return null;var n=r.charCodeAt(Math.floor(e*r.length));n>=93&&n--,n>=35&&n--;var o=null;if((n-=32)in this.keys_){var s=this.keys_[n];o=this.data_&&s in this.data_?this.data_[s]:s}return o},i.prototype.forDataAtCoordinate=function(e,i,r){this.state==n.default.EMPTY&&!0===r?(this.state=n.default.IDLE,(0,d.listenOnce)(this,t.default.CHANGE,function(t){i(this.getData(e))},this),this.loadInternal_()):!0===r?setTimeout(function(){i(this.getData(e))}.bind(this),0):i(this.getData(e))},i.prototype.getKey=function(){return this.src_},i.prototype.handleError_=function(){this.state=n.default.ERROR,this.changed()},i.prototype.handleLoad_=function(t){this.grid_=t.grid,this.keys_=t.keys,this.data_=t.data,this.state=n.default.LOADED,this.changed()},i.prototype.loadInternal_=function(){if(this.state==n.default.IDLE)if(this.state=n.default.LOADING,this.jsonp_)(0,p.jsonp)(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{var t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",this.src_),t.send()}},i.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var i=void 0;try{i=JSON.parse(e.responseText)}catch(r){return void this.handleError_()}this.handleLoad_(i)}else this.handleError_()},i.prototype.onXHRError_=function(t){this.handleError_()},i.prototype.load=function(){this.preemptive_?this.loadInternal_():this.setState(n.default.EMPTY)},i}(i.default);exports.CustomTile=_;var v=function(t){function i(i){var r=t.call(this,{projection:(0,h.get)("EPSG:3857"),state:e.default.LOADING})||this;if(r.preemptive_=void 0===i.preemptive||i.preemptive,r.tileUrlFunction_=a.nullTileUrlFunction,r.template_=void 0,r.jsonp_=i.jsonp||!1,i.url)if(r.jsonp_)(0,p.jsonp)(i.url,r.handleTileJSONResponse.bind(r),r.handleTileJSONError.bind(r));else{var n=new XMLHttpRequest;n.addEventListener("load",r.onXHRLoad_.bind(r)),n.addEventListener("error",r.onXHRError_.bind(r)),n.open("GET",i.url),n.send()}else i.tileJSON?r.handleTileJSONResponse(i.tileJSON):(0,s.assert)(!1,51);return r}return f(i,t),i.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var i=void 0;try{i=JSON.parse(e.responseText)}catch(r){return void this.handleTileJSONError()}this.handleTileJSONResponse(i)}else this.handleTileJSONError()},i.prototype.onXHRError_=function(t){this.handleTileJSONError()},i.prototype.getTemplate=function(){return this.template_},i.prototype.forDataAtCoordinateAndResolution=function(t,e,i,r){if(this.tileGrid){var n=this.tileGrid.getZForResolution(e,this.zDirection),o=this.tileGrid.getTileCoordForCoordAndZ(t,n);this.getTile(o[0],o[1],o[2],1,this.getProjection()).forDataAtCoordinate(t,i,r)}else!0===r?setTimeout(function(){i(null)},0):i(null)},i.prototype.handleTileJSONError=function(){this.setState(e.default.ERROR)},i.prototype.handleTileJSONResponse=function(t){var i,r=(0,h.get)("EPSG:4326"),n=this.getProjection();if(void 0!==t.bounds){var s=(0,h.getTransformFromProjections)(r,n);i=(0,o.applyTransform)(t.bounds,s)}var u=t.minzoom||0,d=t.maxzoom||22,p=(0,l.createXYZ)({extent:(0,l.extentFromProjection)(n),maxZoom:d,minZoom:u});this.tileGrid=p,this.template_=t.template;var c=t.grids;if(c){if(this.tileUrlFunction_=(0,a.createFromTemplates)(c,p),void 0!==t.attribution){var f=void 0!==i?i:r.getExtent();this.setAttributions(function(e){return(0,o.intersects)(f,e.extent)?[t.attribution]:null})}this.setState(e.default.READY)}else this.setState(e.default.ERROR)},i.prototype.getTile=function(t,e,i,r,o){var s=(0,u.getKeyZXY)(t,e,i);if(this.tileCache.containsKey(s))return this.tileCache.get(s);var a=[t,e,i],l=this.getTileCoordForTileUrlFunction(a,o),h=this.tileUrlFunction_(l,r,o),d=new _(a,void 0!==h?n.default.IDLE:n.default.EMPTY,void 0!==h?h:"",this.tileGrid.getTileCoordExtent(a),this.preemptive_,this.jsonp_);return this.tileCache.set(s,d),d},i.prototype.useTile=function(t,e,i){var r=(0,u.getKeyZXY)(t,e,i);this.tileCache.containsKey(r)&&this.tileCache.get(r)},i}(r.default),y=v;exports.default=y;
},{"../events/EventType.js":"C8cu","./State.js":"iC8j","../Tile.js":"IWZI","./Tile.js":"JECm","../TileState.js":"Xz9x","../extent.js":"QDir","../asserts.js":"fLG6","../tileurlfunction.js":"p1vZ","../tilegrid.js":"ExRx","../tilecoord.js":"faTr","../proj.js":"Diht","../events.js":"UqnM","../net.js":"SU9K"}],"gBl1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={KVP:"KVP",REST:"REST"};exports.default=e;
},{}],"omFW":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createFromCapabilitiesMatrixSet=u,exports.default=void 0;var t=i(require("./TileGrid.js")),e=require("../array.js"),r=require("../proj.js");function i(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),o=function(t){function e(e){var r=t.call(this,{extent:e.extent,origin:e.origin,origins:e.origins,resolutions:e.resolutions,tileSize:e.tileSize,tileSizes:e.tileSizes,sizes:e.sizes})||this;return r.matrixIds_=e.matrixIds,r}return n(e,t),e.prototype.getMatrixId=function(t){return this.matrixIds_[t]},e.prototype.getMatrixIds=function(){return this.matrixIds_},e}(t.default),s=o;function u(t,i,n){var s=[],u=[],a=[],f=[],p=[],l=void 0!==n?n:[],c=t.SupportedCRS,d=(0,r.get)(c),x=d.getMetersPerUnit(),h="ne"==d.getAxisOrientation().substr(0,2);return t.TileMatrix.sort(function(t,e){return e.ScaleDenominator-t.ScaleDenominator}),t.TileMatrix.forEach(function(r){if(!(l.length>0)||(0,e.find)(l,function(e){return r.Identifier==e.TileMatrix||-1===r.Identifier.indexOf(":")&&t.Identifier+":"+r.Identifier===e.TileMatrix})){u.push(r.Identifier);var i=28e-5*r.ScaleDenominator/x,n=r.TileWidth,o=r.TileHeight;h?a.push([r.TopLeftCorner[1],r.TopLeftCorner[0]]):a.push(r.TopLeftCorner),s.push(i),f.push(n==o?n:[n,o]),p.push([r.MatrixWidth,r.MatrixHeight])}}),new o({extent:i,origins:a,resolutions:s,matrixIds:u,tileSizes:f,sizes:p})}exports.default=s;
},{"./TileGrid.js":"dpZ6","../array.js":"luEr","../proj.js":"Diht"}],"LIR5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.optionsFromCapabilities=d,exports.default=void 0;var e=l(require("./TileImage.js")),t=l(require("./WMTSRequestEncoding.js")),i=require("../uri.js"),r=require("../obj.js"),n=require("../tilegrid/WMTS.js"),o=require("../tileurlfunction.js"),a=require("../proj.js"),s=require("../array.js");function l(e){return e&&e.__esModule?e:{default:e}}var u=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),c=function(e){function n(i){var r=this,n=void 0!==i.requestEncoding?i.requestEncoding:t.default.KVP,a=i.tileGrid,s=i.urls;return void 0===s&&void 0!==i.url&&(s=(0,o.expandUrl)(i.url)),(r=e.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,imageSmoothing:i.imageSmoothing,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:a,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:i.tilePixelRatio,urls:s,wrapX:void 0!==i.wrapX&&i.wrapX,transition:i.transition})||this).version_=void 0!==i.version?i.version:"1.0.0",r.format_=void 0!==i.format?i.format:"image/jpeg",r.dimensions_=void 0!==i.dimensions?i.dimensions:{},r.layer_=i.layer,r.matrixSet_=i.matrixSet,r.style_=i.style,r.requestEncoding_=n,r.setKey(r.getKeyForDimensions_()),s&&s.length>0&&(r.tileUrlFunction=(0,o.createFromTileUrlFunctions)(s.map(r.createFromWMTSTemplate.bind(r)))),r}return u(n,e),n.prototype.setUrls=function(e){this.urls=e;var t=e.join("\n");this.setTileUrlFunction((0,o.createFromTileUrlFunctions)(e.map(this.createFromWMTSTemplate.bind(this))),t)},n.prototype.getDimensions=function(){return this.dimensions_},n.prototype.getFormat=function(){return this.format_},n.prototype.getLayer=function(){return this.layer_},n.prototype.getMatrixSet=function(){return this.matrixSet_},n.prototype.getRequestEncoding=function(){return this.requestEncoding_},n.prototype.getStyle=function(){return this.style_},n.prototype.getVersion=function(){return this.version_},n.prototype.getKeyForDimensions_=function(){var e=0,t=[];for(var i in this.dimensions_)t[e++]=i+"-"+this.dimensions_[i];return t.join("/")},n.prototype.updateDimensions=function(e){(0,r.assign)(this.dimensions_,e),this.setKey(this.getKeyForDimensions_())},n.prototype.createFromWMTSTemplate=function(e){var n=this.requestEncoding_,o={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};n==t.default.KVP&&(0,r.assign)(o,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),e=n==t.default.KVP?(0,i.appendParams)(e,o):e.replace(/\{(\w+?)\}/g,function(e,t){return t.toLowerCase()in o?o[t.toLowerCase()]:e});var a=this.tileGrid,s=this.dimensions_;return function(o,l,u){if(o){var c={TileMatrix:a.getMatrixId(o[0]),TileCol:o[1],TileRow:o[2]};(0,r.assign)(c,s);var f=e;return f=n==t.default.KVP?(0,i.appendParams)(f,c):f.replace(/\{(\w+?)\}/g,function(e,t){return c[t]})}}},n}(e.default),f=c;function d(e,i){var r=e.Contents.Layer,o=(0,s.find)(r,function(e,t,r){return e.Identifier==i.layer});if(null===o)return null;var l,u=e.Contents.TileMatrixSet;(l=o.TileMatrixSetLink.length>1?"projection"in i?(0,s.findIndex)(o.TileMatrixSetLink,function(e,t,r){var n=(0,s.find)(u,function(t){return t.Identifier==e.TileMatrixSet}).SupportedCRS,o=(0,a.get)(n),l=(0,a.get)(i.projection);return o&&l?(0,a.equivalent)(o,l):n==i.projection}):(0,s.findIndex)(o.TileMatrixSetLink,function(e,t,r){return e.TileMatrixSet==i.matrixSet}):0)<0&&(l=0);var c=o.TileMatrixSetLink[l].TileMatrixSet,f=o.TileMatrixSetLink[l].TileMatrixSetLimits,d=o.Format[0];"format"in i&&(d=i.format),(l=(0,s.findIndex)(o.Style,function(e,t,r){return"style"in i?e.Title==i.style:e.isDefault}))<0&&(l=0);var p=o.Style[l].Identifier,m={};"Dimension"in o&&o.Dimension.forEach(function(e,t,i){var r=e.Identifier,n=e.Default;void 0===n&&(n=e.Value[0]),m[r]=n});var h,T=e.Contents.TileMatrixSet,g=(0,s.find)(T,function(e,t,i){return e.Identifier==c}),y=g.SupportedCRS;if(y&&(h=(0,a.get)(y)),"projection"in i){var v=(0,a.get)(i.projection);v&&(h&&!(0,a.equivalent)(v,h)||(h=v))}var x="ne"==h.getAxisOrientation().substr(0,2),M=g.TileMatrix[0],S={MinTileCol:0,MinTileRow:0,MaxTileCol:M.MatrixWidth-1,MaxTileRow:M.MatrixHeight-1};if(f){S=f[f.length-1];var _=(0,s.find)(g.TileMatrix,function(e){return e.Identifier===S.TileMatrix||g.Identifier+":"+e.Identifier===S.TileMatrix});_&&(M=_)}var j=28e-5*M.ScaleDenominator/h.getMetersPerUnit(),C=x?[M.TopLeftCorner[1],M.TopLeftCorner[0]]:M.TopLeftCorner,q=M.TileWidth*j,F=M.TileHeight*j,E=[C[0]+q*S.MinTileCol,C[1]-F*(1+S.MaxTileRow),C[0]+q*(1+S.MaxTileCol),C[1]-F*S.MinTileRow];null===h.getExtent()&&h.setExtent(E);var P=(0,n.createFromCapabilitiesMatrixSet)(g,E,f),w=[],L=i.requestEncoding;if(L=void 0!==L?L:"","OperationsMetadata"in e&&"GetTile"in e.OperationsMetadata)for(var R=e.OperationsMetadata.GetTile.DCP.HTTP.Get,O=0,b=R.length;O<b;++O)if(R[O].Constraint){var I=(0,s.find)(R[O].Constraint,function(e){return"GetEncoding"==e.name}).AllowedValues.Value;if(""===L&&(L=I[0]),L!==t.default.KVP)break;(0,s.includes)(I,t.default.KVP)&&w.push(R[O].href)}else R[O].href&&(L=t.default.KVP,w.push(R[O].href));return 0===w.length&&(L=t.default.REST,o.ResourceURL.forEach(function(e){"tile"===e.resourceType&&(d=e.format,w.push(e.template))})),{urls:w,layer:i.layer,matrixSet:c,format:d,projection:h,requestEncoding:L,tileGrid:P,style:p,dimensions:m,wrapX:!1,crossOrigin:i.crossOrigin}}exports.default=f;
},{"./TileImage.js":"udAI","./WMTSRequestEncoding.js":"gBl1","../uri.js":"n7G7","../obj.js":"mH6q","../tilegrid/WMTS.js":"omFW","../tileurlfunction.js":"p1vZ","../proj.js":"Diht","../array.js":"luEr"}],"kDr9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"BingMaps",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"CartoDB",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"Cluster",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"IIIF",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"Image",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"ImageArcGISRest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"ImageCanvas",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"ImageMapGuide",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(exports,"ImageStatic",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(exports,"ImageWMS",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(exports,"OSM",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(exports,"Raster",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"Source",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(exports,"Stamen",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(exports,"Tile",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(exports,"TileArcGISRest",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(exports,"TileDebug",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(exports,"TileImage",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(exports,"TileJSON",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(exports,"TileWMS",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(exports,"UrlTile",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(exports,"UTFGrid",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(exports,"Vector",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(exports,"VectorTile",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(exports,"WMTS",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(exports,"XYZ",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(exports,"Zoomify",{enumerable:!0,get:function(){return M.default}});var e=G(require("./source/BingMaps.js")),r=G(require("./source/CartoDB.js")),t=G(require("./source/Cluster.js")),u=G(require("./source/IIIF.js")),n=G(require("./source/Image.js")),o=G(require("./source/ImageArcGISRest.js")),i=G(require("./source/ImageCanvas.js")),s=G(require("./source/ImageMapGuide.js")),c=G(require("./source/ImageStatic.js")),a=G(require("./source/ImageWMS.js")),f=G(require("./source/OSM.js")),l=G(require("./source/Raster.js")),d=G(require("./source/Source.js")),p=G(require("./source/Stamen.js")),b=G(require("./source/Tile.js")),j=G(require("./source/TileArcGISRest.js")),g=G(require("./source/TileDebug.js")),m=G(require("./source/TileImage.js")),O=G(require("./source/TileJSON.js")),y=G(require("./source/TileWMS.js")),x=G(require("./source/UrlTile.js")),P=G(require("./source/UTFGrid.js")),q=G(require("./source/Vector.js")),I=G(require("./source/VectorTile.js")),S=G(require("./source/WMTS.js")),T=G(require("./source/XYZ.js")),M=G(require("./source/Zoomify.js"));function G(e){return e&&e.__esModule?e:{default:e}}
},{"./source/BingMaps.js":"KSjo","./source/CartoDB.js":"WJrq","./source/Cluster.js":"sV2m","./source/IIIF.js":"oF4i","./source/Image.js":"XHvt","./source/ImageArcGISRest.js":"P20y","./source/ImageCanvas.js":"Y2uN","./source/ImageMapGuide.js":"C9PY","./source/ImageStatic.js":"zK6j","./source/ImageWMS.js":"e4Kb","./source/OSM.js":"Rmo4","./source/Raster.js":"w95b","./source/Source.js":"H38a","./source/Stamen.js":"ehVO","./source/Tile.js":"JECm","./source/TileArcGISRest.js":"XUos","./source/TileDebug.js":"dQMP","./source/TileImage.js":"udAI","./source/TileJSON.js":"V9RY","./source/TileWMS.js":"IcO7","./source/UrlTile.js":"uv9E","./source/UTFGrid.js":"oCPk","./source/Vector.js":"ZS12","./source/VectorTile.js":"A6uo","./source/WMTS.js":"LIR5","./source/XYZ.js":"knlU","./source/Zoomify.js":"aDh3"}],"cHEw":[function(require,module,exports) {
"use strict";function t(t,e){return i(t)||a(t,e)||n(t,e)||r()}function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(t,r){if(t){if("string"==typeof t)return e(t,r);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,r):void 0}}function e(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}function a(t,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],e=!0,a=!1,i=void 0;try{for(var o,u=t[Symbol.iterator]();!(e=(o=u.next()).done)&&(n.push(o.value),!r||n.length!==r);e=!0);}catch(s){a=!0,i=s}finally{try{e||null==u.return||u.return()}finally{if(a)throw i}}return n}}function i(t){if(Array.isArray(t))return t}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function u(t,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function s(t,r,n){return r&&u(t.prototype,r),n&&u(t,n),t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var l=3.141592653589793,f=52.35987755982988,c=6378245,h=.006693421622965943,y=function(){function r(){o(this,r)}return s(r,null,[{key:"delta",value:function(r){var n=t(r,2),e=n[0],a=n[1],i=[e-105,a-35],o=t(this.transform(i),2),u=o[0],s=o[1],f=a/180*l,y=Math.sin(f);y=1-h*y*y;var v=Math.sqrt(y);return s=180*s/(c*(1-h)/(y*v)*l),[u=180*u/(c/v*Math.cos(f)*l),s]}},{key:"gcjEncrypt",value:function(t){if(this.outOfChina(t))return t;var r=this.delta(t);return[t[0]+r[0],t[1]+r[1]]}},{key:"outOfChina",value:function(r){var n=t(r,2),e=n[0],a=n[1];return e<72.004||e>137.8347||(a<.8293||a>55.8271)}},{key:"transform",value:function(r){var n=t(r,2),e=n[0],a=n[1],i=2*e-100+3*a+.2*a*a+.1*e*a+.2*Math.sqrt(Math.abs(e));i+=2*(20*Math.sin(6*e*l)+20*Math.sin(2*e*l))/3,i+=2*(20*Math.sin(a*l)+40*Math.sin(a/3*l))/3,i+=2*(160*Math.sin(a/12*l)+320*Math.sin(a*l/30))/3;var o=300+e+2*a+.1*e*e+.1*e*a+.1*Math.sqrt(Math.abs(e));return o+=2*(20*Math.sin(6*e*l)+20*Math.sin(2*e*l))/3,o+=2*(20*Math.sin(e*l)+40*Math.sin(e/3*l))/3,[o+=2*(150*Math.sin(e/12*l)+300*Math.sin(e/30*l))/3,i]}}]),r}();exports.default=y;
},{}],"i7HX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.map=exports.vectorSource=exports.getFeature=exports.removeShap=exports.setCenter=exports.clear=exports.addArrow=exports.transform=void 0,require("ol/ol.css"),require("ol-ext/map/PerspectiveMap.css");var e=d(require("ol/Feature")),r=d(require("ol-ext/map/PerspectiveMap")),t=d(require("ol/View")),o=d(require("ol/Overlay")),n=require("ol/events/condition"),a=require("ol/geom"),i=require("ol/layer"),c=require("ol/source"),u=require("ol/style"),l=require("ol/proj"),s=require("ol/control"),p=require("ol/interaction"),f=d(require("./GpsRectify"));function d(e){return e&&e.__esModule?e:{default:e}}function m(e,r){return h(e)||w(e,r)||y(e,r)||v()}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(e,r){if(e){if("string"==typeof e)return g(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?g(e,r):void 0}}function g(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}function w(e,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],o=!0,n=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(o=(i=c.next()).done)&&(t.push(i.value),!r||t.length!==r);o=!0);}catch(u){n=!0,a=u}finally{try{o||null==c.return||c.return()}finally{if(n)throw a}}return t}}function h(e){if(Array.isArray(e))return e}var x=[13186082.237595802,4736428.0034728395],S=10,I={},L={fromLonLat:l.fromLonLat,toLonLat:l.toLonLat};exports.transform=L;var q=function(e){var r=e.name,t=e.info,o=e.from,n=e.to,a="a".concat(r);try{var i=(0,l.fromLonLat)(f.default.gcjEncrypt(o)),c=(0,l.fromLonLat)(f.default.gcjEncrypt(n)),u=[(i[0]+c[0])/2,(i[1]+c[1])/2];I[a]={center:u,name:r,info:t},k.addFeature(j(i,c,a))}catch(s){}};exports.addArrow=q;var A=function(){I={},k.clear()};exports.clear=A;var b=function(e){return Y.getView().animate({center:(0,l.fromLonLat)(f.default.gcjEncrypt(e)),duration:2e3})};exports.setCenter=b;var P=function(e){k.removeFeature(e)};exports.removeShap=P;var E=function(e,r){return k.getFeatureById("".concat(e,"-").concat(r))};exports.getFeature=E;var M={Arrow:function(e){var r=e.getGeometry(),t=[new u.Style({stroke:new u.Stroke({color:"red",width:3})})];return r.forEachSegment(function(e,r){var o=r[0]-e[0],n=r[1]-e[1],i=Math.atan2(n,o);t.push(new u.Style({geometry:new a.Point(r),image:new u.Icon({src:"arrow.png",color:"#ff0000",anchor:[.75,.5],rotateWithView:!0,scale:.1,rotation:-i})}))}),t}};function j(r,t,o){var n=new e.default({geometry:new a.LineString([r,t])});return n.setId("Arrow-".concat(o)),n}var B=document.getElementById("popup"),C=document.getElementById("popup-content"),F=document.getElementById("popup-closer"),z=new o.default({element:B,autoPan:!0,autoPanAnimation:{duration:250}}),G=document.getElementById("popupName"),O=document.getElementById("name-content"),T=new o.default({element:G,autoPan:!0,autoPanAnimation:{duration:250}});F.onclick=function(){return z.setPosition(void 0),F.blur(),!1};var _=function(e){var r;if(e.getId()){var t=m(e.getId().split("-"),2),o=t[0],n=t[1];"function"==typeof(r=M[o])&&(r=r(e));var a=I[n].color;if(a){var i=r.getFill();i&&i.setColor(a);var c=r.getStroke();c&&c.setColor(a)}}else r=M.default;return r},k=new c.Vector({features:[]});exports.vectorSource=k;var V=new i.Vector({source:k,style:_}),R=new i.Tile({source:new c.XYZ({url:"http://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}",projection:"EPSG:3857"})}),W=new i.Tile({source:new c.TileArcGISRest({url:"https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer"})}),X=new i.Tile({source:new c.XYZ({url:"http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}"})}),Y=new r.default({layers:[X,V],overlays:[z,T],target:"map",view:new t.default({center:x,zoom:S})});exports.map=Y;var Z=new p.Select({condition:n.pointerMove});Y.addInteraction(Z);var H=null;Y.on("click",function(e){var r=e.coordinate;(0,l.toLonLat)(r);console.log(r)}),Z.on("select",function(e){if(H=e.selected[0]){var r=H.getId();if(r){var t=m(r.split("-"),2),o=t[0],n=t[1];if("Arrow"==o){var a=I[n],i=a.name,c=a.center,u=H.getGeometry().getCoordinates(),l=Math.sqrt((u[0][0]-u[1][0])*(u[0][0]-u[1][0])+(u[0][1]-u[1][1])*(u[0][1]-u[1][1]));O.innerHTML="<code>".concat(i,"</code><br>距离").concat(l),T.setPosition(c)}}}else T.setPosition(void 0)});
},{"ol/ol.css":"JiFC","ol-ext/map/PerspectiveMap.css":"JiFC","ol/Feature":"mYW9","ol-ext/map/PerspectiveMap":"cqF1","ol/View":"hNqE","ol/Overlay":"qWcX","ol/events/condition":"YcID","ol/geom":"V3SP","ol/layer":"ZVaS","ol/source":"kDr9","ol/style":"qeKX","ol/proj":"Diht","ol/control":"ucqx","ol/interaction":"aMDX","./GpsRectify":"cHEw"}]},{},["i7HX"], "biMap")
//# sourceMappingURL=/huace.js.map