PageSourceSearch

https://www.opalesurfcasting.net/geoportail/cartographie.0dd5f516.js

js opalesurfcasting.net collected 2026-10-04 00:30:27 UTC 608,745 bytes, 9 lines download raw bytes

1let t,e,i,s,r,n,a,o,l,h;function u(t){Object.defineProperty(t,"__esModule",{value:!0,configurable:!0})}function d(t,e,i,s){Object.defineProperty(t,e,{get:i,set:s,enumerable:!0,configurable:!0})}function c(t){return t&&t.__esModule?t.default:t}var g,f,p=globalThis,_={},m={},y=p.parcelRequire76d6;null==y&&((y=function(t){if(t in _)return _[t].exports;if(t in m){var e=m[t];delete m[t];var i={id:t,exports:{}};return _[t]=i,e.call(i.exports,i,i.exports),i.exports}var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}).register=function(t,e){m[t]=e},p.parcelRequire76d6=y);var x=y.register;x("ejLRd",function(t,e){u(t.exports),d(t.exports,"unByKey",()=>a),d(t.exports,"default",()=>o);var i=y("cw4dl"),s=y("9LzRi"),r=y("bsgMw");class n extends s.default{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(i.default.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){let i=t.length,s=Array(i);for(let n=0;n<i;++n)s[n]=(0,r.listen)(this,t[n],e);return s}return(0,r.listen)(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){let s=t.length;i=Array(s);for(let n=0;n<s;++n)i[n]=(0,r.listenOnce)(this,t[n],e)}else i=(0,r.listenOnce)(this,t,e);return e.ol_key=i,i}unInternal(t,e){let i=e.ol_key;if(i)a(i);else if(Array.isArray(t))for(let i=0,s=t.length;i<s;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)}}function a(t){if(Array.isArray(t))for(let e=0,i=t.length;e<i;++e)(0,r.unlistenByKey)(t[e]);else(0,r.unlistenByKey)(t)}n.prototype.on,n.prototype.once,n.prototype.un;var o=n}),x("cw4dl",function(t,e){d(t.exports,"default",()=>i);var i={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"}}),x("9LzRi",function(t,e){d(t.exports,"default",()=>o);var i=y("jjfV9"),s=y("eQaCk"),r=y("kKEgb"),n=y("iTTi2");class a extends i.default{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;let i=this.listeners_||(this.listeners_={}),s=i[t]||(i[t]=[]);s.includes(e)||s.push(e)}dispatchEvent(t){let e,i="string"==typeof t,r=i?t:t.type,a=this.listeners_&&this.listeners_[r];if(!a)return;let o=i?new(0,n.default)(t):t;o.target||(o.target=this.eventTarget_||this);let l=this.dispatching_||(this.dispatching_={}),h=this.pendingRemovals_||(this.pendingRemovals_={});r in l||(l[r]=0,h[r]=0),++l[r];for(let t=0,i=a.length;t<i;++t)if(!1===(e="handleEvent"in a[t]?a[t].handleEvent(o):a[t].call(this,o))||o.propagationStopped){e=!1;break}if(0==--l[r]){let t=h[r];for(delete h[r];t--;)this.removeEventListener(r,s.VOID);delete l[r]}return e}disposeInternal(){this.listeners_&&(0,r.clear)(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(t,e){if(!this.listeners_)return;let i=this.listeners_[t];if(!i)return;let r=i.indexOf(e);-1!==r&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[r]=s.VOID,++this.pendingRemovals_[t]):(i.splice(r,1),0===i.length&&delete this.listeners_[t]))}}var o=a}),x("jjfV9",function(t,e){d(t.exports,"default",()=>i);var i=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}}),x("eQaCk",function(t,e){d(t.exports,"TRUE",()=>s),d(t.exports,"FALSE",()=>r),d(t.exports,"VOID",()=>n),d(t.exports,"memoizeOne",()=>a),d(t.exports,"toPromise",()=>o);var i=y("kBSVF");function s(){return!0}function r(){return!1}function n(){}function a(t){let e,s,r;return function(){let n=Array.prototype.slice.call(arguments);return s&&this===r&&(0,i.equals)(n,s)||(r=this,s=n,e=t.apply(this,arguments)),e}}function o(t){let e;try{e=t()}catch(t){return Promise.reject(t)}return e instanceof Promise?e:Promise.resolve(e)}}),x("kBSVF",function(t,e){function i(t,e,i){let r,n;i=i||s;let a=0,o=t.length,l=!1;for(;a<o;)(n=+i(t[r=a+(o-a>>1)],e))<0?a=r+1:(o=r,l=!n);return l?a:~a}function s(t,e){return t>e?1:t<e?-1:0}function r(t,e){return t<e?1:t>e?-1:0}function n(t,e,i){if(t[0]<=e)return 0;let s=t.length;if(e<=t[s-1])return s-1;if("function"==typeof i){for(let r=1;r<s;++r){let s=t[r];
1if(s===e)return r;if(s<e){if(i(e,t[r-1],s)>0)return r-1;return r}}return s-1}if(i>0){for(let i=1;i<s;++i)if(t[i]<e)return i-1;return s-1}if(i<0){for(let i=1;i<s;++i)if(t[i]<=e)return i;return s-1}for(let i=1;i<s;++i){if(t[i]==e)return i;if(t[i]<e){if(t[i-1]-e<e-t[i])return i-1;return i}}return s-1}function a(t,e,i){for(;e<i;){let s=t[e];t[e]=t[i],t[i]=s,++e,--i}}function o(t,e){let i=Array.isArray(e)?e:[e],s=i.length;for(let e=0;e<s;e++)t[t.length]=i[e]}function l(t,e){let i=t.length;if(i!==e.length)return!1;for(let s=0;s<i;s++)if(t[s]!==e[s])return!1;return!0}function h(t,e,i){let r=e||s;return t.every(function(e,s){if(0===s)return!0;let n=r(t[s-1],e);return!(n>0||i&&0===n)})}d(t.exports,"binarySearch",()=>i),d(t.exports,"ascending",()=>s),d(t.exports,"descending",()=>r),d(t.exports,"linearFindNearest",()=>n),d(t.exports,"reverseSubArray",()=>a),d(t.exports,"extend",()=>o),d(t.exports,"equals",()=>l),d(t.exports,"isSorted",()=>h)}),x("kKEgb",function(t,e){function i(t){for(let e in t)delete t[e]}function s(t){let e;for(e in t)return!1;return!e}d(t.exports,"clear",()=>i),d(t.exports,"isEmpty",()=>s)}),x("iTTi2",function(t,e){d(t.exports,"default",()=>i);var i=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}}),x("bsgMw",function(t,e){d(t.exports,"listen",()=>s),d(t.exports,"listenOnce",()=>r),d(t.exports,"unlistenByKey",()=>n);var i=y("kKEgb");function s(t,e,i,s,r){if(r){let r=i;i=function(n){return t.removeEventListener(e,i),r.call(s??this,n)}}else s&&s!==t&&(i=i.bind(s));let n={target:t,type:e,listener:i};return t.addEventListener(e,i),n}function r(t,e,i,r){return s(t,e,i,r,!0)}function n(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,i.clear)(t))}}),x("4DafG",function(t,e){u(t.exports),d(t.exports,"default",()=>o);var i=y("2u1lG"),s=y("fnScq"),r=y("bsgMw"),n=y("eQaCk");class a extends s.default{constructor(t){super();let e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&this.element?.remove();for(let t=0,e=this.listenerKeys.length;t<e;++t)(0,r.unlistenByKey)(this.listenerKeys[t]);if(this.listenerKeys.length=0,this.map_=t,t){let e=this.target_??t.getOverlayContainerStopEvent();this.element&&e.appendChild(this.element),this.render!==n.VOID&&this.listenerKeys.push((0,r.listen)(t,i.default.POSTRENDER,this.render,this)),t.render()}}render(t){}setTarget(t){this.target_="string"==typeof t?document.getElementById(t):t}}var o=a}),x("2u1lG",function(t,e){d(t.exports,"default",()=>i);var i={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"}}),x("fnScq",function(t,e){d(t.exports,"default",()=>h);var i=y("5dXmB"),s=y("ejLRd"),r=y("iTTi2"),n=y("kKEgb"),a=y("lVQul");class o extends r.default{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class l extends s.default{constructor(t){super(),this.on,this.once,this.un,(0,a.getUid)(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let s;s=`change:${t}`,this.hasListener(s)&&this.dispatchEvent(new o(s,t,e)),s=i.default.PROPERTYCHANGE,this.hasListener(s)&&this.dispatchEvent(new o(s,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){let s=this.values_||(this.values_={});if(i)s[t]=e;else{let i=s[t];s[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(let i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){let i=this.values_[t];delete this.values_[t],(0,n.isEmpty)(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}var h=l}),x("5dXmB",function(t,e){d(t.exports,"default",()=>i);var i={PROPERTYCHANGE:"propertychange"}}),x("lVQul",function(t,e){function i(){throw Error("Unimplemented abstract method.")}d(t.exports,"abstract",()=>i),d(t.exports,"getUid",()=>r);let s=0;function r(t){return t.ol_uid||(t.ol_uid=String(++s))}}),x("3VGVQ",function(t,e){u(t.exports),d(t.exports,"GroupEvent",()=>m),d(t.exports,"default",()=>v);var i=y("31ZqB"),s=y("eHnTw"),r=y("5dXmB"),n=y("eJ4LZ"),a=y("iTTi2"),o=y("cw4dl"),l=y("bsgMw"),h=y("jZquI"),
1c=y("kKEgb"),g=y("lVQul"),f=y("lwtpg");let p="addlayer",_="removelayer";class m extends a.default{constructor(t,e){super(t),this.layer=e}}let x="layers";class S extends f.default{constructor(t){let e=Object.assign({},t=t||{});delete e.layers;let s=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(x,this.handleLayersChanged_),s?Array.isArray(s)?s=new(0,i.default)(s.slice(),{unique:!0}):(0,n.assert)("function"==typeof s.getArray,"Expected `layers` to be an array or a `Collection`"):s=new(0,i.default)(void 0,{unique:!0}),this.setLayers(s)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(l.unlistenByKey),this.layersListenerKeys_.length=0;let t=this.getLayers();for(let e in this.layersListenerKeys_.push((0,l.listen)(t,s.default.ADD,this.handleLayersAdd_,this),(0,l.listen)(t,s.default.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(l.unlistenByKey);(0,c.clear)(this.listenerKeys_);let e=t.getArray();for(let t=0,i=e.length;t<i;t++){let i=e[t];this.registerLayerListeners_(i),this.dispatchEvent(new m(p,i))}this.changed()}registerLayerListeners_(t){let e=[(0,l.listen)(t,r.default.PROPERTYCHANGE,this.handleLayerChange_,this),(0,l.listen)(t,o.default.CHANGE,this.handleLayerChange_,this)];t instanceof S&&e.push((0,l.listen)(t,p,this.handleLayerGroupAdd_,this),(0,l.listen)(t,_,this.handleLayerGroupRemove_,this)),this.listenerKeys_[(0,g.getUid)(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new m(p,t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new m(_,t.layer))}handleLayersAdd_(t){let e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new m(p,e)),this.changed()}handleLayersRemove_(t){let e=t.element,i=(0,g.getUid)(e);this.listenerKeys_[i].forEach(l.unlistenByKey),delete this.listenerKeys_[i],this.dispatchEvent(new m(_,e)),this.changed()}getLayers(){return this.get(x)}setLayers(t){let e=this.getLayers();if(e){let t=e.getArray();for(let e=0,i=t.length;e<i;++e)this.dispatchEvent(new m(_,t[e]))}this.set(x,t)}getLayersArray(t){return t=void 0!==t?t:[],this.getLayers().forEach(function(e){e.getLayersArray(t)}),t}getLayerStatesArray(t){let e=void 0!==t?t:[],i=e.length;this.getLayers().forEach(function(t){t.getLayerStatesArray(e)});let s=this.getLayerState(),r=s.zIndex;t||void 0!==s.zIndex||(r=0);for(let t=i,n=e.length;t<n;t++){let i=e[t];i.opacity*=s.opacity,i.visible=i.visible&&s.visible,i.maxResolution=Math.min(i.maxResolution,s.maxResolution),i.minResolution=Math.max(i.minResolution,s.minResolution),i.minZoom=Math.max(i.minZoom,s.minZoom),i.maxZoom=Math.min(i.maxZoom,s.maxZoom),void 0!==s.extent&&(void 0!==i.extent?i.extent=(0,h.getIntersection)(i.extent,s.extent):i.extent=s.extent),void 0===i.zIndex&&(i.zIndex=r)}return e}getSourceState(){return"ready"}}var v=S}),x("31ZqB",function(t,e){d(t.exports,"default",()=>l);var i=y("eHnTw"),s=y("fnScq"),r=y("iTTi2");let n="length";class a extends r.default{constructor(t,e,i){super(t),this.element=e,this.index=i}}class o extends s.default{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t??[],this.unique_)for(let t=1,e=this.array_.length;t<e;++t)this.assertUnique_(this.array_[t],t);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,i=t.length;e<i;++e)this.push(t[e]);return this}forEach(t){let e=this.array_;for(let i=0,s=e.length;i<s;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(n)}insertAt(t,e){if(t<0||t>this.getLength())throw Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new a(i.default.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){let e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){let e=this.array_;for(let i=0,s=e.length;i<s;++i)if(e[i]===t)return this.removeAt(i)}removeAt(t){if(t<0||t>=this.getLength())return;let e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new a(i.default.REMOVE,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);let s=this.array_[t];this.array_[t]=e,this.dispatchEvent(new a(i.default.REMOVE,s,t)),this.dispatchEvent(new a(i.default.ADD,e,t))}updateLength_(){this.set(n,this.array_.length)}assertUnique_(t,e){let i=this.array_;for(let s=0,r=i.length;s<r;++s)if(i[s]===t&&s!==e)throw Error("Duplicate item added to a unique collection")}}var l=o}),x("eHnTw",function(t,e){d(t.exports,"default",()=>i);var i={ADD:"add",REMOVE:"remove"}}),x("eJ4LZ",function(t,e){d(t.exports,"assert",()=>i);function i(t,e){if(!t)throw Error(e)}}),x("jZquI",function(t,e){d(t.exports,"boundingExtent",()=>s),d(t.exports,"createEmpty",()=>c),d(t.exports,"extendCoordinate",()=>S),d(t.exports,"createOrUpdate",()=>g),d(t.exports,"buffer",()=>r),d(t.exports,"clone",()=>n),d(t.exports,"closestSquaredDistanceXY",()=>a),d(t.exports,"containsCoordinate",()=>o),d(t.exports,"containsXY",()=>h),d(t.exports,"containsExtent",()=>l),d(t.exports,"coordinateRelationship",()=>u),d(t.exports,"createOrUpdateEmpty",()=>f),d(t.exports,"createOrUpdateFromCoordinate",()=>p),d(t.exports,"createOrUpdateFromFlatCoordinates",()=>_),d(t.exports,"extendFlatCoordinates",()=>v),d(t.exports,"equals",()=>m),d(t.exports,"extend",()=>x),d(t.exports,"forEachCorner",()=>w),d(t.exports,"getBottomLeft",()=>M),d(t.exports,"getBottomRight",()=>P),d(t.exports,"getTopRight",()=>N),d(t.exports,"getTopLeft",()=>L),d(t.exports,"getArea",()=>E),d(t.exports,"isEmpty",()=>O),d(t.exports,"getWidth",()=>F),d(t.exports,"getHeight",()=>T),d(t.exports,"getCenter",()=>C),d(t.exports,"getCorner",()=>b),d(t.exports,"getForViewAndSize",()=>R),d(t.exports,"getRotatedViewport",()=>I),d(t.exports,"getIntersection",()=>A),d(t.exports,"intersects",()=>G),d(t.exports,"returnOrUpdate",()=>D),d(t.exports,"intersectsSegment",()=>k),d(t.exports,"applyTransform",()=>j),d(t.exports,"wrapX",()=>B),d(t.exports,"wrapAndSliceX",()=>z);var i=y("iweSO");function s(t){let e=c();for(let i=0,s=t.length;i<s;++i)S(e,t[i]);return e}function r(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function n(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function a(t,e,i){let s,r;return(s=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*s+(r=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0)*r}function o(t,e){return h(t,e[0],e[1])}function l(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}
1function h(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function u(t,e){let s=t[0],r=t[1],n=t[2],a=t[3],o=e[0],l=e[1],h=i.default.UNKNOWN;return o<s?h|=i.default.LEFT:o>n&&(h|=i.default.RIGHT),l<r?h|=i.default.BELOW:l>a&&(h|=i.default.ABOVE),h===i.default.UNKNOWN&&(h=i.default.INTERSECTING),h}function c(){return[1/0,1/0,-1/0,-1/0]}function g(t,e,i,s,r){return r?(r[0]=t,r[1]=e,r[2]=i,r[3]=s,r):[t,e,i,s]}function f(t){return g(1/0,1/0,-1/0,-1/0,t)}function p(t,e){let i=t[0],s=t[1];return g(i,s,i,s,e)}function _(t,e,i,s,r){return v(f(r),t,e,i,s)}function m(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function x(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 S(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 v(t,e,i,s,r){for(;i<s;i+=r){var n,a,o;n=t,a=e[i],o=e[i+1],n[0]=Math.min(n[0],a),n[1]=Math.min(n[1],o),n[2]=Math.max(n[2],a),n[3]=Math.max(n[3],o)}return t}function w(t,e){let i;return!!((i=e(M(t)))||(i=e(P(t)))||(i=e(N(t)))||(i=e(L(t))))&&i}function E(t){let e=0;return O(t)||(e=F(t)*T(t)),e}function M(t){return[t[0],t[1]]}function P(t){return[t[2],t[1]]}function C(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function b(t,e){let i;if("bottom-left"===e)i=M(t);else if("bottom-right"===e)i=P(t);else if("top-left"===e)i=L(t);else if("top-right"===e)i=N(t);else throw Error("Invalid corner");return i}function R(t,e,i,s,r){let[n,a,o,l,h,u,d,c]=I(t,e,i,s);return g(Math.min(n,o,h,d),Math.min(a,l,u,c),Math.max(n,o,h,d),Math.max(a,l,u,c),r)}function I(t,e,i,s){let r=e*s[0]/2,n=e*s[1]/2,a=Math.cos(i),o=Math.sin(i),l=r*a,h=r*o,u=n*a,d=n*o,c=t[0],g=t[1];return[c-l+d,g-h-u,c-l-d,g-h+u,c+l-d,g+h+u,c+l+d,g+h-u,c-l+d,g-h-u]}function T(t){return t[3]-t[1]}function A(t,e,i){let s=i||c();return G(t,e)?(t[0]>e[0]?s[0]=t[0]:s[0]=e[0],t[1]>e[1]?s[1]=t[1]:s[1]=e[1],t[2]<e[2]?s[2]=t[2]:s[2]=e[2],t[3]<e[3]?s[3]=t[3]:s[3]=e[3]):f(s),s}function L(t){return[t[0],t[3]]}function N(t){return[t[2],t[3]]}function F(t){return t[2]-t[0]}function G(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function O(t){return t[2]<t[0]||t[3]<t[1]}function D(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,s){let r=!1,n=u(t,e),a=u(t,s);if(n===i.default.INTERSECTING||a===i.default.INTERSECTING)r=!0;else{let o,l,h=t[0],u=t[1],d=t[2],c=t[3],g=e[0],f=e[1],p=s[0],_=s[1],m=(_-f)/(p-g);a&i.default.ABOVE&&!(n&i.default.ABOVE)&&(r=(o=p-(_-c)/m)>=h&&o<=d),r||!(a&i.default.RIGHT)||n&i.default.RIGHT||(r=(l=_-(p-d)*m)>=u&&l<=c),r||!(a&i.default.BELOW)||n&i.default.BELOW||(r=(o=p-(_-u)/m)>=h&&o<=d),r||!(a&i.default.LEFT)||n&i.default.LEFT||(r=(l=_-(p-h)*m)>=u&&l<=c)}return r}function j(t,e,i,s){let r,n;if(O(t))return f(i);let a=[];if(s>1){let e=t[2]-t[0],i=t[3]-t[1];for(let r=0;r<s;++r)a.push(t[0]+e*r/s,t[1],t[2],t[1]+i*r/s,t[2]-e*r/s,t[3],t[0],t[3]-i*r/s)}else a=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(a,a,2);let o=[],l=[];for(let t=0,e=a.length;t<e;t+=2)o.push(a[t]),l.push(a[t+1]);return r=Math.min.apply(null,o),n=Math.min.apply(null,l),g(r,n,Math.max.apply(null,o),Math.max.apply(null,l),i)}function B(t,e){let i=e.getExtent(),s=C(t);if(e.canWrapX()&&(s[0]<i[0]||s[0]>=i[2])){let e=F(i),r=Math.floor((s[0]-i[0])/e)*e;t[0]-=r,t[2]-=r}return t}function z(t,e,i){if(e.canWrapX()){let s=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[s[0],t[1],s[2],t[3]]];B(t,e);let r=F(s);if(F(t)>r&&!i)return[[s[0],t[1],s[2],t[3]]];if(t[0]<s[0])return[[t[0]+r,t[1],s[2],t[3]],[s[0],t[1],t[2],t[3]]];if(t[2]>s[2])return[[t[0],t[1],s[2],t[3]],[s[0],t[1],t[2]-r,t[3]]]}return[t]}}),x("iweSO",function(t,e){d(t.exports,"default",()=>i);var i={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}}),x("lwtpg",function(t,e){d(t.exports,"default",()=>l);var i=y("fnScq"),s=y("eJ4LZ"),r=y("a6roo"),n=y("lVQul"),a=y("7xQTT");class o extends i.default{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;let e=Object.assign({},t);"object"==typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[a.default.OPACITY]=void 0!==t.opacity?t.opacity:1,(0,s.assert)("number"==typeof e[a.default.OPACITY],"Layer opacity must be a number"),e[a.default.VISIBLE]=void 0===t.visible||t.visible,e[a.default.Z_INDEX]=t.zIndex,e[a.default.MAX_RESOLUTION]=void 0!==t.maxResolution?t.maxResolution:1/0,e[a.default.MIN_RESOLUTION]=void 0!==t.minResolution?t.minResolution:0,e[a.default.MIN_ZOOM]=void 0!==t.minZoom?t.minZoom:-1/0,e[a.default.MAX_ZOOM]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}
1getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){let e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=(0,r.clamp)(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return(0,n.abstract)()}getLayerStatesArray(t){return(0,n.abstract)()}getExtent(){return this.get(a.default.EXTENT)}getMaxResolution(){return this.get(a.default.MAX_RESOLUTION)}getMinResolution(){return this.get(a.default.MIN_RESOLUTION)}getMinZoom(){return this.get(a.default.MIN_ZOOM)}getMaxZoom(){return this.get(a.default.MAX_ZOOM)}getOpacity(){return this.get(a.default.OPACITY)}getSourceState(){return(0,n.abstract)()}getVisible(){return this.get(a.default.VISIBLE)}getZIndex(){return this.get(a.default.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(a.default.EXTENT,t)}setMaxResolution(t){this.set(a.default.MAX_RESOLUTION,t)}setMinResolution(t){this.set(a.default.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(a.default.MAX_ZOOM,t)}setMinZoom(t){this.set(a.default.MIN_ZOOM,t)}setOpacity(t){(0,s.assert)("number"==typeof t,"Layer opacity must be a number"),this.set(a.default.OPACITY,t)}setVisible(t){this.set(a.default.VISIBLE,t)}setZIndex(t){this.set(a.default.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}var l=o}),x("a6roo",function(t,e){function i(t,e,i){return Math.min(Math.max(t,e),i)}function s(t,e,i,s,n,a){let o=n-i,l=a-s;if(0!==o||0!==l){let r=((t-i)*o+(e-s)*l)/(o*o+l*l);r>1?(i=n,s=a):r>0&&(i+=o*r,s+=l*r)}return r(t,e,i,s)}function r(t,e,i,s){let r=i-t,n=s-e;return r*r+n*n}function n(t){let e=t.length;for(let i=0;i<e;i++){let s=i,r=Math.abs(t[i][i]);for(let n=i+1;n<e;n++){let e=Math.abs(t[n][i]);e>r&&(r=e,s=n)}if(0===r)return null;let n=t[s];t[s]=t[i],t[i]=n;for(let s=i+1;s<e;s++){let r=-t[s][i]/t[i][i];for(let n=i;n<e+1;n++)i==n?t[s][n]=0:t[s][n]+=r*t[i][n]}}let i=Array(e);for(let s=e-1;s>=0;s--){i[s]=t[s][e]/t[s][s];for(let r=s-1;r>=0;r--)t[r][e]-=t[r][s]*i[s]}return i}function a(t){return 180*t/Math.PI}function o(t){return t*Math.PI/180}function l(t,e){let i=t%e;return i*e<0?i+e:i}function h(t,e,i){return t+i*(e-t)}function u(t,e){let i=Math.pow(10,e);return Math.round(t*i)/i}function c(t,e){return Math.floor(u(t,e))}function g(t,e){return Math.ceil(u(t,e))}function f(t,e,i){if(t>=e&&t<i)return t;let s=i-e;return((t-e)%s+s)%s+e}d(t.exports,"clamp",()=>i),d(t.exports,"squaredSegmentDistance",()=>s),d(t.exports,"squaredDistance",()=>r),d(t.exports,"solveLinearSystem",()=>n),d(t.exports,"toDegrees",()=>a),d(t.exports,"toRadians",()=>o),d(t.exports,"modulo",()=>l),d(t.exports,"lerp",()=>h),d(t.exports,"toFixed",()=>u),d(t.exports,"floor",()=>c),d(t.exports,"ceil",()=>g),d(t.exports,"wrap",()=>f)}),x("7xQTT",function(t,e){d(t.exports,"default",()=>i);var i={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"}}),x("es3WD",function(t,e){d(t.exports,"init",()=>u),d(t.exports,"forward",()=>c),d(t.exports,"inverse",()=>g),d(t.exports,"names",()=>f),d(t.exports,"default",()=>p);var i=y("5BH1M"),s=y("63eZQ"),r=y("9ijWS"),n=y("lDRbx"),a=y("cMuZ8"),o=y("hcIfS"),l=y("30KR7"),h=y("kEf05");function u(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(i.default.init.apply(this),this.forward=i.default.forward,this.inverse=i.default.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),s=e;this.cgb[0]=e*(2+e*(-2/3+e*(-2+e*(116/45+e*(26/45+-2854/675*e))))),this.cbg[0]=e*(-2+e*(2/3+e*(4/3+e*(-82/45+e*(32/45+4642/4725*e))))),s*=e,this.cgb[1]=s*(7/3+e*(-1.6+e*(-227/45+e*(2704/315+2323/945*e)))),this.cbg[1]=s*(5/3+e*(-16/15+e*(-13/9+e*(904/315+-1522/945*e)))),s*=e,this.cgb[2]=s*(56/15+e*(-136/35+e*(-1262/105+73814/2835*e))),this.cbg[2]=s*(-26/15+e*(34/21+e*(1.6+-12686/2835*e))),s*=e,this.cgb[3]=s*(4279/630+e*(-332/35+-399572/14175*e)),this.cbg[3]=s*(1237/630+e*(-2.4+-24832/14175*e)),s*=e,this.cgb[4]=s*(4174/315+-144838/6237*e),this.cbg[4]=s*(-734/315+109598/31185*e),s*=e,this.cgb[5]=601676/22275*s,this.cbg[5]=444337/155925*s,s=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+s*(1/4+s*(1/64+s/256))),this.utg[0]=e*(-.5+e*(2/3+e*(-37/96+e*(1/360+e*(81/512+-96199/604800*e))))),this.gtu[0]=e*(.5+e*(-2/3+e*(5
1/16+e*(41/180+e*(-127/288+7891/37800*e))))),this.utg[1]=s*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+1118711/3870720*e)))),this.gtu[1]=s*(13/48+e*(-.6+e*(557/1440+e*(281/630+-1983433/1935360*e)))),s*=e,this.utg[2]=s*(-17/480+e*(37/840+e*(209/4480+-5569/90720*e))),this.gtu[2]=s*(61/240+e*(-103/140+e*(15061/26880+167603/181440*e))),s*=e,this.utg[3]=s*(-4397/161280+e*(11/504+830251/7257600*e)),this.gtu[3]=s*(49561/161280+e*(-179/168+6601661/7257600*e)),s*=e,this.utg[4]=s*(-4583/161280+108847/3991680*e),this.gtu[4]=s*(34729/80640+-3418889/1995840*e),s*=e,this.utg[5]=-0x13b12f5/0x26115000*s,this.gtu[5]=.6650675310896665*s;var r=(0,a.default)(this.cbg,this.lat0);this.Zb=-this.Qn*(r+(0,o.default)(this.gtu,2*r))}function c(t){var e,i,s=(0,h.default)(t.x-this.long0,this.over),o=t.y,u=Math.sin(o=(0,a.default)(this.cbg,o)),d=Math.cos(o),c=Math.sin(s),g=Math.cos(s);o=Math.atan2(u,g*d),s=Math.atan2(c*d,(0,r.default)(u,d*g)),s=(0,n.default)(Math.tan(s));var f=(0,l.default)(this.gtu,2*o,2*s);return o+=f[0],2.623395162778>=Math.abs(s+=f[1])?(e=this.a*(this.Qn*s)+this.x0,i=this.a*(this.Qn*o+this.Zb)+this.y0):(e=1/0,i=1/0),t.x=e,t.y=i,t}function g(t){var e,i,n=(t.x-this.x0)*(1/this.a),o=(t.y-this.y0)*(1/this.a);if(o=(o-this.Zb)/this.Qn,2.623395162778>=Math.abs(n/=this.Qn)){var u=(0,l.default)(this.utg,2*o,2*n);o+=u[0],n+=u[1],n=Math.atan((0,s.default)(n));var d=Math.sin(o),c=Math.cos(o),g=Math.sin(n),f=Math.cos(n);o=Math.atan2(d*f,(0,r.default)(g,f*c)),n=Math.atan2(g,f*c),e=(0,h.default)(n+this.long0,this.over),i=(0,a.default)(this.cgb,o)}else e=1/0,i=1/0;return t.x=e,t.y=i,t}var f=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"],p={init:u,forward:c,inverse:g,names:f}}),x("5BH1M",function(t,e){d(t.exports,"default",()=>l);var i=y("lz6WA"),s=y("8GYcG"),r=y("6NyiU"),n=y("kEf05"),a=y("7M1Nv"),o=y("SsFAj"),l={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=(0,i.default)(this.es),this.ml0=(0,s.default)(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var e,i,r=t.x,o=t.y,l=(0,n.default)(r-this.long0,this.over),h=Math.sin(o),u=Math.cos(o);if(this.es){var d=u*l,c=Math.pow(d,2),g=this.ep2*Math.pow(u,2),f=Math.pow(g,2),p=Math.pow(Math.abs(u)>a.EPSLN?Math.tan(o):0,2),_=Math.pow(p,2);d/=Math.sqrt(1-this.es*Math.pow(h,2));var m=(0,s.default)(o,h,u,this.en);e=this.a*(this.k0*d*(1+c/6*(1-p+g+c/20*(5-18*p+_+14*g-58*p*g+c/42*(61+179*_-_*p-479*p)))))+this.x0,i=this.a*(this.k0*(m-this.ml0+h*l*d/2*(1+c/12*(5-p+9*g+4*f+c/30*(61+_-58*p+270*g-330*p*g+c/56*(1385+543*_-_*p-3111*p))))))+this.y0}else{var y=u*Math.sin(l);if(Math.abs(Math.abs(y)-1)<a.EPSLN)return 93;if(e=.5*this.a*this.k0*Math.log((1+y)/(1-y))+this.x0,(y=Math.abs(i=u*Math.cos(l)/Math.sqrt(1-Math.pow(y,2))))>=1)if(y-1>a.EPSLN)return 93;else i=0;else i=Math.acos(i);o<0&&(i=-i),i=this.a*this.k0*(i-this.lat0)+this.y0}return t.x=e,t.y=i,t},inverse:function(t){var e,i,s,l,h=(t.x-this.x0)*(1/this.a),u=(t.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+u/this.k0,Math.abs(i=(0,r.default)(e,this.es,this.en))<a.HALF_PI){var d=Math.sin(i),c=Math.cos(i),g=Math.abs(c)>a.EPSLN?Math.tan(i):0,f=this.ep2*Math.pow(c,2),p=Math.pow(f,2),_=Math.pow(g,2),m=Math.pow(_,2),y=h*Math.sqrt(e=1-this.es*Math.pow(d,2))/this.k0,x=Math.pow(y,2);e*=g,s=i-e*x/(1-this.es)*.5*(1-x/12*(5+3*_-9*f*_+f-4*p-x/30*(61+90*_-252*f*_+45*m+46*f-x/56*(1385+3633*_+4095*m+1574*m*_)))),l=(0,n.default)(this.long0+y*(1-x/6*(1+2*_+f-x/20*(5+28*_+24*m+8*f*_+6*f-x/42*(61+662*_+1320*m+720*m*_))))/c,this.over)}else s=a.HALF_PI*(0,o.default)(u),l=0;else{var S=Math.exp(h/this.k0),v=.5*(S-1/S),w=Math.cos(this.lat0+u/this.k0);s=Math.asin(e=Math.sqrt((1-Math.pow(w,2))/(1+Math.pow(v,2)))),u<0&&(s=-s),l=0===v&&0===w?0:(0,n.default)(Math.atan2(v,w)+this.long0,this.over)}return t.x=l,t.y=s,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]}}),x("lz6WA",function(t,e){d(t.exports,"default",()=>i);function i(t){var e=[];e[0]=1-t*(.25+t*(.046875+t*(.01953125+.01068115234375*t))),e[1]=t*(.75-t*(.046875+t*(.01953125+.01068115234375*t)));var i=t*t;return e[2]=i*(.46875-t*(.013020833333333334+.007120768229166667*t)),i*=t,e[3]=i*(.3645833333333333-.005696614583333333*t),e[4]=i*t*.3076171875,e}}),x("8GYcG",function(t,e){d(t.exports,"default",()=>i);function i(t,e,i,s){return i*=e,e*=e,s[0]*t-i*(s[1]+e*(s[2]+e*(s[3]+e*s[4])))}}),x("6NyiU",function(t,e){d(t.exports,"default",()=>r);var i=y("8GYcG"),s=y("7M1Nv");function r(t,e,r){for(var n=1/(1-e),a=t,o=20;o;--o){var l=Math.sin(a),h=1-e*l*l;if(h=((0,i.default)(a,l,Math.cos(a),r)-t)*(h*Math.sqrt(h))*n,a-=h,Math.abs(h)<s.EPSLN)break}return a}}),x("7M1Nv",function(t,e){d(t.exports,"PJD_3PARAM",()=>i),d(t.exports,"PJD_7PARAM",()=>s),d(t.exports,"PJD_GRIDSHIFT",()=>r),d(t.exports,"PJD_WGS84",()=>
1n),d(t.exports,"PJD_NODATUM",()=>a),d(t.exports,"SRS_WGS84_SEMIMAJOR",()=>o),d(t.exports,"SRS_WGS84_SEMIMINOR",()=>l),d(t.exports,"SRS_WGS84_ESQUARED",()=>h),d(t.exports,"SEC_TO_RAD",()=>u),d(t.exports,"HALF_PI",()=>c),d(t.exports,"SIXTH",()=>g),d(t.exports,"RA4",()=>f),d(t.exports,"RA6",()=>p),d(t.exports,"EPSLN",()=>_),d(t.exports,"D2R",()=>m),d(t.exports,"R2D",()=>y),d(t.exports,"FORTPI",()=>x),d(t.exports,"TWO_PI",()=>S),d(t.exports,"SPI",()=>v);var i=1,s=2,r=3,n=4,a=5,o=6378137,l=6356752.314,h=.0066943799901413165,u=484813681109536e-20,c=Math.PI/2,g=.16666666666666666,f=.04722222222222222,p=.022156084656084655,_=1e-10,m=.017453292519943295,y=57.29577951308232,x=Math.PI/4,S=2*Math.PI,v=3.14159265359}),x("kEf05",function(t,e){d(t.exports,"default",()=>r);var i=y("7M1Nv"),s=y("SsFAj");function r(t,e){return e||Math.abs(t)<=i.SPI?t:t-(0,s.default)(t)*i.TWO_PI}}),x("SsFAj",function(t,e){d(t.exports,"default",()=>i);function i(t){return t<0?-1:1}}),x("63eZQ",function(t,e){d(t.exports,"default",()=>i);function i(t){var e=Math.exp(t);return(e-1/e)/2}}),x("9ijWS",function(t,e){d(t.exports,"default",()=>i);function i(t,e){var i=Math.max(t=Math.abs(t),e=Math.abs(e)),s=Math.min(t,e)/(i||1);return i*Math.sqrt(1+Math.pow(s,2))}}),x("lDRbx",function(t,e){d(t.exports,"default",()=>r);var i=y("9ijWS"),s=y("jZ7FQ");function r(t){var e=Math.abs(t);return e=(0,s.default)(e*(1+e/((0,i.default)(1,e)+1))),t<0?-e:e}}),x("jZ7FQ",function(t,e){d(t.exports,"default",()=>i);function i(t){var e=1+t,i=e-1;return 0===i?t:t*Math.log(e)/i}}),x("cMuZ8",function(t,e){d(t.exports,"default",()=>i);function i(t,e){for(var i,s=2*Math.cos(2*e),r=t.length-1,n=t[r],a=0;--r>=0;)i=-a+s*n+t[r],a=n,n=i;return e+i*Math.sin(2*e)}}),x("hcIfS",function(t,e){d(t.exports,"default",()=>i);function i(t,e){for(var i,s=2*Math.cos(e),r=t.length-1,n=t[r],a=0;--r>=0;)i=-a+s*n+t[r],a=n,n=i;return Math.sin(e)*i}}),x("30KR7",function(t,e){d(t.exports,"default",()=>r);var i=y("63eZQ"),s=y("em6GO");function r(t,e,r){for(var n,a,o=Math.sin(e),l=Math.cos(e),h=(0,i.default)(r),u=(0,s.default)(r),d=2*l*u,c=-2*o*h,g=t.length-1,f=t[g],p=0,_=0,m=0;--g>=0;)n=_,a=p,f=-n+d*(_=f)-c*(p=m)+t[g],m=-a+c*_+d*p;return[(d=o*u)*f-(c=l*h)*m,d*m+c*f]}}),x("em6GO",function(t,e){d(t.exports,"default",()=>i);function i(t){var e=Math.exp(t);return(e+1/e)/2}}),x("9v6gR",function(t,e){d(t.exports,"S_POLE",()=>n),d(t.exports,"N_POLE",()=>a),d(t.exports,"EQUIT",()=>o),d(t.exports,"OBLIQ",()=>l),d(t.exports,"init",()=>h),d(t.exports,"forward",()=>u),d(t.exports,"inverse",()=>c),d(t.exports,"names",()=>g),d(t.exports,"default",()=>f);var i=y("7M1Nv"),s=y("iVfS2"),r=y("kEf05"),n=1,a=2,o=3,l=4;function h(){var t,e,r,h,u=Math.abs(this.lat0);if(Math.abs(u-i.HALF_PI)<i.EPSLN?this.mode=this.lat0<0?n:a:Math.abs(u)<i.EPSLN?this.mode=o:this.mode=l,this.es>0){switch(this.qp=(0,s.default)(this.e,1),this.mmf=.5/(1-this.es),this.apa=(t=this.es,(r=[])[0]=.3333333333333333*t,e=t*t,r[0]+=.17222222222222222*e,r[1]=.06388888888888888*e,e*=t,r[0]+=.10257936507936508*e,r[1]+=.0664021164021164*e,r[2]=.016415012942191543*e,r),this.mode){case a:case n:this.dd=1;break;case o:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case l:this.rq=Math.sqrt(.5*this.qp),h=Math.sin(this.lat0),this.sinb1=(0,s.default)(this.e,h)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*h*h)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}}else this.mode===l&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function u(t){var e,n,a,o,l,h,u,d,c,g,f=t.x,p=t.y;if(f=(0,r.default)(f-this.long0,this.over),this.sphere){if(l=Math.sin(p),g=Math.cos(p),a=Math.cos(f),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((n=this.mode===this.EQUIT?1+g*a:1+this.sinph0*l+this.cosph0*g*a)<=i.EPSLN)return null;e=(n=Math.sqrt(2/n))*g*Math.sin(f),n*=this.mode===this.EQUIT?l:this.cosph0*l-this.sinph0*g*a}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(a=-a),Math.abs(p+this.lat0)<i.EPSLN)return null;n=i.FORTPI-.5*p,e=(n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)))*Math.sin(f),n*=a}}else{switch(u=0,d=0,c=0,a=Math.cos(f),o=Math.sin(f),l=Math.sin(p),h=(0,s.default)(this.e,l),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(d=Math.sqrt(1-(u=h/this.qp)*u)),this.mode){case this.OBLIQ:c=1+this.sinb1*u+this.cosb1*d*a;break;case this.EQUIT:c=1+d*a;break;case this.N_POLE:c=i.HALF_PI+p,h=this.qp-h;break;case this.S_POLE:c=p-i.HALF_PI,h=this.qp+h}if(Math.abs(c)<i.EPSLN)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:c=Math.sqrt(2/c),n=this.mode===this.OBLIQ?this.ymf*c*(this.cosb1*u-this.sinb1*d*a):(c=Math.sqrt(2/(1+d*a)))*u*this.ymf,e=this.xmf*c*d*o;break;case this.N_POLE:case this.S_POLE:h>=0?(e=(c=Math.sqrt(h))*o,n=a*(this.mode===this.S_POLE?c:-c)):e=n=0}}return t.x=this.a*e+this.x0,t.y=this.a*n+this.y0,t}function c(t){t.x-=this.x0,t.y-=this.y0;var e,s,n,a=t.x/this.a,o=t.y/this.a;if(this.sphere){var l,h,u,d,c,g,f,p,_=0,m=0;if((h=.5*(p=Math.sqrt(a*a+o*o)))>1)return null;switch(h=2*Math.asin(h),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(m=Math.sin(h),_=Math.cos(h)),this.mode){case this.EQUIT:h=Math.abs(p)<=i.EPSLN?0:Math.asin(o*m/p),a*=m,o=_*p;break;case this.OBLIQ:h=Math.abs(p)<=i.EPSLN?this.lat0:Math.asin(_*this.sinph0+o*m*this.cosph0/p),a*=m*this.cosph0,o=(_-Math.sin(h)*this.sinph0)*p;break;case this.N_POLE:o=-o,h=i.HALF_PI-h;break;case this.S_POLE:h-=i.HALF_PI}l=0===o&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(a,o)}else{if(f=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(a/=this.dd,o*=this.dd,(g=Math.sqrt(a*a+o*o))<i.EPSLN)return t.x=this.long0,t.y=this.lat0,t;u=Math.cos(d=2*Math.asin(.5*g/this.rq)),a*=d=Math.sin(d),this.mode===this.OBLIQ?(f=u*this.sinb1+o*d*this.cosb1/g,c=this.qp*f,o=g*this.cosb1*u-o*this.sinb1*d):(f=o*d/g,c=this.qp*f,o=g*u)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(o=-o),!(c=a*a+o*o))return t.x=this.long0,t.y=this.lat0,t;f=1-c/this.qp,this.mode===this.S_POLE&&(f=-f)}l=Math.atan2(a,o),e=Math.asin(f),s=this.apa,n=e+e,h=e+s[0]*Math.sin(n)+s[1]*Math.sin(n+n)+s[2]*Math.sin(n+n+n)}return t.x=(0,r.default)(this.long0+l,this.over),t.y=h,t}
1var g=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],f={init:h,forward:u,inverse:c,names:g,S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4}}),x("iVfS2",function(t,e){d(t.exports,"default",()=>i);function i(t,e){var i;return t>1e-7?(i=t*e,(1-t*t)*(e/(1-i*i)-.5/t*Math.log((1-i)/(1+i)))):2*e}}),x("aYCax",function(t,e){d(t.exports,"init",()=>o),d(t.exports,"forward",()=>l),d(t.exports,"inverse",()=>h),d(t.exports,"phi1z",()=>u),d(t.exports,"names",()=>c),d(t.exports,"default",()=>g);var i=y("1gqnK"),s=y("iVfS2"),r=y("kEf05"),n=y("bp9ph"),a=y("7M1Nv");function o(){Math.abs(this.lat1+this.lat2)<a.EPSLN||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=(0,i.default)(this.e3,this.sin_po,this.cos_po),this.qs1=(0,s.default)(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=(0,i.default)(this.e3,this.sin_po,this.cos_po),this.qs2=(0,s.default)(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=(0,s.default)(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>a.EPSLN?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function l(t){var e=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=(0,s.default)(this.e3,this.sin_phi),a=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*(0,r.default)(e-this.long0,this.over),l=a*Math.sin(o)+this.x0,h=this.rh-a*Math.cos(o)+this.y0;return t.x=l,t.y=h,t}function h(t){var e,i,s,n,a;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),s=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),s=-1),n=0,0!==e&&(n=Math.atan2(s*t.x,s*t.y)),s=e*this.ns0/this.a,this.sphere?a=Math.asin((this.c-s*s)/(2*this.ns0)):(i=(this.c-s*s)/this.ns0,a=this.phi1z(this.e3,i)),t.x=(0,r.default)(n/this.ns0+this.long0,this.over),t.y=a,t}function u(t,e){var i,s,r,o,l,h=(0,n.default)(.5*e);if(t<a.EPSLN)return h;for(var u=t*t,d=1;d<=25;d++)if(i=Math.sin(h),s=Math.cos(h),h+=l=.5*(o=1-(r=t*i)*r)*o/s*(e/(1-u)-i/o+.5/t*Math.log((1-r)/(1+r))),1e-7>=Math.abs(l))return h;return null}var c=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"],g={init:o,forward:l,inverse:h,names:c,phi1z:u}}),x("1gqnK",function(t,e){d(t.exports,"default",()=>i);function i(t,e,i){var s=t*e;return i/Math.sqrt(1-s*s)}}),x("bp9ph",function(t,e){d(t.exports,"default",()=>i);function i(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}}),x("fQxFh",function(t,e){d(t.exports,"iterations",()=>s),d(t.exports,"init",()=>r),d(t.exports,"forward",()=>n),d(t.exports,"inverse",()=>a),d(t.exports,"names",()=>o),d(t.exports,"default",()=>l);var i=y("7M1Nv"),s=1;function r(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function n(t){var e,s,r,n=t.x,a=t.y-this.lat0,o=n-this.long0,l=a/i.SEC_TO_RAD*1e-5,h=1,u=0;for(e=1;e<=10;e++)h*=l,u+=this.A[e]*h;var d=u,c=1,g=0,f=0,p=0;for(e=1;e<=6;e++)s=c*d-g*o,r=g*d+c*o,c=s,g=r,f=f+this.B_re[e]*c-this.B_im[e]*g,p=p+this.B_im[e]*c+this.B_re[e]*g;return t.x=p*this.a+this.x0,t.y=f*this.a+this.y0,t}function a(t){var e=t.x,s=t.y,r=e-this.x0,n=(s-this.y0)/this.a,a=r/this.a,o=1,l=0,h=0,u=0;for(c=1;c<=6;c++)g=o*n-l*a,f=l*n+o*a,o=g,l=f,h=h+this.C_re[c]*o-this.C_im[c]*l,u=u+this.C_im[c]*o+this.C_re[c]*l;for(var d=0;d<this.iterations;d++){var c,g,f,p,_,m=h,y=u,x=n,S=a;for(c=2;c<=6;c++)p=m*h-y*u,_=y*h+m*u,m=p,y=_,x+=(c-1)*(this.B_re[c]*m-this.B_im[c]*y),S+=(c-1)*(this.B_im[c]*m+this.B_re[c]*y);m=1,y=0;var v=this.B_re[1],w=this.B_im[1];for(c=2;c<=6;c++)p=m*h-y*u,_=y*h+m*u,m=p,y=_,v+=c*(this.B_re[c]*m-this.B_im[c]*y),w+=c*(this.B_im[c]*m+this.B_re[c]*y);var E=v*v+w*w;h=(x*v+S*w)/E,u=(S*v-x*w)/E}var M=h,P=u,C=1,b=0;for(c=1;c<=9;c++)C*=M,b+=this.D[c]*C;var R=this.lat0+b*i.SEC_TO_RAD*1e5;return t.x=this.long0+P,t.y=R,t}
1var o=["New_Zealand_Map_Grid","nzmg"],l={init:r,forward:n,inverse:a,names:o}}),x("VCbYw",function(t,e){u(t.exports),d(t.exports,"default",()=>p);var i=y("2u1lG"),s=y("fnScq"),r=y("erROg"),n=y("cgxQK"),a=y("bsgMw"),o=y("jZquI");let l="element",h="offset",c="position",g="positioning";class f extends s.default{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=void 0===t.insertFirst||t.insertFirst,this.stopEvent=void 0===t.stopEvent||t.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==t.className?t.className:"ol-overlay-container "+r.CLASS_SELECTABLE,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=!0===t.autoPan?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(l,this.handleElementChanged),this.addChangeListener("map",this.handleMapChanged),this.addChangeListener(h,this.handleOffsetChanged),this.addChangeListener(c,this.handlePositionChanged),this.addChangeListener(g,this.handlePositioningChanged),void 0!==t.element&&this.setElement(t.element),this.setOffset(void 0!==t.offset?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),void 0!==t.position&&this.setPosition(t.position)}getElement(){return this.get(l)}getId(){return this.id}getMap(){return this.get("map")||null}getOffset(){return this.get(h)}getPosition(){return this.get(c)}getPositioning(){return this.get(g)}handleElementChanged(){(0,n.removeChildren)(this.element);let t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&(this.element?.remove(),(0,a.unlistenByKey)(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);let t=this.getMap();if(t){this.mapPostrenderListenerKey=(0,a.listen)(t,i.default.POSTRENDER,this.render,this),this.updatePixelPosition();let e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(t){this.set(l,t)}setMap(t){this.set("map",t)}setOffset(t){this.set(h,t)}setPosition(t){this.set(c,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){let e=this.getMap();if(!e||!e.getTargetElement()||!this.get(c))return;let i=this.getRect(e.getTargetElement(),e.getSize()),s=this.getElement(),r=this.getRect(s,[(0,n.outerWidth)(s),(0,n.outerHeight)(s)]),a=void 0===(t=t||{}).margin?20:t.margin;if(!(0,o.containsExtent)(i,r)){let s=r[0]-i[0],n=i[2]-r[2],o=r[1]-i[1],l=i[3]-r[3],h=[0,0];if(s<0?h[0]=s-a:n<0&&(h[0]=Math.abs(n)+a),o<0?h[1]=o-a:l<0&&(h[1]=Math.abs(l)+a),0!==h[0]||0!==h[1]){let i=e.getView().getCenterInternal(),s=e.getPixelFromCoordinateInternal(i);if(!s)return;let r=[s[0]+h[0],s[1]+h[1]],n=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(r),duration:n.duration,easing:n.easing})}}}getRect(t,e){let i=t.getBoundingClientRect(),s=i.left+window.pageXOffset,r=i.top+window.pageYOffset;return[s,r,s+e[0],r+e[1]]}setPositioning(t){this.set(g,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){let t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e)return void this.setVisible(!1);let i=t.getPixelFromCoordinate(e),s=t.getSize();this.updateRenderedPosition(i,s)}updateRenderedPosition(t,e){let i=this.element.style,s=this.getOffset(),r=this.getPositioning();this.setVisible(!0);let n=`${t[0]+s[0]}px`,a=`${t[1]+s[1]}px`,o="0%",l="0%";"bottom-right"==r||"center-right"==r||"top-right"==r?o="-100%":("bottom-center"==r||"center-center"==r||"top-center"==r)&&(o="-50%"),"bottom-left"==r||"bottom-center"==r||"bottom-right"==r?l="-100%":("center-left"==r||"center-center"==r||"center-right"==r)&&(l="-50%");let h=`translate(${o}, ${l}) translate(${n}, ${a})`;this.rendered.transform_!=h&&(this.rendered.transform_=h,i.transform=h)}getOptions(){return this.options}}var p=f}),x("erROg",function(t,e){d(t.exports,"CLASS_HIDDEN",()=>i),d(t.exports,"CLASS_SELECTABLE",()=>s),d(t.exports,"CLASS_UNSELECTABLE",()=>r),d(t.exports,"CLASS_UNSUPPORTED",()=>n),d(t.exports,"CLASS_CONTROL",()=>a),d(t.exports,"CLASS_COLLAPSED",()=>o),d(t.exports,"fontWeights",()=>u),d(t.exports,"getFontParameters",()=>c);let i="ol-hidden",s="ol-selectable",r="ol-unselectable",n="ol-unsupported",a="ol-control",o="ol-collapsed",l=RegExp("^\\s*(?=(?
1:(?:[-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-z0-9]+?)\\s*$","i"),h=["style","variant","weight","size","lineHeight","family"],u={normal:400,bold:700},c=function(t){let e=t.match(l);if(!e)return null;let i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"400",variant:"normal"};for(let t=0,s=h.length;t<s;++t){let s=e[t+1];void 0!==s&&(i[h[t]]="string"==typeof s?s.trim():s)}return isNaN(Number(i.weight))&&i.weight in u&&(i.weight=u[i.weight]),i.families=i.family.split(/,\s?/).map(t=>t.trim().replace(/^['"]|['"]$/g,"")),i}}),x("cgxQK",function(t,e){let i;d(t.exports,"createCanvasContext2D",()=>r),d(t.exports,"getSharedCanvasContext2D",()=>n),d(t.exports,"releaseCanvas",()=>a),d(t.exports,"outerWidth",()=>o),d(t.exports,"outerHeight",()=>l),d(t.exports,"replaceNode",()=>h),d(t.exports,"removeChildren",()=>u),d(t.exports,"replaceChildren",()=>c),d(t.exports,"createMockDiv",()=>g),d(t.exports,"isCanvas",()=>f);var s=y("lW8xZ");function r(t,e,i,r){let n;return n=i&&i.length?i.shift():s.WORKER_OFFSCREEN_CANVAS?new class extends OffscreenCanvas{style={}}(t??300,e??150):document.createElement("canvas"),t&&(n.width=t),e&&(n.height=e),n.getContext("2d",r)}function n(){return i||(i=r(1,1)),i}function a(t){let e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function o(t){let e=t.offsetWidth,i=getComputedStyle(t);return e+(parseInt(i.marginLeft,10)+parseInt(i.marginRight,10))}function l(t){let e=t.offsetHeight,i=getComputedStyle(t);return e+(parseInt(i.marginTop,10)+parseInt(i.marginBottom,10))}function h(t,e){let i=e.parentNode;i&&i.replaceChild(t,e)}function u(t){for(;t.lastChild;)t.lastChild.remove()}function c(t,e){let i=t.childNodes;for(let s=0;;++s){let r=i[s],n=e[s];if(!r&&!n)break;if(r!==n){if(!r){t.appendChild(n);continue}if(!n){t.removeChild(r),--s;continue}t.insertBefore(n,r)}}}function g(){return new Proxy({childNodes:[],appendChild:function(t){return this.childNodes.push(t),t},remove:function(){},removeChild:function(t){let e=this.childNodes.indexOf(t);if(-1===e)throw Error("Node to remove was not found");return this.childNodes.splice(e,1),t},insertBefore:function(t,e){let i=this.childNodes.indexOf(e);if(-1===i)throw Error("Reference node not found");return this.childNodes.splice(i,0,t),t},style:{}},{get:(t,e,i)=>"firstElementChild"===e?t.childNodes.length>0?t.childNodes[0]:null:Reflect.get(t,e,i)})}function f(t){return"u">typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"u">typeof OffscreenCanvas&&t instanceof OffscreenCanvas}}),x("lW8xZ",function(t,e){d(t.exports,"WEBKIT",()=>s),d(t.exports,"MAC",()=>r),d(t.exports,"DEVICE_PIXEL_RATIO",()=>n),d(t.exports,"WORKER_OFFSCREEN_CANVAS",()=>a),d(t.exports,"IMAGE_DECODE",()=>o),d(t.exports,"CREATE_IMAGE_BITMAP",()=>l),d(t.exports,"PASSIVE_EVENT_LISTENERS",()=>h);let i="u">typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"";i.includes("safari")&&!i.includes("chrom")&&(i.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(i));let s=i.includes("webkit")&&!i.includes("edge"),r=i.includes("macintosh"),n="u">typeof devicePixelRatio?devicePixelRatio:1,a="u">typeof WorkerGlobalScope&&"u">typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,o="u">typeof Image&&Image.prototype.decode,l="function"==typeof createImageBitmap,h=function(){let t=!1;try{let e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return t}()});var S=y("31ZqB"),v=y("eHnTw"),w=y("iTTi2");class E extends w.default{constructor(t,e,i){super(t),this.map=e,this.frameState=void 0!==i?i:null}}var M=E,P=class extends M{constructor(t,e,i,s,r,n){super(t,e,r),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==s&&s,this.activePointers=n}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}
1get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}},C=y("cw4dl"),b={SINGLECLICK:"singleclick",CLICK:C.default.CLICK,DBLCLICK:C.default.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},C=y("cw4dl"),R=y("9LzRi"),I=y("bsgMw"),T=y("lW8xZ"),A="pointermove",L="pointerdown";class N extends R.default{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===e?1:e,this.down_=null;let i=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=i,this.pointerdownListenerKey_=(0,I.listen)(i,L,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=(0,I.listen)(i,A,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(C.default.TOUCHMOVE,this.boundHandleTouchMove_,!!T.PASSIVE_EVENT_LISTENERS&&{passive:!1})}emulateClick_(t){let e=new P(b.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new P(b.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(()=>{this.clickTimeoutId_=void 0;let e=new P(b.SINGLECLICK,this.map_,t);this.dispatchEvent(e)},250)}updateActivePointers_(t){let e=t.pointerId;if(t.type==b.POINTERUP||t.type==b.POINTERCANCEL){for(let i in delete this.trackedTouches_[e],this.trackedTouches_)if(this.trackedTouches_[i].target!==t.target){delete this.trackedTouches_[i];break}}else(t.type==b.POINTERDOWN||t.type==b.POINTERMOVE)&&(this.trackedTouches_[e]=t);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);let e=new P(b.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(I.unlistenByKey),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);let e=new P(b.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){let t=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,I.listen)(t,b.POINTERMOVE,this.handlePointerMove_,this),(0,I.listen)(t,b.POINTERUP,this.handlePointerUp_,this),(0,I.listen)(this.element_,b.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push((0,I.listen)(this.element_.getRootNode(),b.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;let e=new P(b.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;let e=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new P(b.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){let e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&("boolean"!=typeof t.cancelable||!0===t.cancelable)&&t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&((0,I.unlistenByKey)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(C.default.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,I.unlistenByKey)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(I.unlistenByKey),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}var F=y("2u1lG"),G="layergroup",O="size",D="target",k="view",j=y("fnScq"),B=y("5dXmB"),C=y("cw4dl"),z=y("eJ4LZ"),U=y("kKEgb");let W=1/0;var V=class{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,(0,U.clear)(this.queuedElements_)}dequeue(){let 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));let s=this.keyFunction_(i);return delete this.queuedElements_[s],i}enqueue(t){(0,z.assert)(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");let e=this.priorityFunction_(t);
1return e!=W&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){let e=this.elements_,i=this.priorities_,s=e.length,r=e[t],n=i[t],a=t;for(;t<s>>1;){let r=this.getLeftChildIndex_(t),n=this.getRightChildIndex_(t),a=n<s&&i[n]<i[r]?n:r;e[t]=e[a],i[t]=i[a],t=a}e[t]=r,i[t]=n,this.siftDown_(a,t)}siftDown_(t,e){let i=this.elements_,s=this.priorities_,r=i[e],n=s[e];for(;e>t;){let t=this.getParentIndex_(e);if(s[t]>n)i[e]=i[t],s[e]=s[t],e=t;else break}i[e]=r,s[e]=n}reprioritize(){let t,e,i,s=this.priorityFunction_,r=this.elements_,n=this.priorities_,a=0,o=r.length;for(e=0;e<o;++e)(i=s(t=r[e]))==W?delete this.queuedElements_[this.keyFunction_(t)]:(n[a]=i,r[a++]=t);r.length=a,n.length=a,this.heapify_()}},q=class extends V{constructor(t,e){super(e=>t.apply(null,e),t=>t[0].getKey()),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){let e=super.enqueue(t);return e&&t[0].addEventListener(C.default.CHANGE,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){let e=t.target,i=e.getState();if(2===i||3===i||4===i){3!==i&&e.removeEventListener(C.default.CHANGE,this.boundHandleTileChange_);let t=e.getKey();t in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[t],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let i=0;for(;this.tilesLoading_<t&&i<e&&this.getCount()>0;){let t=this.dequeue()[0],e=t.getKey();0!==t.getState()||e in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[e]=!0,++this.tilesLoading_,++i,t.load())}}},j=y("fnScq"),Z={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},K=y("kBSVF"),z=y("eJ4LZ"),H=y("a6roo");function X(t,e,i){return function(s,r,n,a,o){if(!s)return;if(!r&&!e)return s;let l=e?0:n[0]*r,h=e?0:n[1]*r,u=o?o[0]:0,d=o?o[1]:0,c=t[0]+l/2+u,g=t[2]-l/2+u,f=t[1]+h/2+d,p=t[3]-h/2+d;c>g&&(g=c=(g+c)/2),f>p&&(p=f=(p+f)/2);let _=(0,H.clamp)(s[0],c,g),m=(0,H.clamp)(s[1],f,p);if(a&&i&&r){let t=30*r;_+=-t*Math.log(1+Math.max(0,c-s[0])/t)+t*Math.log(1+Math.max(0,s[0]-g)/t),m+=-t*Math.log(1+Math.max(0,f-s[1])/t)+t*Math.log(1+Math.max(0,s[1]-p)/t)}return[_,m]}}function Y(t){return t}var Q=y("jZquI"),H=y("a6roo");function J(t,e,i){return t?e.replace("{x}",t[0].toFixed(i)).replace("{y}",t[1].toFixed(i)):""}function $(t,e){let i=!0;for(let s=t.length-1;s>=0;--s)if(t[s]!=e[s]){i=!1;break}return i}function tt(t,e){let i=Math.cos(e),s=Math.sin(e),r=t[0]*i-t[1]*s,n=t[1]*i+t[0]*s;return t[0]=r,t[1]=n,t}function te(t,e){if(e.canWrapX()){let i=(0,Q.getWidth)(e.getExtent()),s=ti(t,e,i);s&&(t[0]-=s*i)}return t}function ti(t,e,i){let s=e.getExtent(),r=0;return e.canWrapX()&&(t[0]<s[0]||t[0]>s[2])&&(i=i||(0,Q.getWidth)(s),r=Math.floor((t[0]-s[0])/i)),r}function ts(t){return Math.pow(t,3)}function tr(t){return 1-ts(1-t)}function tn(t){return 3*t*t-2*t*t*t}function ta(t){return t}var Q=y("jZquI"),to=y("eQaCk"),K=y("kBSVF"),Q=y("jZquI"),H=(y("a6roo"),y("a6roo"));function tl(t,e,i){i=i||6371008.8;let s=(0,H.toRadians)(t[1]),r=(0,H.toRadians)(e[1]),n=(r-s)/2,a=(0,H.toRadians)(e[0]-t[0])/2,o=Math.sin(n)*Math.sin(n)+Math.sin(a)*Math.sin(a)*Math.cos(s)*Math.cos(r);return 2*i*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))}var Q=(y("jZquI"),y("jZquI")),th=y("lVQul"),j=y("fnScq"),Q=y("jZquI"),to=y("eQaCk");function tu(...t){console.warn(...t)}var Q=y("jZquI"),H=y("a6roo");let td={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var tc=class{constructor(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}canWrapX(){return this.canWrapX_}
1getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||td[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}};let tg=6378137*Math.PI,tf=[-tg,-tg,tg,tg],tp=[-180,-85,180,85],t_=6378137*Math.log(Math.tan(Math.PI/2));class tm extends tc{constructor(t){super({code:t,units:"m",extent:tf,global:!0,worldExtent:tp,getPointResolution:function(t,e){return t/Math.cosh(e[1]/6378137)}})}}let ty=[new tm("EPSG:3857"),new tm("EPSG:102100"),new tm("EPSG:102113"),new tm("EPSG:900913"),new tm("http://www.opengis.net/def/crs/EPSG/0/3857"),new tm("http://www.opengis.net/gml/srs/epsg.xml#3857")],tx=[-180,-90,180,90],tS=6378137*Math.PI/180;class tv extends tc{constructor(t,e){super({code:t,units:"degrees",extent:tx,axisOrientation:e,global:!0,metersPerUnit:tS,worldExtent:tx})}}let tw=[new tv("CRS:84"),new tv("EPSG:4326","neu"),new tv("urn:ogc:def:crs:OGC:1.3:CRS84"),new tv("urn:ogc:def:crs:OGC:2:84"),new tv("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new tv("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new tv("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],tE={};function tM(t){return tE[t]||tE[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}var U=y("kKEgb");let tP={};function tC(t,e,i){let s=t.getCode(),r=e.getCode();s in tP||(tP[s]={}),tP[s][r]=i}function tb(t,e){return t in tP&&e in tP[t]?tP[t][e]:null}var H=y("a6roo");let tR=Math.sqrt(.99330562),tI=(1-tR)/(1+tR),tT=tI*tI,tA=tT*tI,tL=tA*tI,tN=tL*tI,tF=1.5*tI-27/32*tA+269/512*tN,tG=21/16*tT-55/32*tL,tO=151/96*tA-417/128*tN,tD=1097/512*tL;function tk(t,e,i){let s=(i.north?e:e-1e7)/.9996/6367449.145945056,r=s+tF*Math.sin(2*s)+tG*Math.sin(4*s)+tO*Math.sin(6*s)+tD*Math.sin(8*s),n=Math.sin(r),a=n*n,o=Math.cos(r),l=n/o,h=l*l,u=h*h,d=.006739496752268451*o**2,c=d*d,g=(t-5e5)/(6378137/Math.sqrt(1-.00669438*a)*.9996),f=g*g,p=f*g,_=p*g,m=_*g,y=r-l/(.99330562/(1-.00669438*a))*(f/2-_/24*(5+3*h+10*d-4*c-.06065547077041606))+m*g/720*(61+90*h+298*d+45*u-1.6983531815716497-3*c),x=(g-p/6*(1+2*h+d)+m/120*(5-2*d+28*h-3*c+.05391597401814761+24*u))/o;return x=(0,H.wrap)(x+(0,H.toRadians)(tB(i.number)),-Math.PI,Math.PI),[(0,H.toDegrees)(x),(0,H.toDegrees)(y)]}function tj(t,e,i){t=(0,H.wrap)(t,-180,180),e<-80?e=-80:e>84&&(e=84);let s=(0,H.toRadians)(e),r=Math.sin(s),n=Math.cos(s),a=r/n,o=a*a,l=o*o,h=(0,H.toRadians)(t),u=tB(i.number),d=(0,H.toRadians)(u),c=6378137/Math.sqrt(1-.00669438*r**2),g=.006739496752268451*n**2,f=n*(0,H.wrap)(h-d,-Math.PI,Math.PI),p=f*f,_=p*f,m=_*f,y=m*f,x=.9996*c*(f+_/6*(1-o+g)+y/120*(5-18*o+l+72*g-.39089081163157013))+5e5,S=.9996*(6378137*(.9983242984503243*s-.002514607064228144*Math.sin(2*s)+26390466021299826e-22*Math.sin(4*s)-3418046101696858e-24*Math.sin(6*s))+c*a*(p/2+m/24*(5-o+9*g+4*g**2)+y*f/720*(61-58*o+l+600*g-2.2240339282485886)));return i.north||(S+=1e7),[x,S]}function tB(t){return(t-1)*6-180+3}let tz=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function tU(t){let e=0;for(let i of tz){let s=t.match(i);if(s){e=parseInt(s[1]);break}}if(!e)return null;let i=0,s=!1;return(e>32700&&e<32761?i=e-32700:e>32600&&e<32661&&(s=!0,i=e-32600),i)?{number:i,north:s}:null}function tW(t,e){return function(i,s,r,n){let a=i.length;r=r>1?r:2,n=n??r,s||(s=r>2?i.slice():Array(a));for(let r=0;r<a;r+=n){let n=t(i[r],i[r+1],e);s[r]=n[0],s[r+1]=n[1]}return s}}let tV=[function(t){let e=tU(t.getCode());return e?{forward:tW(tj,e),inverse:tW(tk,e)}:null}],tq=[function(t){return tU(t)?new tc({code:t,units:"m"}):null}],tZ=!0;function tK(t){tZ=!(void 0===t||t)}function tH(t,e){if(void 0!==e)for(let i=0,s=t.length;i<s;++i)e[i]=t[i];else e=t.slice();return e}function tX(t,e){if(void 0!==e&&t!==e){for(let i=0,s=t.length;i<s;++i)e[i]=t[i];t=e}return t}function tY(t){var e;e=t.getCode(),tE[e]=t,tC(t,t,tH)}function tQ(t){if("string"!=typeof t)return t;let e=tM(t);if(e)return e;for(let e of tq){let i=e(t);if(i)return i}return null}function tJ(t,e,i,s){let r,n=(t=tQ(t)).getPointResolutionFunc();if(n){if(r=n(e,i),s&&s!==t.getUnits()){let e=t.getMetersPerUnit();e&&(r=r*e/td[s])}}else{let n=t.getUnits();if(("degrees"!=n||s)&&"degrees"!=s){let a=t3(t,tQ("EPSG:4326"));if(a||"degrees"===n){let t=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];r=(tl((t=a(t,t,2)).slice(0,2),t.slice(2,4))+tl(t.slice(4,6),t.slice(6,8)))/2}else r=e*t.getMetersPerUnit();let o=s?td[s]:t.getMetersPerUnit();void 0!==o&&(r/=o)}else r=e}return r}function t$(t){t.forEach(tY),t.forEach(function(e){t.forEach(function(t){e!==t&&tC(e,t,tH)})})}function t0(t,e){return t?"string"==typeof t?tQ(t):t:tQ(e)}function t1(t){return function(e,i,s,r){let n=e.length;s=void 0!==s?s:2,r=r??s,i=void 0!==i?i:Array(n);for(let a=0;a<n;a+=r){let n=t(e.slice(a,a+s)),o=n.length;for(let t=0,s=r;t<s;++t)i[a+t]=t>=o?e[a+t]:n[t]}return i}}function t2(t,e){return tK(),t6(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function t4(t,e){if(t===e)return!0;let i=t.getUnits()===e.getUnits();return t.getCode()===e.getCode()?i:t3(t,e)===tH&&i}function t3(t,e){let i=t.getCode(),s=e.getCode(),r=tb(i,s);if(r)return r;let n=null,a=null;for(let i of tV)n||(n=i(t)),a||(a=i(e));if(!n&&!a)return null;let o="EPSG:4326";if(a)if(n)r=t8(n.inverse,a.forward);else{let t=tb(i,o);t&&(r=t8(t,a.forward))}else{let t=tb(o,s);t&&(r=t8(n.inverse,t))}return r&&(tY(t),tY(e),tC(t,e,r)),r}
1function t8(t,e){return function(i,s,r,n){return e(s=t(i,s,r,n),s,r,n)}}function t5(t,e){return t3(tQ(t),tQ(e))}function t6(t,e,i){let s=t5(e,i);if(!s){let t=tQ(e).getCode(),s=tQ(i).getCode();throw Error(`No transform available between ${t} and ${s}`)}return s(t,void 0,t.length)}function t7(t,e,i,s){let r=t5(e,i);return(0,Q.applyTransform)(t,r,void 0,s)}function t9(t,e){return tZ&&!$(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(tZ=!1,tu("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function et(t,e,i){return function(s){let r,n;if(t.canWrapX()){let e=t.getExtent(),a=(0,Q.getWidth)(e);(n=ti(s=s.slice(0),t,a))&&(s[0]=s[0]-n*a),s[0]=(0,H.clamp)(s[0],e[0],e[2]),s[1]=(0,H.clamp)(s[1],e[1],e[3]),r=i(s)}else r=i(s);return n&&e.canWrapX()&&(r[0]+=n*(0,Q.getWidth)(e.getExtent())),r}}t$(ty),t$(tw),g=function(t,e,i,s){let r=t.length;i=i>1?i:2,s=s??i,void 0===e&&(e=i>2?t.slice():Array(r));for(let i=0;i<r;i+=s){e[i]=tg*t[i]/180;let s=6378137*Math.log(Math.tan(Math.PI*(+t[i+1]+90)/360));s>t_?s=t_:s<-t_&&(s=-t_),e[i+1]=s}return e},f=function(t,e,i,s){let r=t.length;i=i>1?i:2,s=s??i,void 0===e&&(e=i>2?t.slice():Array(r));for(let i=0;i<r;i+=s)e[i]=180*t[i]/tg,e[i+1]=360*Math.atan(Math.exp(t[i+1]/6378137))/Math.PI-90;return e},tw.forEach(function(t){ty.forEach(function(e){tC(t,e,g),tC(e,t,f)})});var z=y("eJ4LZ");let ee=Array(6);function ei(){return[1,0,0,1,0,0]}function es(t){return en(t,1,0,0,1,0,0)}function er(t,e){let i=t[0],s=t[1],r=t[2],n=t[3],a=t[4],o=t[5],l=e[0],h=e[1],u=e[2],d=e[3],c=e[4],g=e[5];return t[0]=i*l+r*h,t[1]=s*l+n*h,t[2]=i*u+r*d,t[3]=s*u+n*d,t[4]=i*c+r*g+a,t[5]=s*c+n*g+o,t}function en(t,e,i,s,r,n,a){return t[0]=e,t[1]=i,t[2]=s,t[3]=r,t[4]=n,t[5]=a,t}function ea(t,e){let i=e[0],s=e[1];return e[0]=t[0]*i+t[2]*s+t[4],e[1]=t[1]*i+t[3]*s+t[5],e}function eo(t,e,i){return er(t,en(ee,e,0,0,i,0,0))}function el(t,e,i,s,r,n,a,o){let l=Math.sin(n),h=Math.cos(n);return t[0]=s*h,t[1]=r*l,t[2]=-s*l,t[3]=r*h,t[4]=a*s*h-o*s*l+e,t[5]=a*r*l+o*r*h+i,t}function eh(t,e){var i;let s=(i=e)[0]*i[3]-i[1]*i[2];(0,z.assert)(0!==s,"Transformation matrix cannot be inverted");let r=e[0],n=e[1],a=e[2],o=e[3],l=e[4],h=e[5];return t[0]=o/s,t[1]=-n/s,t[2]=-a/s,t[3]=r/s,t[4]=(a*h-o*l)/s,t[5]=-(r*h-n*l)/s,t}let eu=[1e5,1e5,1e5,1e5,2,2];function ed(t){return t.substring(7,t.length-1).split(",").map(parseFloat)}var th=y("lVQul");function ec(t,e,i,s,r,n,a){n=n||[],a=a||2;let o=0;for(let l=e;l<i;l+=s){let e=t[l],i=t[l+1];n[o++]=r[0]*e+r[2]*i+r[4],n[o++]=r[1]*e+r[3]*i+r[5];for(let e=2;e<a;e++)n[o++]=t[l+e]}return n&&n.length!=o&&(n.length=o),n}function eg(t,e,i,s,r,n,a){a=a||[];let o=Math.cos(r),l=Math.sin(r),h=n[0],u=n[1],d=0;for(let r=e;r<i;r+=s){let e=t[r]-h,i=t[r+1]-u;a[d++]=h+e*o-i*l,a[d++]=u+e*l+i*o;for(let e=r+2;e<r+s;++e)a[d++]=t[e]}return a&&a.length!=d&&(a.length=d),a}let ef=ei(),ep=[NaN,NaN];class e_ extends j.default{constructor(){super(),this.extent_=(0,Q.createEmpty)(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=(0,to.memoizeOne)((t,e,i)=>{if(!i)return this.getSimplifiedGeometry(e);let s=this.clone();return s.applyTransform(i),s.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return(0,th.abstract)()}closestPointXY(t,e,i,s){return(0,th.abstract)()}containsXY(t,e){return 0===this.closestPointXY(t,e,ep,5e-324)}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return(0,th.abstract)()}getExtent(t){if(this.extentRevision_!=this.getRevision()){let t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&(0,Q.createOrUpdateEmpty)(t),this.extentRevision_=this.getRevision()}return(0,Q.returnOrUpdate)(this.extent_,t)}rotate(t,e){(0,th.abstract)()}scale(t,e,i){(0,th.abstract)()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return(0,th.abstract)()}getType(){return(0,th.abstract)()}applyTransform(t){(0,th.abstract)()}intersectsExtent(t){return(0,th.abstract)()}translate(t,e){(0,th.abstract)()}transform(t,e){let i=tQ(t),s="tile-pixels"==i.getUnits()?function(t,s,r){let n=i.getExtent(),a=i.getWorldExtent(),o=(0,Q.getHeight)(a)/(0,Q.getHeight)(n);el(ef,a[0],a[3],o,-o,0,0,0);let l=ec(t,0,t.length,r,ef,s),h=t5(i,e);return h?h(l,l,r):l}:t5(i,e);return this.applyTransform(s),this}}var em=e_;function ey(t){let e;return 2==t?e="XY":3==t?e="XYZ":4==t&&(e="XYZM"),e}function ex(t){let e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}var eS=class extends em{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return(0,Q.createOrUpdateFromFlatCoordinates)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return(0,th.abstract)()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;let e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=ex(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){(0,th.abstract)()}setLayout(t,e,i){let s;if(t)s=ex(t);else{for(let t=0;t<i;++t){if(0===e.length){this.layout="XY",this.stride=2;return}e=e[0]}t=ey(s=e.length)}this.layout=t,this.stride=s}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(t,e){let i=this.getFlatCoordinates();if(i){let s=this.getStride();eg(i,0,i.length,s,t,e,i),this.changed()}}scale(t,e,i){void 0===e&&(e=t),i||(i=(0,Q.getCenter)(this.getExtent()));let s=this.getFlatCoordinates();if(s){let r=this.getStride();
1!function(t,e,i,s,r,n,a){a=a||[];let o=n[0],l=n[1],h=0;for(let n=0;n<e;n+=i){let e=t[n]-o,u=t[n+1]-l;a[h++]=o+s*e,a[h++]=l+r*u;for(let e=n+2;e<n+i;++e)a[h++]=t[e]}a&&a.length!=h&&(a.length=h)}(s,s.length,r,t,e,i,s),this.changed()}}translate(t,e){let i=this.getFlatCoordinates();if(i){let s=this.getStride();!function(t,e,i,s,r,n){n=n||[];let a=0;for(let o=0;o<e;o+=i){n[a++]=t[o]+s,n[a++]=t[o+1]+r;for(let e=o+2;e<o+i;++e)n[a++]=t[e]}n&&n.length!=a&&(n.length=a)}(i,i.length,s,t,e,i),this.changed()}}};function ev(t,e,i,s){let r=0,n=t[i-s],a=t[i-s+1],o=0,l=0;for(;e<i;e+=s){let i=t[e]-n,s=t[e+1]-a;r+=l*i-o*s,o=i,l=s}return r/2}function ew(t,e,i,s){let r=0;for(let n=0,a=i.length;n<a;++n){let a=i[n];r+=ev(t,e,a,s),e=a}return r}function eE(t,e,i,s,r,n,a){let o,l=t[e],h=t[e+1],u=t[i]-l,d=t[i+1]-h;if(0===u&&0===d)o=e;else{let c=((r-l)*u+(n-h)*d)/(u*u+d*d);if(c>1)o=i;else if(c>0){for(let r=0;r<s;++r)a[r]=(0,H.lerp)(t[e+r],t[i+r],c);a.length=s;return}else o=e}for(let e=0;e<s;++e)a[e]=t[o+e];a.length=s}function eM(t,e,i,s,r){let n=t[e],a=t[e+1];for(e+=s;e<i;e+=s){let i=t[e],s=t[e+1],o=(0,H.squaredDistance)(n,a,i,s);o>r&&(r=o),n=i,a=s}return r}function eP(t,e,i,s,r){for(let n=0,a=i.length;n<a;++n){let a=i[n];r=eM(t,e,a,s,r),e=a}return r}function eC(t,e,i,s,r,n,a,o,l,h,u){let d,c;if(e==i)return h;if(0===r){if((c=(0,H.squaredDistance)(a,o,t[e],t[e+1]))<h){for(d=0;d<s;++d)l[d]=t[e+d];return l.length=s,c}return h}u=u||[NaN,NaN];let g=e+s;for(;g<i;)if(eE(t,g-s,g,s,a,o,u),(c=(0,H.squaredDistance)(a,o,u[0],u[1]))<h){for(d=0,h=c;d<s;++d)l[d]=u[d];l.length=s,g+=s}else g+=s*Math.max((Math.sqrt(c)-Math.sqrt(h))/r|0,1);if(n&&(eE(t,i-s,e,s,a,o,u),(c=(0,H.squaredDistance)(a,o,u[0],u[1]))<h)){for(d=0,h=c;d<s;++d)l[d]=u[d];l.length=s}return h}function eb(t,e,i,s,r,n,a,o,l,h,u){u=u||[NaN,NaN];for(let d=0,c=i.length;d<c;++d){let c=i[d];h=eC(t,e,c,s,r,n,a,o,l,h,u),e=c}return h}function eR(t,e,i,s){for(let r=0,n=i.length;r<n;++r){let n=i[r];for(let i=0;i<s;++i)t[e++]=n[i]}return e}function eI(t,e,i,s,r){r=r||[];let n=0;for(let a=0,o=i.length;a<o;++a){let o=eR(t,e,i[a],s);r[n++]=o,e=o}return r.length=n,r}function eT(t,e,i,s,r){r=r||[];let n=0;for(let a=0,o=i.length;a<o;++a){let o=eI(t,e,i[a],s,r[n]);0===o.length&&(o[0]=e),r[n++]=o,e=o[o.length-1]}return r.length=n,r}function eA(t,e,i,s,r){r=void 0!==r?r:[];let n=0;for(let a=e;a<i;a+=s)r[n++]=t.slice(a,a+s);return r.length=n,r}function eL(t,e,i,s,r){r=void 0!==r?r:[];let n=0;for(let a=0,o=i.length;a<o;++a){let o=i[a];r[n++]=eA(t,e,o,s,r[n]),e=o}return r.length=n,r}function eN(t,e,i,s,r){r=void 0!==r?r:[];let n=0;for(let a=0,o=i.length;a<o;++a){let o=i[a];r[n++]=1===o.length&&o[0]===e?[]:eL(t,e,o,s,r[n]),e=o[o.length-1]}return r.length=n,r}var H=(y("a6roo"),y("a6roo"));function eF(t,e,i,s,r,n,a){let o=(i-e)/s;if(o<3){for(;e<i;e+=s)n[a++]=t[e],n[a++]=t[e+1];return a}let l=Array(o);l[0]=1,l[o-1]=1;let h=[e,i-s],u=0;for(;h.length>0;){let i=h.pop(),n=h.pop(),a=0,o=t[n],d=t[n+1],c=t[i],g=t[i+1];for(let e=n+s;e<i;e+=s){let i=t[e],s=t[e+1],r=(0,H.squaredSegmentDistance)(i,s,o,d,c,g);r>a&&(u=e,a=r)}a>r&&(l[(u-e)/s]=1,n+s<u&&h.push(n,u),u+s<i&&h.push(u,i))}for(let i=0;i<o;++i)l[i]&&(n[a++]=t[e+i*s],n[a++]=t[e+i*s+1]);return a}function eG(t,e,i,s,r,n,a,o){for(let l=0,h=i.length;l<h;++l){let h=i[l];a=eF(t,e,h,s,r,n,a),o.push(a),e=h}return a}function eO(t,e){return e*Math.round(t/e)}function eD(t,e,i,s,r,n,a,o){for(let l=0,h=i.length;l<h;++l){let h=i[l];a=function(t,e,i,s,r,n,a){let o,l;if(e==i)return a;let h=eO(t[e],r),u=eO(t[e+1],r);e+=s,n[a++]=h,n[a++]=u;do if(o=eO(t[e],r),l=eO(t[e+1],r),(e+=s)==i)return n[a++]=o,n[a++]=l,a;while(o==h&&l==u)for(;e<i;){let i=eO(t[e],r),d=eO(t[e+1],r);if(e+=s,i==o&&d==l)continue;let c=o-h,g=l-u,f=i-h,p=d-u;if(c*p==g*f&&(c<0&&f<c||c==f||c>0&&f>c)&&(g<0&&p<g||g==p||g>0&&p>g)){o=i,l=d;continue}n[a++]=o,n[a++]=l,h=o,u=l,o=i,l=d}return n[a++]=o,n[a++]=l,a}(t,e,h,s,r,n,a),o.push(a),e=h}return a}class ek extends eS{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new ek(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,s){return s<(0,Q.closestSquaredDistanceXY)(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(eM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),eC(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,s))}getArea(){return ev(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return eA(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){let e=[];return e.length=eF(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new ek(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=eR(this.flatCoordinates,0,t,this.stride),this.changed()}}var Q=y("jZquI"),H=y("a6roo");class ej extends eS{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){let t=new ej(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,s){let r=this.flatCoordinates,n=(0,H.squaredDistance)(t,e,r[0],r[1]);if(n<s){let t=this.stride;for(let e=0;e<t;++e)i[e]=r[e];return i.length=t,n}return s}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(t){return(0,Q.createOrUpdateFromCoordinate)(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return(0,Q.containsXY)(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=function(t,e,
1i,s){for(let s=0,r=i.length;s<r;++s)t[e++]=i[s];return e}(this.flatCoordinates,0,t,this.stride),this.changed()}}var Q=y("jZquI");function eB(t,e,i,s,r,n){let a=0,o=t[i-s],l=t[i-s+1];for(;e<i;e+=s){let i=t[e],s=t[e+1];l<=n?s>n&&(i-o)*(n-l)-(r-o)*(s-l)>0&&a++:s<=n&&(i-o)*(n-l)-(r-o)*(s-l)<0&&a--,o=i,l=s}return 0!==a}function ez(t,e,i,s,r,n){if(0===i.length||!eB(t,e,i[0],s,r,n))return!1;for(let e=1,a=i.length;e<a;++e)if(eB(t,i[e-1],i[e],s,r,n))return!1;return!0}var K=y("kBSVF");function eU(t,e,i,s,r,n,a){let o,l,h,u,d,c,g,f=r[n+1],p=[];for(let r=0,n=i.length;r<n;++r){let n=i[r];for(u=t[n-s],c=t[n-s+1],o=e;o<n;o+=s)d=t[o],g=t[o+1],(f<=c&&g<=f||c<=f&&f<=g)&&(h=(f-c)/(g-c)*(d-u)+u,p.push(h)),u=d,c=g}let _=NaN,m=-1/0;for(p.sort(K.ascending),u=p[0],o=1,l=p.length;o<l;++o){let r=Math.abs((d=p[o])-u);r>m&&ez(t,e,i,s,h=(u+d)/2,f)&&(_=h,m=r),u=d}return(isNaN(_)&&(_=r[n]),a)?(a.push(_,f,m),a):[_,f,m]}function eW(t,e,i,s,r){let n=[];for(let a=0,o=i.length;a<o;++a){let o=i[a];n=eU(t,e,o,s,r,2*a,n),e=o[o.length-1]}return n}var Q=y("jZquI");function eV(t,e,i,s,r){let n;for(e+=s;e<i;e+=s)if(n=r(t.slice(e-s,e),t.slice(e,e+s)))return n;return!1}function eq(t,e,i,s,r,n){return n=n??(0,Q.extendFlatCoordinates)((0,Q.createEmpty)(),t,e,i,s),!!(0,Q.intersects)(r,n)&&(n[0]>=r[0]&&n[2]<=r[2]||n[1]>=r[1]&&n[3]<=r[3]||eV(t,e,i,s,function(t,e){return(0,Q.intersectsSegment)(r,t,e)}))}function eZ(t,e,i,s,r){return!!(eq(t,e,i,s,r)||eB(t,e,i,s,r[0],r[1])||eB(t,e,i,s,r[0],r[3])||eB(t,e,i,s,r[2],r[1])||eB(t,e,i,s,r[2],r[3]))}function eK(t,e,i,s,r){if(!eZ(t,e,i[0],s,r))return!1;if(1===i.length)return!0;for(let e=1,n=i.length;e<n;++e)if(function(t,e,i,s,r){return!(0,Q.forEachCorner)(r,function(r){return!eB(t,e,i,s,r[0],r[1])})}(t,i[e-1],i[e],s,r)&&!eq(t,i[e-1],i[e],s,r))return!1;return!0}function eH(t,e,i,s){let r=0,n=t[i-s],a=t[i-s+1];for(;e<i;e+=s){let i=t[e],s=t[e+1];r+=(i-n)*(s+a),n=i,a=s}return 0===r?void 0:r>0}function eX(t,e,i,s,r){r=void 0!==r&&r;for(let n=0,a=i.length;n<a;++n){let a=i[n],o=eH(t,e,a,s);if(0===n){if(r&&o||!r&&!o)return!1}else if(r&&!o||!r&&o)return!1;e=a}return!0}function eY(t,e,i,s,r){for(let n=0,a=i.length;n<a;++n){let a=i[n];if(!eX(t,e,a,s,r))return!1;a.length&&(e=a[a.length-1])}return!0}function eQ(t,e,i,s,r){r=void 0!==r&&r;for(let n=0,a=i.length;n<a;++n){let a=i[n],o=eH(t,e,a,s);(0===n?r&&o||!r&&!o:r&&!o||!r&&o)&&function(t,e,i,s){for(;e<i-s;){for(let r=0;r<s;++r){let n=t[e+r];t[e+r]=t[i-s+r],t[i-s+r]=n}e+=s,i-=s}}(t,e,a,s),e=a}return e}function eJ(t,e,i,s,r){for(let n=0,a=i.length;n<a;++n)e=eQ(t,e,i[n],s,r);return e}class e$ extends eS{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?(0,K.extend)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){let t=new e$(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,s){return s<(0,Q.closestSquaredDistanceXY)(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(eP(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),eb(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,s))}containsXY(t,e){return ez(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return ew(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?eQ(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,eL(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){let t=(0,Q.getCenter)(this.getExtent());this.flatInteriorPoint_=eU(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new ej(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new ek(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){let t=this.layout,e=this.flatCoordinates,i=this.ends_,s=[],r=0;for(let n=0,a=i.length;n<a;++n){let a=i[n],o=new ek(e.slice(r,a),t);s.push(o),r=a}return s}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){let t=this.flatCoordinates;eX(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=eQ(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){let e=[],i=[];return e.length=eD(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new e$(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return eK(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);let i=eI(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}function e0(t,e,i,s){i=i||32;let r=[];for(let n=0;n<i;
1++n)(0,K.extend)(r,function(t,e,i,s){s=s||6371008.8;let r=(0,H.toRadians)(t[1]),n=(0,H.toRadians)(t[0]),a=e/s,o=Math.asin(Math.sin(r)*Math.cos(a)+Math.cos(r)*Math.sin(a)*Math.cos(i)),l=n+Math.atan2(Math.sin(i)*Math.sin(a)*Math.cos(r),Math.cos(a)-Math.sin(r)*Math.sin(o));return[(0,H.toDegrees)(l),(0,H.toDegrees)(o)]}(t,e,2*Math.PI*n/i,s));return r.push(r[0],r[1]),new e$(r,"XY",[r.length])}function e1(t){if((0,Q.isEmpty)(t))throw Error("Cannot create polygon from empty extent");let e=t[0],i=t[1],s=t[2],r=t[3],n=[e,i,e,r,s,r,s,i,e,i];return new e$(n,"XY",[n.length])}var H=y("a6roo"),K=y("kBSVF"),Q=y("jZquI");function e2(t,e,i,s){let r=(0,Q.getWidth)(e)/i[0],n=(0,Q.getHeight)(e)/i[1];return s?Math.min(t,Math.max(r,n)):Math.min(t,Math.min(r,n))}function e4(t,e,i){let s=Math.min(t,e);return s*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(s=Math.max(s,i)/(Math.log(1+50*Math.max(0,i/t-1))/50+1)),(0,H.clamp)(s,i/2,2*e)}function e3(t,e,i,s,r){return i=void 0===i||i,function(n,a,o,l){if(void 0!==n){let a=s?e2(t,s,o,r):t;return i&&l?e4(n,a,e):(0,H.clamp)(n,e,a)}}}var H=(y("a6roo"),y("a6roo"));function e8(t){if(void 0!==t)return 0}function e5(t){if(void 0!==t)return t}class e6 extends j.default{constructor(t){var e,i;super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=t0(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&tK(),t.center&&(t.center=t9(t.center,this.projection_)),t.extent&&(t.extent=(e=t.extent,i=this.projection_,e)),this.applyOptions_(t)}applyOptions_(t){let e=Object.assign({},t);for(let t in Z)delete e[t];this.setProperties(e,!0);let i=function(t){var e,i,s,r,n,a;let o,l,h,u=void 0!==t.minZoom?t.minZoom:0,d=void 0!==t.maxZoom?t.maxZoom:28,c=void 0!==t.zoomFactor?t.zoomFactor:2,g=void 0!==t.multiWorld&&t.multiWorld,f=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,p=void 0!==t.showFullExtent&&t.showFullExtent,_=t0(t.projection,"EPSG:3857"),m=_.getExtent(),y=t.constrainOnlyCenter,x=t.extent;if(!g&&!x&&_.isGlobal()&&(y=!1,x=m),void 0!==t.resolutions){let s=t.resolutions;(l=s[u],h=void 0!==s[d]?s[d]:s[s.length-1],t.constrainResolution)?(e=f,i=!y&&x,e=void 0===e||e,o=function(t,r,n,a){if(void 0!==t){let o=s[0],l=s[s.length-1],h=i?e2(o,i,n,p):o;if(a)return e?e4(t,h,l):(0,H.clamp)(t,l,h);let u=Math.min(h,t),d=Math.floor((0,K.linearFindNearest)(s,u,r));return s[d]>h&&d<s.length-1?s[d+1]:s[d]}}):o=e3(l,h,f,!y&&x,p)}else{let e=(m?Math.max((0,Q.getWidth)(m),(0,Q.getHeight)(m)):360*td.degrees/_.getMetersPerUnit())/256/1;(void 0!==(l=t.maxResolution)?u=0:l=e/Math.pow(c,u),void 0===(h=t.minResolution)&&(h=void 0!==t.maxZoom?void 0!==t.maxResolution?l/Math.pow(c,d):e/Math.pow(c,d):e/0x10000000),d=u+Math.floor(Math.log(l/h)/Math.log(c)),h=l/Math.pow(c,d-u),t.constrainResolution)?(s=l,r=h,n=f,a=!y&&x,n=void 0===n||n,r=void 0!==r?r:0,o=function(t,e,i,o){if(void 0!==t){let l=a?e2(s,a,i,p):s;if(o)return n?e4(t,l,r):(0,H.clamp)(t,r,l);let h=Math.max(Math.ceil(Math.log(s/l)/Math.log(c)-1e-9),Math.floor(Math.log(s/Math.min(l,t))/Math.log(c)+(-(.499999999*e)+.5))),u=s/Math.pow(c,h);return(0,H.clamp)(u,r,l)}}):o=e3(l,h,f,!y&&x,p)}return{constraint:o,maxResolution:l,minResolution:h,minZoom:u,zoomFactor:c}}(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;let s=function(t){if(void 0!==t.extent){let e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return X(t.extent,t.constrainOnlyCenter,e)}let e=t0(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&e.isGlobal()){let t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,X(t,!1,!1)}return Y}(t),r=i.constraint,n=function(t){if(void 0===t.enableRotation||t.enableRotation){let e=t.constrainRotation;if(void 0===e||!0===e){let t;return t=(0,H.toRadians)(5),function(e,i){return i||void 0===e?e:Math.abs(e)<=t?0:e}}if(!1===e)return e5;if("number"==typeof e){let t;return t=2*Math.PI/e,function(e,i){return i?e:void 0!==e?e=Math.floor(e/t+.5)*t:void 0}}return e5}return e8}(t);this.constraints_={center:s,resolution:r,rotation:n},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)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;let i=this.getCenterInternal();if(i){let s=t||[0,0,0,0];e=e||[0,0,0,0];let r=this.getResolution(),n=r/2*(s[3]-e[3]+e[1]-s[1]),a=r/2*(s[0]-e[0]+e[2]-s[2]);this.setCenterInternal([i[0]+n,i[1]-a])}}getUpdatedOptions_(t){let e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);let e=Array(arguments.length);for(let t=0;t<e.length;++t){let i=arguments[t];i.center&&((i=Object.assign({},i)).center=t9(i.center,this.getProjection())),i.anchor&&((i=Object.assign({},i)).anchor=t9(i.anchor,this.getProjection())),e[t]=i}this.animateInternal.apply(this,e)}animateInternal(t){let e,i=arguments.length;i>1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);let s=0;for(;s<i&&!this.isDef();++s){let t=arguments[s];t.center&&this.setCenterInternal(t.center),void 0!==t.zoom?this.setZoom(t.zoom):t.resolution&&this.setResolution(t.resolution),void 0!==t.rotation&&this.setRotation(t.rotation)}if(s===i){e&&e7(e,!0);return}let r=Date.now(),n=this.targetCenter_.slice(),a=this.targetResolution_,o=this.targetRotation_,l=[];for(;s<i;++s){var h;let t=arguments[s],i={start:r,complete:!1,anchor:t.anchor,duration:void 0!==t.duration?t.duration:1e3,easing:t.easing||tn,callback:e};if(t.center&&(i.sourceCenter=n,i.targetCenter=t.center.slice(),n=i.targetCenter),void 0!==t.zoom?(i.sourceResolution=a,i.targetResolution=this.getResolutionForZoom(t.zoom),a=i.targetResolution):t.resolution&&(i.sourceResolution=a,i.targetResolution=t.resolution,a=i.targetResolution),void 0!==t.rotation){i.sourceRotation=o;let e=(0,H.modulo)(t.rotation-o+Math.PI,2*Math.PI)-Math.PI;i.targetRotation=o+e,o=i.targetRotation}(!(h=i).sourceCenter||!h.targetCenter||$(h.sourceCenter,h.targetCenter))&&h.sourceResolution===h.targetResolution&&h.sourceRotation===h.targetRotation?i.complete=!0:r+=i.duration,l.push(i)}this.animations_.push(l),this.setHint(0,1),this.updateAnimations_()}getAnimating(){return this.hints_[0]>0}getInteracting(){return this.hints_[1]>0}cancelAnimations(){let t;this.setHint(0,-this.hints_[0]);for(let e=0,i=this.animations_.length;e<i;++e){let i=this.animations_[e];
1if(i[0].callback&&e7(i[0].callback,!1),!t)for(let e=0,s=i.length;e<s;++e){let s=i[e];if(!s.complete){t=s.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;let t=Date.now(),e=!1;for(let i=this.animations_.length-1;i>=0;--i){let s=this.animations_[i],r=!0;for(let i=0,n=s.length;i<n;++i){let n=s[i];if(n.complete)continue;let a=t-n.start,o=n.duration>0?a/n.duration:1;o>=1?(n.complete=!0,o=1):r=!1;let l=n.easing(o);if(n.sourceCenter){let t=n.sourceCenter[0],e=n.sourceCenter[1],i=n.targetCenter[0],s=n.targetCenter[1];this.nextCenter_=n.targetCenter;let r=t+l*(i-t),a=e+l*(s-e);this.targetCenter_=[r,a]}if(n.sourceResolution&&n.targetResolution){let t=1===l?n.targetResolution:n.sourceResolution+l*(n.targetResolution-n.sourceResolution);if(n.anchor){let e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,n.anchor)}this.nextResolution_=n.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==n.sourceRotation&&void 0!==n.targetRotation){let t=1===l?(0,H.modulo)(n.targetRotation+Math.PI,2*Math.PI)-Math.PI:n.sourceRotation+l*(n.targetRotation-n.sourceRotation);if(n.anchor){let e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,n.anchor)}this.nextRotation_=n.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!n.complete)break}if(r){this.animations_[i]=null,this.setHint(0,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;let t=s[0].callback;t&&e7(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i,s=this.getCenterInternal();if(void 0!==s){var r;tt(i=[s[0]-e[0],s[1]-e[1]],t-this.getRotation()),r=i,r[0]+=+e[0],r[1]+=+e[1]}return i}calculateCenterZoom(t,e){let i,s=this.getCenterInternal(),r=this.getResolution();return void 0!==s&&void 0!==r&&(i=[e[0]-t*(e[0]-s[0])/r,e[1]-t*(e[1]-s[1])/r]),i}getViewportSize_(t){let e=this.viewportSize_;if(t){let i=e[0],s=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(s*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(s*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){var t,e;let i=this.getCenterInternal();return i?(t=i,e=this.getProjection(),t):i}getCenterInternal(){return this.get(Z.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){var e,i;return e=this.calculateExtentInternal(t),i=this.getProjection(),e}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();let e=this.getCenterInternal();(0,z.assert)(e,"The view center is not defined");let i=this.getResolution();(0,z.assert)(void 0!==i,"The view resolution is not defined");let s=this.getRotation();return(0,z.assert)(void 0!==s,"The view rotation is not defined"),(0,Q.getForViewAndSize)(e,i,s,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Z.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){var i,s;return this.getResolutionForExtentInternal((i=t,s=this.getProjection(),i),e)}getResolutionForExtentInternal(t,e){return e=e||this.getViewportSizeMinusPadding_(),Math.max((0,Q.getWidth)(t)/e[0],(0,Q.getHeight)(t)/e[1])}getResolutionForValueFunction(t){t=t||2;let e=this.getConstrainedResolution(this.maxResolution_),i=Math.log(e/this.minResolution_)/Math.log(t);return function(s){return e/Math.pow(t,s*i)}}getRotation(){return this.get(Z.ROTATION)}getValueForResolutionFunction(t){let e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),s=Math.log(i/this.minResolution_)/e;return function(t){return Math.log(i/t)/e/s}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t),i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){let t=this.getProjection(),e=this.getResolution(),i=this.getRotation(),s=this.getCenterInternal(),r=this.padding_;if(r){let t=this.getViewportSizeMinusPadding_();s=e9(s,this.getViewportSize_(),[t[0]/2+r[3],t[1]/2+r[0]],e,i)}return{center:s.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,s=this.minZoom_||0;if(this.resolutions_){let r=(0,K.linearFindNearest)(this.resolutions_,t,1);s=r,e=this.resolutions_[r],i=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,i=this.zoomFactor_;return s+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_?.length){if(1===this.resolutions_.length)return this.resolutions_[0];
1let e=(0,H.clamp)(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,(0,H.clamp)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){var i,s,r,n;let a;if((0,z.assert)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,"Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){(0,z.assert)(!(0,Q.isEmpty)(t),"Cannot fit empty extent provided as `geometry`"),a=e1((i=t,s=this.getProjection(),i))}else if("Circle"===t.getType()){let e=(r=t.getExtent(),n=this.getProjection(),r);(a=e1(e)).rotate(this.getRotation(),(0,Q.getCenter)(e))}else a=t;this.fitInternal(a,e)}rotatedExtentForGeometry(t){let e=this.getRotation(),i=Math.cos(e),s=Math.sin(-e),r=t.getFlatCoordinates(),n=t.getStride(),a=1/0,o=1/0,l=-1/0,h=-1/0;for(let t=0,e=r.length;t<e;t+=n){let e=r[t]*i-r[t+1]*s,n=r[t]*s+r[t+1]*i;a=Math.min(a,e),o=Math.min(o,n),l=Math.max(l,e),h=Math.max(h,n)}return[a,o,l,h]}fitInternal(t,e){let i,s=(e=e||{}).size;s||(s=this.getViewportSizeMinusPadding_());let r=void 0!==e.padding?e.padding:[0,0,0,0],n=void 0!==e.nearest&&e.nearest;i=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.getResolutionForZoom(e.maxZoom):0;let a=this.rotatedExtentForGeometry(t),o=this.getResolutionForExtentInternal(a,[s[0]-r[1]-r[3],s[1]-r[0]-r[2]]);o=isNaN(o)?i:Math.max(o,i),o=this.getConstrainedResolution(o,+!n);let l=this.getRotation(),h=Math.sin(l),u=Math.cos(l),d=(0,Q.getCenter)(a);d[0]+=(r[1]-r[3])/2*o,d[1]+=(r[0]-r[2])/2*o;let c=d[0]*u-d[1]*h,g=d[1]*u+d[0]*h,f=this.getConstrainedCenter([c,g],o),p=e.callback?e.callback:to.VOID;void 0!==e.duration?this.animateInternal({resolution:o,center:f,duration:e.duration,easing:e.easing},p):(this.targetResolution_=o,this.targetCenter_=f,this.applyTargetState_(!1,!0),e7(p,!0))}centerOn(t,e,i){this.centerOnInternal(t9(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(e9(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,s){let r,n=this.padding_;if(n&&t){let a=this.getViewportSizeMinusPadding_(-i),o=e9(t,s,[a[0]/2+n[3],a[1]/2+n[0]],e,i);r=[t[0]-o[0],t[1]-o[1]]}return r}isDef(){return!!this.getCenterInternal()&&void 0!==this.getResolution()}adjustCenter(t){var e,i;let s=(e=this.targetCenter_,i=this.getProjection(),e);this.setCenter([s[0]+t[0],s[1]+t[1]])}adjustCenterInternal(t){let e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&t9(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){let i=this.getAnimating()||this.getInteracting(),s=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,s,i);e&&(this.targetCenter_=this.calculateCenterZoom(r,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=t9(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){let i=this.getAnimating()||this.getInteracting(),s=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(s,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t?t9(t,this.getProjection()):t)}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){let i=this.getAnimating()||this.getInteracting()||e,s=this.constraints_.rotation(this.targetRotation_,i),r=this.getViewportSize_(s),n=this.constraints_.resolution(this.targetResolution_,0,r,i),a=this.constraints_.center(this.targetCenter_,n,r,i,this.calculateCenterShift(this.targetCenter_,n,s,r));this.get(Z.ROTATION)!==s&&this.set(Z.ROTATION,s),this.get(Z.RESOLUTION)!==n&&(this.set(Z.RESOLUTION,n),this.set("zoom",this.getZoom(),!0)),a&&this.get(Z.CENTER)&&$(this.get(Z.CENTER),a)||this.set(Z.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=void 0!==t?t:200;let s=this.constraints_.rotation(this.targetRotation_),r=this.getViewportSize_(s),n=this.constraints_.resolution(this.targetResolution_,e||0,r),a=this.constraints_.center(this.targetCenter_,n,r,!1,this.calculateCenterShift(this.targetCenter_,n,s,r));if(0===t&&!this.cancelAnchor_){this.targetResolution_=n,this.targetRotation_=s,this.targetCenter_=a,this.applyTargetState_();return}i=i||(0===t?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,this.getResolution()===n&&this.getRotation()===s&&this.getCenterInternal()&&$(this.getCenterInternal(),a)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:a,resolution:n,duration:t,easing:tr,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(1,1)}
1endInteraction(t,e,i){i=i&&t9(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(1,-1),this.resolveConstraints(t,e,i))}getConstrainedCenter(t,e){let i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)}getConstrainedZoom(t,e){let i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))}getConstrainedResolution(t,e){e=e||0;let i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,i)}}function e7(t,e){setTimeout(function(){t(e)},0)}function e9(t,e,i,s,r){let n=Math.cos(-r),a=Math.sin(-r),o=t[0]*n-t[1]*a,l=t[1]*n+t[0]*a;return o+=(e[0]/2-i[0])*s,[o*n-(l+=(i[1]-e[1]/2)*s)*(a=-a),l*n+o*a]}var K=y("kBSVF"),z=y("eJ4LZ"),S=y("31ZqB"),K=y("kBSVF"),it=y("erROg"),ie=y("cgxQK"),C=y("cw4dl"),to=y("eQaCk"),ii=y("4DafG");class is extends ii.default{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===t.collapsed||t.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==t.collapsible,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1),this.attributions_=t.attributions;let e=void 0!==t.className?t.className:"ol-attribution",i=void 0!==t.tipLabel?t.tipLabel:"Attributions",s=void 0!==t.expandClassName?t.expandClassName:e+"-expand",r=void 0!==t.collapseLabel?t.collapseLabel:"›",n=void 0!==t.collapseClassName?t.collapseClassName:e+"-collapse";"string"==typeof r?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=r,this.collapseLabel_.className=n):this.collapseLabel_=r;let a=void 0!==t.label?t.label:"i";"string"==typeof a?(this.label_=document.createElement("span"),this.label_.textContent=a,this.label_.className=s):this.label_=a;let o=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(o),this.toggleButton_.addEventListener(C.default.CLICK,this.handleClick_.bind(this),!1);let l=e+" "+it.CLASS_UNSELECTABLE+" "+it.CLASS_CONTROL+(this.collapsed_&&this.collapsible_?" "+it.CLASS_COLLAPSED:"")+(this.collapsible_?"":" ol-uncollapsible"),h=this.element;h.className=l,h.appendChild(this.toggleButton_),h.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){let e=this.getMap().getAllLayers(),i=new Set(e.flatMap(e=>e.getAttributions(t)));if(void 0!==this.attributions_&&(Array.isArray(this.attributions_)?this.attributions_.forEach(t=>i.add(t)):i.add(this.attributions_)),!this.overrideCollapsible_){let t=!e.some(t=>t.getSource()?.getAttributionsCollapsible()===!1);this.setCollapsible(t)}return Array.from(i)}async updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}let e=await Promise.all(this.collectSourceAttributions_(t).map(t=>(0,to.toPromise)(()=>t))),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!(0,K.equals)(e,this.renderedAttributions_)){(0,ie.removeChildren)(this.ulElement_);for(let t=0,i=e.length;t<i;++t){let i=document.createElement("li");i.innerHTML=e[t],this.ulElement_.appendChild(i)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(it.CLASS_COLLAPSED),this.collapsed_?(0,ie.replaceNode)(this.collapseLabel_,this.label_):(0,ie.replaceNode)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}}var it=y("erROg"),C=y("cw4dl"),ii=y("4DafG");class ir extends ii.default{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});let e=void 0!==t.className?t.className:"ol-rotate",i=void 0!==t.label?t.label:"⇧",s=void 0!==t.compassClassName?t.compassClassName:"ol-compass";this.label_=null,"string"==typeof i?(this.label_=document.createElement("span"),this.label_.className=s,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(s));let r=t.tipLabel?t.tipLabel:"Reset rotation",n=document.createElement("button");n.className=e+"-reset",n.setAttribute("type","button"),n.title=r,n.appendChild(this.label_),n.addEventListener(C.default.CLICK,this.handleClick_.bind(this),!1);let a=e+" "+it.CLASS_UNSELECTABLE+" "+it.CLASS_CONTROL,o=this.element;o.className=a,o.appendChild(n),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=void 0!==t.duration?t.duration:250,this.autoHide_=void 0===t.autoHide||t.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(it.CLASS_HIDDEN)}handleClick_(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){let t=this.getMap().getView();if(!t)return;let e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:tr}):t.setRotation(0))}render(t){let e=t.frameState;if(!e)return;let i=e.viewState.rotation;if(i!=this.rotation_){if(this.autoHide_){let t=this.element.classList.contains(it.CLASS_HIDDEN);t||0!==i?t&&0!==i&&this.element.classList.remove(it.CLASS_HIDDEN):this.element.classList.add(it.CLASS_HIDDEN)}this.label_.style.transform="rotate("+i+"rad)"}this.rotation_=i}}var it=y("erROg"),C=y("cw4dl"),ii=y("4DafG");class ia extends ii.default{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});let e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,s=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",r=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",n=void 0!==t.zoomInLabel?t.zoomInLabel:"+",a=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",o=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",l=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=s,h.setAttribute("type","button"),h.title=o,h.appendChild("string"==typeof n?document.createTextNode(n):n),h.addEventListener(C.default.CLICK,this.handleClick_.bind(this,i),!1);let u=document.createElement("button");u.className=r,u.setAttribute("type","button"),u.title=l,u.appendChild("string"==typeof a?document.createTextNode(a):a),u.addEventListener(C.default.CLICK,this.handleClick_.bind(this,-i),!1);let d=e+" "+it.CLASS_UNSELECTABLE+" "+it.CLASS_CONTROL,c=this.element;c.className=d,c.appendChild(h),c.appendChild(u),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){let e=this.getMap().getView();if(!e)return;let i=e.getZoom();if(void 0!==i){let s=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:s,duration:this.duration_,easing:tr})):e.setZoom(s)}}}function io(t){t=t||{};let e=new(0,S.default);return(void 0===t.zoom||t.zoom)&&e.push(new ia(t.zoomOptions)),(void 0===t.rotate||t.rotate)&&e.push(new ir(t.rotateOptions)),(void 0===t.attribution||t.attribution)&&e.push(new is(t.attributionOptions)),e}var ie=y("cgxQK"),C=y("cw4dl"),I=y("bsgMw"),Q=y("jZquI"),to=y("eQaCk"),T=y("lW8xZ"),S=y("31ZqB"),il=class{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;let t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let i=e-3;for(;i>0&&this.points_[i+2]>t;)i-=3;let s=this.points_[e+2]-this.points_[i+2];if(s<1e3/60)return!1;let r=this.points_[e]-this.points_[i],n=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(n,r),this.initialVelocity_=Math.sqrt(r*r+n*n)/s,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}},j=y("fnScq"),ih="active";class iu extends j.default{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(ih)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(ih,t)}setMap(t){this.map_=t}}function id(t,e,i,s){let r=t.getZoom();if(void 0===r)return;let n=t.getConstrainedZoom(r+e),a=t.getResolutionForZoom(n);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:a,anchor:i,duration:void 0!==s?s:250,easing:tr})}var ic=iu,ig=class extends ic{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==b.DBLCLICK){let i=t.originalEvent,s=t.map,r=t.coordinate,n=i.shiftKey?-this.delta_:this.delta_;id(s.getView(),n,r,this.duration_),i.preventDefault(),e=!0}return!e}},to=y("eQaCk"),T=y("lW8xZ");function ip(t){let e=arguments;return function(t){let i=!0;for(let s=0,r=e.length;s<r&&(i=i&&e[s](t));++s);return i}}let i_=function(t){let e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},im=function(t){let e=t.map.getTargetElement(),i=e.getRootNode(),s=t.map.getOwnerDocument().activeElement;return i instanceof ShadowRoot?i.host.contains(s):e.contains(s)},iy=function(t){let e=t.map.getTargetElement(),i=e.getRootNode();return!(i instanceof ShadowRoot?i.host:e).hasAttribute("tabindex")||im(t)},ix=to.TRUE,iS=function(t){let e=t.originalEvent;return"pointerId"in e&&0==e.button&&!(T.WEBKIT&&T.MAC&&e.ctrlKey)},iv=to.FALSE,iw=function(t){return t.type==b.SINGLECLICK},iE=function(t){let e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},iM=function(t){let e=t.originalEvent;return T.MAC?e.metaKey:e.ctrlKey},iP=function(t){let e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},iC=function(t){let e=t.originalEvent,i=e.target.tagName;return"INPUT"!==i&&"SELECT"!==i&&"TEXTAREA"!==i&&!e.target.isContentEditable},ib=function(t){let e=t.originalEvent;return"pointerId"in e&&"mouse"==e.pointerType},iR=function(t){let e=t.originalEvent;
1return"pointerId"in e&&e.isPrimary&&0===e.button};var to=y("eQaCk");function iI(t){let e=t.length,i=0,s=0;for(let r=0;r<e;r++)i+=t[r].clientX,s+=t[r].clientY;return{clientX:i/e,clientY:s/e}}var iT=class extends ic{constructor(t){super(t=t||{}),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==b.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==b.POINTERUP){let e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==b.POINTERDOWN){let i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==b.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}},iA=class extends iT{constructor(t){super({stopDown:to.FALSE}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;let e=t.condition?t.condition:ip(iE,iR);this.condition_=t.onFocusOnly?ip(iy,e):e,this.noKinetic_=!1}handleDragEvent(t){let e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());let i=this.targetPointers,s=e.getEventPixel(iI(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(s[0],s[1]),this.lastCentroid){var r;let e=[this.lastCentroid[0]-s[0],s[1]-this.lastCentroid[1]],i=t.map.getView();r=i.getResolution(),e[0]*=r,e[1]*=r,tt(e,i.getRotation()),i.adjustCenterInternal(e)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=s,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()}handleUpEvent(t){let e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){let t=this.kinetic_.getDistance(),s=this.kinetic_.getAngle(),r=i.getCenterInternal(),n=e.getPixelFromCoordinateInternal(r),a=e.getCoordinateFromPixelInternal([n[0]-t*Math.cos(s),n[1]-t*Math.sin(s)]);i.animateInternal({center:i.getConstrainedCenter(a),duration:500,easing:tr})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){let 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}},to=y("eQaCk"),iL=class extends iT{constructor(t){t=t||{},super({stopDown:to.FALSE}),this.condition_=t.condition?t.condition:i_,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!ib(t))return;let e=t.map,i=e.getView();if(i.getConstraints().rotation===e8)return;let s=e.getSize(),r=t.pixel,n=Math.atan2(s[1]/2-r[1],r[0]-s[0]/2);if(void 0!==this.lastAngle_){let t=n-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=n}handleUpEvent(t){return!ib(t)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){return!!ib(t)&&!!(iS(t)&&this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0)}},w=y("iTTi2"),iN=y("jjfV9");class iF extends iN.default{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){let 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"}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);let t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;let t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new e$([i])}getGeometry(){return this.geometry_}}let iG="boxcancel";class iO extends w.default{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}var iD=class extends iT{constructor(t){super(),this.on,this.once,this.un,t=t??{},this.box_=new iF(t.className||"ol-dragbox"),this.minArea_=t.minArea??
164,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition??iS,this.boxEndCondition_=t.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){let s=i[0]-e[0],r=i[1]-e[1];return s*s+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.startPixel_&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new iO("boxdrag",t.coordinate,t)))}handleUpEvent(t){if(!this.startPixel_)return!1;let e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new iO(e?"boxend":iG,t.coordinate,t)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new iO("boxstart",t.coordinate,t)),!0)}onBoxEnd(t){}setActive(t){!t&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new iO(iG,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}setMap(t){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new iO(iG,this.startPixel_,null)),this.startPixel_=null)),super.setMap(t)}},ik=class extends iD{constructor(t){super({condition:(t=t||{}).condition?t.condition:iP,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){let e=this.getMap().getView(),i=this.getGeometry();if(this.out_){let t=e.rotatedExtentForGeometry(i),s=e.getResolutionForExtentInternal(t),r=e.getResolution()/s;(i=i.clone()).scale(r*r)}e.fitInternal(i,{duration:this.duration_,easing:tr})}},C=y("cw4dl"),ij="ArrowLeft",iB="ArrowRight",iz="ArrowDown",iU=class extends ic{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return iE(t)&&iC(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==C.default.KEYDOWN){let s=t.originalEvent,r=s.key;if(this.condition_(t)&&(r==iz||r==ij||r==iB||"ArrowUp"==r)){let n=t.map.getView(),a=n.getResolution()*this.pixelDelta_,o=0,l=0;r==iz?l=-a:r==ij?o=-a:r==iB?o=a:l=a;let h=[o,l];tt(h,n.getRotation());var i=this.duration_;let u=n.getCenterInternal();if(u){let t=[u[0]+h[0],u[1]+h[1]];n.animateInternal({duration:void 0!==i?i:250,easing:ta,center:n.getConstrainedCenter(t)})}s.preventDefault(),e=!0}}return!e}},C=y("cw4dl"),iW=class extends ic{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(t){return!iM(t)&&iC(t)},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==C.default.KEYDOWN||t.type==C.default.KEYPRESS){let i=t.originalEvent,s=i.key;if(this.condition_(t)&&("+"===s||"-"===s)){let r=t.map,n="+"===s?this.delta_:-this.delta_;id(r.getView(),n,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}},C=y("cw4dl"),H=y("a6roo"),iV=class extends ic{constructor(t){super(t=t||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;let e=t.condition?t.condition:ix;this.condition_=t.onFocusOnly?ip(iy,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;let t=this.getMap();t&&t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_?t.getCoordinateFromPixel(this.lastAnchor_):null)}handleEvent(t){if(!this.condition_(t)||t.type!==C.default.WHEEL)return!0;let e=t.map,i=t.originalEvent;i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.pixel);let s=i.deltaY;switch(i.deltaMode){case WheelEvent.DOM_DELTA_LINE:s*=40;break;case WheelEvent.DOM_DELTA_PAGE:s*=300}if(0===s)return!1;this.lastDelta_=s;let r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=4>Math.abs(s)?"trackpad":"wheel");let n=e.getView();if("trackpad"===this.mode_&&!(n.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(n.getAnimating()&&n.cancelAnimations(),n.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),n.adju
1stZoom(-s/this.deltaPerZoom_,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null),this.startTime_=r,!1;this.totalDelta_+=s;let a=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,e),a),!1}handleWheelZoom_(t){let e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-(0,H.clamp)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),id(e,i,this.lastAnchor_?t.getCoordinateFromPixel(this.lastAnchor_):null,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}},to=y("eQaCk"),iq=class extends iT{constructor(t){let e=t=t||{};e.stopDown||(e.stopDown=to.FALSE),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0,i=this.targetPointers[0],s=this.targetPointers[1],r=Math.atan2(s.clientY-i.clientY,s.clientX-i.clientX);if(void 0!==this.lastAngle_){let t=r-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=r;let n=t.map,a=n.getView();a.getConstraints().rotation!==e8&&(this.anchor_=n.getCoordinateFromPixelInternal(n.getEventPixel(iI(this.targetPointers))),this.rotating_&&(n.render(),a.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){if(this.targetPointers.length>=2){let 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}},to=y("eQaCk"),iZ=class extends iT{constructor(t){let e=t=t||{};e.stopDown||(e.stopDown=to.FALSE),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1,i=this.targetPointers[0],s=this.targetPointers[1],r=i.clientX-s.clientX,n=i.clientY-s.clientY,a=Math.sqrt(r*r+n*n);void 0!==this.lastDistance_&&(e=this.lastDistance_/a),this.lastDistance_=a;let o=t.map,l=o.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(iI(this.targetPointers))),o.render(),l.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){let e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){let e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}};function iK(t){t=t||{};let e=new(0,S.default),i=new il(-.005,.05,100);return(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&e.push(new iL),(void 0===t.doubleClickZoom||t.doubleClickZoom)&&e.push(new ig({delta:t.zoomDelta,duration:t.zoomDuration})),(void 0===t.dragPan||t.dragPan)&&e.push(new iA({onFocusOnly:t.onFocusOnly,kinetic:i})),(void 0===t.pinchRotate||t.pinchRotate)&&e.push(new iq),(void 0===t.pinchZoom||t.pinchZoom)&&e.push(new iZ({duration:t.zoomDuration})),(void 0===t.keyboard||t.keyboard)&&(e.push(new iU),e.push(new iW({delta:t.zoomDelta,duration:t.zoomDuration}))),(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&e.push(new iV({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(void 0===t.shiftDragZoom||t.shiftDragZoom)&&e.push(new ik({duration:t.zoomDuration})),e}var iH=y("3VGVQ"),z=y("eJ4LZ"),C=y("cw4dl"),I=y("bsgMw"),Q=y("jZquI"),iX="prerender",iY="postrender",iQ="precompose",iJ="rendercomplete",i$=y("lwtpg"),i0=y("7xQTT");class i1 extends i$.default{constructor(t){let e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(i0.default.SOURCE,this.handleSourcePropertyChange_);let i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(i0.default.SOURCE)||null}
1getRenderSource(){return this.getSource()}getSourceState(){let t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&((0,I.unlistenByKey)(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;let t=this.getSource();t&&(this.sourceChangeKey_=(0,I.listen)(t,C.default.CHANGE,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e,i,s=this.getMapInternal();if(!t&&s&&(t=s.getView()),!(e=t instanceof e6?{viewState:t.getState(),extent:t.calculateExtent()}:t).layerStatesArray&&s&&(e.layerStatesArray=s.getLayerGroup().getLayerStatesArray()),e.layerStatesArray){if(!(i=e.layerStatesArray.find(t=>t.layer===this)))return!1}else i=this.getLayerState();let r=this.getExtent();return i2(i,e.viewState)&&(!r||(0,Q.intersects)(r,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e=this.getSource()?.getAttributions();if(!e)return[];let i=e(t instanceof e6?t.getViewStateAndExtent():t);return Array.isArray(i)||(i=[i]),i}render(t,e){let i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){let e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(i0.default.MAP,t)}getMapInternal(){return this.get(i0.default.MAP)}setMap(t){this.mapPrecomposeKey_&&((0,I.unlistenByKey)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,I.unlistenByKey)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,I.listen)(t,iQ,this.handlePrecompose_,this),this.mapRenderKey_=(0,I.listen)(this,C.default.CHANGE,t.render,t),this.changed())}handlePrecompose_(t){let e=t.frameState.layerStatesArray,i=this.getLayerState(!1);(0,z.assert)(!e.some(t=>t.layer===i.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),e.push(i)}setSource(t){this.set(i0.default.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}}function i2(t,e){if(!t.visible)return!1;let i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;let s=e.zoom;return s>t.minZoom&&s<=t.maxZoom}var i4=i1,B=y("5dXmB"),it=y("erROg"),ie=y("cgxQK"),I=y("bsgMw"),T=y("lW8xZ"),i3={};i3=function(){function t(t,e,i){let s=t[e];t[e]=t[i],t[i]=s}function e(t,e){i(t,0,t.children.length,e,t)}function i(t,e,i,r,n){n||(n=u(null)),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let a=e;a<i;a++){let e=t.children[a];s(n,t.leaf?r(e):e)}return n}function s(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function r(t,e){return t.minX-e.minX}function n(t,e){return t.minY-e.minY}function a(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function o(t){return t.maxX-t.minX+(t.maxY-t.minY)}function l(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function h(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function u(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(e,i,s,r,n){let a=[i,s];for(;a.length;){if((s=a.pop())-(i=a.pop())<=r)continue;let o=i+Math.ceil((s-i)/r/2)*r;(function e(i,s,r=0,n=i.length-1,a=function(t,e){return t<e?-1:+(t>e)}){for(;n>r;){if(n-r>600){let t=n-r+1,o=s-r+1,l=Math.log(t),h=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*h*(t-h)/t)*(o-t/2<0?-1:1);e(i,s,Math.max(r,Math.floor(s-o*h/t+u)),Math.min(n,Math.floor(s+(t-o)*h/t+u)),a)}let o=i[s],l=r,h=n;for(t(i,r,s),a(i[n],o)>0&&t(i,r,n);l<h;
1){for(t(i,l,h),l++,h--;0>a(i[l],o);)l++;for(;a(i[h],o)>0;)h--}0===a(i[r],o)?t(i,r,h):t(i,++h,n),h<=s&&(r=h+1),s<=h&&(n=h-1)}})(e,o,i,s,n),a.push(i,o,o,s)}}return class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data,i=[];if(!h(t,e))return i;let s=this.toBBox,r=[];for(;e;){for(let n=0;n<e.children.length;n++){let a=e.children[n],o=e.leaf?s(a):a;h(t,o)&&(e.leaf?i.push(a):l(t,o)?this._all(a,i):r.push(a))}e=r.pop()}return i}collides(t){let e=this.data;if(!h(t,e))return!1;let i=[];for(;e;){for(let s=0;s<e.children.length;s++){let r=e.children[s],n=e.leaf?this.toBBox(r):r;if(h(t,n)){if(e.leaf||l(t,n))return!0;i.push(r)}}e=i.pop()}return!1}load(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(let e=0;e<t.length;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){let t=this.data;this.data=e,e=t}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=u([]),this}remove(t,e){let i,s,r;if(!t)return this;let n=this.data,a=this.toBBox(t),o=[],h=[];for(;n||o.length;){if(n||(n=o.pop(),s=o[o.length-1],i=h.pop(),r=!0),n.leaf){let i=function(t,e,i){if(!i)return e.indexOf(t);for(let s=0;s<e.length;s++)if(i(t,e[s]))return s;return -1}(t,n.children,e);if(-1!==i)return n.children.splice(i,1),o.push(n),this._condense(o),this}r||n.leaf||!l(n,a)?s?(i++,n=s.children[i],r=!1):n=null:(o.push(n),h.push(i),i=0,s=n,n=n.children[0])}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){let i=[];for(;t;)t.leaf?e.push(...t.children):i.push(...t.children),t=i.pop();return e}_build(t,i,s,r){let n=s-i+1,a,o=this._maxEntries;if(n<=o)return e(a=u(t.slice(i,s+1)),this.toBBox),a;r||(r=Math.ceil(Math.log(n)/Math.log(o)),o=Math.ceil(n/Math.pow(o,r-1))),(a=u([])).leaf=!1,a.height=r;let l=Math.ceil(n/o),h=l*Math.ceil(Math.sqrt(o));d(t,i,s,h,this.compareMinX);for(let e=i;e<=s;e+=h){let i=Math.min(e+h-1,s);d(t,e,i,l,this.compareMinY);for(let s=e;s<=i;s+=l){let e=Math.min(s+l-1,i);a.children.push(this._build(t,s,e,r-1))}}return e(a,this.toBBox),a}_chooseSubtree(t,e,i,s){for(;s.push(e),!e.leaf&&s.length-1!==i;){let i,s=1/0,r=1/0;for(let n=0;n<e.children.length;n++){let o=e.children[n],l=a(o),h=(Math.max(o.maxX,t.maxX)-Math.min(o.minX,t.minX))*(Math.max(o.maxY,t.maxY)-Math.min(o.minY,t.minY))-l;h<r?(r=h,s=l<s?l:s,i=o):h===r&&l<s&&(s=l,i=o)}e=i||e.children[0]}return e}_insert(t,e,i){let r=i?t:this.toBBox(t),n=[],a=this._chooseSubtree(r,this.data,e,n);for(a.children.push(t),s(a,r);e>=0&&n[e].children.length>this._maxEntries;)this._split(n,e),e--;this._adjustParentBBoxes(r,n,e)}_split(t,i){let s=t[i],r=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,r);let a=this._chooseSplitIndex(s,n,r),o=u(s.children.splice(a,s.children.length-a));o.height=s.height,o.leaf=s.leaf,e(s,this.toBBox),e(o,this.toBBox),i?t[i-1].children.push(o):this._splitRoot(s,o)}_splitRoot(t,i){this.data=u([t,i]),this.data.height=t.height+1,this.data.leaf=!1,e(this.data,this.toBBox)}_chooseSplitIndex(t,e,s){let r,n=1/0,o=1/0;for(let l=e;l<=s-e;l++){let e=i(t,0,l,this.toBBox),h=i(t,l,s,this.toBBox),u=function(t,e){let i=Math.max(t.minX,e.minX),s=Math.max(t.minY,e.minY);return Math.max(0,Math.min(t.maxX,e.maxX)-i)*Math.max(0,Math.min(t.maxY,e.maxY)-s)}(e,h),d=a(e)+a(h);u<n?(n=u,r=l,o=d<o?d:o):u===n&&d<o&&(o=d,r=l)}return r||s-e}_chooseSplitAxis(t,e,i){let s=t.leaf?this.compareMinX:r,a=t.leaf?this.compareMinY:n;this._allDistMargin(t,e,i,s)<this._allDistMargin(t,e,i,a)&&t.children.sort(s)}_allDistMargin(t,e,r,n){t.children.sort(n);let a=this.toBBox,l=i(t,0,e,a),h=i(t,r-e,r,a),u=o(l)+o(h);for(let i=e;i<r-e;i++){let e=t.children[i];s(l,t.leaf?a(e):e),u+=o(l)}for(let i=r-e-1;i>=e;i--){let e=t.children[i];s(h,t.leaf?a(e):e),u+=o(h)}return u}_adjustParentBBoxes(t,e,i){for(let r=i;r>=0;r--)s(e[r],t)}_condense(t){for(let i,s=t.length-1;s>=0;s--)0===t[s].children.length?s>0?(i=t[s-1].children).splice(i.indexOf(t[s]),1):this.clear():e(t[s],this.toBBox)}}}();var ie=y("cgxQK"),H=y("a6roo");let i8=[NaN,NaN,NaN,0],i5=/^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,i6=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,i7=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,i9=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function st(t,e){return t.endsWith("%")?Number(t.substring(0,t.length-1))/e:Number(t)}function se(t){throw Error('failed to parse "'+t+'" as color')}let si={},ss=0;function sr(t){return t>
1.0031308?269.025*Math.pow(t,1/2.4)-14.025:3294.6*t}function sn(t){return t>.2068965?Math.pow(t,3):108/841*(t-4/29)}function sa(t){return t>10.314724?Math.pow((t+14.025)/269.025,2.4):t/3294.6}function so(t){return t>.0088564?Math.pow(t,1/3):t/(108/841)+4/29}function sl(t){let e=sa(t[0]),i=sa(t[1]),s=sa(t[2]),r=so(.222488403*e+.716873169*i+.06060791*s),n=500*(so(.452247074*e+.399439023*i+.148375274*s)-r),a=200*(r-so(.016863605*e+.117638439*i+.865350722*s)),o=180/Math.PI*Math.atan2(a,n);return[116*r-16,Math.sqrt(n*n+a*a),o<0?o+360:o,t[3]]}function sh(e){if("none"===e)return i8;if(si.hasOwnProperty(e))return si[e];if(ss>=1024){let t=0;for(let e in si)(3&t++)==0&&(delete si[e],--ss)}let i=function e(i){if(i.toLowerCase().startsWith("rgb")){let t=i.match(i6)||i.match(i5)||i.match(i7);if(t){let e=t[4],i=100/255;return[(0,H.clamp)(st(t[1],i)+.5|0,0,255),(0,H.clamp)(st(t[2],i)+.5|0,0,255),(0,H.clamp)(st(t[3],i)+.5|0,0,255),void 0!==e?(0,H.clamp)(st(e,100),0,1):1]}se(i)}if(i.startsWith("#")){if(i9.test(i)){let t=i.substring(1),e=t.length<=4?1:2,s=[0,0,0,255];for(let i=0,r=t.length;i<r;i+=e){let r=parseInt(t.substring(i,i+e),16);1===e&&(r+=r<<4),s[i/e]=r}return s[3]=s[3]/255,s}se(i)}let s=(t||(t=(0,ie.createCanvasContext2D)(1,1,void 0,{willReadFrequently:!0,desynchronized:!0})),t);s.fillStyle="#abcdef";let r=s.fillStyle;s.fillStyle=i,s.fillStyle===r&&(s.fillStyle="#fedcba",r=s.fillStyle,s.fillStyle=i,s.fillStyle===r&&se(i));let n=s.fillStyle;if(n.startsWith("#")||n.startsWith("rgba"))return e(n);s.clearRect(0,0,1,1),s.fillRect(0,0,1,1);let a=Array.from(s.getImageData(0,0,1,1).data);return a[3]=(0,H.toFixed)(a[3]/255,3),a}(e);for(let t of(4!==i.length&&se(e),i))isNaN(t)&&se(e);return si[e]=i,++ss,i}function su(t){return Array.isArray(t)?t:sh(t)}function sd(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let s=t[2];return s!=(0|s)&&(s=s+.5|0),"rgba("+e+","+i+","+s+","+(void 0===t[3]?1:Math.round(1e3*t[3])/1e3)+")"}var K=y("kBSVF");function sc(t){return t[0]>0&&t[1]>0}function sg(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}let sf=0,sp=1<<sf++,s_=1<<sf++,sm=1<<sf++,sy=1<<sf++,sx=1<<sf++,sS=1<<sf++,sv=Math.pow(2,sf)-1,sw={[sp]:"boolean",[s_]:"number",[sm]:"string",[sy]:"color",[sx]:"number[]",[sS]:"size"},sE=Object.keys(sw).map(Number).sort(K.ascending);function sM(t){let e=[];for(let s of sE){var i;(t&(i=s))===i&&e.push(sw[s])}return 0===e.length?"untyped":e.length<3?e.join(" or "):e.slice(0,-1).join(", ")+", or "+e[e.length-1]}class sP{constructor(t,e){if(!(t in sw))throw Error(`literal expressions must have a specific type, got ${sM(t)}`);this.type=t,this.value=e}}class sC{constructor(t,e,...i){this.type=t,this.operator=e,this.args=i}}function sb(){return{variables:new Set,properties:new Set,featureId:!1,geometryType:!1,mapState:!1}}function sR(t,e,i){switch(typeof t){case"boolean":if(e===sm)return new sP(sm,t?"true":"false");if((e&sp)!==sp)throw Error(`got a boolean, but expected ${sM(e)}`);return new sP(sp,t);case"number":if(e===sS)return new sP(sS,sg(t));if(e===sp)return new sP(sp,!!t);if(e===sm)return new sP(sm,t.toString());if((e&s_)!==s_)throw Error(`got a number, but expected ${sM(e)}`);return new sP(s_,t);case"string":if(e===sy)return new sP(sy,sh(t));if(e===sp)return new sP(sp,!!t);if((e&sm)!==sm)throw Error(`got a string, but expected ${sM(e)}`);return new sP(sm,t)}if(!Array.isArray(t))throw Error("expression must be an array or a primitive value");if(0===t.length)throw Error("empty expression");if("string"==typeof t[0]){var s=t,r=e,n=i;let a=s[0],o=sZ[a];if(!o)throw Error(`unknown operator: ${a}`);return o(s,r,n)}for(let e of t)if("number"!=typeof e)throw Error("expected an array of numbers");if(e===sS){if(2!==t.length)throw Error(`expected an array of two values for a size, got ${t.length}`);return new sP(sS,t)}if(e===sy){if(3===t.length)return new sP(sy,[...t,1]);if(4===t.length)return new sP(sy,t);throw Error(`expected an array of 3 or 4 values for a color, got ${t.length}`)}if((e&sx)!==sx)throw Error(`got an array of numbers, but expected ${sM(e)}`);return new sP(sx,t)}
1let sI="concat",sT="geometry-type",sA="resolution",sL="clamp",sN="floor",sF="ceil",sG="round",sO="atan",sD="sqrt",sk="match",sj="between",sB="interpolate",sz="coalesce",sU="case",sW="number",sV="string",sq="to-string",sZ={get:s0(sY(1,1/0),sK),var:s0(sY(1,1),function(t,e,i){let s=t[1];if("string"!=typeof s)throw Error("expected a string argument for var operation");return i.variables.add(s),[new sP(sm,s)]}),has:s0(sY(1,1/0),sK),id:s0(function(t,e,i){i.featureId=!0},sX),[sI]:s0(sY(2,1/0),sJ(sm)),[sT]:s0(function(t,e,i){i.geometryType=!0},sX),"line-metric":s0(sX),[sA]:s0(sH,sX),zoom:s0(sH,sX),time:s0(sH,sX),any:s0(sY(2,1/0),sJ(sp)),all:s0(sY(2,1/0),sJ(sp)),"!":s0(sY(1,1),sJ(sp)),"==":s0(sY(2,2),sJ(sv)),"!=":s0(sY(2,2),sJ(sv)),">":s0(sY(2,2),sJ(s_)),">=":s0(sY(2,2),sJ(s_)),"<":s0(sY(2,2),sJ(s_)),"<=":s0(sY(2,2),sJ(s_)),"*":s0(sY(2,1/0),sQ),[sz]:s0(sY(2,1/0),sQ),"/":s0(sY(2,2),sJ(s_)),"+":s0(sY(2,1/0),sJ(s_)),"-":s0(sY(2,2),sJ(s_)),[sL]:s0(sY(3,3),sJ(s_)),"%":s0(sY(2,2),sJ(s_)),"^":s0(sY(2,2),sJ(s_)),abs:s0(sY(1,1),sJ(s_)),[sN]:s0(sY(1,1),sJ(s_)),[sF]:s0(sY(1,1),sJ(s_)),[sG]:s0(sY(1,1),sJ(s_)),sin:s0(sY(1,1),sJ(s_)),cos:s0(sY(1,1),sJ(s_)),[sO]:s0(sY(1,2),sJ(s_)),[sD]:s0(sY(1,1),sJ(s_)),[sk]:s0(sY(4,1/0),s$,function(t,e,i){let s=t.length-1,r=sm|s_|sp,n=sR(t[1],r,i),a=sR(t[t.length-1],e,i),o=Array(s-2);for(let e=0;e<s-2;e+=2){try{let s=sR(t[e+2],n.type,i);o[e]=s}catch(t){throw Error(`failed to parse argument ${e+1} of match expression: ${t.message}`)}try{let s=sR(t[e+3],a.type,i);o[e+1]=s}catch(t){throw Error(`failed to parse argument ${e+2} of match expression: ${t.message}`)}}return[n,...o,a]}),[sj]:s0(sY(3,3),sJ(s_)),[sB]:s0(sY(6,1/0),s$,function(t,e,i){let s,r,n=t[1];switch(n[0]){case"linear":s=1;break;case"exponential":let a=n[1];if("number"!=typeof a||a<=0)throw Error(`expected a number base for exponential interpolation, got ${JSON.stringify(a)} instead`);s=a;break;default:throw Error(`invalid interpolation type: ${JSON.stringify(n)}`)}let o=new sP(s_,s);try{r=sR(t[2],s_,i)}catch(t){throw Error(`failed to parse argument 1 in interpolate expression: ${t.message}`)}let l=Array(t.length-3);for(let s=0;s<l.length;s+=2){try{let e=sR(t[s+3],s_,i);l[s]=e}catch(t){throw Error(`failed to parse argument ${s+2} for interpolate expression: ${t.message}`)}try{let r=sR(t[s+4],e,i);l[s+1]=r}catch(t){throw Error(`failed to parse argument ${s+3} for interpolate expression: ${t.message}`)}}return[o,r,...l]}),[sU]:s0(sY(3,1/0),function(t,e,i){let s=t[0],r=t.length-1;if(r%2==0)throw Error(`expected an odd number of arguments for ${s}, got ${r} instead`)},function(t,e,i){let s=sR(t[t.length-1],e,i),r=Array(t.length-1);for(let e=0;e<r.length-1;e+=2){try{let s=sR(t[e+1],sp,i);r[e]=s}catch(t){throw Error(`failed to parse argument ${e} of case expression: ${t.message}`)}try{let n=sR(t[e+2],s.type,i);r[e+1]=n}catch(t){throw Error(`failed to parse argument ${e+1} of case expression: ${t.message}`)}}return r[r.length-1]=s,r}),in:s0(sY(2,2),function(t,e,i){let s,r=t[2];if(!Array.isArray(r))throw Error('the second argument for the "in" operator must be an array');if("string"==typeof r[0]){if("literal"!==r[0])throw Error('for the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions');if(!Array.isArray(r[1]))throw Error('failed to parse "in" expression: the literal operator must be followed by an array');r=r[1],s=sm}else s=s_;let n=Array(r.length);for(let t=0;t<n.length;t++)try{let e=sR(r[t],s,i);n[t]=e}catch(e){throw Error(`failed to parse haystack item ${t} for "in" expression: ${e.message}`)}return[sR(t[1],s,i),...n]}),[sW]:s0(sY(1,1/0),sJ(sv)),[sV]:s0(sY(1,1/0),sJ(sv)),array:s0(sY(1,1/0),sJ(s_)),color:s0(sY(1,4),sJ(s_)),band:s0(sY(1,3),sJ(s_)),palette:s0(sY(2,2),function(t,e,i){let s;try{s=sR(t[1],s_,i)}catch(t){throw Error(`failed to parse first argument in palette expression: ${t.message}`)}let r=t[2];if(!Array.isArray(r))throw Error("the second argument of palette must be an array");let n=Array(r.length);for(let t=0;t<n.length;t++){let e;try{e=sR(r[t],sy,i)}catch(e){throw Error(`failed to parse color at index ${t} in palette expression: ${e.message}`)}if(!(e instanceof sP))throw Error(`the palette color at index ${t} must be a literal value`);n[t]=e}return[s,...n]}),[sq]:s0(sY(1,1),sJ(sp|s_|sm|sy))};function sK(t,e,i){let s=t.length-1,r=Array(s);for(let e=0;e<s;++e){let s=t[e+1];switch(typeof s){case"number":r[e]=new sP(s_,s);break;case"string":r[e]=new sP(sm,s);break;default:throw Error(`expected a string key or numeric array index for a get operation, got ${s}`)}0===e&&i.properties.add(String(s))}return r}function sH(t,e,i){i.mapState=!0}function sX(t,e,i){let s=t[0];if(1!==t.length)throw Error(`expected no arguments for ${s} operation`);return[]}function sY(t,e){return function(i,s,r){let n=i[0],a=i.length-1;if(t===e){if(a!==t)throw Error(`expected ${t} argument${1===t?"":"s"} for ${n}, got ${a}`)}else if(a<t||a>e){let i=e===1/0?`${t} or more`:`${t} to ${e}`;throw Error(`expected ${i} arguments for ${n}, got ${a}`)}}}function sQ(t,e,i){let s=t.length-1,r=Array(s);for(let n=0;n<s;++n){let s=sR(t[n+1],e,i);r[n]=s}return r}function sJ(t){return function(e,i,s){let r=e.length-1,n=Array(r);for(let i=0;i<r;++i){let r=sR(e[i+1],t,s);n[i]=r}return n}}function s$(t,e,i){let s=t[0],r=t.length-1;if(r%2==1)throw Error(`expected an even number of arguments for operation ${s}, got ${r} instead`)}function s0(...t){return function(e,i,s){let r,n=e[0];for(let n=0;n<t.length;n++){let a=t[n](e,i,s);if(n==t.length-1){if(!a)throw Error("expected last argument validator to return the parsed args");r=a}}return new sC(i,n,...r)}}function s1(){return{variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""}}function s2(t,e,i){return function t(e,i){if(e instanceof sP){if(e.type===sy&&"string"==typeof e.value){let t=sh(e.value);return function(){return t}}return function(){return e.value}}let s=e.operator;
1switch(s){case sW:case sV:case sz:var r=e,n=i;let a=r.operator,o=r.args.length,l=Array(o);for(let e=0;e<o;++e)l[e]=t(r.args[e],n);switch(a){case sz:return t=>{for(let e=0;e<o;++e){let i=l[e](t);if(null!=i)return i}throw Error("Expected one of the values to be non-null")};case sW:case sV:return t=>{for(let e=0;e<o;++e){let i=l[e](t);if(typeof i===a)return i}throw Error(`Expected one of the values to be a ${a}`)};default:throw Error(`Unsupported assertion operator ${a}`)}case"get":case"var":case"has":var h=e;let u=h.args[0].value;switch(h.operator){case"get":return t=>{let e=h.args,i=t.properties[u];for(let t=1,s=e.length;t<s;++t)i=i[e[t].value];return i};case"var":return t=>t.variables[u];case"has":return t=>{let e=h.args;if(!(u in t.properties))return!1;let i=t.properties[u];for(let t=1,s=e.length;t<s;++t){let s=e[t].value;if(!i||!Object.hasOwn(i,s))return!1;i=i[s]}return!0};default:throw Error(`Unsupported accessor operator ${h.operator}`)}case"id":return t=>t.featureId;case sT:return t=>t.geometryType;case sI:{let s=e.args.map(e=>t(e,i));return t=>"".concat(...s.map(e=>e(t).toString()))}case sA:return t=>t.resolution;case"any":case"all":case sj:case"in":case"!":var d=e,c=i;let g=d.operator,f=d.args.length,p=Array(f);for(let e=0;e<f;++e)p[e]=t(d.args[e],c);switch(g){case"any":return t=>{for(let e=0;e<f;++e)if(p[e](t))return!0;return!1};case"all":return t=>{for(let e=0;e<f;++e)if(!p[e](t))return!1;return!0};case sj:return t=>{let e=p[0](t),i=p[1](t),s=p[2](t);return e>=i&&e<=s};case"in":return t=>{let e=p[0](t);for(let i=1;i<f;++i)if(e===p[i](t))return!0;return!1};case"!":return t=>!p[0](t);default:throw Error(`Unsupported logical operator ${g}`)}case"==":case"!=":case"<":case"<=":case">":case">=":var _=e,m=i;let y=_.operator,x=t(_.args[0],m),S=t(_.args[1],m);switch(y){case"==":return t=>x(t)===S(t);case"!=":return t=>x(t)!==S(t);case"<":return t=>x(t)<S(t);case"<=":return t=>x(t)<=S(t);case">":return t=>x(t)>S(t);case">=":return t=>x(t)>=S(t);default:throw Error(`Unsupported comparison operator ${y}`)}case"*":case"/":case"+":case"-":case sL:case"%":case"^":case"abs":case sN:case sF:case sG:case"sin":case"cos":case sO:case sD:var v=e,w=i;let E=v.operator,M=v.args.length,P=Array(M);for(let e=0;e<M;++e)P[e]=t(v.args[e],w);switch(E){case"*":return t=>{let e=1;for(let i=0;i<M;++i)e*=P[i](t);return e};case"/":return t=>P[0](t)/P[1](t);case"+":return t=>{let e=0;for(let i=0;i<M;++i)e+=P[i](t);return e};case"-":return t=>P[0](t)-P[1](t);case sL:return t=>{let e=P[0](t),i=P[1](t);if(e<i)return i;let s=P[2](t);return e>s?s:e};case"%":return t=>P[0](t)%P[1](t);case"^":return t=>Math.pow(P[0](t),P[1](t));case"abs":return t=>Math.abs(P[0](t));case sN:return t=>Math.floor(P[0](t));case sF:return t=>Math.ceil(P[0](t));case sG:return t=>Math.round(P[0](t));case"sin":return t=>Math.sin(P[0](t));case"cos":return t=>Math.cos(P[0](t));case sO:if(2===M)return t=>Math.atan2(P[0](t),P[1](t));return t=>Math.atan(P[0](t));case sD:return t=>Math.sqrt(P[0](t));default:throw Error(`Unsupported numeric operator ${E}`)}case sU:var C=e,b=i;let R=C.args.length,I=Array(R);for(let e=0;e<R;++e)I[e]=t(C.args[e],b);return t=>{for(let e=0;e<R-1;e+=2)if(I[e](t))return I[e+1](t);return I[R-1](t)};case sk:var T=e,A=i;let L=T.args.length,N=Array(L);for(let e=0;e<L;++e)N[e]=t(T.args[e],A);return t=>{let e=N[0](t);for(let i=1;i<L-1;i+=2)if(e===N[i](t))return N[i+1](t);return N[L-1](t)};case sB:var F=e,G=i;let O=F.args.length,D=Array(O);for(let e=0;e<O;++e)D[e]=t(F.args[e],G);return t=>{let e,i,s=D[0](t),r=D[1](t);for(let n=2;n<O;n+=2){let a=D[n](t),o=D[n+1](t),l=Array.isArray(o);if(l&&(o=function(t){if(4===t.length)return t;let e=t.slice();return e[3]=1,e}(o)),a>=r){if(2===n)return o;if(l)return function(t,e,i,s,r,n){var a;let o,l,h,u,d,c,g,f,p;if(0==r-i)return s;let _=sl(s),m=sl(n),y=m[2]-_[2];return y>180?y-=360:y<-180&&(y+=360),o=((a=[s4(t,e,i,_[0],r,m[0]),s4(t,e,i,_[1],r,m[1]),_[2]+s4(t,e,i,0,r,y),s4(t,e,i,s[3],r,n[3])])[0]+16)/116,l=a[1],h=a[2]*Math.PI/180,u=sn(o),d=sn(o+l/500*Math.cos(h)),g=sr(3.021973625*d-1.617392459*u-.404875592*(c=sn(o-l/200*Math.sin(h)))),f=sr(-.943766287*d+1.916279586*u+.027607165*c),p=sr(.069407491*d-.22898585*u+1.159737864*c),[(0,H.clamp)(g+.5|0,0,255),(0,H.clamp)(f+.5|0,0,255),(0,H.clamp)(p+.5|0,0,255),a[3]]}(s,r,e,i,a,o);return s4(s,r,e,i,a,o)}e=a,i=o}return i};case sq:var k=e,j=i;let B=k.operator,z=k.args.length,U=Array(z);for(let e=0;e<z;++e)U[e]=t(k.args[e],j);if(B===sq)return t=>{let e=U[0](t);return k.args[0].type===sy?sd(e):e.toString()};throw Error(`Unsupported convert operator ${B}`);default:throw Error(`Unsupported operator ${s}`)}}(sR(t,e,i),i)}function s4(t,e,i,s,r,n){let a=r-i;if(0===a)return s;let o=e-i;return s+(1===t?o/a:(Math.pow(t,o)-1)/(Math.pow(t,a)-1))*(n-s)}var U=y("kKEgb"),ie=y("cgxQK"),C=y("cw4dl"),R=y("9LzRi"),I=y("bsgMw"),to=y("eQaCk"),T=y("lW8xZ");R.default;var ie=y("cgxQK"),C=y("cw4dl"),R=y("9LzRi"),ie=y("cgxQK");function s3(t,e){return t+":"+(e?su(e):"null")}let s8=new class{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}
1expire(){if(this.canExpireCache()){let t=0;for(let e in this.cache_){let i=this.cache_[e];(3&t++)==0&&!i.hasListener()&&(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e){let i=s3(t,e);return i in this.cache_?this.cache_[i]:null}getPattern(t,e){let i=s3(t,e);return i in this.patternCache_?this.patternCache_[i]:null}set(t,e,i,s){let r=s3(t,e),n=r in this.cache_;this.cache_[r]=i,s&&(0===i.getImageState()&&i.load(),1===i.getImageState()?i.ready().then(()=>{this.patternCache_[r]=(0,ie.getSharedCanvasContext2D)().createPattern(i.getImage(1),"repeat")}):this.patternCache_[r]=(0,ie.getSharedCanvasContext2D)().createPattern(i.getImage(1),"repeat")),!n&&++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}},s5=null;class s6 extends R.default{constructor(t,e,i,s,r){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=i?.crossOrigin,this.referrerPolicy_=i?.referrerPolicy,this.canvas_={},this.color_=r,this.imageState_=void 0===s?0:s,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_),void 0!==this.referrerPolicy_&&(this.image_.referrerPolicy=this.referrerPolicy_)}isTainted_(){if(void 0===this.tainted_&&2===this.imageState_){s5||(s5=(0,ie.createCanvasContext2D)(1,1,void 0,{willReadFrequently:!0})),s5.drawImage(this.image_,0,0);try{s5.getImageData(0,0,1,1),this.tainted_=!1}catch{s5=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(C.default.CHANGE)}handleImageError_(){this.imageState_=3,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=2,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}setImage(t){this.image_=t}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){let t=this.size_[0],e=this.size_[1],i=(0,ie.createCanvasContext2D)(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(0===this.imageState_){var t,e;this.image_||this.initializeImage_(),this.imageState_=1;try{void 0!==this.src_&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&(t=this.image_,(e=this.src_)&&(t.src=e),t.src&&T.IMAGE_DECODE?new Promise((e,i)=>t.decode().then(()=>e(t)).catch(s=>t.complete&&t.width?e(t):i(s))):new Promise((e,i)=>{function s(){n(),e(t)}function r(){n(),i(Error("Image load error"))}function n(){t.removeEventListener("load",s),t.removeEventListener("error",r)}t.addEventListener("load",s),t.addEventListener("error",r)})).then(t=>{this.image_=t,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(t){var e;if(!this.color_||this.canvas_[t]||2!==this.imageState_)return;let i=this.image_,s=(0,ie.createCanvasContext2D)(Math.ceil(i.width*t),Math.ceil(i.height*t)),r=s.canvas;s.scale(t,t),s.drawImage(i,0,0),s.globalCompositeOperation="multiply",s.fillStyle="string"==typeof(e=this.color_)?e:sd(e),s.fillRect(0,0,r.width/t,r.height/t),s.globalCompositeOperation="destination-in",s.drawImage(i,0,0),this.canvas_[t]=r}ready(){return this.ready_||(this.ready_=new Promise(t=>{if(2===this.imageState_||3===this.imageState_)t();else{let e=()=>{(2===this.imageState_||3===this.imageState_)&&(this.removeEventListener(C.default.CHANGE,e),t())};this.addEventListener(C.default.CHANGE,e)}})),this.ready_}}function s7(t,e,i,s,r,n){let a=void 0===e?void 0:s8.get(e,r);return a||(a=new s6(t,t&&"src"in t?t.src||void 0:e,i,s,r),s8.set(e,r,a,n)),n&&a&&!s8.getPattern(e,r)&&s8.set(e,r,a,n),a}function s9(t){return t?Array.isArray(t)?sd(t):"object"==typeof t&&"src"in t?function(t){if(!t.offset||!t.size)return s8.getPattern(t.src,t.color);let e=t.src+":"+t.offset,i=s8.getPattern(e,t.color);if(i)return i;
1let s=s8.get(t.src,null);if(2!==s.getImageState())return null;let r=(0,ie.createCanvasContext2D)(t.size[0],t.size[1]);return r.drawImage(s.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),s7(r.canvas,e,void 0,2,t.color,!0),s8.getPattern(e,t.color)}(t):t:null}var ie=y("cgxQK"),j=y("fnScq"),it=y("erROg"),ie=y("cgxQK"),T=y("lW8xZ"),U=y("kKEgb");let rt="10px sans-serif",re="#000",ri="round",rs=[],rr="round",rn="#000",ra="center",ro="middle",rl=[0,0,0,0],rh=new(0,j.default),ru=null,rd={},rc=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]),rg=function(){let t,e;async function i(t){await e.ready;let i=await e.load(t);if(0===i.length)return!1;let s=(0,it.getFontParameters)(t),r=s.families[0].toLowerCase(),n=s.weight;return i.some(t=>{let e=t.family.replace(/^['"]|['"]$/g,"").toLowerCase(),i=it.fontWeights[t.weight]||t.weight;return e===r&&t.style===s.style&&i==n})}async function s(){await e.ready;let r=!0,n=rh.getProperties(),a=Object.keys(n).filter(t=>n[t]<100);for(let t=a.length-1;t>=0;--t){let e=a[t],s=n[e];s<100&&(await i(e)?((0,U.clear)(rd),rh.set(e,100)):(s+=10,rh.set(e,s,!0),s<100&&(r=!1)))}t=void 0,r||(t=setTimeout(s,100))}return async function(i){e||(e=T.WORKER_OFFSCREEN_CANVAS?self.fonts:document.fonts);let r=(0,it.getFontParameters)(i);if(!r)return;let n=r.families,a=!1;for(let t of n){var o,l;if(rc.has(t))continue;let e=(o=r.style,l=r.weight,`${o} ${l} 16px "${t}"`);void 0===rh.get(e)&&(rh.set(e,0,!0),a=!0)}a&&(clearTimeout(t),t=setTimeout(s,100))}}(),rf=function(t){let e=rd[t];if(void 0==e){if(T.WORKER_OFFSCREEN_CANVAS){let i=(0,it.getFontParameters)(t),s=rp(t,"Žg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(s.actualBoundingBoxAscent+s.actualBoundingBoxDescent)}else o||((o=document.createElement("div")).innerHTML="M",o.style.minHeight="0",o.style.maxHeight="none",o.style.height="auto",o.style.padding="0",o.style.border="none",o.style.position="absolute",o.style.display="block",o.style.left="-99999px"),o.style.font=t,document.body.appendChild(o),e=o.offsetHeight,document.body.removeChild(o);rd[t]=e}return e};function rp(t,i){return ru||(ru=(0,ie.createCanvasContext2D)(1,1)),t!=e&&(ru.font=t,e=ru.font),ru.measureText(i)}function r_(t,e,i){if(e in i)return i[e];let s=e.split("\n").reduce((e,i)=>Math.max(e,rp(t,i).width),0);return i[e]=s,s}var th=y("lVQul");class rm{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=sg(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){let t=this.getScale();return new rm({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return(0,th.abstract)()}getImage(t){return(0,th.abstract)()}getHitDetectionImage(){return(0,th.abstract)()}getPixelRatio(t){return 1}getImageState(){return(0,th.abstract)()}getImageSize(){return(0,th.abstract)()}getOrigin(){return(0,th.abstract)()}getSize(){return(0,th.abstract)()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=sg(t)}listenImageChange(t){(0,th.abstract)()}load(){(0,th.abstract)()}unlistenImageChange(t){(0,th.abstract)()}ready(){return Promise.resolve()}}var ry=rm;class rx extends ry{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,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],declutterMode:t.declutterMode}),this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius=t.radius,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?1:2,1===this.imageState_&&this.ready().then(()=>this.imageState_=2),this.render()}clone(){let t=this.getScale(),e=new rx({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.get
1Stroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){let t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.fill_?.getKey(),i=`${t},${this.angle_},${this.radius},${this.radius2_},${this.points_},${e}`+Object.values(this.renderOptions_).join(","),s=s8.get(i,null)?.getImage(1);if(!s){let e=this.renderOptions_,r=Math.ceil(e.size*t),n=(0,ie.createCanvasContext2D)(r,r);this.draw_(e,n,t);let a=new s6(s=n.canvas,void 0,null,2,null);s8.set(i,null,a),createImageBitmap(s).then(t=>{a.setImage(t)})}return s}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}setRadius(t){this.radius!==t&&(this.radius=t,this.render())}getRadius2(){return this.radius2_}setRadius2(t){this.radius2_!==t&&(this.radius2_=t,this.render())}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let s=this.radius,r=void 0===this.radius2_?s:this.radius2_;if(s<r){let t=s;s=r,r=t}let n=2*Math.PI/(void 0===this.radius2_?this.points_:2*this.points_),a=r*Math.sin(n),o=s-Math.sqrt(r*r-a*a),l=Math.sqrt(a*a+o*o),h=l/a;if("miter"===t&&h<=i)return h*e;let u=e/2/h,d=e/2*(o/l),c=Math.sqrt((s+u)*(s+u)+d*d)-s;if(void 0===this.radius2_||"bevel"===t)return 2*c;let g=s*Math.sin(n),f=r-Math.sqrt(s*s-g*g),p=Math.sqrt(g*g+f*f)/g;return p<=i?2*Math.max(c,p*e/2-r-s):2*c}createRenderOptions(){let t,e=ri,i=rr,s=0,r=null,n=0,a=0;this.stroke_&&(t=s9(this.stroke_.getColor()??rn),a=this.stroke_.getWidth()??1,r=this.stroke_.getLineDash(),n=this.stroke_.getLineDashOffset()??0,i=this.stroke_.getLineJoin()??rr,e=this.stroke_.getLineCap()??ri,s=this.stroke_.getMiterLimit()??10);let o=this.calculateLineJoinSize_(i,a,s);return{strokeStyle:t,strokeWidth:a,size:Math.ceil(2*Math.max(this.radius,this.radius2_||0)+o),lineCap:e,lineDash:r,lineDashOffset:n,lineJoin:i,miterLimit:s}}render(){this.renderOptions_=this.createRenderOptions();let t=this.renderOptions_.size;this.hitDetectionCanvas_=null,this.size_=[t,t]}draw_(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let t=this.fill_.getColor();null===t&&(t=re),e.fillStyle=s9(t),e.fill()}t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){let e;if(this.fill_){let i=this.fill_.getColor(),s=0;"string"==typeof i&&(i=su(i)),null===i?s=1:Array.isArray(i)&&(s=4===i.length?i[3]:1),0===s&&(e=(0,ie.createCanvasContext2D)(t.size,t.size),this.drawHitDetectionCanvas_(t,e))}return e?e.canvas:this.getImage(1)}createPath_(t){let e=this.points_,i=this.radius;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{let s=void 0===this.radius2_?i:this.radius2_;void 0!==this.radius2_&&(e*=2);let r=this.angle_-Math.PI/2,n=2*Math.PI/e;for(let a=0;a<e;a++){let e=r+a*n,o=a%2==0?i:s;t.lineTo(o*Math.cos(e),o*Math.sin(e))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=re,e.fill(),t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}}var rS=rx;class rv extends rS{constructor(t){super({points:1/0,fill:(t=t||{radius:5}).fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.dis
1placement:[0,0],declutterMode:t.declutterMode})}clone(){let t=this.getScale(),e=new rv({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(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}}var th=y("lVQul");class rw{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,void 0!==t.color&&this.setColor(t.color)}clone(){let t=this.getColor();return new rw({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(null!==t&&"object"==typeof t&&"src"in t){let e=s7(null,t.src,{crossOrigin:"anonymous"},void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then(()=>{this.patternImage_=null}),0===e.getImageState()&&e.load(),1===e.getImageState()&&(this.patternImage_=e)}this.color_=t}getKey(){let t=this.getColor();return t?t instanceof CanvasPattern||t instanceof CanvasGradient?(0,th.getUid)(t):"object"==typeof t&&"src"in t?t.src+":"+t.offset:su(t).toString():""}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}var z=y("eJ4LZ"),C=y("cw4dl"),th=y("lVQul");function rE(t,e,i,s){return void 0!==i&&void 0!==s?[i/t,s/e]:void 0!==i?i/t:void 0!==s?s/e:1}class rM extends ry{constructor(t){let e,i=void 0!==(t=t||{}).opacity?t.opacity:1,s=void 0!==t.rotation?t.rotation:0,r=void 0!==t.scale?t.scale:1,n=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:i,rotation:s,scale:r,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:n,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.referrerPolicy_=t.referrerPolicy;let a=void 0!==t.img?t.img:null,o=t.src;if((0,z.assert)(!(void 0!==o&&a),"`image` and `src` cannot be provided at the same time"),(void 0===o||0===o.length)&&a&&(o=a.src||(0,th.getUid)(a)),(0,z.assert)(void 0!==o&&o.length>0,"A defined and non-empty `src` or `image` must be provided"),(0,z.assert)(void 0===t.width&&void 0===t.height||void 0===t.scale,"`width` or `height` cannot be provided together with `scale`"),void 0!==t.src?e=0:void 0!==a&&(e="complete"in a?a.complete?2*!!a.src:1:2),this.color_=void 0!==t.color?su(t.color):null,this.iconImage_=s7(a,o,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},e,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,this.initialOptions_,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{let s=this.getImage(1);if(s.width&&s.height)e=s.width,i=s.height;else if(s instanceof HTMLImageElement){this.initialOptions_=t;let e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;let i=this.iconImage_.getSize();this.setScale(rE(i[0],i[1],t.width,t.height))};this.listenImageChange(e);return}}void 0!==e&&this.setScale(rE(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):t=Array.isArray(t=this.getScale())?t.slice():t,new rM({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;let e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),("top-right"==this.anchorOrigin_||"bottom-right"==this.anchorOrigin_)&&(t[0]=-t[0]+e[0]),("bottom-left"==this.anchorOrigin_||"bottom-right"==this.anchorOrigin_)&&(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}let e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}setColor(t){let e=t?su(t):null;if(this.color_===e||this.color_&&e&&this.color_.length===e.length&&this.color_.every((t,i)=>t===e[i]))return;this.color_=e;let i=this.getSrc(),s=void 0!==i?null:this.getHitDetectionImage(),r=void 0!==i?0:this.iconImage_.getImageState();this.iconImage_=s7(s,i,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},r,this.color_)}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){let e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),("top-right"==this.offsetOrigin_||"bottom-right"==this.offsetOrigin_)&&(t[0]=i[0]-e[0]-t[0]),("bottom-left"==this.offsetOrigin_||"bottom-right"==this.offsetOrigin_)&&(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}setSrc(t){this.iconImage_=s7(null,t,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},0,this.color_)}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){let t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:2==this.iconImage_.getImageState()?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){let t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:2==this.iconImage_.getImageState()?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(C.default.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(C.default.CHANGE,t)}ready(){return this.iconImage_.ready()}}class rP{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.offset_=t.offset,this.width_=t.width}clone(){let t=this.getColor();return new rP({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),offset:this.getOffset(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getOffset(){return this.offset_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setOffset(t){this.offset_=t}setWidth(t){this.width_=t}}var z=y("eJ4LZ");class rC{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=rI,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.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new rC({geometry:t??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.get
vendor: 4,240 bytes, line 1
1Stroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=rI,this.geometry_=t}setZIndex(t){this.zIndex_=t}}let rb=null;function rR(t,e){if(!rb){let t=new rw({color:"rgba(255,255,255,0.4)"}),e=new rP({color:"#3399CC",width:1.25});rb=[new rC({image:new rv({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return rb}function rI(t){return t.getGeometry()}class rT{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.keepUpright_=t.keepUpright,this.scale_=t.scale,this.scaleArray_=sg(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new rw({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding,this.declutterMode_=t.declutterMode}clone(){let t=this.getScale();return new rT({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),keepUpright:this.getKeepUpright(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()instanceof rw?this.getFill().clone():this.getFill(),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()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getKeepUpright(){return this.keepUpright_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setKeepUpright(t){this.keepUpright_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=sg(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}
1setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}function rA(t){return!0}function rL(t){let e=sb(),i=t.length,s=Array(i);for(let r=0;r<i;++r)s[r]=rN(t[r],e);let r=s1(),n=Array(i);return function(t,a){if(r.properties=t.getPropertiesInternal(),r.resolution=a,e.featureId){let e=t.getId();void 0!==e?r.featureId=e:r.featureId=null}let o=0;for(let t=0;t<i;++t){let e=s[t](r);e&&(n[o]=e,o+=1)}return n.length=o,n}}function rN(t,e){var i,s,r,n,a,o;let l,h,u,d,c,g,f,p,_,m,y,x,S,v,w,E,M,P,C,b,R,I,T,A,L,N,F,G,O,D,k=rF(t,"",e),j=rG(t,"",e),B=function(t,e){let i="text-",s=rk(t,i+"value",e);if(!s)return null;let r=rF(t,i,e),n=rF(t,i+"background-",e),a=rG(t,i,e),o=rG(t,i+"background-",e),l=rk(t,i+"font",e),h=rD(t,i+"max-angle",e),u=rD(t,i+"offset-x",e),d=rD(t,i+"offset-y",e),c=rj(t,i+"overflow",e),g=rk(t,i+"placement",e),f=rD(t,i+"repeat",e),p=rV(t,i+"scale",e),_=rj(t,i+"rotate-with-view",e),m=rD(t,i+"rotation",e),y=rk(t,i+"align",e),x=rk(t,i+"justify",e),S=rk(t,i+"baseline",e),v=rj(t,i+"keep-upright",e),w=rz(t,i+"padding",e),E=new rT({declutterMode:rH(t,i+"declutter-mode")});return function(t){if(E.setText(s(t)),r&&E.setFill(r(t)),n&&E.setBackgroundFill(n(t)),a&&E.setStroke(a(t)),o&&E.setBackgroundStroke(o(t)),l&&E.setFont(l(t)),h&&E.setMaxAngle(h(t)),u&&E.setOffsetX(u(t)),d&&E.setOffsetY(d(t)),c&&E.setOverflow(c(t)),g){let e=g(t);if("point"!==e&&"line"!==e)throw Error("Expected point or line for text-placement");E.setPlacement(e)}if(f&&E.setRepeat(f(t)),p&&E.setScale(p(t)),_&&E.setRotateWithView(_(t)),m&&E.setRotation(m(t)),y){let e=y(t);if("left"!==e&&"center"!==e&&"right"!==e&&"end"!==e&&"start"!==e)throw Error("Expected left, right, center, start, or end for text-align");E.setTextAlign(e)}if(x){let e=x(t);if("left"!==e&&"right"!==e&&"center"!==e)throw Error("Expected left, right, or center for text-justify");E.setJustify(e)}if(S){let e=S(t);if("bottom"!==e&&"top"!==e&&"middle"!==e&&"alphabetic"!==e&&"hanging"!==e)throw Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");E.setTextBaseline(e)}return w&&E.setPadding(w(t)),v&&E.setKeepUpright(v(t)),E}}(t,e),z=(i=t,s=e,"icon-src"in i?(r=i,n=s,d=rY(r[u=(h="icon-")+"src"],u),c=rU(r,h+"anchor",n),g=rV(r,h+"scale",n),f=rD(r,h+"opacity",n),p=rU(r,h+"displacement",n),_=rD(r,h+"rotation",n),m=rj(r,h+"rotate-with-view",n),y=rZ(r,h+"anchor-origin"),x=rK(r,h+"anchor-x-units"),S=rK(r,h+"anchor-y-units"),v=rO(r,h+"color"),w=null,void 0!==v&&(Array.isArray(v)&&v.length>0&&"string"==typeof v[0]?w=rB(r,h+"color",n):l=rJ(v,h+"color")),E=function(t,e){let i=t[e];if(void 0!==i){if("string"!=typeof i)throw Error(`Expected a string for ${e}`);return i}}(r,h+"cross-origin"),M=function(t,e){let i=t[e];if(void 0!==i)return rX(i,e)}(r,h+"offset"),P=rZ(r,h+"offset-origin"),C=rq(r,h+"width"),b={src:d,anchorOrigin:y,anchorXUnits:x,anchorYUnits:S,crossOrigin:E,offset:M,offsetOrigin:P,height:rq(r,h+"height"),width:C,size:function(t,e){let i=t[e];if(void 0!==i){if("number"==typeof i)return sg(i);if(!Array.isArray(i)||2!==i.length||"number"!=typeof i[0]||"number"!=typeof i[1])throw Error(`Expected a number or size array for ${e}`);return i}}(r,h+"size"),declutterMode:rH(r,h+"declutter-mode")},R=null,function(t){if(R)w&&R.setColor(w(t));else{let e=w?w(t):l;R=new rM(void 0!==e?Object.assign({},b,{color:e}):Object.assign({},b))}return f&&R.setOpacity(f(t)),p&&R.setDisplacement(p(t)),_&&R.setRotation(_(t)),m&&R.setRotateWithView(m(t)),g&&R.setScale(g(t)),c&&R.setAnchor(c(t)),R}):"shape-points"in i?function(t,e){let i="shape-",s=i+"points",r=i+"radius",n=rQ(t[s],s);if(!(r in t))throw Error(`Expected a number for ${r}`);let a=rD(t,r,e),o="number"==typeof t[r]?t[r]:5,l=i+"radius2",h=rD(t,l,e),u="number"==typeof t[l]?t[l]:void 0,d=rF(t,i,e),c=rG(t,i,e),g=rV(t,i+"scale",e),f=rU(t,i+"displacement",e),p=rD(t,i+"rotation",e),_=rj(t,i+"rotate-with-view",e),m=new rS({points:n,radius:o,radius2:u,angle:rq(t,i+"angle"),declutterMode:rH(t,i+"declutter-mode")});return function(t){return a&&m.setRadius(a(t)),h&&m.setRadius2(h(t)),d&&m.setFill(d(t)),c&&m.setStroke(c(t)),f&&m.setDisplacement(f(t)),p&&m.setRotation(p(t)),_&&m.setRotateWithView(_(t)),g&&m.setScale(g(t)),m}}(i,s):"circle-radius"in i?(T=rF(a=i,I="circle-",o=s),A=rG(a,I,o),L=rD(a,I+"radius",o),N=rV(a,I+"scale",o),F=rU(a,I+"displacement",o),G=rD(a,I+"rotation",o),O=rj(a,I+"rotate-with-view",o),D=new rv({radius:5,declutterMode:rH(a,I+"declutter-mode")}),function(t){return L&&D.setRadius(L(t)),T&&D.setFill(T(t)),A&&D.setStroke(A(t)),F&&D.setDisplacement(F(t)),G&&D.setRotation(G(t)),O&&D.setRotateWithView(O(t)),N&&D.setScale(N(t)),D}):null),W=rD(t,"z-index",e);if(!k&&!j&&!B&&!z&&!(0,U.isEmpty)(t))throw Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(t));let V=new rC;return function(t){let e=!0;if(k){let i=k(t);i&&(e=!1),V.setFill(i)}if(j){let i=j(t);i&&(e=!1),V.setStroke(i)}if(B){let i=B(t);i&&(e=!1),V.setText(i)}if(z){let i=z(t);i&&(e=!1),V.setImage(i)}return(W&&V.setZIndex(W(t)),e)?null:V}}
1function rF(t,e,i){let s;if(e+"fill-pattern-src"in t){var r,n,a;let o,l,h,u;o=rk(r=t,(n=e+"fill-")+"pattern-src",a=i),l=rW(r,n+"pattern-offset",a),h=rW(r,n+"pattern-size",a),u=rB(r,n+"color",a),s=function(t){return{src:o(t),offset:l&&l(t),size:h&&h(t),color:u&&u(t)}}}else{if("none"===t[e+"fill-color"])return t=>null;s=rB(t,e+"fill-color",i)}if(!s)return null;let o=new rw;return function(t){let e=s(t);return e===i8?null:(o.setColor(e),o)}}function rG(t,e,i){let s=rD(t,e+"stroke-width",i),r=rB(t,e+"stroke-color",i);if(!s&&!r)return null;let n=rk(t,e+"stroke-line-cap",i),a=rk(t,e+"stroke-line-join",i),o=rz(t,e+"stroke-line-dash",i),l=rD(t,e+"stroke-line-dash-offset",i),h=rD(t,e+"stroke-miter-limit",i),u=rD(t,e+"stroke-offset",i),d=new rP;return function(t){if(r){let e=r(t);if(e===i8)return null;d.setColor(e)}if(s&&d.setWidth(s(t)),n){let e=n(t);if("butt"!==e&&"round"!==e&&"square"!==e)throw Error("Expected butt, round, or square line cap");d.setLineCap(e)}if(a){let e=a(t);if("bevel"!==e&&"round"!==e&&"miter"!==e)throw Error("Expected bevel, round, or miter line join");d.setLineJoin(e)}return o&&d.setLineDash(o(t)),l&&d.setLineDashOffset(l(t)),h&&d.setMiterLimit(h(t)),u&&d.setOffset(u(t)),d}}function rO(t,e){if(!(e in t))return;let i=t[e];return void 0===i?void 0:i}function rD(t,e,i){let s=rO(t,e);if(void 0===s)return;let r=s2(s,s_,i);return function(t){return rQ(r(t),e)}}function rk(t,e,i){let s=rO(t,e);if(void 0===s)return null;let r=s2(s,sm,i);return function(t){return rY(r(t),e)}}function rj(t,e,i){let s=rO(t,e);if(void 0===s)return null;let r=s2(s,sp,i);return function(t){let i=r(t);if("boolean"!=typeof i)throw Error(`Expected a boolean for ${e}`);return i}}function rB(t,e,i){let s=rO(t,e);if(void 0===s)return null;let r=s2(s,sy,i);return function(t){return rJ(r(t),e)}}function rz(t,e,i){let s=rO(t,e);if(void 0===s)return null;if(Array.isArray(s)&&(0===s.length||"string"!=typeof s[0])){let t=s.map((t,s)=>{if("number"==typeof t)return()=>t;let r=s2(t,s_,i);return function(t){return rQ(r(t),`${e}[${s}]`)}});return function(e){let i=Array(t.length);for(let s=0;s<t.length;++s)i[s]=t[s](e);return i}}let r=s2(s,sx,i);return function(t){return rX(r(t),e)}}function rU(t,e,i){let s=rO(t,e);if(void 0===s)return null;let r=s2(s,sx,i);return function(t){let i=rX(r(t),e);if(2!==i.length)throw Error(`Expected two numbers for ${e}`);return i}}function rW(t,e,i){let s=rO(t,e);if(void 0===s)return null;let r=s2(s,sx,i);return function(t){return r$(r(t),e)}}function rV(t,e,i){let s=rO(t,e);if(void 0===s)return null;let r=s2(s,sx|s_,i);return function(t){var i,s;return i=r(t),s=e,"number"==typeof i?i:r$(i,s)}}function rq(t,e){let i=t[e];if(void 0!==i){if("number"!=typeof i)throw Error(`Expected a number for ${e}`);return i}}function rZ(t,e){let i=t[e];if(void 0!==i){if("bottom-left"!==i&&"bottom-right"!==i&&"top-left"!==i&&"top-right"!==i)throw Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${e}`);return i}}function rK(t,e){let i=t[e];if(void 0!==i){if("pixels"!==i&&"fraction"!==i)throw Error(`Expected pixels or fraction for ${e}`);return i}}function rH(t,e){let i=t[e];if(void 0!==i){if("string"!=typeof i)throw Error(`Expected a string for ${e}`);if("declutter"!==i&&"obstacle"!==i&&"none"!==i)throw Error(`Expected declutter, obstacle, or none for ${e}`);return i}}function rX(t,e){if(!Array.isArray(t))throw Error(`Expected an array for ${e}`);let i=t.length;for(let s=0;s<i;++s)if("number"!=typeof t[s])throw Error(`Expected an array of numbers for ${e}`);return t}function rY(t,e){if("string"!=typeof t)throw Error(`Expected a string for ${e}`);return t}function rQ(t,e){if("number"!=typeof t)throw Error(`Expected a number for ${e}`);return t}function rJ(t,e){if("string"==typeof t)return t;let i=rX(t,e),s=i.length;if(s<3||s>4)throw Error(`Expected a color with 3 or 4 values for ${e}`);return i}function r$(t,e){let i=rX(t,e);if(2!==i.length)throw Error(`Expected an array of two numbers for ${e}`);return i}let r0="renderOrder";var r1=class extends i4{constructor(t){let e=Object.assign({},t=t||{});delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(r0)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){let i=this.getDeclutter();i in t.declutter==!1&&(t.declutter[i]=new(c(i3))(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(r0,t)}setStyle(t){this.style_=void 0===t?rR:t;let e=function(t){if(void 0===t)return rR;if(!t)return null;if("function"==typeof t||t instanceof rC)return t;if(!Array.isArray(t))return rL([t]);if(0===t.length)return[];let e=t.length,i=t[0];if(i instanceof rC){let i=Array(e);for(let s=0;s<e;++s){let e=t[s];if(!(e instanceof rC))throw Error("Expected a list of style instances");i[s]=e}return i}if("style"in i){let i,s,r,n=Array(e);for(let i=0;i<e;++i){let e=t[i];if(!("style"in e))throw Error("Expected a list of rules with a style property");n[i]=e}return s=function(t,e){let i=t.length,s=Array(i);for(let r=0;r<i;++r){let i,n=t[r],a="filter"in n?s2(n.filter,sp,e):rA;if(Array.isArray(n.style)){let t=n.style.length;i=Array(t);for(let s=0;s<t;++s)i[s]=rN(n.style[s],e)}else i=[rN(n.style,e)];
1s[r]={filter:a,styles:i}}return function(e){let r=[],n=!1;for(let a=0;a<i;++a)if((0,s[a].filter)(e)&&(!t[a].else||!n))for(let t of(n=!0,s[a].styles)){let i=t(e);i&&r.push(i)}return r}}(n,i=sb()),r=s1(),function(t,e){if(r.properties=t.getPropertiesInternal(),r.resolution=e,i.featureId){let e=t.getId();void 0!==e?r.featureId=e:r.featureId=null}return i.geometryType&&(r.geometryType=function t(e){if(!e)return"";let i=e.getType();switch(i){case"Point":case"LineString":case"Polygon":return i;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return i.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return t(e.getGeometries()[0]);default:return""}}(t.getGeometry())),s(r)}}return rL(t)}(t);this.styleFunction_=null===t?void 0:function(t){let e;if("function"==typeof t)e=t;else{let i;Array.isArray(t)?i=t:((0,z.assert)("function"==typeof t.getZIndex,"Expected an `Style` or an array of `Style`"),i=[t]),e=function(){return i}}return e}(e),this.changed()}setDeclutter(t){this.declutter_=t?String(t):void 0,this.changed()}},w=y("iTTi2");class r2 extends w.default{constructor(t,e,i,s){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=s}}var iN=y("jjfV9"),Q=y("jZquI"),to=y("eQaCk"),th=y("lVQul");class r4 extends iN.default{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){(0,th.abstract)()}calculateMatrices2D(t){let e=t.viewState,i=t.coordinateToPixelTransform,s=t.pixelToCoordinateTransform;el(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),eh(s,i)}forEachFeatureAtCoordinate(t,e,i,s,r,n,a,o){let l,h=e.viewState;function u(t,e,i,s){return r.call(n,e,t?i:null,s)}let d=h.projection,c=te(t.slice(),d),g=[[0,0]];if(d.canWrapX()&&s){let t=d.getExtent(),e=(0,Q.getWidth)(t);g.push([-e,0],[e,0])}let f=e.layerStatesArray,p=f.length,_=[],m=[];for(let s=0;s<g.length;s++)for(let r=p-1;r>=0;--r){let n=f[r],d=n.layer;if(d.hasRenderer()&&i2(n,h)&&a.call(o,d)){let r=d.getRenderer(),a=d.getSource();if(r&&a){let o=a.getWrapX()?c:t,h=u.bind(null,n.managed);m[0]=o[0]+g[s][0],m[1]=o[1]+g[s][1],l=r.forEachFeatureAtCoordinate(m,e,i,h,_)}if(l)return l}}if(0===_.length)return;let y=1/_.length;return _.forEach((t,e)=>t.distanceSq+=e*y),_.sort((t,e)=>t.distanceSq-e.distanceSq),_.some(t=>l=t.callback(t.feature,t.layer,t.geometry)),l}hasFeatureAtCoordinate(t,e,i,s,r,n){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,s,to.TRUE,this,r,n)}getMap(){return this.map_}renderFrame(t){(0,th.abstract)()}scheduleExpireIconCache(t){s8.canExpireCache()&&t.postRenderFunctions.push(r3)}}function r3(t,e){s8.expire()}var r8=r4,r5=class extends r8{constructor(t){super(t),this.fontChangeListenerKey_=(0,I.listen)(rh,B.default.PROPERTYCHANGE,t.redrawText,t),this.element_=T.WORKER_OFFSCREEN_CANVAS?(0,ie.createMockDiv)():document.createElement("div");let e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=it.CLASS_UNSELECTABLE+" ol-layers";let i=t.getViewport();i&&i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){let i=this.getMap();if(i.hasListener(t)){let s=new r2(t,void 0,e);i.dispatchEvent(s)}}disposeInternal(){(0,I.unlistenByKey)(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(iQ,t);let e=t.layerStatesArray.sort((t,e)=>t.zIndex-e.zIndex);e.some(t=>t.layer instanceof r1&&t.layer.getDeclutter())&&(t.declutter={});let i=t.viewState;this.children_.length=0;let s=[],r=null;for(let n=0,a=e.length;n<a;++n){let a=e[n];t.layerIndex=n;let o=a.layer,l=o.getSourceState();if(!i2(a,i)||"ready"!=l&&"undefined"!=l){o.unrender();continue}let h=o.render(t,r);h&&(h!==r&&(this.children_.push(h),r=h),s.push(a))}this.declutter(t,s),(0,ie.replaceChildren)(this.element_,this.children_);let n=this.getMap().getTargetElement();if((0,ie.isCanvas)(n)){let t=n.getContext("2d");for(let e of this.children_){let i=e.firstElementChild||e,s=e.style.backgroundColor;if(s&&(!(0,ie.isCanvas)(i)||i.width>0)&&(t.fillStyle=s,t.fillRect(0,0,n.width,n.height)),(0,ie.isCanvas)(i)&&i.width>0){t.save();let s=e.style.opacity||i.style.opacity;t.globalAlpha=""===s?1:Number(s);let r=i.style.transform;if(r)t.transform(...ed(r));else{let e=parseFloat(i.style.width)/i.width,s=parseFloat(i.style.height)/i.height;t.transform(e,0,0,s,0,0)}
1t.drawImage(i,0,0),t.restore()}}}this.dispatchRenderEvent("postcompose",t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}declutter(t,e){if(t.declutter){for(let i=e.length-1;i>=0;--i){let s=e[i],r=s.layer;r.getDeclutter()&&r.renderDeclutter(t,s)}e.forEach(e=>e.layer.renderDeferred(t))}}},th=y("lVQul");class r6 extends j.default{constructor(t){var e;let i,s,r,n,a,o;super(),t=t||{},this.on,this.once,this.un;let l=(n=null,void 0!==(e=t).keyboardEventTarget&&(n="string"==typeof e.keyboardEventTarget?document.getElementById(e.keyboardEventTarget):e.keyboardEventTarget),a={},o=e.layers&&"function"==typeof e.layers.getLayers?e.layers:new(0,iH.default)({layers:e.layers}),a[G]=o,a[D]=e.target,a[k]=e.view instanceof e6?e.view:new e6,void 0!==e.controls&&(Array.isArray(e.controls)?i=new(0,S.default)(e.controls.slice()):((0,z.assert)("function"==typeof e.controls.getArray,"Expected `controls` to be an array or an `ol/Collection.js`"),i=e.controls)),void 0!==e.interactions&&(Array.isArray(e.interactions)?s=new(0,S.default)(e.interactions.slice()):((0,z.assert)("function"==typeof e.interactions.getArray,"Expected `interactions` to be an array or an `ol/Collection.js`"),s=e.interactions)),void 0!==e.overlays?Array.isArray(e.overlays)?r=new(0,S.default)(e.overlays.slice()):((0,z.assert)("function"==typeof e.overlays.getArray,"Expected `overlays` to be an array or an `ol/Collection.js`"),r=e.overlays):r=new(0,S.default),{controls:i,interactions:s,keyboardEventTarget:n,overlays:r,values:a});this.renderComplete_=!1,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=void 0!==t.maxTilesLoading?t.maxTilesLoading:16,this.pixelRatio_=void 0!==t.pixelRatio?t.pixelRatio:T.DEVICE_PIXEL_RATIO,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=ei(),this.pixelToCoordinateTransform_=ei(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,T.WORKER_OFFSCREEN_CANVAS||(this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_)),this.mapBrowserEventHandler_=null,this.moveTolerance_=t.moveTolerance,this.keyboardEventTarget_=l.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,T.WORKER_OFFSCREEN_CANVAS||(this.resizeObserver_=new ResizeObserver(()=>this.updateSize())),this.controls=l.controls||(T.WORKER_OFFSCREEN_CANVAS?new(0,S.default):io()),this.interactions=l.interactions||(T.WORKER_OFFSCREEN_CANVAS?new(0,S.default):iK({onFocusOnly:!0})),this.overlays_=l.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new q(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(G,this.handleLayerGroupChanged_),this.addChangeListener(k,this.handleViewChanged_),this.addChangeListener(O,this.handleSizeChanged_),this.addChangeListener(
1D,this.handleTargetChanged_),this.setProperties(l.values);let h=this;!t.view||t.view instanceof e6||t.view.then(function(t){h.setView(new e6(t))}),this.controls.addEventListener(v.default.ADD,t=>{t.element.setMap(this)}),this.controls.addEventListener(v.default.REMOVE,t=>{t.element.setMap(null)}),this.interactions.addEventListener(v.default.ADD,t=>{t.element.setMap(this)}),this.interactions.addEventListener(v.default.REMOVE,t=>{t.element.setMap(null)}),this.overlays_.addEventListener(v.default.ADD,t=>{this.addOverlayInternal_(t.element)}),this.overlays_.addEventListener(v.default.REMOVE,t=>{let e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}),this.controls.forEach(t=>{t.setMap(this)}),this.interactions.forEach(t=>{t.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){!function t(e,i){if(e instanceof i4)return void e.setMapInternal(i);if(e instanceof iH.default){let s=e.getLayers().getArray();for(let e=0,r=s.length;e<r;++e)t(s[e],i)}}(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){let e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_?.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;let s=this.getCoordinateFromPixelInternal(t),r=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,n=void 0!==i.layerFilter?i.layerFilter:to.TRUE,a=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(s,this.frameState_,r,a,e,null,n,null)}getFeaturesAtPixel(t,e){let i=[];return this.forEachFeatureAtPixel(t,function(t){i.push(t)},e),i}getAllLayers(){let t=[];return!function e(i){i.forEach(function(i){i instanceof iH.default?e(i.getLayers()):t.push(i)})}(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;let i=this.getCoordinateFromPixelInternal(t),s=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:to.TRUE,r=void 0!==e.hitTolerance?e.hitTolerance:0,n=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,r,n,s,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){let e=this.viewport_.getBoundingClientRect(),i=this.getSize(),s=e.width/i[0],r=e.height/i[1],n="changedTouches"in t?t.changedTouches[0]:t;return[(n.clientX-e.left)/s,(n.clientY-e.top)/r]}getTarget(){return this.get(D)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){var e,i;return e=this.getCoordinateFromPixelInternal(t),i=this.getView().getProjection(),e}getCoordinateFromPixelInternal(t){let e=this.frameState_;return e?ea(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){let e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(G)}setLayers(t){let e=this.getLayerGroup();if(t instanceof S.default)return void e.setLayers(t);let i=e.getLayers();i.clear(),i.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){let t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){let i=t[e];if(!i.visible)continue;let s=i.layer.getRenderer();if(s&&!s.ready)return!0;let r=i.layer.getSource();if(r&&r.loading)return!0}return!1}getPixelFromCoordinate(t){let e=t9(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){let e=this.frameState_;return e?ea(e.coordinateToPixelTransform,t.slice(0,2)):null}getPixelRatio(){return this.pixelRatio_}setPixelRatio(t){this.pixelRatio_!==t&&(this.pixelRatio_=t,this.render())}getRenderer(){return this.renderer_}getSize(){return this.get(O)}getView(){return this.get(k)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){let t=this.getTargetElement();return t?t.ownerDocument:document}
1getTilePriority(t,e,i,s){return function(t,e,i,s,r){if(!t||!(i in t.wantedTiles)||!t.wantedTiles[i][e.getKey()])return W;let n=t.viewState.center,a=s[0]-n[0],o=s[1]-n[1];return 65536*Math.log(r)+Math.sqrt(a*a+o*o)/r}(this.frameState_,t,e,i,s)}handleBrowserEvent(t,e){let i=new P(e=e||t.type,this,t);this.handleMapBrowserEvent(i)}handleMapBrowserEvent(t){if(!this.frameState_)return;let e=t.originalEvent,i=e.type;if(i===L||i===C.default.WHEEL||i===C.default.KEYDOWN){let t=this.getOwnerDocument(),i=this.viewport_.getRootNode?this.viewport_.getRootNode():t,s=e.target,r=i instanceof ShadowRoot?i.host===s?i.host.ownerDocument:i:i===t?t.documentElement:i;if(this.overlayContainerStopEvent_.contains(s)||!r.contains(s))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t)){let e=this.getInteractions().getArray().slice();for(let i=e.length-1;i>=0;i--){let s=e[i];if(s.getMap()===this&&s.getActive()&&this.getTargetElement()&&(!s.handleEvent(t)||t.propagationStopped))break}}}handlePostRender(){let t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,s=i;if(t){let e=t.viewHints;if(e[0]||e[1]){let e=Date.now()-t.time>8;i=8*!e,s=2*!e}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,s))}t&&this.renderer_&&!t.animate&&(this.renderComplete_?(this.hasListener(iJ)&&this.renderer_.dispatchRenderEvent(iJ,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new M(F.default.LOADEND,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new M(F.default.LOADSTART,this,t))));let i=this.postRenderFunctions_;if(t)for(let e=0,s=i.length;e<s;++e)i[e](this,t);i.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)(0,I.unlistenByKey)(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(C.default.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(C.default.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,this.viewport_.remove()}if(this.targetElement_&&!(0,ie.isCanvas)(this.targetElement_)){this.resizeObserver_?.unobserve(this.targetElement_);let t=this.targetElement_.getRootNode();t instanceof ShadowRoot&&this.resizeObserver_.unobserve(t.host),this.setSize(void 0)}let t=this.getTarget(),e="string"==typeof t?document.getElementById(t):t;if(this.targetElement_=e,e){if((0,ie.isCanvas)(e)||e.appendChild(this.viewport_),this.renderer_||(this.renderer_=new r5(this)),!(0,ie.isCanvas)(e)){let t;for(let t in this.mapBrowserEventHandler_=new N(this,this.moveTolerance_),b)this.mapBrowserEventHandler_.addEventListener(b[t],this.handleMapBrowserEvent.bind(this));if(this.viewport_.addEventListener(C.default.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(C.default.WHEEL,this.boundHandleBrowserEvent_,!!T.PASSIVE_EVENT_LISTENERS&&{passive:!1}),this.keyboardEventTarget_)t=this.keyboardEventTarget_;else{let i=e.getRootNode();t=i instanceof ShadowRoot?i.host:e}if(this.targetChangeHandlerKeys_=[(0,I.listen)(t,C.default.KEYDOWN,this.handleBrowserEvent,this),(0,I.listen)(t,C.default.KEYPRESS,this.handleBrowserEvent,this)],e instanceof HTMLElement){let t=e.getRootNode();t instanceof ShadowRoot&&this.resizeObserver_.observe(t.host),this.resizeObserver_?.observe(e)}}this.updateSize()}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)}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&((0,I.unlistenByKey)(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&((0,I.unlistenByKey)(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);let t=this.getView();t&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=(0,I.listen)(t,B.default.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=(0,I.listen)(t,C.default.CHANGE,this.handleViewPropertyChanged_,this),t.resolve
1Constraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(I.unlistenByKey),this.layerGroupPropertyListenerKeys_=null);let t=this.getLayerGroup();t&&(this.handleLayerAdd_(new(0,iH.GroupEvent)("addlayer",t)),this.layerGroupPropertyListenerKeys_=[(0,I.listen)(t,B.default.PROPERTYCHANGE,this.render,this),(0,I.listen)(t,C.default.CHANGE,this.render,this),(0,I.listen)(t,"addlayer",this.handleLayerAdd_,this),(0,I.listen)(t,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){if(!this.frameState_)return;let t=this.frameState_.layerStatesArray;for(let e=0,i=t.length;e<i;++e){let i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}render(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){return this.getLayerGroup().getLayers().remove(t)}handleLayerRemove_(t){!function t(e){e instanceof i4?e.setMapInternal(null):e instanceof iH.default&&e.getLayers().forEach(t)}(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){let e=this.getSize(),i=this.getView(),s=this.frameState_,r=null;if(void 0!==e&&sc(e)&&i&&i.isDef()){let s=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),n=i.getState();if(r={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutter:null,extent:(0,Q.getForViewAndSize)(n.center,n.resolution,n.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:n,viewHints:s,wantedTiles:{},mapId:(0,th.getUid)(this),renderTargets:{}},n.nextCenter&&n.nextResolution){let t=isNaN(n.nextRotation)?n.rotation:n.nextRotation;r.nextExtent=(0,Q.getForViewAndSize)(n.nextCenter,n.nextResolution,t,e)}}this.frameState_=r,this.renderer_.renderFrame(r),r&&(r.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,r.postRenderFunctions),s&&(this.previousExtent_&&((0,Q.isEmpty)(this.previousExtent_)||(0,Q.equals)(r.extent,this.previousExtent_))||(this.dispatchEvent(new M(F.default.MOVESTART,this,s)),this.previousExtent_=(0,Q.createOrUpdateEmpty)(this.previousExtent_))),!this.previousExtent_||r.viewHints[0]||r.viewHints[1]||(0,Q.equals)(r.extent,this.previousExtent_)||(this.dispatchEvent(new M(F.default.MOVEEND,this,r)),(0,Q.clone)(r.extent,this.previousExtent_))),this.dispatchEvent(new M(F.default.POSTRENDER,this,r)),this.renderComplete_=(this.hasListener(F.default.LOADSTART)||this.hasListener(F.default.LOADEND)||this.hasListener(iJ))&&!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady(),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){let e=this.getLayerGroup();e&&this.handleLayerRemove_(new(0,iH.GroupEvent)("removelayer",e)),this.set(G,t)}setSize(t){this.set(O,t)}setTarget(t){this.set(D,t)}setView(t){if(!t||t instanceof e6)return void this.set(k,t);this.set(k,new e6);let e=this;t.then(function(t){e.setView(new e6(t))})}updateSize(){let t,e=this.getTargetElement();if(e){let i,s;if((0,ie.isCanvas)(e)){let t=e.getContext("2d").getTransform();i=e.width/t.a,s=e.height/t.d}else{let t=getComputedStyle(e);i=e.offsetWidth-parseFloat(t.borderLeftWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)-parseFloat(t.borderRightWidth),s=e.offsetHeight-parseFloat(t.borderTopWidth)-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)-parseFloat(t.borderBottomWidth)}!isNaN(i)&&!isNaN(s)&&!sc(t=[Math.max(0,i),Math.max(0,s)])&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&tu("No map visible because the map container's width or height are 0.")}let i=this.getSize();!t||i&&(0,K.equals)(t,i)||(this.setSize(t),this.updateViewportSize_(t))}updateViewportSize_(t){let e=this.getView();e&&e.setViewportSize(t)}
1}var iH=y("3VGVQ"),it=y("erROg"),ii=y("4DafG");let r7="units",r9=[1,2,5],nt=25.4/.28;class ne extends ii.default{constructor(t){t=t||{};let e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;let i=void 0!==t.className?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=i+"-inner",this.element.className=i+" "+it.CLASS_UNSELECTABLE,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=void 0!==t.minWidth?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(r7,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(r7)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(r7,t)}setDpi(t){this.dpi_=t}updateElement_(){let t,e,i,s,r,n=this.viewState_;if(!n){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}let a=n.center,o=n.projection,l=this.getUnits(),h=tJ(o,n.resolution,a,"degrees"==l?"degrees":"m"),u=this.minWidth_*(this.dpi_||nt)/nt,d=void 0!==this.maxWidth_?this.maxWidth_*(this.dpi_||nt)/nt:void 0,c=u*h,g="";if("degrees"==l){let t=td.degrees;(c*=t)<t/60?(g="″",h*=3600):c<t?(g="′",h*=60):g="°"}else if("imperial"==l)c<.9144?(g="in",h/=.0254):c<1609.344?(g="ft",h/=.3048):(g="mi",h/=1609.344);else if("nautical"==l)h/=1852,g="NM";else if("metric"==l)c<1e-6?(g="nm",h*=1e9):c<.001?(g="μm",h*=1e6):c<1?(g="mm",h*=1e3):c<1e3?g="m":(g="km",h/=1e3);else if("us"==l)c<.9144?(g="in",h*=39.37):c<1609.344?(g="ft",h/=.30480061):(g="mi",h/=1609.3472);else throw Error("Invalid units");let f=3*Math.floor(Math.log(u*h)/Math.log(10)),p=0;for(;;){let n=Math.pow(10,i=Math.floor(f/3));if(isNaN(e=Math.round((t=r9[(f%3+3)%3]*n)/h))){this.element.style.display="none",this.renderedVisible_=!1;return}if(void 0!==d&&e>=d){t=p,e=s,i=r;break}if(e>=u)break;p=t,s=e,r=i,++f}let _=this.scaleBar_?this.createScaleBar(e,t,g):t.toFixed(i<0?-i:0)+" "+g;this.renderedHTML_!=_&&(this.innerElement_.innerHTML=_,this.renderedHTML_=_),this.renderedWidth_!=e&&(this.innerElement_.style.width=e+"px",this.renderedWidth_=e),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,i){let s=this.getScaleForResolution(),r=s<1?Math.round(1/s).toLocaleString()+" : 1":"1 : "+Math.round(s).toLocaleString(),n=this.scaleBarSteps_,a=t/n,o=[this.createMarker("absolute")];for(let s=0;s<n;++s){let r=s%2==0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";o.push(`<div><div class="ol-scale-singlebar ${r}" style="width: ${a}px;"></div>`+this.createMarker("relative")+(s%2==0||2===n?this.createStepText(s,t,!1,e,i):"")+"</div>")}return o.push(this.createStepText(n,t,!0,e,i)),(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${t}px;">`+r+"</div>":"")+o.join("")}createMarker(t){return`<div class="ol-scale-step-marker" style="position: ${t}; top: ${"absolute"===t?3:-10}px;"></div>`}createStepText(t,e,i,s,r){let n=0===t?0:Math.round(s/this.scaleBarSteps_*t*100)/100,a=0===t?-3:-(e/this.scaleBarSteps_*1),o=0===t?0:e/this.scaleBarSteps_*2;return`<div class="ol-scale-step-text" style="margin-left: ${a}px;text-align: ${0===t?"left":"center"};min-width: ${o}px;left: ${i?e+"px":"unset"};">`+n+(0===t?"":" "+r)+"</div>"}getScaleForResolution(){return 1e3/25.4*tJ(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m")*(this.dpi_||nt)}render(t){let e=t.frameState;e?this.viewState_=e.viewState:this.viewState_=null,this.updateElement_()}}var it=y("erROg"),ie=y("cgxQK"),C=y("cw4dl"),I=y("bsgMw"),ii=y("4DafG");let ni=["fullscreenchange","webkitfullscreenchange"];class ns extends ii.default{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.on,this.once,this.un,this.keys_=void 0!==t.keys&&t.keys,this.source_=t.source,this.isInFullscreen_=!1,this.boundHandleMapTargetChange_=this.handleMapTargetChange_.bind(this),this.cssClassName_=void 0!==t.className?t.className:"ol-full-screen",this.documentListeners_=[],this.activeClassName_=void 0!==t.activeClassName?t.activeClassName.split(" "):[this.cssClassName_+"-true"],this.inactiveClassName_=void 0!==t.inactiveClassName?t.inactiveClassName.split(" "):[this.cssClassName_+"-false"];let e=void 0!==t.label?t.label:"⤢";this.labelNode_="string"==typeof e?document.createTextNode(e):e;let i=void 0!==t.labelActive?t.labelActive:"×";this.labelActiveNode_="string"==typeof i?document.createTextNode(i):i;let s=t.tipLabel?t.tipLabel:"Toggle full-screen";this.button_=document.createElement("button"),this.button_.title=s,this.button_.setAttribute("type","button"),this.button_.appendChild(this.labelNode_),this.button_.addEventListener(C.default.CLICK,this.handleClick_.bind(this),!1),this.setClassName_(this.button_,this.isInFullscreen_),this.element.className=`${this.cssClassName_} ${it.CLASS_UNSELECTABLE} ${it.CLASS_CONTROL}`,this.element.appendChild(this.button_)}handleClick_(t){t.preventDefault(),this.handleFullScreen_()}handleFullScreen_(){var t,e;let i=this.getMap();if(!i)return;let s=i.getOwnerDocument();if(nr(s))if(nn(s)){(t=s).exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen&&t.webkitExitFullscreen()}else{let t;t=this.source_?"string"==typeof this.source_?s.getElementById(this.source_):this.source_:i.getTargetElement(),this.keys_?(e=t).webkitRequestFullscreen?e.webkitRequestFullscreen():na(e):na(t)}}handleFullScreenChange_(){let t=this.getMap();if(!t)return;let e=this.isInFullscreen_;this.isInFullscreen_=nn(t.getOwnerDocument()),e!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?((0,ie.replaceNode)(this.labelActiveNode_,this.labelNode_),this.dispatchEvent("enterfullscreen")):((0,ie.replaceNode)(this.labelNode_,this.labelActiveNode_),this.dispatchEvent("leavefullscreen")),t.updateSize())}setClassName_(t,e){e?(t.classList.remove(...this.inactiveClassName_),t.classList.add(...this.activeClassName_)):(t.classList.remove(...this.activeClassName_),t.classList.add(...this.inactiveClassName_))}setMap(t){let e=this.getMap();
1e&&e.removeChangeListener(D,this.boundHandleMapTargetChange_),super.setMap(t),this.handleMapTargetChange_(),t&&t.addChangeListener(D,this.boundHandleMapTargetChange_)}handleMapTargetChange_(){let t=this.documentListeners_;for(let e=0,i=t.length;e<i;++e)(0,I.unlistenByKey)(t[e]);t.length=0;let e=this.getMap();if(e){let i=e.getOwnerDocument();nr(i)?this.element.classList.remove(it.CLASS_UNSUPPORTED):this.element.classList.add(it.CLASS_UNSUPPORTED);for(let e=0,s=ni.length;e<s;++e)t.push((0,I.listen)(i,ni[e],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}}}function nr(t){let e=t.body;return!!(e.webkitRequestFullscreen||e.requestFullscreen&&t.fullscreenEnabled)}function nn(t){return!!(t.webkitIsFullScreen||t.fullscreenElement)}function na(t){t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}var I=y("bsgMw"),ii=y("4DafG");let no="projection",nl="coordinateFormat";class nh extends ii.default{constructor(t){t=t||{};let e=document.createElement("div");e.className=void 0!==t.className?t.className:"ol-mouse-position",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un,this.addChangeListener(no,this.handleProjectionChanged_),t.coordinateFormat&&this.setCoordinateFormat(t.coordinateFormat),t.projection&&this.setProjection(t.projection),this.renderOnMouseOut_=void 0!==t.placeholder,this.placeholder_=this.renderOnMouseOut_?t.placeholder:"&#160;",this.renderedHTML_=e.innerHTML,this.mapProjection_=null,this.transform_=null,this.wrapX_=!1!==t.wrapX}handleProjectionChanged_(){this.transform_=null}getCoordinateFormat(){return this.get(nl)}getProjection(){return this.get(no)}handleMouseMove(t){let e=this.getMap();this.updateHTML_(e.getEventPixel(t))}handleMouseOut(t){this.updateHTML_(null)}setMap(t){if(super.setMap(t),t){let e=t.getViewport();this.listenerKeys.push((0,I.listen)(e,A,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push((0,I.listen)(e,"pointerout",this.handleMouseOut,this)),this.updateHTML_(null)}}setCoordinateFormat(t){this.set(nl,t)}setProjection(t){this.set(no,tQ(t))}updateHTML_(t){let e=this.placeholder_;if(t&&this.mapProjection_){if(!this.transform_){let t=this.getProjection();t?this.transform_=t3(this.mapProjection_,t):this.transform_=tX}let i=this.getMap().getCoordinateFromPixelInternal(t);if(i){this.transform_(i,i),this.wrapX_&&te(i,this.getProjection()||this.mapProjection_);let t=this.getCoordinateFormat();e=t?t(i):i.toString()}}this.renderedHTML_&&e===this.renderedHTML_||(this.element.innerHTML=e,this.renderedHTML_=e)}render(t){let e=t.frameState;e?this.mapProjection_!=e.viewState.projection&&(this.mapProjection_=e.viewState.projection,this.transform_=null):this.mapProjection_=null}}var F=y("2u1lG"),C=y("cw4dl"),I=y("bsgMw"),H=y("a6roo");function nu(t){return parseFloat(t)}function nd(t){return(0,H.toFixed)(t,5).toString()}function nc(t,e){return!isNaN(t)&&t!==nu(nd(e))}var ng=class extends ic{constructor(t){let e;super(),e=!0===(t=Object.assign({animate:!0,params:["x","y","z","r","l"],replace:!1,prefix:""},t||{})).animate?{duration:250}:t.animate?t.animate:null,this.animationOptions_=e,this.params_=t.params.reduce((t,e)=>(t[e]=!0,t),{}),this.replace_=t.replace,this.prefix_=t.prefix,this.listenerKeys_=[],this.initial_=!0,this.updateState_=this.updateState_.bind(this),this.trackedCallbacks_={},this.trackedValues_={}}getParamName_(t){return this.prefix_?this.prefix_+t:t}get_(t,e){return t.get(this.getParamName_(e))}set_(t,e,i){e in this.params_&&t.set(this.getParamName_(e),i)}delete_(t,e){e in this.params_&&t.delete(this.getParamName_(e))}setMap(t){let e=this.getMap();super.setMap(t),t!==e&&(e&&this.unregisterListeners_(e),t&&(this.initial_=!0,this.updateState_(),this.registerListeners_(t)))}registerListeners_(t){this.listenerKeys_.push((0,I.listen)(t,F.default.MOVEEND,this.updateUrl_,this),(0,I.listen)(t.getLayerGroup(),C.default.CHANGE,this.updateUrl_,this),(0,I.listen)(t,"change:layergroup",this.handleChangeLayerGroup_,this)),this.replace_||addEventListener("popstate",this.updateState_)}unregisterListeners_(t){for(let t=0,e=this.listenerKeys_.length;t<e;++t)(0,I.unlistenByKey)(this.listenerKeys_[t]);this.listenerKeys_.length=0,this.replace_||removeEventListener("popstate",this.updateState_);let e=new URL(window.location.href),i=e.searchParams;this.delete_(i,"x"),this.delete_(i,"y"),this.delete_(i,"z"),this.delete_(i,"r"),this.delete_(i,"l"),window.history.replaceState(null,"",e)}handleChangeLayerGroup_(){let t=this.getMap();t&&(this.unregisterListeners_(t),this.registerListeners_(t),this.initial_=!0,this.updateUrl_())}updateState_(){var t;let e=new URL(window.location.href).searchParams;for(let t in this.trackedCallbacks_){let i=e.get(t);t in this.trackedCallbacks_&&i!==this.trackedValues_[t]&&(this.trackedValues_[t]=i,this.trackedCallbacks_[t](i))}let i=this.getMap();if(!i)return;let s=i.getView();if(!s||!s.isDef())return;let r=!1,n={},a=nu(this.get_(e,"z"));"z"in this.params_&&nc(a,s.getZoom())&&(r=!0,n.zoom=a);let o=nu(this.get_(e,"r"));"r"in this.params_&&nc(o,s.getRotation())&&(r=!0,n.rotation=o);let l=[nu(this.get_(e,"x")),nu(this.get_(e,"y"))];("x"in this.params_||"y"in this.params_)&&(t=s.getCenter(),nc(l[0],t[0])||nc(l[1],t[1]))&&(r=!0,n.center=l),r&&(!this.initial_&&this.animationOptions_?s.animate(Object.assign(n,this.animationOptions_)):(n.center&&s.setCenter(n.center),"zoom"in n&&s.setZoom(n.zoom),"rotation"in n&&s.setRotation(n.rotation)));let h=i.getAllLayers(),u=this.get_(e,"l");
1if("l"in this.params_&&u&&u.length===h.length)for(let t=0,e=h.length;t<e;++t){let e=parseInt(u[t]);if(!isNaN(e)){let i=!!e,s=h[t];s.getVisible()!==i&&s.setVisible(i)}}}track(t,e){this.trackedCallbacks_[t]=e;let i=new URL(window.location.href).searchParams.get(t);return this.trackedValues_[t]=i,i}update(t,e){let i=new URL(window.location.href),s=i.searchParams;null===e?s.delete(t):s.set(t,e),t in this.trackedValues_&&(this.trackedValues_[t]=e),this.updateHistory_(i)}updateUrl_(){let t=this.getMap();if(!t)return;let e=t.getView();if(!e||!e.isDef())return;let i=e.getCenter(),s=e.getZoom(),r=e.getRotation(),n=t.getAllLayers(),a=Array(n.length);for(let t=0,e=n.length;t<e;++t)a[t]=n[t].getVisible()?"1":"0";let o=new URL(window.location.href),l=o.searchParams;this.set_(l,"x",nd(i[0])),this.set_(l,"y",nd(i[1])),this.set_(l,"z",nd(s)),this.set_(l,"r",nd(r)),this.set_(l,"l",a.join("")),this.updateHistory_(o),this.initial_=!1}updateHistory_(t){t.href!==window.location.href&&(this.initial_||this.replace_?window.history.replaceState(history.state,"",t):window.history.pushState(null,"",t))}},S=y("31ZqB"),v=y("eHnTw"),j=y("fnScq"),z=y("eJ4LZ"),C=y("cw4dl"),I=y("bsgMw");class nf extends j.default{constructor(t){super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t&&("function"==typeof t.getSimplifiedGeometry?this.setGeometry(t):this.setProperties(t))}clone(){let t=new nf(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());let e=this.getGeometry();e&&t.setGeometry(e.clone());let i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&((0,I.unlistenByKey)(this.geometryChangeKey_),this.geometryChangeKey_=null);let t=this.getGeometry();t&&(this.geometryChangeKey_=(0,I.listen)(t,C.default.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){var e;let i;this.style_=t,this.styleFunction_=t?"function"==typeof(e=t)?e:(Array.isArray(e)?i=e:((0,z.assert)("function"==typeof e.getZIndex,"Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),i=[e]),function(){return i}):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}var K=y("kBSVF"),w=y("iTTi2"),to=y("eQaCk"),K=y("kBSVF"),ie=y("cgxQK"),Q=y("jZquI"),K=y("kBSVF"),np=y("iweSO"),Q=y("jZquI"),n_=class{drawCustom(t,e,i,s,r){}drawGeometry(t){}setStyle(t){}drawCircle(t,e,i){}drawFeature(t,e,i){}drawGeometryCollection(t,e,i){}drawLineString(t,e,i){}drawMultiLineString(t,e,i){}drawMultiPoint(t,e,i){}drawMultiPolygon(t,e,i){}drawPoint(t,e,i){}drawPolygon(t,e,i){}drawText(t,e,i){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}};let nm=0,ny=1,nx=2,nS=3,nv=4,nw=5,nE=6,nM=7,nP=8,nC=9,nb=10,nR=11,nI=12,nT=[nP],nA=[nI],nL=[ny],nN=[nS];var nF=class extends n_{constructor(t,e,i,s){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=s,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){let e=this.pixelRatio;return 1==e?t:t.map(function(t){return t*e})}appendFlatPointCoordinates(t,e){let i=this.getBufferedMaxExtent(),s=this.tmpCoordinate_,r=this.coordinates,n=r.length;for(let a=0,o=t.length;a<o;a+=e)s[0]=t[a],s[1]=t[a+1],(0,Q.containsCoordinate)(i,s)&&(r[n++]=s[0],r[n++]=s[1]);return n}appendFlatLineCoordinates(t,e,i,s,r,n){let a,o,l,h=this.coordinates,u=h.length,d=this.getBufferedMaxExtent();n&&(e+=s);let c=t[e],g=t[e+1],f=this.tmpCoordinate_,p=!0;for(a=e+s;a<i;
1a+=s)f[0]=t[a],f[1]=t[a+1],(l=(0,Q.coordinateRelationship)(d,f))!==o?(p&&(h[u++]=c,h[u++]=g,p=!1),h[u++]=f[0],h[u++]=f[1]):l===np.default.INTERSECTING?(h[u++]=f[0],h[u++]=f[1],p=!1):p=!0,c=f[0],g=f[1],o=l;return(r&&p||a===e+s)&&(h[u++]=c,h[u++]=g),u}drawCustomCoordinates_(t,e,i,s,r){for(let n=0,a=i.length;n<a;++n){let a=i[n],o=this.appendFlatLineCoordinates(t,e,a,s,!1,!1);r.push(o),e=a}return e}drawCustom(t,e,i,s,r){let n,a,o,l,h;this.beginGeometry(t,e,r);let u=t.getType(),d=t.getStride(),c=this.coordinates.length;switch(u){case"MultiPolygon":n=t.getOrientedFlatCoordinates(),l=[];let g=t.getEndss();h=0;for(let t=0,e=g.length;t<e;++t){let e=[];h=this.drawCustomCoordinates_(n,h,g[t],d,e),l.push(e)}this.instructions.push([nv,c,l,t,i,eN,r]),this.hitDetectionInstructions.push([nv,c,l,t,s||i,eN,r]);break;case"Polygon":case"MultiLineString":o=[],n="Polygon"==u?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),h=this.drawCustomCoordinates_(n,0,t.getEnds(),d,o),this.instructions.push([nv,c,o,t,i,eL,r]),this.hitDetectionInstructions.push([nv,c,o,t,s||i,eL,r]);break;case"LineString":case"Circle":n=t.getFlatCoordinates(),a=this.appendFlatLineCoordinates(n,0,n.length,d,!1,!1),this.instructions.push([nv,c,a,t,i,eA,r]),this.hitDetectionInstructions.push([nv,c,a,t,s||i,eA,r]);break;case"MultiPoint":n=t.getFlatCoordinates(),(a=this.appendFlatPointCoordinates(n,d))>c&&(this.instructions.push([nv,c,a,t,i,eA,r]),this.hitDetectionInstructions.push([nv,c,a,t,s||i,eA,r]));break;case"Point":n=t.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),a=this.coordinates.length,this.instructions.push([nv,c,a,t,i,void 0,r]),this.hitDetectionInstructions.push([nv,c,a,t,s||i,void 0,r])}this.endGeometry(e)}beginGeometry(t,e,i){this.beginGeometryInstruction1_=[nm,e,0,t,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[nm,e,0,t,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){let t,e,i,s=this.hitDetectionInstructions;s.reverse();let r=s.length,n=-1;for(t=0;t<r;++t)(i=(e=s[t])[0])==nM?n=t:i==nm&&(e[2]=t,(0,K.reverseSubArray)(this.hitDetectionInstructions,n,t),n=-1)}fillStyleToState(t,e={}){if(t){let i=t.getColor();e.fillPatternScale=i&&"object"==typeof i&&"src"in i?this.pixelRatio:1,e.fillStyle=s9(i||re)}else e.fillStyle=void 0;return e}strokeStyleToState(t,e={}){if(t){e.strokeStyle=s9(t.getColor()||rn);let i=t.getLineCap();e.lineCap=void 0!==i?i:ri;let s=t.getLineDash();e.lineDash=s?s.slice():rs,e.lineDashOffset=t.getLineDashOffset()||0;let r=t.getLineJoin();e.lineJoin=void 0!==r?r:rr;let n=t.getWidth();e.lineWidth=void 0!==n?n:1;let a=t.getMiterLimit();e.miterLimit=void 0!==a?a:10,e.strokeOffset=t.getOffset()??0,e.lineWidth>this.maxLineWidth&&(this.maxLineWidth=e.lineWidth,this.bufferedMaxExtent_=null)}else e.strokeStyle=void 0,e.lineCap=void 0,e.lineDash=null,e.lineDashOffset=void 0,e.lineJoin=void 0,e.lineWidth=void 0,e.miterLimit=void 0,e.strokeOffset=void 0;return e}setFillStrokeStyle(t,e){let i=this.state;this.fillStyleToState(t,i),this.strokeStyleToState(e,i)}createFill(t){let e=t.fillStyle,i=[nb,e];return"string"!=typeof e&&i.push(t.fillPatternScale),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[nR,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,t.lineDash?this.applyPixelRatio(t.lineDash):null,t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){let i=t.fillStyle;("string"!=typeof i||t.currentFillStyle!=i)&&(this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){let i=t.strokeStyle,s=t.lineCap,r=t.lineDash,n=t.lineDashOffset,a=t.lineJoin,o=t.lineWidth,l=t.miterLimit,h=t.strokeOffset;t.currentStrokeStyle==i&&t.currentLineCap==s&&(r==t.currentLineDash||(0,K.equals)(t.currentLineDash,r))&&t.currentLineDashOffset==n&&t.currentLineJoin==a&&t.currentLineWidth==o&&t.currentMiterLimit==l&&t.currentStrokeOffset==h||(e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=s,t.currentLineDash=r,t.currentLineDashOffset=n,t.currentLineJoin=a,t.currentLineWidth=o,t.currentMiterLimit=l,t.currentStrokeOffset=h)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;let e=[nM,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,Q.clone)(this.maxExtent),this.maxLineWidth>0)){let t=this.resolution*(this.maxLineWidth+1)/2;(0,Q.buffer)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}},Q=y("jZquI"),nG=class extends nF{constructor(t,e,i,s){super(t,e,i,s),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,i){if(!this.image_||this.maxExtent&&!(0,Q.containsCoordinate)(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,i);let s=t.getFlatCoordinates(),r=t.getStride(),n=this.coordinates.length,a=this.appendFlatPointCoordinates(s,r);this.instructions.push([nE,n,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.
1ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,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.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([nE,n,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,i){if(!this.image_)return;this.beginGeometry(t,e,i);let s=t.getFlatCoordinates(),r=[];for(let e=0,i=s.length;e<i;e+=t.getStride())(!this.maxExtent||(0,Q.containsCoordinate)(this.maxExtent,s.slice(e,e+2)))&&r.push(s[e],s[e+1]);let n=this.coordinates.length,a=this.appendFlatPointCoordinates(r,2);this.instructions.push([nE,n,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,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.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([nE,n,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){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,super.finish()}setImageStyle(t,e){let i=t.getAnchor(),s=t.getSize(),r=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=s[1],this.opacity_=t.getOpacity(),this.originX_=r[0],this.originY_=r[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=s[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}},nO=class extends nF{constructor(t,e,i,s){super(t,e,i,s)}drawFlatCoordinates_(t,e,i,s,r){let n=this.coordinates.length,a=this.appendFlatLineCoordinates(t,e,i,s,!1,!1);return this.instructions.push([nC,n,a,r*this.pixelRatio]),this.hitDetectionInstructions.push([nC,n,a,r]),i}drawLineString(t,e,i){let s=this.state,r=s.strokeStyle,n=s.lineWidth,a=s.strokeOffset;if(void 0===r||void 0===n)return;this.updateStrokeStyle(s,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([nR,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,rs,0],nL);let o=t.getFlatCoordinates(),l=t.getStride();this.drawFlatCoordinates_(o,0,o.length,l,a),this.hitDetectionInstructions.push(nA),this.endGeometry(e)}drawMultiLineString(t,e,i){let s=this.state,r=s.strokeStyle,n=s.lineWidth,a=s.strokeOffset;if(void 0===r||void 0===n)return;this.updateStrokeStyle(s,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([nR,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,rs,0],nL);let o=t.getEnds(),l=t.getFlatCoordinates(),h=t.getStride(),u=0;for(let t=0,e=o.length;t<e;++t)u=this.drawFlatCoordinates_(l,u,o[t],h,a);this.hitDetectionInstructions.push(nA),this.endGeometry(e)}finish(){let t=this.state;return void 0!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push(nA),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){void 0!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(nA),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(nL)}},nD=class extends nF{constructor(t,e,i,s){super(t,e,i,s)}drawFlatCoordinatess_(t,e,i,s,r){let n=this.state,a=void 0!==n.fillStyle,o=void 0!==n.strokeStyle,l=i.length;this.instructions.push(nL),this.hitDetectionInstructions.push(nL);for(let n=0;n<l;++n){let a=i[n],l=this.coordinates.length,h=this.appendFlatLineCoordinates(t,e,a,s,!0,!o);this.instructions.push([nC,l,h,r*this.pixelRatio,!0]),this.hitDetectionInstructions.push([nC,l,h,r,!0]),o&&(this.instructions.push(nN),this.hitDetectionInstructions.push(nN)),e=a}return a&&(this.instructions.push(nT),this.hitDetectionInstructions.push(nT)),o&&(this.instructions.push(nA),this.hitDetectionInstructions.push(nA)),e}drawCircle(t,e,i){let s=this.state,r=s.fillStyle,n=s.strokeStyle,a=s.strokeOffset;if(void 0===r&&void 0===n||this.handleStrokeOffset_(()=>this.drawCircle(t,e,i)))return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==s.fillStyle&&this.hitDetectionInstructions.push([nb,re]),void 0!==s.strokeStyle&&this.hitDetectionInstructions.push([nR,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,rs,0]);let o=t.getFlatCoordinates(),l=t.getStride(),h=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,l,!1,!1);let u=[nx,h,a];this.instructions.push(nL,u),this.hitDetectionInstructions.push(nL,u),void 0!==s.fillStyle&&(this.instructions.push(nT),this.hitDetectionInstructions.push(nT)),void 0!==s.strokeStyle&&(this.instructions.push(nA),this.hitDetectionInstructions.push(nA)),this.endGeometry(e)}drawPolygon(t,e,i){let s=this.state,r=s.fillStyle,n=s.strokeStyle,a=s.strokeOffset;if(void 0===r&&void 0===n||this.handleStrokeOffset_(()=>this.drawPolygon(t,e,i)))return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==s.fillStyle&&this.hitDetectionInstructions.push([nb,re]),void 0!==s.strokeStyle&&this.hitDetectionInstructions.push([nR,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,rs,0]);let o=t.getEnds(),l=t.getOrientedFlatCoordinates(),h=t.getStride();this.drawFlatCoordinatess_(l,0,o,h,a),this.endGeometry(e)}drawMultiPolygon(t,e,i){let s=this.state,r=s.fillStyle,n=s.strokeStyle,a=s.strokeOffset;if(void 0===r&&void 0===n||this.handleStrokeOffset_(()=>this.drawMultiPolygon(t,e,i)))return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==s.fillStyle&&this.hitDetectionInstructions.push([nb,re]),void 0!==s.strokeStyle&&this.hitDetectionInstructions.push([nR,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,rs,0]);let o=t.getEndss(),l=t.getOrientedFlatCoordinates(),h=t.getStride(),u=0;for(let t=0,e=o.length;t<e;++t)u=this.drawFlatCoordinatess_(l,u,o[t],h,a);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;let t=this.tolerance;if(0!==t){let e=this.coordinates;for(let i=0,s=e.length;i<s;++i)e[i]=eO(e[i],t)}return super.finish()}setFillStrokeStyles_(){let t=this.state;this.updateFillStyle(t,this.createFill),this.updateStrokeStyle(t,this.applyStroke)}handleStrokeOffset_(t){let e=this.state,i=e.fillStyle,s=e.strokeStyle,r=e.strokeOffset;return Math.abs(r)>0&&void 0!==i&&void 0!==s&&(e.strokeStyle=void 0,e.strokeOffset=0,t(),e.fillStyle=void 0,e.strokeStyle=s,e.strokeOffset=r,t(),e.fillStyle=i,!0)}},Q=y("jZquI"),H=y("a6roo"),th=y("lVQul");let nk={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};var nj=class extends nF{constructor(t,e,i,s){super(t,e,i,s),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textKeepUpright_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[re]={fillStyle:re},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){let t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,i){let s=this.textFillState_,r=this.textStrokeState_,n=this.textState_;if(""===this.text_||!n||!s&&!r)return;let a=this.coordinates,o=a.length,l=t.getType(),h=null,u=t.getStride();if("line"===n.placement&&("LineString"==l||"MultiLineString"==l||"Polygon"==l||"MultiPolygon"==l)){let s;if(!(0,Q.intersects)(this.maxExtent,t.getExtent()))return;if(h=t.getFlatCoordinates(),"LineString"==l)s=[h.length];else if("MultiLineString"==l)s=t.getEnds();else if("Polygon"==l)s=t.getEnds().slice(0,1);else if("MultiPolygon"==l){let e=t.getEndss();s=[];for(let t=0,i=e.length;t<i;++t)s.push(e[t][0])}this.beginGeometry(t,e,i);let r=n.repeat,d=r?void 0:n.textAlign,c=0;for(let t=0,e=s.length;t<e;++t){let e;
1e=r?function(t,e,i,s,r){let n=[],a=i,o=0,l=e.slice(i,2);for(;o<t&&a+r<s;){let[i,s]=l.slice(-2),h=e[a+r],u=e[a+r+1],d=Math.sqrt((h-i)*(h-i)+(u-s)*(u-s));if((o+=d)>=t){let e=(t-o+d)/d,c=(0,H.lerp)(i,h,e),g=(0,H.lerp)(s,u,e);l.push(c,g),n.push(l),l=[c,g],o==t&&(a+=r),o=0}else if(o<t)l.push(e[a+r],e[a+r+1]),a+=r;else{let t=d-o,e=(0,H.lerp)(i,h,t/d),c=(0,H.lerp)(s,u,t/d);l.push(e,c),n.push(l),l=[e,c],o=0,a+=r}}return o>0&&n.push(l),n}(r*this.resolution,h,c,s[t],u):[h.slice(c,s[t])];for(let i=0,r=e.length;i<r;++i){let r=e[i],l=0,h=r.length;if(void 0==d){let t=function(t,e,i){let s,r,n,a,o,l,h,u,d,c=0,g=0,f=0,p=0,_=0;for(s=0;s<i;s+=2){let i=e[s],m=e[s+1];void 0!==a&&(n=Math.sqrt((u=i-a)*u+(d=m-o)*d),void 0!==l&&(p+=r,Math.acos((l*u+h*d)/(r*n))>t&&(p>f&&(f=p,c=_,g=s),p=0,_=s-2)),r=n,l=u,h=d),a=i,o=m}return(p+=n)>f?[_,s]:[c,g]}(n.maxAngle,r,r.length);l=t[0],h=t[1]}for(let t=l;t<h;t+=u)a.push(r[t],r[t+1]);let g=a.length;c=s[t],this.drawChars_(o,g),o=g}}this.endGeometry(e)}else{let s=n.overflow?null:[];switch(l){case"Point":case"MultiPoint":h=t.getFlatCoordinates();break;case"LineString":h=t.getFlatMidpoint();break;case"Circle":h=t.getCenter();break;case"MultiLineString":h=t.getFlatMidpoints(),u=2;break;case"Polygon":h=t.getFlatInteriorPoint(),n.overflow||s.push(h[2]/this.resolution),u=3;break;case"MultiPolygon":let r=t.getFlatInteriorPoints();h=[];for(let t=0,e=r.length;t<e;t+=3)n.overflow||s.push(r[t+2]/this.resolution),h.push(r[t],r[t+1]);if(0===h.length)return;u=2}let d=this.appendFlatPointCoordinates(h,u);if(d===o)return;if(s&&(d-o)/2!=h.length/u){let t=o/2;s=s.filter((e,i)=>{let s=a[(t+i)*2]===h[i*u]&&a[(t+i)*2+1]===h[i*u+1];return!s&&--t,s})}this.saveTextStates_();let c=n.backgroundFill?this.createFill(this.fillStyleToState(n.backgroundFill)):null,g=n.backgroundStroke?this.createStroke(this.strokeStyleToState(n.backgroundStroke)):null;this.beginGeometry(t,e,i);let f=n.padding;if(f!=rl&&(n.scale[0]<0||n.scale[1]<0)){let t=n.padding[0],e=n.padding[1],i=n.padding[2],s=n.padding[3];n.scale[0]<0&&(e=-e,s=-s),n.scale[1]<0&&(t=-t,i=-i),f=[t,e,i,s]}let p=this.pixelRatio;this.instructions.push([nE,o,d,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,f==rl?rl:f.map(function(t){return t*p}),c,g,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,s]);let _=1/p,m=c?c.slice(0):null;m&&(m[1]=re),this.hitDetectionInstructions.push([nE,o,d,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[_,_],NaN,this.declutterMode_,this.declutterImageWithText_,f,m,g,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?re:this.fillKey_,this.textOffsetX_,this.textOffsetY_,s]),this.endGeometry(e)}}saveTextStates_(){let 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});let r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||ra,justify:e.justify,textBaseline:e.textBaseline||ro,scale:e.scale});let n=this.fillKey_;!i||n in this.fillStates||(this.fillStates[n]={fillStyle:i.fillStyle})}drawChars_(t,e){let i=this.textStrokeState_,s=this.textState_,r=this.strokeKey_,n=this.textKey_,a=this.fillKey_;this.saveTextStates_();let o=this.pixelRatio,l=nk[s.textBaseline],h=this.textOffsetY_*o,u=this.text_,d=i?i.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([nw,t,e,l,s.overflow,a,s.maxAngle,o,h,r,d*o,u,n,1,this.declutterMode_,this.textKeepUpright_]),this.hitDetectionInstructions.push([nw,t,e,l,s.overflow,a?re:a,s.maxAngle,o,h,r,d*o,u,n,1/o,this.declutterMode_,this.textKeepUpright_])}setTextStyle(t,e){let i,s,r;
1if(t){let e=t.getFill();e?((s=this.textFillState_)||(s={},this.textFillState_=s),s.fillStyle=s9(e.getColor()||re)):(s=null,this.textFillState_=s);let n=t.getStroke();if(n){(r=this.textStrokeState_)||(r={},this.textStrokeState_=r);let t=n.getLineDash(),e=n.getLineDashOffset(),i=n.getWidth(),s=n.getMiterLimit();r.lineCap=n.getLineCap()||ri,r.lineDash=t?t.slice():rs,r.lineDashOffset=void 0===e?0:e,r.lineJoin=n.getLineJoin()||rr,r.lineWidth=void 0===i?1:i,r.miterLimit=void 0===s?10:s,r.strokeStyle=s9(n.getColor()||rn)}else r=null,this.textStrokeState_=r;i=this.textState_;let a=t.getFont()||rt;rg(a);let o=t.getScaleArray();i.overflow=t.getOverflow(),i.font=a,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||ro,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||rl,i.scale=void 0===o?[1,1]:o;let l=t.getOffsetX(),h=t.getOffsetY(),u=t.getRotateWithView(),d=t.getKeepUpright(),c=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===l?0:l,this.textOffsetY_=void 0===h?0:h,this.textRotateWithView_=void 0!==u&&u,this.textKeepUpright_=void 0===d||d,this.textRotation_=void 0===c?0:c,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:(0,th.getUid)(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=s&&s.fillStyle?"string"==typeof s.fillStyle?s.fillStyle:"|"+(0,th.getUid)(s.fillStyle):""}else this.text_="";this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}};let nB={Circle:nD,Default:nF,Image:nG,LineString:nO,Polygon:nD,Text:nj};var nz=class{constructor(t,e,i,s){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=s,this.resolution_=i,this.buildersByZIndex_={}}finish(){let t={};for(let e in this.buildersByZIndex_){t[e]=t[e]||{};let i=this.buildersByZIndex_[e];for(let s in i){let r=i[s].finish();t[e][s]=r}}return t}getBuilder(t,e){let i=void 0!==t?t.toString():"0",s=this.buildersByZIndex_[i];void 0===s&&(s={},this.buildersByZIndex_[i]=s);let r=s[e];return void 0===r&&(r=new nB[e](this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[e]=r),r}},K=y("kBSVF"),ie=y("cgxQK"),Q=y("jZquI"),U=y("kKEgb"),K=y("kBSVF"),Q=y("jZquI");function nU(t,e,i,s){let r=t[e],n=t[e+1],a=0;for(let o=e+s;o<i;o+=s){let e=t[o],i=t[o+1];a+=Math.sqrt((e-r)*(e-r)+(i-n)*(i-n)),r=e,n=i}return a}function nW(t,e,i,s,r,n,a){var o,l,h;let u,d,c,g,f,p,_,m;void 0!==i&&void 0!==s?(u=t-i,d=e-s):void 0!==r&&void 0!==n?(u=r-t,d=n-e):(u=1,d=0);let y=Math.hypot(u,d),x=u/y,S=d/y;if(u=-S,d=x,void 0===i||void 0===s||void 0===r||void 0===n)return[t+u*a,e+d*a];let v=(o=[t,e],l=[i,s],h=[r,n],c=Math.sqrt((l[0]-o[0])*(l[0]-o[0])+(l[1]-o[1])*(l[1]-o[1])),f=[-(g=[(l[0]-o[0])/c,(l[1]-o[1])/c])[1],g[0]],p=Math.sqrt((h[0]-o[0])*(h[0]-o[0])+(h[1]-o[1])*(h[1]-o[1])),_=[(h[0]-o[0])/p,(h[1]-o[1])/p],m=Math.max(m=0===c||0===p?0:Math.acos((0,H.clamp)(_[0]*g[0]+_[1]*g[1],-1,1)),1e-5),_[0]*f[0]+_[1]*f[1]>0?m:2*Math.PI-m);if(Math.cos(v)>.998)return[t+x*a,e+S*a];let w=Math.cos(v/2),E=Math.sin(v/2),M=E*u+w*d,P=-w*u+E*d;return[t+1/E*M*a,e+1/E*P*a]}var H=y("a6roo"),ie=y("cgxQK"),nV=class{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy((0,ie.getSharedCanvasContext2D)(),{get:(t,e)=>{if("function"==typeof(0,ie.getSharedCanvasContext2D)()[e])return this.push_(e),this.pushMethodArgs_},set:(t,e,i)=>(this.push_(e,i),!0)})}push_(...t){let e=this.instructions_,i=this.zIndex+this.offset_;e[i]||(e[i]=[]),e[i].push(...t)}pushMethodArgs_=(...t)=>(this.push_(t),this);pushFunction(t){this.push_(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach(e=>{for(let i=0,s=e.length;i<s;++i){let s=e[i];if("function"==typeof s){s(t);continue}let r=e[++i];if("function"==typeof t[s])t[s](...r);else{if("function"==typeof r){t[s]=r(t);continue}t[s]=r}}})}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}};let nq=(0,Q.createEmpty)(),nZ=[],nK=[],nH=[],nX=[];function nY(t){return t[3].declutterBox}let nQ=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 nJ(t,e){return"start"===e?e=nQ.test(t)?"right":"left":"end"===e&&(e=nQ.test(t)?"left":"right"),nk[e]}function n$(t,e,i){return i>0&&t.push("\n",""),t.push(e,""),t}function n0(t,e,i){return i%2==0&&(t+=e),t}var n1=class{constructor(t,e,i,s,r){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=ei(),this.hitDetectionInstructions=s.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=s.fillStates||{},this.strokeStates=s.strokeStates||{},this.textStates=s.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new nV:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,i,s){let r,n=t+e+i+s;
1if(this.labels_[n])return this.labels_[n];let a=s?this.strokeStates[s]:null,o=i?this.fillStates[i]:null,l=this.textStates[e],h=this.pixelRatio,u=[l.scale[0]*h,l.scale[1]*h],d=l.justify?nk[l.justify]:nJ(Array.isArray(t)?t[0]:t,l.textAlign||ra),c=s&&a.lineWidth?a.lineWidth:0,g=Array.isArray(t)?t:String(t).split("\n").reduce(n$,[]),{width:f,height:p,widths:_,heights:m,lineWidths:y}=function(t,e){let i=[],s=[],r=[],n=0,a=0,o=0,l=0;for(let h=0,u=e.length;h<=u;h+=2){let d=e[h];if("\n"===d||h===u){n=Math.max(n,a),r.push(a),a=0,o+=l,l=0;continue}let c=e[h+1]||t.font,g=rp(c,d).width;i.push(g),a+=g;let f=rf(c);s.push(f),l=Math.max(l,f)}return{width:n,height:o,widths:i,heights:s,lineWidths:r}}(l,g),x=f+c,S=[],v=(x+2)*u[0],w=(p+c)*u[1],E={width:v<0?Math.floor(v):Math.ceil(v),height:w<0?Math.floor(w):Math.ceil(w),contextInstructions:S};(1!=u[0]||1!=u[1])&&S.push("scale",u),s&&(S.push("strokeStyle",a.strokeStyle),S.push("lineWidth",c),S.push("lineCap",a.lineCap),S.push("lineJoin",a.lineJoin),S.push("miterLimit",a.miterLimit),S.push("setLineDash",[a.lineDash]),S.push("lineDashOffset",a.lineDashOffset)),i&&S.push("fillStyle",o.fillStyle),S.push("textBaseline","middle"),S.push("textAlign","center");let M=.5-d,P=d*x+M*c,C=[],b=[],R=0,I=0,T=0,A=0;for(let t=0,e=g.length;t<e;t+=2){let e=g[t];if("\n"===e){I+=R,R=0,P=d*x+M*c,++A;continue}let n=g[t+1]||l.font;n!==r&&(s&&C.push("font",n),i&&b.push("font",n),r=n),R=Math.max(R,m[T]);let a=[e,P+M*_[T]+d*(_[T]-y[A]),.5*(c+R)+I];P+=_[T],s&&C.push("strokeText",a),i&&b.push("fillText",a),++T}return Array.prototype.push.apply(S,C),Array.prototype.push.apply(S,b),this.labels_[n]=E,E}replayTextBackground_(t,e,i,s,r,n,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,s),t.lineTo.apply(t,r),t.lineTo.apply(t,e),n&&(this.alignAndScaleFill_=n[2],t.fillStyle=n[1],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())}calculateImageOrLabelDimensions_(t,e,i,s,r,n,a,o,l,h,u,d,c,g,f,p){let _;a*=d[0],o*=d[1];let m=i-a,y=s-o,x=r+l>t?t-l:r,S=n+h>e?e-h:n,v=g[3]+x*d[0]+g[1],w=g[0]+S*d[1]+g[2],E=m-g[3],M=y-g[0];return(f||0!==u)&&(nZ[0]=E,nX[0]=E,nZ[1]=M,nK[1]=M,nK[0]=E+v,nH[0]=nK[0],nH[1]=M+w,nX[1]=nH[1]),0!==u?(ea(_=el(ei(),i,s,1,1,u,-i,-s),nZ),ea(_,nK),ea(_,nH),ea(_,nX),(0,Q.createOrUpdate)(Math.min(nZ[0],nK[0],nH[0],nX[0]),Math.min(nZ[1],nK[1],nH[1],nX[1]),Math.max(nZ[0],nK[0],nH[0],nX[0]),Math.max(nZ[1],nK[1],nH[1],nX[1]),nq)):(0,Q.createOrUpdate)(Math.min(E,E+v),Math.min(M,M+w),Math.max(E,E+v),Math.max(M,M+w),nq),c&&(m=Math.round(m),y=Math.round(y)),{drawImageX:m,drawImageY:y,drawImageW:x,drawImageH:S,originX:l,originY:h,declutterBox:{minX:nq[0],minY:nq[1],maxX:nq[2],maxY:nq[3],value:p},canvasTransform:_,scale:d}}replayImageOrLabel_(t,e,i,s,r,n,a){let o=!!(n||a),l=s.declutterBox,h=a?a[2]*s.scale[0]/2:0;if(l.minX-h<=e[0]&&l.maxX+h>=0&&l.minY-h<=e[1]&&l.maxY+h>=0){var u,d,c,g,f,p,_,m;o&&this.replayTextBackground_(t,nZ,nK,nH,nX,n,a),u=s.canvasTransform,d=s.originX,c=s.originY,g=s.drawImageW,f=s.drawImageH,p=s.drawImageX,_=s.drawImageY,m=s.scale,t.save(),1!==r&&(void 0===t.globalAlpha?t.globalAlpha=t=>t.globalAlpha*=r:t.globalAlpha*=r),u&&t.transform.apply(t,u),i.contextInstructions?(t.translate(p,_),t.scale(m[0],m[1]),function(t,e){let i=t.contextInstructions;for(let t=0,s=i.length;t<s;t+=2)Array.isArray(i[t+1])?e[i[t]].apply(e,i[t+1]):e[i[t]]=i[t+1]}(i,t)):m[0]<0||m[1]<0?(t.translate(p,_),t.scale(m[0],m[1]),t.drawImage(i,d,c,g,f,0,0,g,f)):t.drawImage(i,d,c,g,f,p,_,g*m[0],f*m[1]),t.restore()}return!0}fill_(t){let e=this.alignAndScaleFill_;if(e){let i=ea(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;t.save(),t.translate(i[0]%s,i[1]%s),1!==e&&t.scale(e,e)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],e[1]&&(t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6]))}drawLabelWithPointPlacement_(t,e,i,s){let r=this.textStates[e],n=this.createLabel(t,e,s,i),a=this.strokeStates[i],o=this.pixelRatio,l=nJ(Array.isArray(t)?t[0]:t,r.textAlign||ra),h=nk[r.textBaseline||ro],u=a&&a.lineWidth?a.lineWidth:0,d=n.width/o-2*r.scale[0],c=h*n.height/o+2*(.5-h)*u;return{label:n,anchorX:l*d+2*(.5-l)*u,anchorY:c}}execute_(t,e,i,s,r,n,a,o){let l,h,u,d,c,g,f,p,_,m,y,x,S,v,w,E,M,P,C,b,R,I=this.zIndexContext_;if(this.pixelCoordinates_&&(0,K.equals)(i,this.renderedTransform_))l=this.pixelCoordinates_;else{var T;this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=ec(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),T=this.renderedTransform_,T[0]=i[0],T[1]=i[1],T[2]=i[2],T[3]=i[3],T[4]=i[4],T[5]=i[5]}let A=0,L=s.length,N=0,F=0,G=0,O=this.coordinateCache_,D=this.viewRotation_,k=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,j={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},B=this.instructions!=s||this.overlaps?0:200;for(;A<L;){let i=s[A];switch(i[0]){case nm:P=i[1],R=i[3],P.getGeometry()?void 0===a||(0,Q.intersects)(a,R.getExtent())?++A:A=i[2]+1:A=i[2],I&&(I.zIndex=i[4]);break;case ny:F>B&&(this.fill_(t),F=0),G>
1B&&(t.stroke(),G=0),F||G||(t.beginPath(),_=NaN,m=NaN),++A;break;case nx:N=i[1],c=i[2]??0;let T=l[N],L=l[N+1],z=l[N+2]-c,U=l[N+3]-c,W=z-T,V=U-L,q=Math.sqrt(W*W+V*V);t.moveTo(T+q,L),t.arc(T,L,q,0,2*Math.PI,!0),++A;break;case nS:t.closePath(),++A;break;case nv:N=i[1],h=i[2];let Z=i[3],K=i[4],X=i[5];j.geometry=Z,j.feature=P,A in O||(O[A]=[]);let Y=O[A];X?X(l,N,h,2,Y):(Y[0]=l[N],Y[1]=l[N+1],Y.length=2),I&&(I.zIndex=i[6]),K(Y,j),++A;break;case nE:let J,$,tt,te;N=i[1],h=i[2],S=i[3],u=i[4],d=i[5];let ti=i[6],ts=i[7],tr=i[8],tn=i[9],ta=i[10],to=i[11],tl=i[12],th=i[13];p=i[14]||"declutter";let tu=i[15];if(!S&&i.length>=20){v=i[19],w=i[20],E=i[21],M=i[22];let t=this.drawLabelWithPointPlacement_(v,w,E,M);S=t.label,i[3]=S;let e=i[23];u=(t.anchorX-e)*this.pixelRatio,i[4]=u;let s=i[24];d=(t.anchorY-s)*this.pixelRatio,i[5]=d,ti=S.height,i[6]=ti,th=S.width,i[13]=th}i.length>25&&(J=i[25]),i.length>17?($=i[16],tt=i[17],te=i[18]):($=rl,tt=null,te=null),ta&&k?to+=D:ta||k||(to-=D);let td=0;for(;N<h;N+=2){if(J&&J[td++]<th/this.pixelRatio)continue;let i=this.calculateImageOrLabelDimensions_(S.width,S.height,l[N],l[N+1],th,ti,u,d,tr,tn,to,tl,r,$,!!tt||!!te,P),s=[t,e,S,i,ts,tt,te];if(o){let t,e,r,n,a;if(tu){let i=h-N;if(!tu[i]){tu[i]={args:s,declutterMode:p};continue}let n=tu[i];t=n.args,e=n.declutterMode,delete tu[i],r=nY(t)}if(t&&("declutter"!==e||!o.collides(r))&&(n=!0),"declutter"===p&&o.collides(i.declutterBox)||(a=!0),"declutter"===e&&"declutter"===p){let t=n&&a;n=t,a=t}n&&("none"!==e&&o.insert(r),this.replayImageOrLabel_.apply(this,t)),a&&("none"!==p&&o.insert(i.declutterBox),this.replayImageOrLabel_.apply(this,s))}else this.replayImageOrLabel_.apply(this,s)}++A;break;case nw:let tc,tg=i[1],tf=i[2],tp=i[3],t_=i[4];M=i[5];let tm=i[6],ty=i[7],tx=i[8];E=i[9];let tS=i[10];Array.isArray(v=i[11])&&(v=v.reduce(n0,"")),w=i[12];let tv=[i[13],i[13]];p=i[14]||"declutter";let tw=i[15],tE=this.textStates[w],tM=tE.font,tP=[tE.scale[0]*ty,tE.scale[1]*ty];tM in this.widths_?tc=this.widths_[tM]:(tc={},this.widths_[tM]=tc);let tC=nU(l,tg,tf,2),tb=Math.abs(tP[0])*r_(tM,v,tc);if(t_||tb<=tC){let i=(tC-tb)*nJ(v,this.textStates[w].textAlign),s=function(t,e,i,s,r,n,a,o,l,h,u,d=!0){let c,g=t[e],f=t[e+1],p=0,_=0,m=0,y=0;function x(){p=g,_=f,e+=2,g=t[e],f=t[e+1],y+=m,m=Math.sqrt((g-p)*(g-p)+(f-_)*(f-_))}do x();while(e<i-2&&y+m<r)let S=0===m?0:(r-y)/m,v=(0,H.lerp)(p,g,S),w=(0,H.lerp)(_,f,S),E=e-2,M=y,P=r+a*o(l,s,h);for(;e<i-2&&y+m<P;)x();S=0===m?0:(P-y)/m;let C=(0,H.lerp)(p,g,S),b=(0,H.lerp)(_,f,S),R=!1;if(d)if(u){let t=[v,w,C,b];eg(t,0,4,2,u,t,t),R=t[0]>t[2]}else R=v>C;let I=Math.PI,T=[],A=E+2===e;if(e=E,m=0,y=M,g=t[e],f=t[e+1],A){x(),c=Math.atan2(f-_,g-p),R&&(c+=c>0?-I:I);let t=(C+v)/2,e=(b+w)/2;return T[0]=[t,e,(P-r)/2,c,s],T}s=s.replace(/\n/g," ");for(let t=0,u=s.length;t<u;){x();let d=Math.atan2(f-_,g-p);if(R&&(d+=d>0?-I:I),void 0!==c){let t=d-c;if(Math.abs(t+=t>I?-2*I:t<-I?2*I:0)>n)return null}c=d;let v=t,w=0;for(;t<u;++t){let n=a*o(l,s[R?u-t-1:t],h);if(e+2<i&&y+m<r+w+n/2)break;w+=n}if(t===v)continue;let E=R?s.substring(u-v,u-t):s.substring(v,t);S=0===m?0:(r+w/2-y)/m;let M=(0,H.lerp)(p,g,S),P=(0,H.lerp)(_,f,S);T.push([M,P,w/2,d,E]),r+=w}return T}(l,tg,tf,v,i,tm,Math.abs(tP[0]),r_,tM,tc,k?0:this.viewRotation_,tw);t:if(s){let i,r,n,a,l,h=[];if(E)for(i=0,r=s.length;i<r;++i){n=(l=s[i])[4],a=this.createLabel(n,w,"",E),u=l[2]+(tP[0]<0?-tS:tS),d=tp*a.height+(.5-tp)*2*tS*tP[1]/tP[0]-tx;let r=this.calculateImageOrLabelDimensions_(a.width,a.height,l[0],l[1],a.width,a.height,u,d,0,0,l[3],tv,!1,rl,!1,P);if(o&&"declutter"===p&&o.collides(r.declutterBox))break t;h.push([t,e,a,r,1,null,null])}if(M)for(i=0,r=s.length;i<r;++i){n=(l=s[i])[4],a=this.createLabel(n,w,M,""),u=l[2],d=tp*a.height-tx;let r=this.calculateImageOrLabelDimensions_(a.width,a.height,l[0],l[1],a.width,a.height,u,d,0,0,l[3],tv,!1,rl,!1,P);if(o&&"declutter"===p&&o.collides(r.declutterBox))break t;h.push([t,e,a,r,1,null,null])}o&&"none"!==p&&o.load(h.map(nY));for(let t=0,e=h.length;t<e;++t)this.replayImageOrLabel_.apply(this,h[t])}}++A;break;case nM:if(void 0!==n){let t=n(P=i[1],R,p);if(t)return t}++A;break;case nP:B?F++:this.fill_(t),++A;break;
1case nC:for(N=i[1],h=i[2],c=i[3],g=i[4]??!1,C=l[N],b=l[N+1],c&&(f=N,[C,b]=nW(C,b,g?l[h-4]:void 0,g?l[h-3]:void 0,l[N+2],l[N+3],c)),t.moveTo(C,b),_=C+.5|0,m=b+.5|0,N+=2;N<h;N+=2)C=l[N],b=l[N+1],y=C+.5|0,x=b+.5|0,(N==h-2||y!==_||x!==m)&&(c&&(N==h-2?[C,b]=nW(C,b,l[N-2],l[N-1],g?l[f+2]:void 0,g?l[f+3]:void 0,c):[C,b]=nW(C,b,l[N-2],l[N-1],l[N+2],l[N+3],c)),t.lineTo(C,b),_=y,m=x);++A;break;case nb:this.alignAndScaleFill_=i[2],F&&(this.fill_(t),F=0,G&&(t.stroke(),G=0)),t.fillStyle=i[1],++A;break;case nR:G&&(t.stroke(),G=0),this.setStrokeStyle_(t,i),++A;break;case nI:B?G++:t.stroke(),++A;break;default:++A}}F&&this.fill_(t),G&&t.stroke()}execute(t,e,i,s,r,n){this.viewRotation_=s,this.execute_(t,e,i,this.instructions,r,void 0,void 0,n)}executeHitDetection(t,e,i,s,r){return this.viewRotation_=i,this.execute_(t,[t.canvas.width,t.canvas.height],e,this.hitDetectionInstructions,!0,s,r)}};let n2=["Polygon","Circle","LineString","Image","Text","Default"],n4=["Image","Text"],n3=n2.filter(t=>!n4.includes(t)),n8=!1,n5=!1,n6={};var n7=class{constructor(t,e,i,s,r,n,a){this.maxExtent_=t,this.overlaps_=s,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=n,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=ei(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(r,a)}clip(t,e){let i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t,e){for(let i in t){let s=this.executorsByZIndex_[i];void 0===s&&(s={},this.executorsByZIndex_[i]=s);let r=t[i];for(let t in r){let i=r[t];s[t]=new n1(this.resolution_,this.pixelRatio_,this.overlaps_,i,e)}}}hasExecutors(t){for(let e in this.executorsByZIndex_){let i=this.executorsByZIndex_[e];for(let e=0,s=t.length;e<s;++e)if(t[e]in i)return!0}return!1}forEachFeatureAtCoordinate(t,e,i,s,r,n){let a,o,l,h,u,d,c,g,f;!1===n5&&(g=0,n8=({[(f=t=>{let e=(0,ie.createCanvasContext2D)(1,1,null,{willReadFrequently:t}),i=0,s=performance.now();for(;performance.now()-s<50;++i)e.fillStyle=`rgba(255,0,${i%256},1)`,e.fillRect(0,0,1,1),e.getImageData(0,0,1,1);return g=i>g?i:g,i})(!0)]:!0,[f(!1)]:!1,[f(void 0)]:void 0})[g],n5=!0);let p=2*(s=Math.round(s))+1,_=el(this.hitDetectionTransform_,s+.5,s+.5,1/e,-1/e,-i,-t[0],-t[1]),m=!this.hitDetectionContext_;m&&(this.hitDetectionContext_=(0,ie.createCanvasContext2D)(p,p,null,{willReadFrequently:n8}));let y=this.hitDetectionContext_;y.canvas.width!==p||y.canvas.height!==p?(y.canvas.width=p,y.canvas.height=p):m||y.clearRect(0,0,p,p),void 0!==this.renderBuffer_&&(a=(0,Q.createEmpty)(),(0,Q.extendCoordinate)(a,t),(0,Q.buffer)(a,e*(this.renderBuffer_+s),a));let x=function(t){if(void 0!==n6[t])return n6[t];let e=2*t+1,i=t*t,s=Array(i+1);for(let r=0;r<=t;++r)for(let n=0;n<=t;++n){let a=r*r+n*n;if(a>i)break;let o=s[a];o||(o=[],s[a]=o),o.push(((t+r)*e+(t+n))*4+3),r>0&&o.push(((t-r)*e+(t+n))*4+3),n>0&&(o.push(((t+r)*e+(t-n))*4+3),r>0&&o.push(((t-r)*e+(t-n))*4+3))}let r=[];for(let t=0,e=s.length;t<e;++t)s[t]&&r.push(...s[t]);return n6[t]=r,r}(s);function S(t,e,i){let a=y.getImageData(0,0,p,p).data;for(let l=0,h=x.length;l<h;l++)if(a[x[l]]>0){if(!n||"none"===i||"Image"!==o&&"Text"!==o||n.includes(t)){let i=(x[l]-3)/4,n=s-i%p,a=s-(i/p|0),o=r(t,e,n*n+a*a);if(o)return o}y.clearRect(0,0,p,p);break}}let v=Object.keys(this.executorsByZIndex_).map(Number);for(v.sort(K.ascending),l=v.length-1;l>=0;--l){let t=v[l].toString();for(u=this.executorsByZIndex_[t],h=n2.length-1;h>=0;--h)if(void 0!==(d=u[o=n2[h]])&&(c=d.executeHitDetection(y,_,i,S,a)))return c}}getClipCoords(t){let e=this.maxExtent_;if(!e)return null;let i=e[0],s=e[1],r=e[2],n=e[3],a=[i,s,i,n,r,n,r,s];return ec(a,0,8,2,t,a),a}isEmpty(){return(0,U.isEmpty)(this.executorsByZIndex_)}execute(t,e,i,s,r,n,a){let o=Object.keys(this.executorsByZIndex_).map(Number);o.sort(a?K.descending:K.ascending),n=n||n2;let l=n2.length;for(let h=0,u=o.length;h<u;++h){let u=o[h].toString(),d=this.executorsByZIndex_[u];for(let u=0,c=n.length;u<c;++u){let c=n[u],g=d[c];if(void 0!==g){let n=null===a?void 0:g.getZIndexContext(),u=n?n.getContext():t,d=this.maxExtent_&&"Image"!==c&&"Text"!==c;if(d&&(u.save(),this.clip(u,i)),n&&"Text"!==c&&"Image"!==c?n.pushFunction(t=>
1g.execute(t,e,i,s,r,a)):g.execute(u,e,i,s,r,a),d&&u.restore(),n){n.offset();let t=o[h]*l+n2.indexOf(c);this.deferredZIndexContexts_[t]||(this.deferredZIndexContexts_[t]=[]),this.deferredZIndexContexts_[t].push(n)}}}}this.renderedContext_=t}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){let t=this.deferredZIndexContexts_,e=Object.keys(t).map(Number).sort(K.ascending);for(let i=0,s=e.length;i<s;++i)t[e[i]].forEach(t=>{t.draw(this.renderedContext_),t.clear()}),t[e[i]].length=0}},K=y("kBSVF"),ie=y("cgxQK"),Q=y("jZquI"),H=y("a6roo"),K=y("kBSVF"),Q=y("jZquI"),H=y("a6roo"),n9=class extends n_{constructor(t,e,i,s,r,n,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=s,this.transformRotation_=s?(0,H.toFixed)(Math.atan2(s[1],s[0]),10):0,this.viewRotation_=r,this.squaredTolerance_=n,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=ei()}drawImages_(t,e,i,s){if(!this.image_)return;let r=ec(t,e,i,s,this.transform_,this.pixelCoordinates_),n=this.context_,a=this.tmpLocalTransform_,o=n.globalAlpha;1!=this.imageOpacity_&&(n.globalAlpha=o*this.imageOpacity_);let l=this.imageRotation_;0===this.transformRotation_&&(l-=this.viewRotation_),this.imageRotateWithView_&&(l+=this.viewRotation_);for(let t=0,e=r.length;t<e;t+=2){let e=r[t]-this.imageAnchorX_,i=r[t+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){let t=e+this.imageAnchorX_,s=i+this.imageAnchorY_;el(a,t,s,1,1,l,-t,-s),n.save(),n.transform.apply(n,a),n.translate(t,s),n.scale(this.imageScale_[0],this.imageScale_[1]),n.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),n.restore()}else n.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,e,i,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(n.globalAlpha=o)}drawText_(t,e,i,s){if(!this.textState_||""===this.text_)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);let r=ec(t,e,i,s,this.transform_,this.pixelCoordinates_),n=this.context_,a=this.textRotation_;for(0===this.transformRotation_&&(a-=this.viewRotation_),this.textRotateWithView_&&(a+=this.viewRotation_);e<i;e+=s){let t=r[e]+this.textOffsetX_,i=r[e+1]+this.textOffsetY_;0!==a||1!=this.textScale_[0]||1!=this.textScale_[1]?(n.save(),n.translate(t-this.textOffsetX_,i-this.textOffsetY_),n.rotate(a),n.translate(this.textOffsetX_,this.textOffsetY_),n.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&n.strokeText(this.text_,0,0),this.textFillState_&&n.fillText(this.text_,0,0),n.restore()):(this.textStrokeState_&&n.strokeText(this.text_,t,i),this.textFillState_&&n.fillText(this.text_,t,i))}}moveToLineTo_(t,e,i,s,r,n){let a=this.context_,o=ec(t,e,i,s,this.transform_,this.pixelCoordinates_);Math.abs(n)>0&&(o=function(t,e,i,s,r,n){let a,o,l,h,u,d,c,g;r=r??[],n=n??e;let f=t[0],p=t[1],_=t[t.length-4],m=t[t.length-3],y=0;for(let x=0;x<t.length;x+=e){l=a,h=o,u=void 0,d=void 0,x+e<t.length&&(u=t[x+e],d=t[x+e+1]),s&&0===x&&(l=_,h=m),s&&x===t.length-2&&(u=f,d=p),a=t[x],o=t[x+1],[c,g]=nW(a,o,l,h,u,d,i),r[y++]=c,r[y++]=g;for(let e=2;e<n;e++)r[y++]=t[x+e]}return r.length!=y&&(r.length=y),r}(o,s,n,r,o)),a.moveTo(o[0],o[1]);let l=o.length;r&&(l-=2);for(let t=2;t<l;t+=2)a.lineTo(o[t],o[t+1]);return r&&a.closePath(),i}drawRings_(t,e,i,s,r){for(let n=0,a=i.length;n<a;++n)e=this.moveToLineTo_(t,e,i[n],s,!0,r);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,Q.intersects)(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);
1let e=function(t,e,i){let s=t.getFlatCoordinates();if(!s)return null;let r=t.getStride();return ec(s,0,s.length,r,e,i)}(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],s=e[3]-e[1],r=Math.sqrt(i*i+s*s),n=this.context_;n.beginPath(),n.arc(e[0],e[1],r,0,2*Math.PI),this.fillState_&&n.fill(),this.strokeState_&&n.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t)}}drawFeature(t,e){let i=e.getGeometryFunction()(t);i&&(this.setStyle(e),this.drawGeometry(i))}drawGeometryCollection(t){let e=t.getGeometriesArray();for(let t=0,i=e.length;t<i;++t)this.drawGeometry(e[t])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));let e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));let e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,Q.intersects)(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);let e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1,this.strokeState_.strokeOffset),e.stroke()}if(""!==this.text_){let e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));let e=t.getExtent();if((0,Q.intersects)(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);let e=this.context_,i=t.getFlatCoordinates(),s=0,r=t.getEnds(),n=t.getStride();e.beginPath();for(let t=0,e=r.length;t<e;++t)s=this.moveToLineTo_(i,s,r[t],n,!1,this.strokeState_.strokeOffset);e.stroke()}if(""!==this.text_){let e=t.getFlatMidpoints();this.drawText_(e,0,e.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,Q.intersects)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);let e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride(),this.strokeState_?.strokeOffset),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){let e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,Q.intersects)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);let e=this.context_,i=t.getOrientedFlatCoordinates(),s=0,r=t.getEndss(),n=t.getStride();e.beginPath();for(let t=0,e=r.length;t<e;++t){let e=r[t];s=this.drawRings_(i,s,e,n,this.strokeState_?.strokeOffset)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){let e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){let 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})}setContextStrokeState_(t){let e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),(0,K.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(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})}setContextTextState_(t){let e=this.context_,i=this.contextTextState_,s=t.textAlign?t.textAlign:ra;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})}setFillStrokeStyle(t,e){if(t){let e=t.getColor();this.fillState_={fillStyle:s9(e||re)}}else this.fillState_=null;if(e){let t=e.getColor(),i=e.getLineCap(),s=e.getLineDash(),r=e.getLineDashOffset(),n=e.getLineJoin(),a=e.getWidth(),o=e.getMiterLimit(),l=s||rs,h=e.getOffset();this.strokeState_={lineCap:void 0!==i?i:ri,lineDash:1===this.pixelRatio_?l:l.map(t=>t*this.pixelRatio_),lineDashOffset:(r||0)*this.pixelRatio_,lineJoin:void 0!==n?n:rr,lineWidth:(void 0!==a?a:1)*this.pixelRatio_,miter
1Limit:void 0!==o?o:10,strokeStyle:s9(t||rn),strokeOffset:(h??0)*this.pixelRatio_}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}let i=t.getPixelRatio(this.pixelRatio_),s=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*i,this.imageAnchorY_=s[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();let n=t.getScaleArray();this.imageScale_=[n[0]*this.pixelRatio_/i,n[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){let e=t.getFill();if(e){let t=e.getColor();this.textFillState_={fillStyle:s9(t||re)}}else this.textFillState_=null;let i=t.getStroke();if(i){let t=i.getColor(),e=i.getLineCap(),s=i.getLineDash(),r=i.getLineDashOffset(),n=i.getLineJoin(),a=i.getWidth(),o=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:ri,lineDash:s||rs,lineDashOffset:r||0,lineJoin:void 0!==n?n:rr,lineWidth:void 0!==a?a:1,miterLimit:void 0!==o?o:10,strokeStyle:s9(t||rn)}}else this.textStrokeState_=null;let s=t.getFont(),r=t.getOffsetX(),n=t.getOffsetY(),a=t.getRotateWithView(),o=t.getRotation(),l=t.getScaleArray(),h=t.getText(),u=t.getTextAlign(),d=t.getTextBaseline();this.textState_={font:void 0!==s?s:rt,textAlign:void 0!==u?u:ra,textBaseline:void 0!==d?d:ro},this.text_=void 0!==h?Array.isArray(h)?h.reduce((t,e,i)=>t+=i%2?" ":e,""):h:"",this.textOffsetX_=void 0!==r?this.pixelRatio_*r:0,this.textOffsetY_=void 0!==n?this.pixelRatio_*n:0,this.textRotateWithView_=void 0!==a&&a,this.textRotation_=void 0!==o?o:0,this.textScale_=[this.pixelRatio_*l[0],this.pixelRatio_*l[1]]}else this.text_=""}};function at(t,e,i,s,r,n,a,o,l){let h=r,u=.5*t[0],d=.5*t[1],c=(0,ie.createCanvasContext2D)(u,d);c.imageSmoothingEnabled=!1;let g=c.canvas,f=new n9(c,.5,r,null,a,o,l?t3(null,l):null),p=i.length,_=Math.floor(0xffffff/p),m={};for(let t=1;t<=p;++t){let e=i[t-1],r=e.getStyleFunction()||s;if(!r)continue;let a=r(e,n);if(!a)continue;Array.isArray(a)||(a=[a]);let o=(t*_).toString(16).padStart(7,"#00000");for(let t=0,i=a.length;t<i;++t){let i=a[t],s=i.getGeometryFunction()(e);if(!s||!(0,Q.intersects)(h,s.getExtent()))continue;let r=i.clone(),n=r.getFill();n&&n.setColor(o);let l=r.getStroke();l&&(l.setColor(o),l.setLineDash(null)),r.setText(void 0);let u=i.getImage();if(u){let t=u.getImageSize();if(!t)continue;let e=(0,ie.createCanvasContext2D)(t[0],t[1],void 0,{alpha:!1}),i=e.canvas;e.fillStyle=o,e.fillRect(0,0,i.width,i.height),r.setImage(new rM({img:i,anchor:u.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:u.getOrigin(),opacity:1,size:u.getSize(),scale:u.getScale(),rotation:u.getRotation(),rotateWithView:u.getRotateWithView()}))}let d=r.getZIndex()||0,c=m[d];c||(c={},m[d]=c,c.Polygon=[],c.Circle=[],c.LineString=[],c.Point=[]);let g=s.getType();if("GeometryCollection"===g){let t=s.getGeometriesArrayRecursive();for(let e=0,i=t.length;e<i;++e){let i=t[e];c[i.getType().replace("Multi","")].push(i,r)}}else c[g.replace("Multi","")].push(s,r)}}let y=Object.keys(m).map(Number).sort(K.ascending);for(let t=0,i=y.length;t<i;++t){let i=m[y[t]];for(let t in i){let s=i[t];for(let t=0,i=s.length;t<i;t+=2){f.setStyle(s[t+1]);for(let i=0,r=e.length;i<r;++i)f.setTransform(e[i]),f.drawGeometry(s[t])}}}return c.getImageData(0,0,g.width,g.height)}function ae(t,e,i){let s=[];if(i){let r=Math.floor(.5*Math.round(t[0])),n=Math.floor(.5*Math.round(t[1])),a=((0,H.clamp)(r,0,i.width-1)+(0,H.clamp)(n,0,i.height-1)*i.width)*4,o=i.data[a],l=i.data[a+1],h=i.data[a+2]+256*(l+256*o),u=Math.floor(0xffffff/e.length);h&&h%u==0&&s.push(e[h/u-1])}return s}var th=(y("lVQul"),y("lVQul"));let ai={Point:function(t,e,i,s,r,n){let a=i.getImage(),o=i.getText(),l=o&&o.getText(),h=n&&a&&l?{}:void 0;if(a){if(2!=a.getImageState())return;let n=t.getBuilder(i.getZIndex(),"Image");n.setImageStyle(a,h),n.drawPoint(e,s,r)}if(l){let n=t.getBuilder(i.getZIndex(),"Text");n.setTextStyle(o,h),n.drawText(e,s,r)}},LineString:function(t,e,i,s,r){let n=i.getStroke();if(n){let a=t.getBuilder(i.getZIndex(),"LineString");a.setFillStrokeStyle(null,n),a.drawLineString(e,s,r)}let a=i.getText();if(a&&a.getText()){let n=t.getBuilder(i.getZIndex(),"Text");n.setTextStyle(a),n.drawText(e,s,r)}}
1,Polygon:function(t,e,i,s,r){let n=i.getFill(),a=i.getStroke();if(n||a){let o=t.getBuilder(i.getZIndex(),"Polygon");o.setFillStrokeStyle(n,a),o.drawPolygon(e,s,r)}let o=i.getText();if(o&&o.getText()){let n=t.getBuilder(i.getZIndex(),"Text");n.setTextStyle(o),n.drawText(e,s,r)}},MultiPoint:function(t,e,i,s,r,n){let a=i.getImage(),o=a&&0!==a.getOpacity(),l=i.getText(),h=l&&l.getText(),u=n&&o&&h?{}:void 0;if(o){if(2!=a.getImageState())return;let n=t.getBuilder(i.getZIndex(),"Image");n.setImageStyle(a,u),n.drawMultiPoint(e,s,r)}if(h){let n=t.getBuilder(i.getZIndex(),"Text");n.setTextStyle(l,u),n.drawText(e,s,r)}},MultiLineString:function(t,e,i,s,r){let n=i.getStroke();if(n){let a=t.getBuilder(i.getZIndex(),"LineString");a.setFillStrokeStyle(null,n),a.drawMultiLineString(e,s,r)}let a=i.getText();if(a&&a.getText()){let n=t.getBuilder(i.getZIndex(),"Text");n.setTextStyle(a),n.drawText(e,s,r)}},MultiPolygon:function(t,e,i,s,r){let n=i.getFill(),a=i.getStroke();if(a||n){let o=t.getBuilder(i.getZIndex(),"Polygon");o.setFillStrokeStyle(n,a),o.drawMultiPolygon(e,s,r)}let o=i.getText();if(o&&o.getText()){let n=t.getBuilder(i.getZIndex(),"Text");n.setTextStyle(o),n.drawText(e,s,r)}},GeometryCollection:function(t,e,i,s,r,n){let a,o,l=e.getGeometriesArray();for(a=0,o=l.length;a<o;++a)(0,ai[l[a].getType()])(t,l[a],i,s,r,n)},Circle:function(t,e,i,s,r){let n=i.getFill(),a=i.getStroke();if(n||a){let o=t.getBuilder(i.getZIndex(),"Circle");o.setFillStrokeStyle(n,a),o.drawCircle(e,s,r)}let o=i.getText();if(o&&o.getText()){let r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,s)}}};function as(t,e){return parseInt((0,th.getUid)(t),10)-parseInt((0,th.getUid)(e),10)}function ar(t,e){let i=.5*t/e;return i*i}function an(t,e,i,s,r,n,a,o){let l=[],h=i.getImage();if(h){let t=!0,e=h.getImageState();2==e||3==e?t=!1:0==e&&h.load(),t&&l.push(h.ready())}let u=i.getFill();u&&u.loading()&&l.push(u.ready());let d=l.length>0;return d&&Promise.all(l).then(()=>r(null)),function(t,e,i,s,r,n,a){let o=i.getGeometryFunction()(e);if(!o)return;let l=o.simplifyTransformed(s,r);i.getRenderer()?function t(e,i,s,r,n){if("GeometryCollection"==i.getType()){let a=i.getGeometries();for(let i=0,o=a.length;i<o;++i)t(e,a[i],s,r,n);return}e.getBuilder(s.getZIndex(),"Default").drawCustom(i,r,s.getRenderer(),s.getHitDetectionRenderer(),n)}(t,l,i,e,a):(0,ai[l.getType()])(t,l,i,e,a,n)}(t,e,i,s,n,a,o),d}var K=y("kBSVF"),ie=y("cgxQK"),Q=y("jZquI"),T=y("lW8xZ"),aa=y("ejLRd"),C=y("cw4dl"),th=y("lVQul");class ao extends aa.default{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.staleKeys_=[],this.maxStaleKeys=5}getStaleKeys(){return this.staleKeys_}prependStaleKey(t){this.staleKeys_.unshift(t),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(t){return(0,th.abstract)()}getData(t){return null}prepareFrame(t){return(0,th.abstract)()}renderFrame(t,e){return(0,th.abstract)()}forEachFeatureAtCoordinate(t,e,i,s,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){let e=t.target;(2===e.getState()||3===e.getState())&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return 2!=e&&3!=e&&t.addEventListener(C.default.CHANGE,this.boundHandleImageChange_),0==e&&(t.load(),e=t.getState()),2==e}renderIfReadyAndVisible(){let t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}var al=ao;let ah=[],au=null;var ad=class extends al{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=ei(),this.pixelTransform=ei(),this.inversePixelTransform=ei(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.frameState=null}getImageData(t,e,i){let s;au||(au=(0,ie.createCanvasContext2D)(1,1,void 0,{willReadFrequently:!0})),au.clearRect(0,0,1,1);try{au.drawImage(t,e,i,1,1,0,0,1,1),s=au.getImageData(0,0,1,1).data}catch{return au=null,null}return s}
1getBackground(t){let e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0}useContainer(t,e,i){let s,r,n=this.getLayer().getClassName();if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&(0,K.equals)(su(t.style.backgroundColor),su(i)))){let e=t.firstElementChild;(0,ie.isCanvas)(e)&&(r=e.getContext("2d"))}if(r&&function(t,e){let i=ed(t),s=ed(e);for(let t=0;t<6;++t)if(0!==Math.round((i[t]-s[t])*eu[t]))return!1;return!0}(r.canvas.style.transform,e)?(this.container=t,this.context=r,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){(s=T.WORKER_OFFSCREEN_CANVAS?(0,ie.createMockDiv)():document.createElement("div")).className=n;let t=s.style;t.position="absolute",t.width="100%",t.height="100%";let e=(r=(0,ie.createCanvasContext2D)()).canvas;s.appendChild(e),(t=e.style).position="absolute",t.left="0",t.transformOrigin="top left",this.container=s,this.context=r}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){let s=(0,Q.getTopLeft)(i),r=(0,Q.getTopRight)(i),n=(0,Q.getBottomRight)(i),a=(0,Q.getBottomLeft)(i);ea(e.coordinateToPixelTransform,s),ea(e.coordinateToPixelTransform,r),ea(e.coordinateToPixelTransform,n),ea(e.coordinateToPixelTransform,a);let o=this.inversePixelTransform;ea(o,s),ea(o,r),ea(o,n),ea(o,a),t.save(),t.beginPath(),t.moveTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])
1),t.lineTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()}prepareContainer(t,e){let i=t.extent,s=t.viewState.resolution,r=t.viewState.rotation,n=t.pixelRatio,a=Math.round((0,Q.getWidth)(i)/s*n),o=Math.round((0,Q.getHeight)(i)/s*n);el(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/n,1/n,r,-a/2,-o/2),eh(this.inversePixelTransform,this.pixelTransform);let l="matrix("+this.pixelTransform.join(", ")+")";if(this.useContainer(e,l,this.getBackground(t)),!this.containerReused){let t=this.context.canvas;t.width!=a||t.height!=o?(t.width=a,t.height=o):this.context.clearRect(0,0,a,o),l!==t.style.transform&&(t.style.transform=l)}}dispatchRenderEvent_(t,e,i){let s=this.getLayer();if(s.hasListener(t)){let r=new r2(t,this.inversePixelTransform,i,e);s.dispatchEvent(r)}}preRender(t,e){this.frameState=e,e.declutter||this.dispatchRenderEvent_(iX,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(iY,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new nV),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(iX,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(iY,this.context,t))}getRenderTransform(t,e,i,s,r,n,a){let o=s/e,l=-t[0]+a,h=-t[1];return el(this.tempTransform,r/2,n/2,o,-o,-i,l,h)}disposeInternal(){delete this.frameState,super.disposeInternal()}},ac=class extends ad{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.clipExtent_=null,this.extendX_=!1,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=(0,Q.createEmpty)(),this.wrappedRenderedExtent_=(0,Q.createEmpty)(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.renderedFrameDeclutter_,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(t,e,i){let s=e.extent,r=e.viewState,n=r.center,a=r.resolution,o=r.projection,l=r.rotation,h=o.getExtent(),u=this.getLayer().getSource(),d=this.getLayer().getDeclutter(),c=e.pixelRatio,g=e.viewHints,f=!(g[0]||g[1]),p=this.context,_=Math.round((0,Q.getWidth)(s)/a*c),m=Math.round((0,Q.getHeight)(s)/a*c),y=u.getWrapX()&&o.canWrapX(),x=y?(0,Q.getWidth)(h):null,S=y?Math.ceil((s[2]-h[2])/x)+(this.extendX_?2:1):1,v=y?Math.floor((s[0]-h[0])/x)-!!this.extendX_:0;do{let s=this.getRenderTransform(n,a,0,c,_,m,v*x);e.declutter&&(s=s.slice(0)),t.execute(p,[p.canvas.width,p.canvas.height],s,l,f,void 0===i?n2:i?n4:n3,i?d&&e.declutter[d]:void 0)}while(++v<S)}setDrawContext_(){1!==this.opacity_&&(this.targetContext_=this.context,this.context=(0,ie.createCanvasContext2D)(this.context.canvas.width,this.context.canvas.height,ah))}resetDrawContext_(){if(1!==this.opacity_&&this.targetContext_){let t=this.targetContext_.globalAlpha;this.targetContext_.globalAlpha=this.opacity_,this.targetContext_.drawImage(this.context.canvas,0,0),this.targetContext_.globalAlpha=t,(0,ie.releaseCanvas)(this.context),ah.push(this.context.canvas),this.context=this.targetContext_,this.targetContext_=null}}renderDeclutter(t){this.replayGroup_&&this.getLayer().getDeclutter()&&this.renderWorlds(this.replayGroup_,t,!0)}renderDeferredInternal(t){this.replayGroup_&&(this.clipExtent_&&this.clipUnrotated(this.context,t,this.clipExtent_),this.replayGroup_.renderDeferred(),this.clipExtent_&&(this.context.restore(),this.clipExtent_=null),this.resetDrawContext_())}renderFrame(t,e){let i=t.layerStatesArray[t.layerIndex];this.opacity_=i.opacity;let s=t.viewState;this.prepareContainer(t,e);let r=this.context,n=this.replayGroup_,a=n&&!n.isEmpty();if(!a&&!(this.getLayer().hasListener(iX)||this.getLayer().hasListener(iY)))return this.container;this.setDrawContext_(),this.preRender(r,t);s.projection;this.clipExtent_=null;let o=!1;if(a&&i.extent&&this.clipping){let e=i.extent;(a=(0,Q.intersects)(e,t.extent))&&!(0,Q.containsExtent)(e,t.extent)&&(t.declutter?this.clipExtent_=e:(this.clipUnrotated(r,t,e),o=!0))}return a&&this.renderWorlds(n,t,!this.getLayer().getDeclutter()&&void 0),o&&r.restore(
1),this.postRender(r,t),this.renderedRotation_!==s.rotation&&(this.renderedRotation_=s.rotation,this.hitDetectionImageData_=null),t.declutter||this.resetDrawContext_(),this.container}getFeatures(t){return new Promise(e=>{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){let t=this.frameState.size.slice(),e=this.renderedCenter_,i=this.renderedResolution_,s=this.renderedRotation_,r=this.renderedProjection_,n=this.wrappedRenderedExtent_,a=this.getLayer(),o=[],l=.5*t[0],h=.5*t[1];o.push(this.getRenderTransform(e,i,s,.5,l,h,0).slice());let u=a.getSource(),d=r.getExtent();if(u.getWrapX()&&r.canWrapX()&&!(0,Q.containsExtent)(d,n)){let t,r=n[0],a=(0,Q.getWidth)(d),u=0;for(;r<d[0];)t=a*--u,o.push(this.getRenderTransform(e,i,s,.5,l,h,t).slice()),r+=a;for(u=0,r=n[2];r>d[2];)t=a*++u,o.push(this.getRenderTransform(e,i,s,.5,l,h,t).slice()),r-=a}this.hitDetectionImageData_=at(t,o,this.renderedFeatures_,a.getStyleFunction(),n,i,s,ar(i,this.renderedPixelRatio_),null)}e(ae(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,e,i,s,r){if(!this.replayGroup_)return;let n=e.viewState.resolution,a=e.viewState.rotation,o=this.getLayer(),l={},h=this.getLayer().getDeclutter();return this.replayGroup_.forEachFeatureAtCoordinate(t,n,a,i,function(t,e,i){let n=(0,th.getUid)(t),a=l[n];if(a){if(!0!==a&&i<a.distanceSq){if(0===i)return l[n]=!0,r.splice(r.lastIndexOf(a),1),s(t,o,e);a.geometry=e,a.distanceSq=i}}else{if(0===i)return l[n]=!0,s(t,o,e);r.push(l[n]={feature:t,layer:o,geometry:e,distanceSq:i,callback:s})}},h?e.declutter?.[h]?.all().map(t=>t.value):null)}handleFontsChanged(){let t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){let e,i=this.getLayer(),s=i.getSource();if(!s)return!1;let r=t.viewHints[0],n=t.viewHints[1],a=i.getUpdateWhileAnimating(),o=i.getUpdateWhileInteracting();if(this.ready&&!a&&r||!o&&n)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;let l=t.extent,h=t.viewState,u=h.projection,d=h.resolution,c=t.pixelRatio,g=i.getRevision(),f=i.getRenderBuffer(),p=i.getRenderOrder();void 0===p&&(p=as);let _=h.center.slice(),m=(0,Q.buffer)(l,f*d),y=m.slice(),x=[m.slice()],S=u.getExtent(),v=s.getWrapX()&&u.canWrapX();if(this.extendX_=!1,v){let t=s.getExtent();t&&!(0,Q.isEmpty)(t)&&(this.extendX_=t[0]<S[0]||t[2]>S[2])}if(v&&(!(0,Q.containsExtent)(S,t.extent)||this.extendX_)){let t=(0,Q.getWidth)(S),e=Math.max((0,Q.getWidth)(m)/2,t),i=S[0],s=S[2];this.extendX_&&(i-=t,s+=t),m[0]=i-e,m[2]=s+e,te(_,u);let r=(0,Q.wrapX)(x[0],u);r[0]<S[0]&&r[2]<S[2]?x.push([r[0]+t,r[1],r[2]+t,r[3]]):r[0]>S[0]&&r[2]>S[2]&&x.push([r[0]-t,r[1],r[2]-t,r[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedPixelRatio_===c&&this.renderedRevision_==g&&this.renderedRenderOrder_==p&&!!t.declutter===this.renderedFrameDeclutter_&&(0,Q.containsExtent)(this.wrappedRenderedExtent_,m))return(0,K.equals)(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=_,this.replayGroupChanged=!1,!0;this.replayGroup_=null;let w=new nz(.5*d/c,m,d,c);for(let t=0,e=x.length;t<e;++t)s.loadFeatures(x[t],d,u);let E=ar(d,c),M=!0,P=(t,s)=>{let r,n=t.getStyleFunction()||i.getStyleFunction();if(n&&(r=n(t,d)),r){let i=this.renderFeature(t,E,r,w,e,this.getLayer().getDeclutter(),s);M=M&&!i}},C=s.getFeaturesInExtent(m);p&&C.sort(p);for(let t=0,e=C.length;t<e;++t)P(C[t],t);this.renderedFeatures_=C,this.ready=M;let b=w.finish(),R=new n7(m,d,c,s.getOverlaps(),b,i.getRenderBuffer(),!!t.declutter);return this.renderedResolution_=d,this.renderedRevision_=g,this.renderedRenderOrder_=p,this.renderedFrameDeclutter_=!!t.declutter,this.renderedExtent_=y,this.wrappedRenderedExtent_=m,this.renderedCenter_=_,this.renderedProjection_=u,this.renderedPixelRatio_=c,this.replayGroup_=R,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,i,s,r,n,a){if(!i)return!1;let o=!1;if(Array.isArray(i))for(let l=0,h=i.length;l<h;++l)o=an(s,t,i[l],e,this.boundHandleStyleImageChange_,r,n,a)||o;else o=an(s,t,i,e,this.boundHandleStyleImageChange_,r,n,a);return o}},ag=class extends r1{constructor(t){super(t)}createRenderer(){return new ac(this)}},th=y("lVQul");let af="select";class ap extends w.default{constructor(t,e,i,s){super(t),this.selected=e,this.deselected=i,this.mapBrowserEvent=s}}let a_={};class am extends ic{constructor(t){let e,i,s,r,n;if(super(),this.on,this.once,this.un,t=t||{},this.boundAddFeature_=this.addFeature_.bind(this),this.boundRemoveFeature_=this.removeFeature_.bind(this),this.condition_=t.condition?t.condition:iw,this.addCondition_=t.addCondition?t.addCondition:iv,this.removeCondition_=t.removeCondition?t.removeCondition:iv,this.toggleCondition_=t.toggleCondition?t.toggleCondition:iP,this.multi_=!!t.multi&&t.multi,this.filter_=t.filter?t.filter:to.TRUE,this.hitTolerance_=t.hitTolerance?t.hitTolerance:0,this.style_=void 0!==t.style?t.style:(n=(s=[255,255,255,1],r=[0,153,255,1],(i={}).Polygon=[new rC({fill:new rw({color:[255,255,255,.5]})})],i.MultiPolygon=i.Polygon,i.LineString=[new rC({stroke:new rP({color:s,width:5})}),new rC({stroke:new rP({color:r,width:3})})],i.MultiLineString=i.LineString,i.Circle=i.Polygon.concat(i.LineString),i.Point=[new rC({image:new rv({radius:6,fill:new rw({color:r}),stroke:new rP({color:s,width:1.5})}),zIndex:1/0})],i.MultiPoint=i.Point,i.GeometryCollection=i.Polygon.concat(i.LineString,i.Point),i),(0,K.extend)(n.Polygon,n.LineString),(0,K.extend)(n.GeometryCollection,n.LineString),function(t){return t.getGeometry()?n[t.getGeometry().getType()]:null}
1),this.features_=t.features||new(0,S.default),t.layers)if("function"==typeof t.layers)e=t.layers;else{let i=t.layers;e=function(t){return i.includes(t)}}else e=to.TRUE;this.layerFilter_=e,this.featureLayerAssociation_={}}addFeatureLayerAssociation_(t,e){this.featureLayerAssociation_[(0,th.getUid)(t)]=e}getFeatures(){return this.features_}getHitTolerance(){return this.hitTolerance_}getLayer(t){return this.featureLayerAssociation_[(0,th.getUid)(t)]}setHitTolerance(t){this.hitTolerance_=t}setMap(t){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),super.setMap(t),t?(this.features_.addEventListener(v.default.ADD,this.boundAddFeature_),this.features_.addEventListener(v.default.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(v.default.ADD,this.boundAddFeature_),this.features_.removeEventListener(v.default.REMOVE,this.boundRemoveFeature_))}addFeature_(t){let e=t.element;if(this.style_&&this.applySelectedStyle_(e),!this.getLayer(e)){let t=this.findLayerOfFeature_(e);t&&this.addFeatureLayerAssociation_(e,t)}}removeFeature_(t){this.style_&&this.restorePreviousStyle_(t.element),this.removeFeatureLayerAssociation_(t.element)}findLayerOfFeature_(t){return this.getMap().getAllLayers().find(function(e){if(e instanceof ag&&e.getSource()&&e.getSource().hasFeature(t))return e})}getStyle(){return this.style_}applySelectedStyle_(t){let e=(0,th.getUid)(t);e in a_||(a_[e]=t.getStyle()),t.setStyle(this.style_)}restorePreviousStyle_(t){let e=this.getMap().getInteractions().getArray();for(let i=e.length-1;i>=0;--i){let s=e[i];if(s!==this&&s instanceof am&&s.getStyle()&&-1!==s.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(s.getStyle())}let i=(0,th.getUid)(t);t.setStyle(a_[i]),delete a_[i]}removeFeatureLayerAssociation_(t){delete this.featureLayerAssociation_[(0,th.getUid)(t)]}selectFeature(t){let e=this.findLayerOfFeature_(t);if(!this.layerFilter_(e)||!this.filter_(t,e))return!1;let i=this.getFeatures();return!i.getArray().includes(t)&&(this.addFeatureLayerAssociation_(t,e),i.push(t),this.dispatchEvent(new ap(af,[t],[],void 0)),!0)}deselectFeature(t){let e=this.getFeatures(),i=e.getArray().indexOf(t);return -1!==i&&(e.removeAt(i),this.dispatchEvent(new ap(af,[],[t],void 0)),!0)}toggleFeature(t){this.deselectFeature(t)||this.selectFeature(t)}clearSelection(){let t=this.getFeatures();if(0!==t.getLength()){let e=t.getArray().slice();t.clear(),this.dispatchEvent(new ap(af,[],e,void 0))}}handleEvent(t){if(!this.condition_(t))return!0;let e=this.addCondition_(t),i=this.removeCondition_(t),s=this.toggleCondition_(t),r=t.map,n=this.getFeatures(),a=[],o=[];if(e||i||s){r.forEachFeatureAtPixel(t.pixel,(t,r)=>{if(!(t instanceof nf)||!this.filter_(t,r))return;let l=n.getArray().includes(t);return l&&(i||s)?a.push(t):!l&&(e||s)&&(this.addFeatureLayerAssociation_(t,r),o.push(t)),!this.multi_},{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let t=a.length-1;t>=0;--t)n.remove(a[t]);n.extend(o)}else{r.forEachFeatureAtPixel(t.pixel,(t,e)=>{if(t instanceof nf&&this.filter_(t,e))return this.addFeatureLayerAssociation_(t,e),o.push(t),!this.multi_},{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let t=n.getLength()-1;t>=0;--t){let e=n.item(t),i=o.indexOf(e);-1===i?(n.removeAt(t),a.push(e)):o.splice(i,1)}0!==o.length&&n.extend(o)}return(o.length>0||a.length>0)&&this.dispatchEvent(new ap(af,o,a,t)),!0}}var ay=y("7M1Nv"),ax={};ax.greenwich=0,ax.lisbon=-9.131906111111,ax.paris=2.337229166667,ax.bogota=-74.080916666667,ax.madrid=-3.687938888889,ax.rome=12.452333333333,ax.bern=7.439583333333,ax.jakarta=106.807719444444,ax.ferro=-17.666666666667,ax.brussels=4.367975,ax.stockholm=18.058277777778,ax.athens=23.7163375,ax.oslo=10.722916666667;var aS={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}},av=/[\s_\-\/\(\)]/g;function aw(t,e){if(t[e])return t[e];for(var i,s=Object.keys(t),r=e.toLowerCase().replace(av,""),n=-1;++n<s.length;)if((i=s[n]).toLowerCase().replace(av,"")===r)return t[i]}function aE(t){var e,i,s,r={},n=t.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,e){var i=e.split("=");return i.push(!0),t[i[0].toLowerCase()]=i[1],t},{}),a={proj:"projName",datum:"datumCode",rf:function(t){r.rf=parseFloat(t)},lat_0:function(t){r.lat0=t*ay.D2R},lat_1:function(t){r.lat1=t*ay.D2R},lat_2:function(t){r.lat2=t*ay.D2R},lat_ts:function(t){r.lat_ts=t*ay.D2R},lon_0:function(t){r.long0=t*ay.D2R},lon_1:function(t){r.long1=t*ay.D2R},lon_2:function(t){r.long2=t*ay.D2R},alpha:function(t){r.alpha=parseFloat(t)*ay.D2R},gamma:function(t){r.rectified_grid_angle=parseFloat(t)*ay.D2R},lonc:function(t){r.longc=t*ay.D2R},x_0:function(t){r.x0=parseFloat(t)},y_0:function(t){r.y0=parseFloat(t)},k_0:function(t){r.k0=parseFloat(t)},k:function(t){r.k0=parseFloat(t)},a:function(t){r.a=parseFloat(t)},b:function(t){r.b=parseFloat(t)},r:function(t){r.a=r.b=parseFloat(t)},r_a:function(){r.R_A=!0}
1,zone:function(t){r.zone=parseInt(t,10)},south:function(){r.utmSouth=!0},towgs84:function(t){r.datum_params=t.split(",").map(function(t){return parseFloat(t)})},to_meter:function(t){r.to_meter=parseFloat(t)},units:function(t){r.units=t;var e=aw(aS,t);e&&(r.to_meter=e.to_meter)},from_greenwich:function(t){r.from_greenwich=t*ay.D2R},pm:function(t){r.from_greenwich=(aw(ax,t)||parseFloat(t))*ay.D2R},nadgrids:function(t){"@null"===t?r.datumCode="none":r.nadgrids=t},axis:function(t){var e="ewnsud";3===t.length&&-1!==e.indexOf(t.substr(0,1))&&-1!==e.indexOf(t.substr(1,1))&&-1!==e.indexOf(t.substr(2,1))&&(r.axis=t)},approx:function(){r.approx=!0},over:function(){r.over=!0}};for(e in n)i=n[e],e in a?"function"==typeof(s=a[e])?s(i):r[s]=i:r[e]=i;return"string"==typeof r.datumCode&&"WGS84"!==r.datumCode&&(r.datumCode=r.datumCode.toLowerCase()),r.projStr=t,r}var aM=class{static getId(t){let e=t.find(t=>Array.isArray(t)&&"ID"===t[0]);return e&&e.length>=3?{authority:e[1],code:parseInt(e[2],10)}:null}static convertUnit(t,e="unit"){if(!t||t.length<3)return{type:e,name:"unknown",conversion_factor:null};let i=t[1],s=parseFloat(t[2])||null,r=t.find(t=>Array.isArray(t)&&"ID"===t[0]);return{type:e,name:i,conversion_factor:s,id:r?{authority:r[1],code:parseInt(r[2],10)}:null}}static convertAxis(t){let e,i=t[1]||"Unknown",s=i.match(/^\((.)\)$/);if(s){let i=s[1].toUpperCase();if("E"===i)e="east";else if("N"===i)e="north";else if("U"===i)e="up";else if(t[2])e=t[2];else throw Error(`Unknown axis abbreviation: ${i}`)}else e=t[2]||"unknown";let r=t.find(t=>Array.isArray(t)&&"ORDER"===t[0]),n=r?parseInt(r[1],10):null,a=t.find(t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0]));return{name:i,direction:e,unit:this.convertUnit(a),order:n}}static extractAxes(t){return t.filter(t=>Array.isArray(t)&&"AXIS"===t[0]).map(t=>this.convertAxis(t)).sort((t,e)=>(t.order||0)-(e.order||0))}static convert(t,e={}){switch(t[0]){case"PROJCRS":e.type="ProjectedCRS",e.name=t[1],e.base_crs=t.find(t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0])):null,e.conversion=t.find(t=>Array.isArray(t)&&"CONVERSION"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"CONVERSION"===t[0])):null;let i=t.find(t=>Array.isArray(t)&&"CS"===t[0]);i&&(e.coordinate_system={type:i[1],axis:this.extractAxes(t)});let s=t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]);if(s){let t=this.convertUnit(s);e.coordinate_system.unit=t}e.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":case"GEODCRS":e.type="GEODCRS"===t[0]?"GeodeticCRS":"GeographicCRS",e.name=t[1];let r=t.find(t=>Array.isArray(t)&&("DATUM"===t[0]||"ENSEMBLE"===t[0]));if(r){let i=this.convert(r);"ENSEMBLE"===r[0]?e.datum_ensemble=i:e.datum=i;let s=t.find(t=>Array.isArray(t)&&"PRIMEM"===t[0]);s&&"Greenwich"!==s[1]&&(i.prime_meridian={name:s[1],longitude:parseFloat(s[2])})}e.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},e.id=this.getId(t);break;case"DATUM":e.type="GeodeticReferenceFrame",e.name=t[1],e.ellipsoid=t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0])):null;break;case"ENSEMBLE":e.type="DatumEnsemble",e.name=t[1],e.members=t.filter(t=>Array.isArray(t)&&"MEMBER"===t[0]).map(t=>({type:"DatumEnsembleMember",name:t[1],id:this.getId(t)}));let n=t.find(t=>Array.isArray(t)&&"ENSEMBLEACCURACY"===t[0]);n&&(e.accuracy=parseFloat(n[1]));let a=t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0]);a&&(e.ellipsoid=this.convert(a)),e.id=this.getId(t);break;case"ELLIPSOID":e.type="Ellipsoid",e.name=t[1],e.semi_major_axis=parseFloat(t[2]),e.inverse_flattening=parseFloat(t[3]),t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0])&&this.convert(t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]),e);break;case"CONVERSION":e.type="Conversion",e.name=t[1],e.method=t.find(t=>Array.isArray(t)&&"METHOD"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"METHOD"===t[0])):null,e.parameters=t.filter(t=>Array.isArray(t)&&"PARAMETER"===t[0]).map(t=>this.convert(t));break;case"METHOD":e.type="Method",e.name=t[1],e.id=this.getId(t);break;case"PARAMETER":e.type="Parameter",e.name=t[1],e.value=parseFloat(t[2]),e.unit=this.convertUnit(t.find(t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0]))),e.id=this.getId(t);break;case"BOUNDCRS":e.type="BoundCRS";let o=t.find(t=>Array.isArray(t)&&"SOURCECRS"===t[0]);
1if(o){let t=o.find(t=>Array.isArray(t));e.source_crs=t?this.convert(t):null}let l=t.find(t=>Array.isArray(t)&&"TARGETCRS"===t[0]);if(l){let t=l.find(t=>Array.isArray(t));e.target_crs=t?this.convert(t):null}let h=t.find(t=>Array.isArray(t)&&"ABRIDGEDTRANSFORMATION"===t[0]);h?e.transformation=this.convert(h):e.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(e.type="Transformation",e.name=t[1],e.method=t.find(t=>Array.isArray(t)&&"METHOD"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"METHOD"===t[0])):null,e.parameters=t.filter(t=>Array.isArray(t)&&("PARAMETER"===t[0]||"PARAMETERFILE"===t[0])).map(t=>"PARAMETER"===t[0]?this.convert(t):"PARAMETERFILE"===t[0]?{name:t[1],value:t[2],id:{authority:"EPSG",code:8656}}:void 0),7===e.parameters.length){let t=e.parameters[6];"Scale difference"===t.name&&(t.value=Math.round((t.value-1)*1e12)/1e6)}e.id=this.getId(t);break;case"AXIS":e.coordinate_system||(e.coordinate_system={type:"unspecified",axis:[]}),e.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":let u=this.convertUnit(t,"LinearUnit");e.coordinate_system&&e.coordinate_system.axis&&e.coordinate_system.axis.forEach(t=>{t.unit||(t.unit=u)}),u.conversion_factor&&1!==u.conversion_factor&&e.semi_major_axis&&(e.semi_major_axis={value:e.semi_major_axis,unit:u});break;default:e.keyword=t[0]}return e}},aP=class extends aM{static convert(t,e={}){return super.convert(t,e),e.coordinate_system&&"Cartesian"===e.coordinate_system.subtype&&delete e.coordinate_system,e.usage&&delete e.usage,e}},aC=class extends aM{static convert(t,e={}){super.convert(t,e);let i=t.find(t=>Array.isArray(t)&&"CS"===t[0]);i&&(e.coordinate_system={subtype:i[1],axis:this.extractAxes(t)});let s=t.find(t=>Array.isArray(t)&&"USAGE"===t[0]);if(s){let t=s.find(t=>Array.isArray(t)&&"SCOPE"===t[0]),i=s.find(t=>Array.isArray(t)&&"AREA"===t[0]),r=s.find(t=>Array.isArray(t)&&"BBOX"===t[0]);e.usage={},t&&(e.usage.scope=t[1]),i&&(e.usage.area=i[1]),r&&(e.usage.bbox=r.slice(1))}return e}},ab=/\s/,aR=/[A-Za-z]/,aI=/[A-Za-z84_]/,aT=/[,\]]/,aA=/[\d\.E\-\+]/;function aL(t){if("string"!=typeof t)throw Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function aN(t,e,i){Array.isArray(e)&&(i.unshift(e),e=null);var s=e?{}:t,r=i.reduce(function(t,e){return aF(e,t),t},s);e&&(t[e]=r)}function aF(t,e){if(!Array.isArray(t)){e[t]=!0;return}var i,s=t.shift();if("PARAMETER"===s&&(s=t.shift()),1===t.length){if(Array.isArray(t[0])){e[s]={},aF(t[0],e[s]);return}e[s]=t[0];return}if(!t.length){e[s]=!0;return}if("TOWGS84"===s){e[s]=t;return}if("AXIS"===s){s in e||(e[s]=[]),e[s].push(t);return}switch(!Array.isArray(s)&&(e[s]={}),s){case"UNIT":case"PRIMEM":case"VERT_DATUM":e[s]={name:t[0].toLowerCase(),convert:t[1]},3===t.length&&aF(t[2],e[s]);return;case"SPHEROID":case"ELLIPSOID":e[s]={name:t[0],a:t[1],rf:t[2]},4===t.length&&aF(t[3],e[s]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":t[0]=["name",t[0]],aN(e,s,t);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":t[0]=["name",t[0]],aN(e,s,t),e[s].type=s;return;default:for(i=-1;++i<t.length;)if(!Array.isArray(t[i]))return aF(t,e[s]);return aN(e,s,t)}}function aG(t){return .017453292519943295*t}function aO(t){let e=(t.projName||"").toLowerCase().replace(/_/g," ");!t.long0&&t.longc&&("albers conic equal area"===e||"lambert azimuthal equal area"===e)&&(t.long0=t.longc),!t.lat_ts&&t.lat1&&("stereographic south pole"===e||"polar stereographic (variant b)"===e)?(t.lat0=aG(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1):!t.lat_ts&&t.lat0&&("polar stereographic"===e||"polar stereographic (variant a)"===e)&&(t.lat_ts=t.lat0,t.lat0=aG(t.lat0>0?90:-90),delete t.lat1)}function aD(t){let e={units:null,to_meter:void 0};return"string"==typeof t?(e.units=t.toLowerCase(),"metre"===e.units&&(e.units="meter"),"meter"===e.units&&(e.to_meter=1)):t&&t.name&&(e.units=t.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.to_meter=t.conversion_factor),e}function ak(t){return"object"==typeof t?t.value*t.unit.conversion_factor:t}function aj(t,e){t.ellipsoid.radius?(e.a=t.ellipsoid.radius,e.rf=0):(e.a=ak(t.ellipsoid.semi_major_axis),void 0!==t.ellipsoid.inverse_flattening?e.rf=t.ellipsoid.inverse_flattening:void 0!==t.ellipsoid.semi_major_axis&&void 0!==t.ellipsoid.semi_minor_axis&&(e.rf=e.a/(e.a-ak(t.ellipsoid.semi_minor_axis))))}function aB(t,e={}){return t&&"object"==typeof t?("BoundCRS"===t.type?(aB(t.source_crs,e),t.transformation&&(t.transformation.method&&"NTv2"===t.transformation.method.name?e.nadgrids=t.transformation.parameters[0].value:e.datum_params=t.transformation.parameters.map(t=>t.value))):(Object.keys(t).forEach(i=>
1{let s=t[i];if(null!==s)switch(i){case"name":if(e.srsCode)break;e.name=s,e.srsCode=s;break;case"type":"GeographicCRS"===s?e.projName="longlat":"GeodeticCRS"===s?t.coordinate_system&&"Cartesian"===t.coordinate_system.subtype?e.projName="geocent":e.projName="longlat":"ProjectedCRS"===s&&t.conversion&&t.conversion.method&&(e.projName=t.conversion.method.name);break;case"datum":case"datum_ensemble":s.ellipsoid&&(e.ellps=s.ellipsoid.name,aj(s,e)),s.prime_meridian&&(e.from_greenwich=s.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":e.ellps=s.name,aj(s,e);break;case"prime_meridian":e.long0=(s.longitude||0)*Math.PI/180;break;case"coordinate_system":if(s.axis){let t={east:"e",north:"n",west:"w",south:"s",up:"u",down:"d",geocentricx:"e",geocentricy:"n",geocentricz:"u"},i=s.axis.map(e=>t[e.direction.toLowerCase()]);if(i.every(Boolean)&&(e.axis=i.join(""),2===e.axis.length&&(e.axis+="u")),s.unit){let{units:t,to_meter:i}=aD(s.unit);e.units=t,e.to_meter=i}else if(s.axis[0]&&s.axis[0].unit){let{units:t,to_meter:i}=aD(s.axis[0].unit);e.units=t,e.to_meter=i}}break;case"id":s.authority&&s.code&&(e.title=s.authority+":"+s.code);break;case"conversion":s.method&&s.method.name&&(e.projName=s.method.name),s.parameters&&s.parameters.forEach(t=>{let i=t.name.toLowerCase().replace(/\s+/g,"_"),s=t.value;t.unit&&t.unit.conversion_factor?e[i]=s*t.unit.conversion_factor:"degree"===t.unit?e[i]=s*Math.PI/180:e[i]=s});break;case"unit":s.name&&(e.units=s.name.toLowerCase(),"metre"===e.units&&(e.units="meter")),s.conversion_factor&&(e.to_meter=s.conversion_factor);break;case"base_crs":aB(s,e),e.datumCode=s.id?s.id.authority+"_"+s.id.code:s.name}}),void 0!==e.latitude_of_false_origin&&(e.lat0=e.latitude_of_false_origin),void 0!==e.longitude_of_false_origin&&(e.long0=e.longitude_of_false_origin),void 0!==e.latitude_of_standard_parallel&&(e.lat0=e.latitude_of_standard_parallel,e.lat1=e.latitude_of_standard_parallel),void 0!==e.latitude_of_1st_standard_parallel&&(e.lat1=e.latitude_of_1st_standard_parallel),void 0!==e.latitude_of_2nd_standard_parallel&&(e.lat2=e.latitude_of_2nd_standard_parallel),void 0!==e.latitude_of_projection_centre&&(e.lat0=e.latitude_of_projection_centre),void 0!==e.longitude_of_projection_centre&&(e.longc=e.longitude_of_projection_centre),void 0!==e.easting_at_false_origin&&(e.x0=e.easting_at_false_origin),void 0!==e.northing_at_false_origin&&(e.y0=e.northing_at_false_origin),void 0!==e.latitude_of_natural_origin&&(e.lat0=e.latitude_of_natural_origin),void 0!==e.longitude_of_natural_origin&&(e.long0=e.longitude_of_natural_origin),void 0!==e.longitude_of_origin&&(e.long0=e.longitude_of_origin),void 0!==e.false_easting&&(e.x0=e.false_easting),e.easting_at_projection_centre&&(e.x0=e.easting_at_projection_centre),void 0!==e.false_northing&&(e.y0=e.false_northing),e.northing_at_projection_centre&&(e.y0=e.northing_at_projection_centre),void 0!==e.standard_parallel_1&&(e.lat1=e.standard_parallel_1),void 0!==e.standard_parallel_2&&(e.lat2=e.standard_parallel_2),void 0!==e.scale_factor_at_natural_origin&&(e.k0=e.scale_factor_at_natural_origin),void 0!==e.scale_factor_at_projection_centre&&(e.k0=e.scale_factor_at_projection_centre),void 0!==e.scale_factor_on_pseudo_standard_parallel&&(e.k0=e.scale_factor_on_pseudo_standard_parallel),void 0!==e.azimuth&&(e.alpha=e.azimuth),void 0!==e.azimuth_at_projection_centre&&(e.alpha=e.azimuth_at_projection_centre),e.angle_from_rectified_to_skew_grid&&(e.rectified_grid_angle=e.angle_from_rectified_to_skew_grid),aO(e)),e):t}aL.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;ab.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case -1:return}},aL.prototype.afterquote=function(t){if('"'===t){this.word+='"',this.state=4;return}if(aT.test(t)){this.word=this.word.trim(),this.afterItem(t);return}throw Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},aL.prototype.afterItem=function(t){if(","===t){null!==this.word&&this.currentObject.push(this.word),this.word=null,this.state=1;return}if("]"===t){this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),this.currentObject||(this.state=-1);return}},aL.prototype.number=function(t){if(aA.test(t)){this.word+=t;return}if(aT.test(t)){this.word=parseFloat(this.word),this.afterItem(t);return}throw Error("havn't handled \""+t+'" in number yet, index '+this.place)},aL.prototype.quoted=function(t){if('"'===t){this.state=5;return}this.word+=t},aL.prototype.keyword=function(t){if(aI.test(t)){this.word+=t;return}if("["===t){var e=[];e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,this.state=1;return}if(aT.test(t))return void this.afterItem(t);throw Error("havn't handled \""+t+'" in keyword yet, index '+this.place)},aL.prototype.neutral=function(t){if(aR.test(t)){this.word=t,this.state=2;return}if('"'===t){this.word="",this.state=4;return}if(aA.test(t)){this.word=t,this.state=3;return}if(aT.test(t))return void this.afterItem(t);throw Error("havn't handled \""+t+'" in neutral yet, index '+this.place)},aL.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw Error('unable to parse string "'+this.text+'". State is '+this.state)};
1var az=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function aU(t){let e;if("object"==typeof t)return aB(t);let i=(e=t.toUpperCase()).includes("PROJCRS")||e.includes("GEOGCRS")||e.includes("BOUNDCRS")||e.includes("VERTCRS")||e.includes("LENGTHUNIT")||e.includes("ANGLEUNIT")||e.includes("SCALEUNIT")?"WKT2":(e.includes("PROJCS")||e.includes("GEOGCS")||e.includes("LOCAL_CS")||e.includes("VERT_CS")||e.includes("UNIT"),"WKT1");var s=new aL(t).output();if("WKT2"===i)return aB(("2019"==(s.find(t=>Array.isArray(t)&&"USAGE"===t[0])?"2019":(s.find(t=>Array.isArray(t)&&"CS"===t[0])||"BOUNDCRS"===s[0]||"PROJCRS"===s[0]||s[0],"2015"))?aC:aP).convert(s));var r=s[0],n={};return aF(s,n),!function t(e){for(var i=Object.keys(e),s=0,r=i.length;s<r;++s){var n=i[s];-1!==az.indexOf(n)&&function(t){if(t.AUTHORITY){var e=Object.keys(t.AUTHORITY)[0];e&&e in t.AUTHORITY&&(t.title=e+":"+t.AUTHORITY[e])}if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var i="",s=0,r=t.AXIS.length;s<r;++s){var n=[t.AXIS[s][0].toLowerCase(),t.AXIS[s][1].toLowerCase()];-1!==n[0].indexOf("north")||("y"===n[0]||"lat"===n[0])&&"north"===n[1]?i+="n":-1!==n[0].indexOf("south")||("y"===n[0]||"lat"===n[0])&&"south"===n[1]?i+="s":-1!==n[0].indexOf("east")||("x"===n[0]||"lon"===n[0])&&"east"===n[1]?i+="e":(-1!==n[0].indexOf("west")||("x"===n[0]||"lon"===n[0])&&"west"===n[1])&&(i+="w")}2===i.length&&(i+="u"),3===i.length&&(t.axis=i)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var a=t.GEOGCS;function o(e){return e*(t.to_meter||1)}"GEOGCS"===t.type&&(a=t),a&&(a.DATUM?t.datumCode=a.DATUM.name.toLowerCase():t.datumCode=a.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_1949"===t.datumCode&&(t.datumCode="nzgd49"),("wgs_1984"===t.datumCode||"world_geodetic_system_1984"===t.datumCode)&&("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"belge_1972"===t.datumCode&&(t.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(t.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=a.DATUM.SPHEROID.a,t.rf=parseFloat(a.DATUM.SPHEROID.rf)),a.DATUM&&a.DATUM.TOWGS84&&(t.datum_params=a.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),t.rectified_grid_angle&&(t.rectified_grid_angle=aG(t.rectified_grid_angle)),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",aG],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",aG],["x0","false_easting",o],["y0","fal
1se_northing",o],["long0","central_meridian",aG],["lat0","latitude_of_origin",aG],["lat0","standard_parallel_1",aG],["lat1","standard_parallel_1",aG],["lat2","standard_parallel_2",aG],["azimuth","Azimuth"],["alpha","azimuth",aG],["srsCode","name"]].forEach(function(e){var i,s;return i=e[0],s=e[1],void(!(i in t)&&s in t&&(t[i]=t[s],3===e.length&&(t[i]=e[2](t[i]))))}),aO(t)}(e[n]),"object"==typeof e[n]&&t(e[n])}}(n),n[r]}function aW(t){var e=this;if(2==arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?aW[t]=aE(arguments[1]):aW[t]=aU(arguments[1]):!i||"object"!=typeof i||"projName"in i?(aW[t]=i,i||delete aW[t]):aW[t]=aU(arguments[1])}else if(1==arguments.length){if(Array.isArray(t))return t.map(function(t){return Array.isArray(t)?aW.apply(e,t):aW(t)});if("string"==typeof t){if(t in aW)return aW[t]}else"EPSG"in t?aW["EPSG:"+t.EPSG]=t:"ESRI"in t?aW["ESRI:"+t.ESRI]=t:"IAU2000"in t?aW["IAU2000:"+t.IAU2000]=t:console.log(t);return}}aW("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),aW("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),aW("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var aV=1;aV<=60;++aV)aW("EPSG:"+(32600+aV),"+proj=utm +zone="+aV+" +datum=WGS84 +units=m"),aW("EPSG:"+(32700+aV),"+proj=utm +zone="+aV+" +south +datum=WGS84 +units=m");aW("EPSG:5041","+title=WGS 84 / UPS North (E,N) +proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),aW("EPSG:5042","+title=WGS 84 / UPS South (E,N) +proj=stere +lat_0=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),aW.WGS84=aW["EPSG:4326"],aW["EPSG:3785"]=aW["EPSG:3857"],aW.GOOGLE=aW["EPSG:3857"],aW["EPSG:900913"]=aW["EPSG:3857"],aW["EPSG:102113"]=aW["EPSG:3857"];var aq=["3857","900913","3785","102113"],aZ=function(t){let e;if("string"==typeof t)if(t in aW)e=aW[t];else if((0===t.indexOf("+")||-1===t.indexOf("["))&&("object"!=typeof t||"srsCode"in t))"+"===t[0]&&(e=aE(t));else{var i=function(t){var e=aw(t,"extension");if(e)return aw(e,"proj4")}(e=aU(t));i&&(e=aE(i))}else e="projName"in t?t:aU(t);return e&&function(t){if(t.title)return 0===t.title.toLowerCase().indexOf("epsg:")&&aq.indexOf(t.title.substr(5))>-1;var e=aw(t,"authority");if(e){var i=aw(e,"epsg");return i&&aq.indexOf(i)>-1}}(e)?aW["EPSG:3857"]:e};function aK(t,e){var i,s;if(t=t||{},!e)return t;for(s in e)void 0!==(i=e[s])&&(t[s]=i);return t}var aH=y("1gqnK"),aX=y("kEf05");function aY(t,e,i){var s=t*i;return s=Math.pow((1-s)/(1+s),.5*t),Math.tan(.5*(ay.HALF_PI-e))/s}function aQ(t,e){for(var i,s,r=.5*t,n=ay.HALF_PI-2*Math.atan(e),a=0;a<=15;a++)if(i=t*Math.sin(n),s=ay.HALF_PI-2*Math.atan(e*Math.pow((1-i)/(1+i),r))-n,n+=s,1e-10>=Math.abs(s))return n;return -9999}var ay=(y("7M1Nv"),y("7M1Nv"),y("7M1Nv"));function aJ(t){return t}var a$=["longlat","identity"],a0=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=(0,aH.default)(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var e,i,s=t.x,r=t.y;if(r*ay.R2D>90&&r*ay.R2D<-90&&s*ay.R2D>180&&s*ay.R2D<-180||Math.abs(Math.abs(r)-ay.HALF_PI)<=ay.EPSLN)return null;if(this.sphere)e=this.x0+this.a*this.k0*(0,aX.default)(s-this.long0,this.over),i=this.y0+this.a*this.k0*Math.log(Math.tan(ay.FORTPI+.5*r));else{var n=Math.sin(r),a=aY(this.e,r,n);e=this.x0+this.a*this.k0*(0,aX.default)(s-this.long0,this.over),i=this.y0-this.a*this.k0*Math.log(a)}return t.x=e,t.y=i,t},inverse:function(t){var e,i=t.x-this.x0,s=t.y-this.y0;if(this.sphere)e=ay.HALF_PI-2*Math.atan(Math.exp(-s/(this.a*this.k0)));else{var r=Math.exp(-s/(this.a*this.k0));if(-9999===(e=aQ(this.e,r)))return null}return t.x=(0,aX.default)(this.long0+i/(this.a*this.k0),this.over),t.y=e,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"]},{init:function(){},forward:aJ,inverse:aJ,names:a$}],a1={},a2=[];function a4(t,e){var i=a2.length;
1return t.names?(a2[i]=t,t.names.forEach(function(t){a1[t.toLowerCase()]=i}),this):(console.log(e),!0)}function a3(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}var ay=y("7M1Nv"),a8={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};let a5=a8.WGS84;var a6={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80
vendor: 19,713 bytes, line 1
1",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.005693,-0.044698,0.044285,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-0.395026,0.330772,-1.876073,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243648,-1.158828,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,6.681627,-31.611492,-19.848161,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-0.008393,0.000749,-0.010276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,0.02579,0.00965,0.01166,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"0.06155,-0.01087,-0.04019,0.039492,0.032722,0.032898,-0.009994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.309248,0.324822,0.497299,5.689063"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"372.87,149.23,585.29"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"},EPSG_10328:{towgs84:"0,0,0"},EPSG_9782:{towgs84:"0,0,0"},EPSG_9777:{towgs84:"0,0,0"},EPSG_10690:{towgs84:"0,0,0"},EPSG_10639:{towgs84:"0,0,0"},EPSG_10739:{towgs84:"0,0,0"},EPSG_7686:{towgs84:"0,0,0"},EPSG_8900:{towgs84:"0,0,0"},EPSG_5886:{towgs84:"0,0,0"},EPSG_7683:{towgs84:"0,0,0"},EPSG_6668:{towgs84:"0,0,0"},EPSG_20046:{towgs84:"0,0,0"},EPSG_10299:{towgs84:"0,0,0"},EPSG_10310:{towgs84:"0,0,0"},EPSG_10475:{towgs84:"0,0,0"},EPSG_4742:{towgs84:"0,0,0"},EPSG_10671:{towgs84:"0,0,0"},EPSG_10762:{towgs84:"0,0,0"},EPSG_10725:{towgs84:"0,0,0"},EPSG_10791:{towgs84:"0,0,0"},EPSG_10800:{towgs84:"0,0,0"},EPSG_10305:{towgs84:"0,0,0"},EPSG_10941:{towgs84:"0,0,0"},EPSG_10968:{towgs84:"0,0,0"},EPSG_10875:{towgs84:"0,0,0"},EPSG_6318:{towgs84:"0,0,0"},EPSG_10910:{towgs84:"0,0,0"}};for(var 
1a7 in a6){var a9=a6[a7];a9.datumName&&(a6[a9.datumName]=a9)}var ay=y("7M1Nv"),ot=function(t,e,i,s,r,n,a){var o={};return void 0===t||"none"===t?o.datum_type=ay.PJD_NODATUM:o.datum_type=ay.PJD_WGS84,e&&(o.datum_params=e.map(parseFloat),(0!==o.datum_params[0]||0!==o.datum_params[1]||0!==o.datum_params[2])&&(o.datum_type=ay.PJD_3PARAM),o.datum_params.length>3&&(0!==o.datum_params[3]||0!==o.datum_params[4]||0!==o.datum_params[5]||0!==o.datum_params[6])&&(o.datum_type=ay.PJD_7PARAM,o.datum_params[3]*=ay.SEC_TO_RAD,o.datum_params[4]*=ay.SEC_TO_RAD,o.datum_params[5]*=ay.SEC_TO_RAD,o.datum_params[6]=o.datum_params[6]/1e6+1)),a&&(o.datum_type=ay.PJD_GRIDSHIFT,o.grids=a),o.a=i,o.b=s,o.es=r,o.ep2=n,o},oe={};async function oi(t,e){for(var i=[],s=await e.getImageCount(),r=s-1;r>=0;r--){var n=await e.getImage(r),a=await n.readRasters(),o=[n.getWidth(),n.getHeight()],l=n.getBoundingBox().map(or),h=[n.fileDirectory.ModelPixelScale[0],n.fileDirectory.ModelPixelScale[1]].map(or),u=l[0]+(o[0]-1)*h[0],d=l[3]-(o[1]-1)*h[1],c=a[0],g=a[1],f=[];for(let t=o[1]-1;t>=0;t--)for(let e=o[0]-1;e>=0;e--){var p=t*o[0]+e;f.push([-on(g[p]),on(c[p])])}i.push({del:h,lim:o,ll:[-u,d],cvs:f})}var _={header:{nSubgrids:s},subgrids:i};return oe[t]=_,_}function os(t){if(0===t.length)return null;var e="@"===t[0];return(e&&(t=t.slice(1)),"null"===t)?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:oe[t]||null,isNull:!1}}function or(t){return t*Math.PI/180}function on(t){return t/3600*Math.PI/180}function oa(t,e,i){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,i)))}function oo(t,e){if(!(this instanceof oo))return new oo(t);this.forward=null,this.inverse=null,this.init=null,this.name,this.names=null,this.title,e=e||function(t){if(t)throw t};var i,s,r,n,a,o,l,h,u=aZ(t);if("object"!=typeof u)return void e("Could not parse to valid json: "+t);var d=oo.projections.get(u.projName);if(!d)return void e("Could not get projection name from: "+t);if(u.datumCode&&"none"!==u.datumCode){var c=aw(a6,u.datumCode);c&&(u.datum_params=u.datum_params||(c.towgs84?c.towgs84.split(","):null),u.ellps=c.ellipse,u.datumName=c.datumName?c.datumName:u.datumCode)}u.k0=u.k0||1,u.axis=u.axis||"enu",u.ellps=u.ellps||"wgs84",u.lat1=u.lat1||u.lat0;var g=function(t,e,i,s,r){if(!t){var n=aw(a8,s);n||(n=a5),t=n.a,e=n.b,i=n.rf}return i&&!e&&(e=(1-1/i)*t),(0===i||Math.abs(t-e)<ay.EPSLN)&&(r=!0,e=t),{a:t,b:e,rf:i,sphere:r}}(u.a,u.b,u.rf,u.ellps,u.sphere),f=(i=g.a,s=g.b,g.rf,r=u.R_A,o=((n=i*i)-(a=s*s))/n,l=0,r?(i*=1-o*(ay.SIXTH+o*(ay.RA4+o*ay.RA6)),n=i*i,o=0):l=Math.sqrt(o),{es:o,e:l,ep2:(n-a)/a}),p=void 0===(h=u.nadgrids)?null:h.split(",").map(os),_=u.datum||ot(u.datumCode,u.datum_params,g.a,g.b,f.es,f.ep2,p);aK(this,u),aK(this,d),this.a=g.a,this.b=g.b,this.rf=g.rf,this.sphere=g.sphere,this.es=f.es,this.e=f.e,this.ep2=f.ep2,this.datum=_,"init"in this&&"function"==typeof this.init&&this.init(),e(null,this)}oo.projections={start:function(){a0.forEach(a4)},add:a4,get:function(t){if(!t)return!1;var e=t.toLowerCase();if(void 0!==a1[e]&&a2[a1[e]]||(e=a3(e))in a1&&a2[a1[e]])return a2[a1[e]]}},oo.projections.start();var ay=(y("7M1Nv"),y("7M1Nv"),y("7M1Nv"));function ol(t,e,i){var s,r,n,a=t.x,o=t.y,l=t.z?t.z:0;if(o<-ay.HALF_PI&&o>-1.001*ay.HALF_PI)o=-ay.HALF_PI;else if(o>ay.HALF_PI&&o<1.001*ay.HALF_PI)o=ay.HALF_PI;else if(o<-ay.HALF_PI)return{x:-1/0,y:-1/0,z:t.z};else if(o>ay.HALF_PI)return{x:1/0,y:1/0,z:t.z};return a>Math.PI&&(a-=2*Math.PI),r=Math.sin(o),n=Math.cos(o),{x:((s=i/Math.sqrt(1-r*r*e))+l)*n*Math.cos(a),y:(s+l)*n*Math.sin(a),z:(s*(1-e)+l)*r}}function oh(t,e,i,s){var r,n,a,o,l,h,u,d,c,g,f,p,_,m,y,x=1e-12*1e-12,S=t.x,v=t.y,w=t.z?t.z:0;if(r=Math.sqrt(S*S+v*v),n=Math.sqrt(S*S+v*v+w*w),r/i<1e-12){if(m=0,n/i<1e-12)return ay.HALF_PI,y=-s,{x:t.x,y:t.y,z:t.z}}else m=Math.atan2(v,S);a=w/n,l=1/Math.sqrt(1-e*(2-e)*(o=r/n)*o),d=o*(1-e)*l,c=a*l,_=0;do _++,u=i/Math.sqrt(1-e*c*c),y=r*d+w*c-u*(1-e*c*c),l=1/Math.sqrt(1-(h=e*u/(u+y))*(2-h)*o*o),g=o*(1-h)*l,p=(f=a*l)*d-g*c,d=g,c=f;while(p*p>x&&_<30)return{x:m,y:Math.atan(f/Math.abs(g)),z:y}}var aX=y("kEf05");function ou(t){return t===ay.PJD_3PARAM||t===ay.PJD_7PARAM}function od(t,e,i){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;var s={x:-i.x,y:i.y},r={x:NaN,y:NaN},n=[];e:for(var a=0;a<t.grids.length;a++){var o=t.grids[a];if(n.push(o.name),o.isNull){r=s;break}if(null===o.grid){if(o.mandatory)return console.log("Unable to find mandatory grid '"+o.name+"'"),-1;continue}for(var l=o.grid.subgrids,h=0,u=l.length;h<u;h++){var d=l[h],c=(Math.abs(d.del[1])+Math.abs(d.del[0]))/1e4,g=d.ll[0]-c,f=d.ll[1]-c,p=d.ll[0]+(d.lim[0]-1)*d.del[0]+c,_=d.ll[1]+(d.lim[1]-1)*d.del[1]+c;if(!(f>s.y)&&!(g>
1s.x)&&!(_<s.y)&&!(p<s.x)&&!isNaN((r=function(t,e,i){var s={x:NaN,y:NaN};if(isNaN(t.x))return s;var r={x:t.x,y:t.y};r.x-=i.ll[0],r.y-=i.ll[1],r.x=(0,aX.default)(r.x-Math.PI)+Math.PI;var n=oc(r,i);if(e){if(isNaN(n.x))return s;n.x=r.x-n.x,n.y=r.y-n.y;var a,o,l=9;do{if(isNaN((o=oc(n,i)).x)){console.log("Inverse grid shift iteration failed, presumably at grid edge.  Using first approximation.");break}a={x:r.x-(o.x+n.x),y:r.y-(o.y+n.y)},n.x+=a.x,n.y+=a.y}while(l--&&Math.abs(a.x)>1e-12&&Math.abs(a.y)>1e-12)if(l<0)return console.log("Inverse grid shift iterator failed to converge."),s;s.x=(0,aX.default)(n.x+i.ll[0]),s.y=n.y+i.ll[1]}else isNaN(n.x)||(s.x=t.x+n.x,s.y=t.y+n.y);return s}(s,e,d)).x))break e}}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-s.x*ay.R2D+" "+s.y*ay.R2D+" tried: '"+n+"'"),-1):(i.x=-r.x,i.y=r.y,0)}function oc(t,e){var i,s={x:t.x/e.del[0],y:t.y/e.del[1]},r={x:Math.floor(s.x),y:Math.floor(s.y)},n={x:s.x-r.x,y:s.y-r.y},a={x:NaN,y:NaN};if(r.x<0||r.x>=e.lim[0]||r.y<0||r.y>=e.lim[1])return a;i=r.y*e.lim[0]+r.x;var o={x:e.cvs[i][0],y:e.cvs[i][1]};i++;var l={x:e.cvs[i][0],y:e.cvs[i][1]};i+=e.lim[0];var h={x:e.cvs[i][0],y:e.cvs[i][1]};i--;var u={x:e.cvs[i][0],y:e.cvs[i][1]},d=n.x*n.y,c=n.x*(1-n.y),g=(1-n.x)*(1-n.y),f=(1-n.x)*n.y;return a.x=g*o.x+c*l.x+f*u.x+d*h.x,a.y=g*o.y+c*l.y+f*u.y+d*h.y,a}function og(t,e,i){var s,r,n,a=i.x,o=i.y,l=i.z||0,h={};for(n=0;n<3;n++)if(!e||2!==n||void 0!==i.z)switch(0===n?(s=a,r=-1!=="ew".indexOf(t.axis[n])?"x":"y"):1===n?(s=o,r=-1!=="ns".indexOf(t.axis[n])?"y":"x"):(s=l,r="z"),t.axis[n]){case"e":case"n":h[r]=s;break;case"w":case"s":h[r]=-s;break;case"u":void 0!==i[r]&&(h.z=s);break;case"d":void 0!==i[r]&&(h.z=-s);break;default:return null}return h}function of(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}function op(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw TypeError("coordinates must be finite numbers")}function o_(t,e,i,s){var r,n,a,o=void 0!==(i=Array.isArray(i)?of(i):{x:i.x,y:i.y,z:i.z,m:i.m}).z;if(op((r=i).x),op(r.y),t.datum&&e.datum&&(((n=t).datum.datum_type===ay.PJD_3PARAM||n.datum.datum_type===ay.PJD_7PARAM||n.datum.datum_type===ay.PJD_GRIDSHIFT)&&"WGS84"!==e.datumCode||(e.datum.datum_type===ay.PJD_3PARAM||e.datum.datum_type===ay.PJD_7PARAM||e.datum.datum_type===ay.PJD_GRIDSHIFT)&&"WGS84"!==n.datumCode)&&(i=o_(t,a=new oo("WGS84"),i,s),t=a),s&&"enu"!==t.axis&&(i=og(t,!1,i)),"longlat"===t.projName)i={x:i.x*ay.D2R,y:i.y*ay.D2R,z:i.z||0};else if(t.to_meter&&(i={x:i.x*t.to_meter,y:i.y*t.to_meter,z:i.z||0}),!(i=t.inverse(i)))return;if(t.from_greenwich&&(i.x+=t.from_greenwich),i=function(t,e,i){if(s=t,r=e,!(s.datum_type!==r.datum_type||s.a!==r.a||Math.abs(s.es-r.es)>5e-11)&&(s.datum_type===ay.PJD_3PARAM?s.datum_params[0]===r.datum_params[0]&&s.datum_params[1]===r.datum_params[1]&&s.datum_params[2]===r.datum_params[2]:s.datum_type!==ay.PJD_7PARAM||s.datum_params[0]===r.datum_params[0]&&s.datum_params[1]===r.datum_params[1]&&s.datum_params[2]===r.datum_params[2]&&s.datum_params[3]===r.datum_params[3]&&s.datum_params[4]===r.datum_params[4]&&s.datum_params[5]===r.datum_params[5]&&s.datum_params[6]===r.datum_params[6])||t.datum_type===ay.PJD_NODATUM||e.datum_type===ay.PJD_NODATUM)return i;var s,r,n=t.a,a=t.es;if(t.datum_type===ay.PJD_GRIDSHIFT){if(0!==od(t,!1,i))return;n=ay.SRS_WGS84_SEMIMAJOR,a=ay.SRS_WGS84_ESQUARED}var o=e.a,l=e.b,h=e.es;if(e.datum_type===ay.PJD_GRIDSHIFT&&(o=ay.SRS_WGS84_SEMIMAJOR,l=ay.SRS_WGS84_SEMIMINOR,h=ay.SRS_WGS84_ESQUARED),a===h&&n===o&&!ou(t.datum_type)&&!ou(e.datum_type)||(i=ol(i,a,n),ou(t.datum_type)&&(i=function(t,e,i){if(e===ay.PJD_3PARAM)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(e===ay.PJD_7PARAM){var s=i[0],r=i[1],n=i[2],a=i[3],o=i[4],l=i[5],h=i[6];return{x:h*(t.x-l*t.y+o*t.z)+s,y:h*(l*t.x+t.y-a*t.z)+r,z:h*(-o*t.x+a*t.y+t.z)+n}}}(i,t.datum_type,t.datum_params)),ou(e.datum_type)&&(i=function(t,e,i){if(e===ay.PJD_3PARAM)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(e===ay.PJD_7PARAM){var s=i[0],r=i[1],n=i[2],a=i[3],o=i[4],l=i[5],h=i[6],u=(t.x-s)/h,d=(t.y-r)/h,c=(t.z-n)/h;return{x:u+l*d-o*c,y:-l*u+d+a*c,z:o*u-a*d+c}}}(i,e.datum_type,e.datum_params)),i=oh(i,h,o,l),e.datum_type!==ay.PJD_GRIDSHIFT||0===od(e,!0,i)))return i}(t.datum,e.datum,i))return(e.from_greenwich&&(i={x:i.x-e.from_greenwich,y:i.y,z:i.z||0}),"longlat"===e.projName?i={x:i.x*ay.R2D,y:i.y*ay.R2D,z:i.z||0}:(i=e.forward(i),e.to_meter&&(i={x:i.x/e.to_meter,y:i.y/e.to_meter,z:i.z||0})),s&&"enu"!==e.axis)?og(e,!0,i):(i&&!o&&delete i.z,i)}var om=oo("WGS84");function oy(t,e,i,s){var r,n,a;if(Array.isArray(i))return(r=o_(t,e,i,s)||{x:NaN,y:NaN},i.length>2)?(void 0===t.name||"geocent"!==t.name)&&(void 0===e.name||"geocent"!==e.name)?[r.x,r.y].c
1oncat(i.slice(2)):"number"==typeof r.z?[r.x,r.y,r.z].concat(i.slice(3)):[r.x,r.y,i[2]].concat(i.slice(3)):[r.x,r.y];return n=o_(t,e,i,s),2===(a=Object.keys(i)).length||a.forEach(function(s){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===s||"y"===s||"z"===s)return}else if("x"===s||"y"===s)return;n[s]=i[s]}),n}function ox(t){return t instanceof oo?t:"object"==typeof t&&"oProj"in t?t.oProj:oo(t)}var oS="AJSAJS",ov="AFAFAF";function ow(t,e){var i,s,r,n,a,o,l,h,u,d,c,g,f,p,_;return e=e||5,i=function(t){var e,i,s,r,n,a,o,l,h=t.lat,u=t.lon,d=oM(h),c=oM(u);l=Math.floor((u+180)/6)+1,180===u&&(l=60),h>=56&&h<64&&u>=3&&u<12&&(l=32),h>=72&&h<84&&(u>=0&&u<9?l=31:u>=9&&u<21?l=33:u>=21&&u<33?l=35:u>=33&&u<42&&(l=37)),o=oM((l-1)*6-180+3),s=6378137/Math.sqrt(1-.00669438*Math.sin(d)*Math.sin(d)),r=Math.tan(d)*Math.tan(d),n=.006739496752268451*Math.cos(d)*Math.cos(d);var g=.9996*s*((a=Math.cos(d)*(c-o))+(1-r+n)*a*a*a/6+(5-18*r+r*r+72*n-.39089081163157013)*a*a*a*a*a/120)+5e5,f=.9996*(6378137*(.9983242984503243*d-.002514607064228144*Math.sin(2*d)+2639046602129982e-21*Math.sin(4*d)-3418046101696858e-24*Math.sin(6*d))+s*Math.tan(d)*(a*a/2+(5-r+9*n+4*n*n)*a*a*a*a/24+(61-58*r+r*r+600*n-2.2240339282485886)*a*a*a*a*a*a/720));return h<0&&(f+=1e7),{northing:Math.round(f),easting:Math.round(g),zoneNumber:l,zoneLetter:(i="Z",84>=(e=h)&&e>=72?i="X":72>e&&e>=64?i="W":64>e&&e>=56?i="V":56>e&&e>=48?i="U":48>e&&e>=40?i="T":40>e&&e>=32?i="S":32>e&&e>=24?i="R":24>e&&e>=16?i="Q":16>e&&e>=8?i="P":8>e&&e>=0?i="N":0>e&&e>=-8?i="M":-8>e&&e>=-16?i="L":-16>e&&e>=-24?i="K":-24>e&&e>=-32?i="J":-32>e&&e>=-40?i="H":-40>e&&e>=-48?i="G":-48>e&&e>=-56?i="F":-56>e&&e>=-64?i="E":-64>e&&e>=-72?i="D":-72>e&&e>=-80&&(i="C"),i)}}({lat:t[1],lon:t[0]}),s=e,r="00000"+i.easting,n="00000"+i.northing,i.zoneNumber+i.zoneLetter+(a=i.easting,o=i.northing,l=i.zoneNumber,h=Math.floor(a/1e5),u=Math.floor(o/1e5)%20,d=ob(l)-1,c=oS.charCodeAt(d),g=ov.charCodeAt(d),f=c+h-1,p=g+u,_=!1,f>90&&(f=f-90+65-1,_=!0),(73===f||c<73&&f>73||(f>73||c<73)&&_)&&f++,(79===f||c<79&&f>79||(f>79||c<79)&&_)&&73==++f&&f++,f>90&&(f=f-90+65-1),p>86?(p=p-86+65-1,_=!0):_=!1,(73===p||g<73&&p>73||(p>73||g<73)&&_)&&p++,(79===p||g<79&&p>79||(p>79||g<79)&&_)&&73==++p&&p++,p>86&&(p=p-86+65-1),String.fromCharCode(f)+String.fromCharCode(p))+r.substr(r.length-5,s)+n.substr(n.length-5,s)}function oE(t){var e=oC(oR(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function oM(t){return Math.PI/180*t}function oP(t){return t/Math.PI*180}function oC(t){var e,i,s,r,n,a,o,l,h=t.northing,u=t.easting,d=t.zoneLetter,c=t.zoneNumber;if(c<0||c>60)return null;var g=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),f=h;d<"N"&&(f-=1e7),e=6378137/Math.sqrt(1-.00669438*Math.sin(o=(a=f/.9996/6367449.145945056)+(3*g/2-27*g*g*g/32)*Math.sin(2*a)+(21*g*g/16-55*g*g*g*g/32)*Math.sin(4*a)+151*g*g*g/96*Math.sin(6*a))*Math.sin(o)),i=Math.tan(o)*Math.tan(o),s=.006739496752268451*Math.cos(o)*Math.cos(o),r=6335439.32722994/Math.pow(1-.00669438*Math.sin(o)*Math.sin(o),1.5),n=(u-5e5)/(.9996*e);var p=o-e*Math.tan(o)/r*(n*n/2-(5+3*i+10*s-4*s*s-.06065547077041606)*n*n*n*n/24+(61+90*i+298*s+45*i*i-1.6983531815716497-3*s*s)*n*n*n*n*n*n/720);p=oP(p);var _=(n-(1+2*i+s)*n*n*n/6+(5-2*s+28*i-3*s*s+.05391597401814761+24*i*i)*n*n*n*n*n/120)/Math.cos(o);if(_=(c-1)*6-180+3+oP(_),t.accuracy){var m=oC({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});
1l={top:m.lat,right:m.lon,bottom:p,left:_}}else l={lat:p,lon:_};return l}function ob(t){var e=t%6;return 0===e&&(e=6),e}function oR(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,i,s=t.length,r=null,n="",a=0;!/[A-Z]/.test(e=t.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+t;n+=e,a++}var o=parseInt(n,10);if(0===a||a+3>s)throw"MGRSPoint bad conversion from: "+t;var l=t.charAt(a++);if(l<="A"||"B"===l||"Y"===l||l>="Z"||"I"===l||"O"===l)throw"MGRSPoint zone letter "+l+" not handled: "+t;r=t.substring(a,a+=2);for(var h=ob(o),u=function(t,e){for(var i=oS.charCodeAt(e-1),s=1e5,r=!1;i!==t.charCodeAt(0);){if(73==++i&&i++,79===i&&i++,i>90){if(r)throw"Bad character: "+t;i=65,r=!0}s+=1e5}return s}(r.charAt(0),h),d=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var i=ov.charCodeAt(e-1),s=0,r=!1;i!==t.charCodeAt(0);){if(73==++i&&i++,79===i&&i++,i>86){if(r)throw"Bad character: "+t;i=65,r=!0}s+=1e5}return s}(r.charAt(1),h);d<function(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}(l);)d+=2e6;var c=s-a;if(c%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var g=c/2,f=0,p=0;return g>0&&(i=1e5/Math.pow(10,g),f=parseFloat(t.substring(a,a+g))*i,p=parseFloat(t.substring(a+g))*i),{easting:f+u,northing:p+d,zoneLetter:l,zoneNumber:o,accuracy:i}}function oI(t,e,i){if(!(this instanceof oI))return new oI(t,e,i);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var s=t.split(",");this.x=parseFloat(s[0]),this.y=parseFloat(s[1]),this.z=parseFloat(s[2])||0}else this.x=t,this.y=e,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}oI.fromMGRS=function(t){return new oI(oE(t))},oI.prototype.toMGRS=function(t){return ow([this.x,this.y],t)};var oT=y("5BH1M"),oA=y("es3WD"),aX=y("kEf05"),oA=y("es3WD");function oL(t,e){return Math.pow((1-t)/(1+t),e)}var ay=(y("7M1Nv"),y("7M1Nv")),oN={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+ay.FORTPI)/(Math.pow(Math.tan(.5*this.lat0+ay.FORTPI),this.C)*oL(this.e*t,this.ratexp))},forward:function(t){var e=t.x,i=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+ay.FORTPI),this.C)*oL(this.e*Math.sin(i),this.ratexp))-ay.HALF_PI,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,i=t.y,s=Math.pow(Math.tan(.5*i+ay.FORTPI)/this.K,1/this.C),r=20;r>0&&!(1e-14>Math.abs((i=2*Math.atan(s*oL(this.e*Math.sin(t.y),-.5*this.e))-ay.HALF_PI)-t.y));--r)t.y=i;return r?(t.x=e,t.y=i,t):null},names:["gauss"]},aX=y("kEf05"),oF=y("9ijWS"),ay=y("7M1Nv"),oG=y("SsFAj"),aH=y("1gqnK");function oO(t,e,i){return e*=i,Math.tan(.5*(ay.HALF_PI+t))*Math.pow((1-e)/(1+e),.5*i)}var aX=(y("kEf05"),y("kEf05")),ay=y("7M1Nv"),aH=y("1gqnK"),oG=y("SsFAj"),aX=y("kEf05"),ay=y("7M1Nv");function oD(t,e,i,s,r){return t*r-e*Math.sin(2*r)+i*Math.sin(4*r)-s*Math.sin(6*r)}function ok(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function oj(t){return .375*t*(1+.25*t*(1+.46875*t))}function oB(t){return .05859375*t*t*(1+.75*t)}function oz(t){return t*t*t*(35/3072)}function oU(t,e,i){var s=e*i;return t/Math.sqrt(1-s*s)}var aX=(y("kEf05"),y("kEf05")),ay=y("7M1Nv"),oG=y("SsFAj");function oW(t){return Math.abs(t)<ay.HALF_PI?t:t-(0,oG.default)(t)*Math.PI}function oV(t,e,i,s,r){n=t/e;for(var n,a,o=0;o<15;o++)if(a=(t-(e*n-i*Math.sin(2*n)+s*Math.sin(4*n)-r*Math.sin(6*n)))/(e-2*i*Math.cos(2*n)+4*s*Math.cos(4*n)-6*r*Math.cos(6*n)),n+=a,1e-10>
1=Math.abs(a))return n;return NaN}var ay=y("7M1Nv"),oq=y("9v6gR"),oZ=y("aYCax"),aX=y("kEf05"),oK=y("bp9ph"),ay=y("7M1Nv"),aX=y("kEf05"),oH=y("iVfS2"),aH=y("1gqnK"),ay=y("7M1Nv"),aX=(y("kEf05"),y("kEf05")),ay=y("7M1Nv"),oX=y("fQxFh"),aX=(y("kEf05"),y("kEf05")),oY=y("lz6WA"),oQ=y("8GYcG"),oJ=y("6NyiU"),ay=y("7M1Nv"),oK=y("bp9ph"),aX=y("kEf05"),ay=y("7M1Nv"),aH=y("1gqnK"),aX=y("kEf05"),ay=y("7M1Nv"),aX=y("kEf05"),ay=y("7M1Nv"),oK=y("bp9ph"),aX=y("kEf05"),ay=y("7M1Nv"),oK=y("bp9ph"),aX=y("kEf05"),oK=y("bp9ph");function o$(t,e,i,s){var r;return t<ay.EPSLN?(s.value=1,r=0):Math.abs(r=Math.atan2(e,i))<=ay.FORTPI?s.value=1:r>ay.FORTPI&&r<=ay.HALF_PI+ay.FORTPI?(s.value=2,r-=ay.HALF_PI):r>ay.HALF_PI+ay.FORTPI||r<=-(ay.HALF_PI+ay.FORTPI)?(s.value=3,r=r>=0?r-ay.SPI:r+ay.SPI):(s.value=4,r+=ay.HALF_PI),r}function o0(t,e){var i=t+e;return i<-ay.SPI?i+=ay.TWO_PI:i>+ay.SPI&&(i-=ay.TWO_PI),i}var ay=(y("7M1Nv"),y("7M1Nv"),y("7M1Nv")),aX=y("kEf05"),o1=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],o2=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],o4=ay.R2D/5,o3=1/o4,o8=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))},ay=y("7M1Nv"),oF=y("9ijWS"),o5={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}},oF=y("9ijWS"),aX=y("kEf05"),o6=Math.sqrt(3)/2,aX=y("kEf05"),oF=y("9ijWS"),oY=y("lz6WA"),oJ=y("6NyiU"),oQ=y("8GYcG"),ay=y("7M1Nv");function o7(t){var e,i,s,r=(0,aX.default)(t.x-(this.long0||0),this.over),n=t.y;return e=this.am1+this.m1-(0,oQ.default)(n,i=Math.sin(n),s=Math.cos(n),this.en),i=s*r/(e*Math.sqrt(1-this.es*i*i)),t.x=e*Math.sin(i),t.y=this.am1-e*Math.cos(i),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function o9(t){var e,i,s,r;if(t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a,i=(0,oF.default)(t.x,t.y=this.am1-t.y),(e=Math.abs(r=(0,oJ.default)(this.am1+this.m1-i,this.es,this.en)))<ay.HALF_PI)e=Math.sin(r),s=i*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*e*e)/Math.cos(r);else if(1e-10>=Math.abs(e-ay.HALF_PI))s=0;else throw Error();return t.x=(0,aX.default)(s+(this.long0||0),this.over),t.y=oW(r),t}function lt(t){var e,i,s=(0,aX.default)(t.x-(this.long0||0),this.over),r=t.y;return Math.abs(i=this.cphi1+this.phi1-r)>1e-10?(t.x=i*Math.sin(e=s*Math.cos(r)/i),t.y=this.cphi1-i*Math.cos(e)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function le(t){t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var e,i,s=(0,oF.default)(t.x,t.y=this.cphi1-t.y);if(Math.abs(i=this.cphi1+this.phi1-s)>ay.HALF_PI)throw Error();return e=1e-10>=Math.abs(Math.abs(i)-ay.HALF_PI)?0:s*Math.atan2(t.x,t.y)/Math.cos(i),t.x=(0,aX.default)(e+(this.long0||0),this.over),t.y=oW(i),t}var aX=y("kEf05"),ay=y("7M1Nv");let li={forward:function(t,e){let{x:i,y:s}=e,r=Math.cos(i+=t.long0),n=Math.sin(s),a=Math.cos(s);e.x=(0,aX.default)(Math.atan2(a*Math.sin(i),t.sphip*a*r+t.cphip*n)+t.lamp),e.y=Math.asin(t.sphip*n-t.cphip*a*r);let o=t.obliqueProjection.forward(e);return t.isIdentity&&(o.x*=ay.R2D,o.y*=ay.R2D),o},inverse:function(t,e){t.isIdentity&&(e.x*=ay.D2R,e.y*=ay.D2R);let{x:i,y:s}=t.obliqueProjection.inverse(e);if(i<Number.MAX_VALUE){let r=Math.cos(i-=t.lamp),n=Math.sin(s),a=Math.cos(s);e.x=Math.atan2(a*Math.sin(i),t.sphip*a*r-t.cphip*n),e.y=Math.asin(t.sphip*n+t.cphip*a*r)}return e.x=(0,aX.default)(e.x+t.long0),e}},ls={forward:function(t,e){let{x:i,y:s}=e;i+=t.long0;let r=Math.cos(s),n=Math.cos(i);e.x=(0,aX.default)(Math.atan2(r*Math.sin(i),Math.sin(s))+t.lamp),e.y=Math.asin(-1*r*n);let a=t.obliqueProjection.forward(e);return t.isIdentity&&(a.x*=ay.R2D,a.y*=ay.R2D),a},inverse:function(t,e){t.isIdentity&&(e.x*=ay.D2R,e.y*=ay.D2R);let{x:i,y:s}=t.obliqueProjection.inverse(e);if(i<Number.MAX_VALUE){let r=Math.cos(s);e.x=Math.atan2(r*Math.sin(i-=t.lamp),-1*Math.sin(s)),e.y=Math.asin(r*Math.cos(i))}return e.x=(0,aX.default)(e.x+t.long0),e}},lr={ROTATE:{o_alpha:"oAlpha",o_lon_c:"oLongC",o_lat_c:"oLatC"},NEW_POLE:{o_lat_p:"oLatP",o_lon_p:"oLongP"},NEW_EQUATOR:{o_lon_1:"oLong1",o_lat_1:"oLat1",o_lon_2:"oLong2",o_lat_2:"oLat2"}}
1,ln=Object.assign(function(t,e,i){var s,r,n,a=!1;return(void 0===e?(r=ox(t),s=om,a=!0):(void 0!==e.x||Array.isArray(e))&&(i=e,r=ox(t),s=om,a=!0),s||(s=ox(t)),r||(r=ox(e)),i)?oy(s,r,i):(n={forward:function(t,e){return oy(s,r,t,e)},inverse:function(t,e){return oy(r,s,t,e)}},a&&(n.oProj=r),n)},{defaultDatum:"WGS84",Proj:oo,WGS84:new oo("WGS84"),Point:oI,toPoint:of,defs:aW,nadgrid:function(t,e,i){var s,r,n,a,o,l,h,u,d,c,g,f,p;return e instanceof ArrayBuffer?(s=t,r=e,a=!0,void 0!==(n=i)&&!1===n.includeErrorFields&&(a=!1),c=11!==(l=(o=d=new DataView(r)).getInt32(8,!1))&&(11!==(l=o.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0),g=(h=d,u=c,{nFields:h.getInt32(8,u),nSubgridFields:h.getInt32(24,u),nSubgrids:h.getInt32(40,u),shiftType:oa(h,56,64).trim(),fromSemiMajorAxis:h.getFloat64(120,u),fromSemiMinorAxis:h.getFloat64(136,u),toSemiMajorAxis:h.getFloat64(152,u),toSemiMinorAxis:h.getFloat64(168,u)}),f=function(t,e,i,s){for(var r=176,n=[],a=0;a<e.nSubgrids;a++){var o,l,h,u=(o=t,l=r,h=i,{name:oa(o,l+8,l+16).trim(),parent:oa(o,l+24,l+24+8).trim(),lowerLatitude:o.getFloat64(l+72,h),upperLatitude:o.getFloat64(l+88,h),lowerLongitude:o.getFloat64(l+104,h),upperLongitude:o.getFloat64(l+120,h),latitudeInterval:o.getFloat64(l+136,h),longitudeInterval:o.getFloat64(l+152,h),gridNodeCount:o.getInt32(l+168,h)}),d=function(t,e,i,s,r){var n=e+176,a=16;!1===r&&(a=8);for(var o=[],l=0;l<i.gridNodeCount;l++){var h={latitudeShift:t.getFloat32(n+l*a,s),longitudeShift:t.getFloat32(n+l*a+4,s)};!1!==r&&(h.latitudeAccuracy=t.getFloat32(n+l*a+8,s),h.longitudeAccuracy=t.getFloat32(n+l*a+12,s)),o.push(h)}return o}(t,r,u,i,s),c=Math.round(1+(u.upperLongitude-u.lowerLongitude)/u.longitudeInterval),g=Math.round(1+(u.upperLatitude-u.lowerLatitude)/u.latitudeInterval);n.push({ll:[on(u.lowerLongitude),on(u.lowerLatitude)],del:[on(u.longitudeInterval),on(u.latitudeInterval)],lim:[c,g],count:u.gridNodeCount,cvs:d.map(function(t){return[on(t.longitudeShift),on(t.latitudeShift)]})});var f=16;!1===s&&(f=8),r+=176+u.gridNodeCount*f}return n}(d,g,c,a),p={header:g,subgrids:f},oe[s]=p,p):{ready:oi(t,e)}},transform:o_,mgrs:{forward:ow,inverse:function(t){var e=oC(oR(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]},toPoint:oE},version:"__VERSION__"});ln.Proj.projections.add(oT.default),ln.Proj.projections.add(oA.default),ln.Proj.projections.add({init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(((0,aX.default)(e)+Math.PI)*30/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*ay.D2R,this.x0=5e5,this.y0=1e7*!!this.utmSouth,this.k0=.9996,oA.default.init.apply(this),this.forward=oA.default.forward,this.inverse=oA.default.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"}),ln.Proj.projections.add({init:function(){oN.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,i,s,r;return t.x=(0,aX.default)(t.x-this.long0,this.over),oN.forward.apply(this,[t]),e=Math.sin(t.y),i=Math.cos(t.y),s=Math.cos(t.x),t.x=(r=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*i*s))*i*Math.sin(t.x),t.y=r*(this.cosc0*e-this.sinc0*i*s),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,i,s,r,n;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,n=(0,oF.default)(t.x,t.y)){var a=2*Math.atan2(n,this.R2);e=Math.sin(a),r=Math.asin((i=Math.cos(a))*this.sinc0+t.y*e*this.cosc0/n),s=Math.atan2(t.x*e,n*this.cosc0*i-t.y*this.sinc0*e)}else r=this.phic0,s=0;return t.x=s,t.y=r,oN.inverse.apply(this,[t]),t.x=(0,aX.default)(t.x+this.long0,this.over),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]}),ln.Proj.projections.add({init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ay.EPSLN&&(this.k0=.5*(1+(0,oG.default)(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=ay.EPSLN&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*
1Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ay.EPSLN&&Math.abs(Math.cos(this.lat_ts))>ay.EPSLN&&(this.k0=.5*this.cons*(0,aH.default)(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/aY(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=(0,aH.default)(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(oO(this.lat0,this.sinlat0,this.e))-ay.HALF_PI,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,i,s,r,n,a,o=t.x,l=t.y,h=Math.sin(l),u=Math.cos(l),d=(0,aX.default)(o-this.long0,this.over);if(Math.abs(Math.abs(o-this.long0)-Math.PI)<=ay.EPSLN&&Math.abs(l+this.lat0)<=ay.EPSLN)return t.x=NaN,t.y=NaN,t;if(this.sphere)e=2*this.k0/(1+this.sinlat0*h+this.coslat0*u*Math.cos(d)),t.x=this.a*e*u*Math.sin(d)+this.x0,t.y=this.a*e*(this.coslat0*h-this.sinlat0*u*Math.cos(d))+this.y0;else{if(r=Math.cos(i=2*Math.atan(oO(l,h,this.e))-ay.HALF_PI),s=Math.sin(i),Math.abs(this.coslat0)<=ay.EPSLN)return n=aY(this.e,l*this.con,this.con*h),a=2*this.a*this.k0*n/this.cons,t.x=this.x0+a*Math.sin(o-this.long0),t.y=this.y0-this.con*a*Math.cos(o-this.long0),t;Math.abs(this.sinlat0)<ay.EPSLN?t.y=(e=2*this.a*this.k0/(1+r*Math.cos(d)))*s:t.y=(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*s+this.cosX0*r*Math.cos(d))))*(this.cosX0*s-this.sinX0*r*Math.cos(d))+this.y0,t.x=e*r*Math.sin(d)+this.x0}return t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,i,s,r,n,a=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var o=2*Math.atan(a/(2*this.a*this.k0));return e=this.long0,i=this.lat0,a<=ay.EPSLN||(i=Math.asin(Math.cos(o)*this.sinlat0+t.y*Math.sin(o)*this.coslat0/a),e=Math.abs(this.coslat0)<ay.EPSLN?this.lat0>0?(0,aX.default)(this.long0+Math.atan2(t.x,-1*t.y),this.over):(0,aX.default)(this.long0+Math.atan2(t.x,t.y),this.over):(0,aX.default)(this.long0+Math.atan2(t.x*Math.sin(o),a*this.coslat0*Math.cos(o)-t.y*this.sinlat0*Math.sin(o)),this.over)),t.x=e,t.y=i,t}if(Math.abs(this.coslat0)<=ay.EPSLN){if(a<=ay.EPSLN)return i=this.lat0,t.x=e=this.long0,t.y=i,t;t.x*=this.con,t.y*=this.con,s=a*this.cons/(2*this.a*this.k0),i=this.con*aQ(this.e,s),e=this.con*(0,aX.default)(this.con*this.long0+Math.atan2(t.x,-1*t.y),this.over)}else r=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,a<=ay.EPSLN?n=this.X0:(n=Math.asin(Math.cos(r)*this.sinX0+t.y*Math.sin(r)*this.cosX0/a),e=(0,aX.default)(this.long0+Math.atan2(t.x*Math.sin(r),a*this.cosX0*Math.cos(r)-t.y*this.sinX0*Math.sin(r)),this.over)),i=-1*aQ(this.e,Math.tan(.5*(ay.HALF_PI+n)));return t.x=e,t.y=i,t},names:["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"],ssfn_:oO}),ln.Proj.projections.add({init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),i=this.a,s=1/this.rf,r=2*s-Math.pow(s,2),n=this.e=Math.sqrt(r);this.R=this.k0*i*Math.sqrt(1-r)/(1-r*Math.pow(e,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),o=Math.log(Math.tan(Math.PI/4+t/2)),l=Math.log((1+n*e)/(1-n*e));this.K=a-this.alpha*o+this.alpha*n/2*l},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),s=2*(Math.atan(Math.exp(-this.alpha*(e+i)+this.K))-Math.PI/4),r=this.alpha*(t.x-this.lambda0),n=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(s)+Math.cos(this.b0)*Math.cos(r))),a=Math.asin(Math.cos(this.b0)*Math.sin(s)-Math.sin(this.b0)*Math.cos(s)*Math.cos(r));return t.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,t.x=this.R*n+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,i=t.y-this.y0,s=e/this.R,r=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),n=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(s)),a=Math.atan(Math.sin(s)/(Math.cos(this.b0)*Math.cos(s)-Math.sin(this.b0)*Math.tan(r))),o=this.lambda0+a/this.alpha,l=0,h=n,u=-1e3,d=0;Math.abs(h-u)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+n/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),u=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return t.x=o,t.y=h,t},names:["somerc"]}),ln.Proj.projections.add({init:function(){var t,e,i,s,r,n,a,o,l,h,u,d,c=0,g=0,f=0,p=0,_=0,m=0,y=0;this.no_off=(t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e="object"==typeof this.projName?Object.keys(this.projName)[0]:this.projName,"no_uoff"in this||"no_off"in this||-1!==t.indexOf(e)||-1!==t.indexOf(a3(e))),this.no_rot="no_rot"in this;var x=!1;"alpha"in this&&(x=!0);var S=!1;if("rectified_grid_angle"in this&&(S=!0),x&&(y=this.alpha),S&&(c=this.rectified_grid_angle),x||S)g=this.longc;else if(f=this.long1,_=this.lat1,p=this.long2,1e-7>=Math.abs(_-(m=this.lat2))||(i=Math.abs(_))<=1e-7||1e-7>=Math.abs(i-ay.HALF_PI)||1e-7>=Math.abs(Math.abs(this.lat0)-ay.HALF_PI)||1e-7>=Math.abs(Math.abs(m)-ay.HALF_PI))throw Error();var v=1-this.es;(s=Math.sqrt(v),Math.abs(this.lat0)>ay.EPSLN?(h=Math.sin(this.lat0),r=Math.cos(this.lat0),i=1-this.es*h*h,this.B=r*r,this.B=Math.sqrt(1+this.es*this.B*this.B/v),this.A=this.B*this.k0*s/i,(a=(n=this.B*s/(r*Math.sqrt(i)))*n-1)<=0?a=0:(a=Math.sqrt(a),this.lat0<0&&(a=-a)),this.E=a+=n,this.E*=Math.pow(aY(this.e,this.lat0,h),this.B)):(this.B=1/s,this.A=this.k0,this.E=n=a=1),x||S)?(x?(d=Math.asin(Math.sin(y)/n),S||(c=y)):y=Math.asin(n*Math.sin(d=c)),this.lam0=g-Math.asin(.5*(a-1/a)*Math.tan(d))/this.B):(o=Math.pow(aY(this.e,_,Math.sin(_)),this.B),l=Math.pow(aY(this.e,m,Math.sin(m)),this.B),a=this.E/o,u=((u=this.E*this.E)-l*o)/(u+l*o),(i=f-p)<-Math.PI?p-=ay.TWO_PI:i>Math.PI&&(p+=ay.TWO_PI),this.lam0=(0,aX.default)(.5*(f+p)-Math.atan(u*Math.tan(.5*this.B*(f-p))/((l-o)/(l+o)))/this.B,this.over),c=y=Math.asin(n*Math.sin(d=Math.atan(2*Math.sin(this.B*(0,aX.default)(f-this.lam0,this.over))/(a-1/a))))),this.singam=M
1ath.sin(d),this.cosgam=Math.cos(d),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(y))),this.lat0<0&&(this.u_0=-this.u_0)),a=.5*d,this.v_pole_n=this.ArB*Math.log(Math.tan(ay.FORTPI-a)),this.v_pole_s=this.ArB*Math.log(Math.tan(ay.FORTPI+a))},forward:function(t){var e,i,s,r,n,a,o,l,h={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-ay.HALF_PI)>ay.EPSLN){if(a=1/(n=this.E/Math.pow(aY(this.e,t.y,Math.sin(t.y)),this.B)),e=.5*(n-a),i=.5*(n+a),r=Math.sin(this.B*t.x),Math.abs(Math.abs(s=(e*this.singam-r*this.cosgam)/i)-1)<ay.EPSLN)throw Error();l=.5*this.ArB*Math.log((1-s)/(1+s)),o=1e-7>Math.abs(a=Math.cos(this.B*t.x))?this.A*t.x:this.ArB*Math.atan2(e*this.cosgam+r*this.singam,a)}else l=t.y>0?this.v_pole_n:this.v_pole_s,o=this.ArB*t.y;return this.no_rot?(h.x=o,h.y=l):(o-=this.u_0,h.x=l*this.cosrot+o*this.sinrot,h.y=o*this.cosrot-l*this.sinrot),h.x=this.a*h.x+this.x0,h.y=this.a*h.y+this.y0,h},inverse:function(t){var e,i,s,r,n,a,o={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(i=t.y,e=t.x):(i=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),r=.5*((s=Math.exp(-this.BrA*i))-1/s),Math.abs(Math.abs(a=((n=Math.sin(this.BrA*e))*this.cosgam+r*this.singam)/(.5*(s+1/s)))-1)<ay.EPSLN)o.x=0,o.y=a<0?-ay.HALF_PI:ay.HALF_PI;else{if(o.y=this.E/Math.sqrt((1+a)/(1-a)),o.y=aQ(this.e,Math.pow(o.y,1/this.B)),o.y===1/0)throw Error();o.x=-this.rB*Math.atan2(r*this.cosgam-n*this.singam,Math.cos(this.BrA*e))}return o.x+=this.lam0,o},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]}),ln.Proj.projections.add({init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<ay.EPSLN)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),i=Math.cos(this.lat1),s=(0,aH.default)(this.e,e,i),r=aY(this.e,this.lat1,e),n=Math.sin(this.lat2),a=Math.cos(this.lat2),o=(0,aH.default)(this.e,n,a),l=aY(this.e,this.lat2,n),h=Math.abs(Math.abs(this.lat0)-ay.HALF_PI)<ay.EPSLN?0:aY(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>ay.EPSLN?this.ns=Math.log(s/o)/Math.log(r/l):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=s/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e,i,s=t.x,r=t.y;Math.abs(2*Math.abs(r)-Math.PI)<=ay.EPSLN&&(r=(0,oG.default)(r)*(ay.HALF_PI-2*ay.EPSLN));var n=Math.abs(Math.abs(r)-ay.HALF_PI);if(n>ay.EPSLN)e=aY(this.e,r,Math.sin(r)),i=this.a*this.f0*Math.pow(e,this.ns);else{if((n=r*this.ns)<=0)return null;i=0}var a=this.ns*(0,aX.default)(s-this.long0,this.over);return t.x=this.k0*(i*Math.sin(a))+this.x0,t.y=this.k0*(this.rh-i*Math.cos(a))+this.y0,t},inverse:function(t){var e,i,s,r,n=(t.x-this.x0)/this.k0,a=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(n*n+a*a),i=1):(e=-Math.sqrt(n*n+a*a),i=-1);var o=0;if(0!==e&&(o=Math.atan2(i*n,i*a)),0!==e||this.ns>0){if(i=1/this.ns,s=Math.pow(e/(this.a*this.f0),i),-9999===(r=aQ(this.e,s)))return null}else r=-ay.HALF_PI;return t.x=(0,aX.default)(o/this.ns+this.long0,this.over),t.y=r,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]}),ln.Proj.projections.add({init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,i,s,r,n,a,o,l=t.x,h=t.y,u=(0,aX.default)(l-this.long0,this.over);return e=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/e)-this.s45),s=-u*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(s)),n=Math.asin(Math.cos(i)*Math.sin(s)/Math.cos(r)),a=this.n*n,t.y=(o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n))*Math.cos(a)/1,t.x=o*Math.sin(a)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,i,s,r,n,a,o,l=t.x;t.x=t.y,t.y=l,this.czech||(t.y*=-1,t.x*=-1),n=Math.sqrt(t.x*t.x+t.y*t.y),r=Math.atan2(t.y,t.x)/Math.sin(this.s0),s=2*(Math.atan(Math.pow(this.ro0/n,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(s)-Math.sin(this.ad)*Math.cos(s)*Math.cos(r)),i=Math.asin(Math.cos(s)*Math.sin(r)/Math.cos(e)),t.x=this.long0-i/this.alfa,a=e,o=0;var h=0;do t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),1e-10>Math.abs(a-t.y)&&(o=1),a=t.y,h+=1;while(0===o&&h<15)return h>=15?null:t},names:["Krovak","Krovak Modified","Krovak (North Orientated)","Krovak Modified (North Orientated)","krovak"]}),ln.Proj.projections.add({init:function(){this.sphere||(this.e0=ok(this.es),this.e1=oj(this.es),this.e2=oB(this.es),this.e3=oz(this.es),this.ml0=this.a*oD(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var e,i,s=t.x,r=t.y;if(s=(0,aX.default)(s-this.long0,this.over),this.sphere)e=this.a*Math.asin(Math.cos(r)*Math.sin(s)),i=this.a*(Math.atan2(Math.tan(r),Math.cos(s))-this.lat0);else{var n=Math.sin(r),a=Math.cos(r),o=oU(this.a,this.e,n),l=Math.tan(r)*Math.tan(r),h=s*Math.cos(r),u=h*h,d=this.es*a*a/(1-this.es),c=this.a*oD(this.e0,this.e1,this.e2,this.e3,r);e=o*h*(1-u*l*(1/6-(8-l+8*d)*u/120)),i=c-this.ml0+o*n/a*u*(.5+(5-l+6*d)*u/24)}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,i,s=t.x/this.a,r=t.y/this.a;if(this.sphere){var n=r+this.lat0;e=Math.asin(Math.sin(n)*Math.cos(s)),i=Math.atan2(Math.tan(s),Math.cos(n))}else{var a=oV(this.ml0/this.a+r,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-ay.HALF_PI)<=ay.EPSLN)return t.x=this.long0,t.y=ay.HALF_PI,r<0&&(t.y*=-1),t;var o=oU(this.a,this.e,Math.sin(a)),l=o*o*o/this.a/this.a*(1-this.es),h=Math.pow(Math.tan(a),2),u=s*this.a/o,d=u*u;e=a-o*Math.tan(a)/l*u*u*(.5-(1+3*h)*u*u/24),i=u*(1-d*(h/3+(1+3*h)*h*d/15))/Math.cos(a)}return t.x=(0,aX.default)(i+this.long0,this.over),t.y=oW(e),t},names:["Cassini","Cassini_Soldner","cass"]}),ln.Proj.projections.add(oq.default),ln.Proj.projections.add(oZ.default),ln.Proj.projections.add({init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var e,i,s,r,n,a,o,l=t.x,h=t.y;return s=(0,aX.default)(l-this.long0,this.over),e=Math.sin(h),i=Math.cos(h),r=Math.cos(s),(n=this.sin_p14*e+this.cos_p14*i*r)>0||Math.abs(n)<=ay.EPSLN?(a=this.x0+this.a*i*Math.sin(s)/n,o=this.y0+this.a*(this.cos_p14*e-this.sin_p14*i*r)/n):(a=this.x0+this.infinity_dist*i*Math.sin(s),o=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*i*r)),t.x=a,t.y=o,t},inverse:function(t){var e,i,s,r,n,a;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(i=Math.sin(r=Math.atan2(e,this.rc)),s=Math.cos(r),a=(0,oK.default)(s*this.sin_p14+t.y*i*this.cos_p14/e),n=Math.atan2(t.x*i,e*this.cos_p14*s-t.y*this.sin_p14*i),n=(0,aX.default)(this.long0+n,this.over)):(a=this.phic0,n=0),t.x=n,t.y=a,t},names:["gnom"]}),ln.Proj.projections.add({init:function(){this.sphere||(this.k0=(0,aH.default)(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,i,s=t.x,r=t.y,n=(0,aX.default)(s-this.long0,this.over);if(this.sphere)e=this.x0+this.a*n*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var a=(0,oH.default)(this.e,Math.sin(r));e=this.x0+this.a*this.k0*n,i=this.y0+this.a*a*.5/this.k0}return t.x=e,t.y=i,t},inverse:function(t){var e,i;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=(0,aX.default)(this.long0+t.x/this.a/Math.cos(this.lat_ts),this.over),i=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(i=function(t,e){if(1e-6>Math.abs(Math.abs(e)-(1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t)))))if(e<0)return -1*ay.HALF_PI;else return ay.HALF_PI;for(var i,s,r,n,a=Math.asin(.5*e),o=0;o<30;o++)if(s=Math.sin(a),r=Math.cos(a),a+=i=Math.pow(1-(n=t*s)*n,2)/(2*r)*(e/(1-t*t)-s/(1-n*n)+.5/t*Math.log((1-n)/(1+n))),1e-10>=Math.abs(i))return a;return NaN}(this.e,2*t.y*this.k0/this.a),e=(0,aX.default)(this.long0+t.x/(this.a*this.k0),this.over)),t.x=e,t.y=i,t},names:["cea"]}),ln.Proj.projections.add({init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,i=t.y,s=(0,aX.default)(e-this.long0,this.over),r=oW(i-this.lat0);return t.x=this.x0+this.a*s*this.rc,t.y=this.y0+this.a*r,t},inverse:function(t){var e=t.x,i=t.y;return t.x=(0,aX.default)(this.long0+(e-this.x0)/(this.a*this.rc),this.over),t.y=oW(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"]}),ln.Proj.projections.add({init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ok(this.es),this.e1=oj(this.es),this.e2=oB(this.es),this.e3=oz(this.es),this.ml0=this.a*oD(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,i,s,r=t.x,n=t.y,a=(0,aX.default)(r-this.long0,this.over);if(s=a*Math.sin(n),this.sphere)Math.abs(n)<=ay.EPSLN?(e=this.a*a,i=-1*this.a*this.lat0):(e=this.a*Math.sin(s)/Math.tan(n),i=this.a*(oW(n-this.lat0)+(1-Math.cos(s))/Math.tan(n)));else if(Math.abs(n)<=ay.EPSLN)e=this.a*a,i=-1*this.ml0;else{var o=oU(this.a,this.e,Math.sin(n))/Math.tan(n);e=o*Math.sin(s),i=this.a*oD(this.e0,this.e1,this.e2,this.e3,n)-this.ml0+o*(1-Math.cos(s))}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){var e,i,s,r,n,a,o,l,h,u,d,c,g,f,p;if(s=t.x-this.x0,r=t.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=ay.EPSLN)e=(0,aX.default)(s/this.a+this.long0,this.over),i=0;else{for(n=20,a=this.lat0+r/this.a,o=s*s/this.a/this.a+a*a,l=a;n;--n)if(u=Math.tan(l),h=-1*(a*(l*u+1)-l-.5*(l*l+o)*u)/((l-a)/u-1),l+=h,Math.abs(h)<=ay.EPSLN){i=l;break}e=(0,aX.default)(this.long0+Math.asin(s*Math.tan(l)/this.a)/Math.sin(i),this.over)}else if(Math.abs(r+this.ml0)<=ay.EPSLN)i=0,e=(0,aX.default)(this.long0+s/this.a,this.over);else{for(n=20,a=(this.ml0+r)/this.a,o=s*s/this.a/this.a+a*a,l=a;n;--n)if(d=Math.sqrt(1-(p=this.e*Math.sin(l))*p)*Math.tan(l),c=this.a*oD(this.e0,this.e1,this.e2,this.e3,l),g=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),h=(a*(d*(f=c/this.a)+1)-f-.5*d*(f*f+o))/(this.es*Math.sin(2*l)*(f*f+o-2*a*f)/(4*d)+(a-f)*(d*g-2/Math.sin(2*l))-g),l-=h,Math.abs(h)<=ay.EPSLN){i=l;break}d=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),e=(0,aX.default)(this.long0+Math.asin(s*d/this.a)/Math.sin(i),this.over)}return t.x=e,t.y=i,t},names:["Polyconic","American_Polyconic","poly"]}),ln.Proj.projections.add(oX.default),ln.Proj.projections.add({init:function(){},forward:function(t){var e=t.x,i=t.y,s=(0,aX.default)(e-this.long0,this.over),r=this.x0+this.a*s,n=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return t.x=r,t.y=n,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e=(0,aX.default)(this.long0+t.x/this.a,this.over),i=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=i,t},names:["Miller_Cylindrical","mill"]}),ln.Proj.projections.add({init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=(0,oY.default)(this.es)},forward:function(t){var e,i,s=t.x,r=t.y;if(s=(0,aX.default)(s-this.long0,this.over),this.sphere){if(this.m)for(var n=this.n
1*Math.sin(r),a=20;a;--a){var o=(this.m*r+Math.sin(r)-n)/(this.m+Math.cos(r));if(r-=o,Math.abs(o)<ay.EPSLN)break}else r=1!==this.n?Math.asin(this.n*Math.sin(r)):r;e=this.a*this.C_x*s*(this.m+Math.cos(r)),i=this.a*this.C_y*r}else{var l=Math.sin(r),h=Math.cos(r);i=this.a*(0,oQ.default)(r,l,h,this.en),e=this.a*s*h/Math.sqrt(1-this.es*l*l)}return t.x=e,t.y=i,t},inverse:function(t){var e,i,s,r;return t.x-=this.x0,s=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,s/=this.C_x*(this.m+Math.cos(e)),this.m?e=(0,oK.default)((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=(0,oK.default)(Math.sin(e)/this.n)),s=(0,aX.default)(s+this.long0,this.over),e=oW(e)):(r=Math.abs(e=(0,oJ.default)(t.y/this.a,this.es,this.en)))<ay.HALF_PI?(r=Math.sin(e),i=this.long0+t.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(e)),s=(0,aX.default)(i,this.over)):r-ay.EPSLN<ay.HALF_PI&&(s=this.long0),t.x=s,t.y=e,t},names:["Sinusoidal","sinu"]}),ln.Proj.projections.add({init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0},forward:function(t){for(var e=t.x,i=t.y,s=(0,aX.default)(e-this.long0,this.over),r=i,n=Math.PI*Math.sin(i);;){var a=-(r+Math.sin(r)-n)/(1+Math.cos(r));if(r+=a,Math.abs(a)<ay.EPSLN)break}r/=2,Math.PI/2-Math.abs(i)<ay.EPSLN&&(s=0);var o=.900316316158*this.a*s*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return t.x=o,t.y=l,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0,Math.abs(e=t.y/(1.4142135623731*this.a))>.999999999999&&(e=.999999999999);var e,i=Math.asin(e),s=(0,aX.default)(this.long0+t.x/(.900316316158*this.a*Math.cos(i)),this.over);s<-Math.PI&&(s=-Math.PI),s>Math.PI&&(s=Math.PI),Math.abs(e=(2*i+Math.sin(2*i))/Math.PI)>1&&(e=1);var r=Math.asin(e);return t.x=s,t.y=r,t},names:["Mollweide","moll"]}),ln.Proj.projections.add({init:function(){Math.abs(this.lat1+this.lat2)<ay.EPSLN||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ok(this.es),this.e1=oj(this.es),this.e2=oB(this.es),this.e3=oz(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=(0,aH.default)(this.e,this.sin_phi,this.cos_phi),this.ml1=oD(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<ay.EPSLN?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=(0,aH.default)(this.e,this.sin_phi,this.cos_phi),this.ml2=oD(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=oD(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var e,i=t.x,s=t.y;if(this.sphere)e=this.a*(this.g-s);else{var r=oD(this.e0,this.e1,this.e2,this.e3,s);e=this.a*(this.g-r)}var n=this.ns*(0,aX.default)(i-this.long0,this.over),a=this.x0+e*Math.sin(n),o=this.y0+this.rh-e*Math.cos(n);return t.x=a,t.y=o,t},inverse:function(t){t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var e,i,s,r,n=0;return(0!==i&&(n=Math.atan2(e*t.x,e*t.y)),this.sphere)?(r=(0,aX.default)(this.long0+n/this.ns,this.over),s=oW(this.g-i/this.a),t.x=r):(s=oV(this.g-i/this.a,this.e0,this.e1,this.e2,this.e3),t.x=r=(0,aX.default)(this.long0+n/this.ns,this.over)),t.y=s,t},names:["Equidistant_Conic","eqdc"]}),ln.Proj.projections.add({init:function(){this.R=this.a},forward:function(t){var e,i,s=t.x,r=t.y,n=(0,aX.default)(s-this.long0,this.over);Math.abs(r)<=ay.EPSLN&&(e=this.x0+this.R*n,i=this.y0);var a=(0,oK.default)(2*Math.abs(r/Math.PI));(Math.abs(n)<=ay.EPSLN||Math.abs(Math.abs(r)-ay.HALF_PI)<=ay.EPSLN)&&(e=this.x0,i=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+-(Math.PI*this.R*Math.tan(.5*a)));var o=.5*Math.abs(Math.PI/n-n/Math.PI),l=o*o,h=Math.sin(a),u=Math.cos(a),d=u/(h+u-1),c=d*(2/h-1),g=c*c,f=Math.PI*this.R*(o*(d-g)+Math.sqrt(l*(d-g)*(d-g)-(g+l)*(d*d-g)))/(g+l);n<0&&(f=-f),e=this.x0+f;var p=l+d;return f=Math.PI*this.R*(c*p-o*Math.sqrt((g+l)*(l+1)-p*p))/(g+l),i=r>=0?this.y0+f:this.y0-f,t.x=e,t.y=i,t},inverse:function(t){var e,i,s,r,n,a,o,l,h,u,d,c;return t.x-=this.x0,t.y-=this.y0,u=Math.PI*this.R,r=(i=t.x/u)*i+(s=t.y/u)*s,a=(n=-Math.abs(s)*(1+r))-2*s*s+i*i,o=-2*n+1+2*s*s+r*r,c=s*s/o+(2*a*a*a/o/o/o-9*n*a/o/o)/27,h=2*Math.sqrt(-(l=(n-a*a/3/o)/o)/3),Math.abs(u=3*c/l/h)>1&&(u=u>=0?1:-1),d=Math.acos(u)/3,e=t.y>=0?(-h*Math.cos(d+Math.PI/3)-a/3/o)*Math.PI:-(-h*Math.cos(d+Math.PI/3)-a/3/o)*Math.PI,t.x=Math.abs(i)<ay.EPSLN?this.long0:(0,aX.default)(this.long0+Math.PI*(r-1+Math.sqrt(1+2*(i*i-s*s)+r*r))/2/i,this.over),t.y=e,t},names:["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"]}),ln.Proj.projections.add({init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))},forward:function(t){var e,i,s,r,n,a,o,l,h,u,d=t.x,c=t.y,g=Math.sin(t.y),f=Math.cos(t.y),p=(0,aX.default)(d-this.long0,this.over);if(this.sphere)if(Math.abs(this.sin_p12-1)<=ay.EPSLN)return t.x=this.x0+this.a*(ay.HALF_PI-c)*M
1ath.sin(p),t.y=this.y0-this.a*(ay.HALF_PI-c)*Math.cos(p),t;else if(Math.abs(this.sin_p12+1)<=ay.EPSLN)return t.x=this.x0+this.a*(ay.HALF_PI+c)*Math.sin(p),t.y=this.y0+this.a*(ay.HALF_PI+c)*Math.cos(p),t;else return l=(o=Math.acos(this.sin_p12*g+this.cos_p12*f*Math.cos(p)))?o/Math.sin(o):1,t.x=this.x0+this.a*l*f*Math.sin(p),t.y=this.y0+this.a*l*(this.cos_p12*g-this.sin_p12*f*Math.cos(p)),t;return(e=ok(this.es),i=oj(this.es),s=oB(this.es),r=oz(this.es),Math.abs(this.sin_p12-1)<=ay.EPSLN)?(n=this.a*oD(e,i,s,r,ay.HALF_PI),a=this.a*oD(e,i,s,r,c),t.x=this.x0+(n-a)*Math.sin(p),t.y=this.y0-(n-a)*Math.cos(p),t):Math.abs(this.sin_p12+1)<=ay.EPSLN?(n=this.a*oD(e,i,s,r,ay.HALF_PI),a=this.a*oD(e,i,s,r,c),t.x=this.x0+(n+a)*Math.sin(p),t.y=this.y0+(n+a)*Math.cos(p),t):(Math.abs(d)<ay.EPSLN&&Math.abs(c-this.lat0)<ay.EPSLN?t.x=t.y=0:(u=(h=function(t,e,i,s,r,n){let a,o,l,h,u,d,c,g,f,p,_,m,y=s-e,x=Math.atan((1-n)*Math.tan(t)),S=Math.atan((1-n)*Math.tan(i)),v=Math.sin(x),w=Math.cos(x),E=Math.sin(S),M=Math.cos(S),P=y,C,b=100;do{if(0===(l=Math.sqrt(M*(a=Math.sin(P))*(M*a)+(w*E-v*M*(o=Math.cos(P)))*(w*E-v*M*o))))return{azi1:0,s12:0};u=Math.atan2(l,h=v*E+w*M*o),g=0!=(c=1-(d=w*M*a/l)*d)?h-2*v*E/c:0,f=n/16*c*(4+n*(4-3*c)),C=P,P=y+(1-f)*n*d*(u+f*l*(g+f*h*(-1+2*g*g)))}while(Math.abs(P-C)>1e-12&&--b>0)return 0===b?{azi1:NaN,s12:NaN}:(_=1+(p=c*(r*r-r*(1-n)*(r*(1-n)))/(r*(1-n)*(r*(1-n))))/16384*(4096+p*(-768+p*(320-175*p))),{azi1:Math.atan2(M*a,w*E-v*M*o),s12:r*(1-n)*_*(u-(m=p/1024*(256+p*(-128+p*(74-47*p))))*l*(g+m/4*(h*(-1+2*g*g)-m/6*g*(-3+4*l*l)*(-3+4*g*g))))})}(this.lat0,this.long0,c,d,this.a,this.f)).azi1,t.x=h.s12*Math.sin(u),t.y=h.s12*Math.cos(u)),t)},inverse:function(t){var e,i,s,r,n,a,o,l,h,u,d,c,g,f;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((e=Math.sqrt(t.x*t.x+t.y*t.y))>2*ay.HALF_PI*this.a)return;return s=Math.sin(i=e/this.a),r=Math.cos(i),n=this.long0,Math.abs(e)<=ay.EPSLN?a=this.lat0:(a=(0,oK.default)(r*this.sin_p12+t.y*s*this.cos_p12/e),n=Math.abs(Math.abs(this.lat0)-ay.HALF_PI)<=ay.EPSLN?this.lat0>=0?(0,aX.default)(this.long0+Math.atan2(t.x,-t.y),this.over):(0,aX.default)(this.long0-Math.atan2(-t.x,t.y),this.over):(0,aX.default)(this.long0+Math.atan2(t.x*s,e*this.cos_p12*r-t.y*this.sin_p12*s),this.over)),t.x=n,t.y=a,t}return(o=ok(this.es),l=oj(this.es),h=oB(this.es),u=oz(this.es),Math.abs(this.sin_p12-1)<=ay.EPSLN)?(a=oV(((d=this.a*oD(o,l,h,u,ay.HALF_PI))-(e=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,o,l,h,u),n=(0,aX.default)(this.long0+Math.atan2(t.x,-1*t.y),this.over),t.x=n,t.y=a):Math.abs(this.sin_p12+1)<=ay.EPSLN?(d=this.a*oD(o,l,h,u,ay.HALF_PI),a=oV(((e=Math.sqrt(t.x*t.x+t.y*t.y))-d)/this.a,o,l,h,u),n=(0,aX.default)(this.long0+Math.atan2(t.x,t.y),this.over),t.x=n,t.y=a):(c=Math.atan2(t.x,t.y),g=Math.sqrt(t.x*t.x+t.y*t.y),t.x=(f=function(t,e,i,s,r,n){let a,o,l,h,u=Math.atan((1-n)*Math.tan(t)),d=Math.sin(u),c=Math.cos(u),g=Math.sin(i),f=Math.cos(i),p=Math.atan2(d,c*f),_=c*g,m=1-_*_,y=m*(r*r-r*(1-n)*(r*(1-n)))/(r*(1-n)*(r*(1-n))),x=1+y/16384*(4096+y*(-768+y*(320-175*y))),S=y/1024*(256+y*(-128+y*(74-47*y))),v=s/(r*(1-n)*x),w,E=100;do a=Math.cos(2*p+v),h=S*(o=Math.sin(v))*(a+S/4*((l=Math.cos(v))*(-1+2*a*a)-S/6*a*(-3+4*o*o)*(-3+4*a*a))),w=v,v=s/(r*(1-n)*x)+h;while(Math.abs(v-w)>1e-12&&--E>0)if(0===E)return{lat2:NaN,lon2:NaN};let M=d*o-c*l*f,P=Math.atan2(d*l+c*o*f,(1-n)*Math.sqrt(_*_+M*M)),C=n/16*m*(4+n*(4-3*m));return{lat2:P,lon2:e+(Math.atan2(o*g,c*l-d*o*f)-(1-C)*n*_*(v+C*o*(a+C*l*(-1+2*a*a))))}}(this.lat0,this.long0,c,g,this.a,this.f)).lon2,t.y=f.lat2),t},names:["Azimuthal_Equidistant","aeqd"]}),ln.Proj.projections.add({init:function(){this.sin_p14=Math.sin(this.lat0||0),this.cos_p14=Math.cos(this.lat0||0)},forward:function(t){var e,i,s,r,n,a,o,l=t.x,h=t.y;return s=(0,aX.default)(l-(this.long0||0),this.over),e=Math.sin(h),i=Math.cos(h),r=Math.cos(s),((n=this.sin_p14*e+this.cos_p14*i*r)>0||Math.abs(n)<=ay.EPSLN)&&(a=this.a*i*Math.sin(s),o=(this.y0||0)+this.a*(this.cos_p14*e-this.sin_p14*i*r)),t.x=a,t.y=o,t},inverse:function(t){var e,i,s,r,n,a,o,l;return(t.x-=this.x0||0,t.y-=this.y0||0,e=Math.sqrt(t.x*t.x+t.y*t.y),s=Math.sin(i=(0,oK.default)(e/this.a)),r=Math.cos(i),o=this.long0||0,l=this.lat0||0,n=o,Math.abs(e)<=ay.EPSLN)?a=l:(a=(0,oK.default)(r*this.sin_p14+t.y*s*this.cos_p14/e),Math.abs(Math.abs(l)-ay.HALF_PI)<=ay.EPSLN)?n=l>=0?(0,aX.default)(o+Math.atan2(t.x,-t.y),this.over):(0,aX.default)(o-Math.atan2(-t.x,t.y),this.over):n=(0,aX.default)(o+Math.atan2(t.x*s,e*this.cos_p14*r-t.y*this.sin_p14*s),this.over),t.x=n,t.y=a,t},names:["ortho"]}),ln.Proj.projections.add({init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=ay.HALF_PI-ay.FORTPI/2?this.face=5:this.lat0<=-(ay.HALF_PI-ay.FORTPI/2)?this.face=6:Math.abs(this.long0)<=ay.FORTPI?this.face=1:Math.abs(this.long0)<=ay.HALF_PI+ay.FORTPI?this.face=this.long0>0?2:4:this.face=3,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,i,s,r,n,a,o,l,h,u,d,c={x:0,y:0},g={value:0};return(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,i=t.x,5===this.face)?(r=ay.HALF_PI-e,i>=ay.FORTPI&&i<=ay.HALF_PI+ay.FORTPI?(g.value=1,s=i-ay.HALF_PI):i>ay.HALF_PI+ay.FORTPI||i<=-(ay.HALF_PI+ay.FORTPI)?(g.value=2,s=i>0?i-ay.SPI:i+ay.SPI):i>-(ay.HALF_PI+ay.FORTPI)&&i<=-ay.FORTPI?(g.value=3,s=i+ay.HALF_PI):(g.value=4,s=i)):6===this.face?(r=ay.HALF_PI+e,i>=ay.FORTPI&&i<=ay.HALF_PI+ay.FORTPI?(g.value=1,s=-i+ay.HALF_PI):i<ay.FORTPI&&i>=-ay.FORTPI?(g.value=2,s=-i):i<-ay.FORTPI&&i>=-(ay.HALF_PI+ay.FORTPI)?(g.value=3,s=-i-ay.HALF_PI):(g.value=4,s=i>0?-i+ay.SPI:-i-ay.SPI)):(2===this.face?i=o0(i,+ay.HALF_PI):3===this.face?i=o0(i,+ay.SPI):4===this.face&&(i=o0(i,-ay.HALF_PI)),h=Math.sin(e),u=Math.cos(e),d=Math.sin(i),o=u*Math.cos(i),l=u*d,1===this.face?s=o$(r=Math.acos(o),h,l,g):2===this.face?s=o$(r=Math.acos(l),h,-o,g):3===this.face?s=o$(r=Math.acos(-o),h,-l,g):4===this.face?s=o$(r=Math.acos(-l),h,o,g):(r=s=0,g.value=1)),n=Math.sqrt((1-Math.cos(r))/(Math.cos(a=Math.atan(12/ay.SPI*(s+Math.acos(Math.sin(s)*Math.cos(ay.FORTPI))-ay.HALF_PI)))*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(s))))),2===g.value?a+=ay.HALF_PI:3===g.value?a+=ay.SPI:4===g.value&&(
1a+=1.5*ay.SPI),c.x=n*Math.cos(a),c.y=n*Math.sin(a),c.x=c.x*this.a+this.x0,c.y=c.y*this.a+this.y0,t.x=c.x,t.y=c.y,t},inverse:function(t){var e,i,s,r,n,a,o,l,h,u,d,c,g,f,p={lam:0,phi:0},_={value:0};return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,i=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?_.value=1:t.y>=0&&t.y>=Math.abs(t.x)?(_.value=2,e-=ay.HALF_PI):t.x<0&&-t.x>=Math.abs(t.y)?(_.value=3,e=e<0?e+ay.SPI:e-ay.SPI):(_.value=4,e+=ay.HALF_PI),n=Math.atan(Math.sin(l=ay.SPI/12*Math.tan(e))/(Math.cos(l)-1/Math.sqrt(2))),(a=1-(s=Math.cos(e))*s*(r=Math.tan(i))*r*(1-Math.cos(Math.atan(1/Math.cos(n)))))<-1?a=-1:a>1&&(a=1),5===this.face?(o=Math.acos(a),p.phi=ay.HALF_PI-o,1===_.value?p.lam=n+ay.HALF_PI:2===_.value?p.lam=n<0?n+ay.SPI:n-ay.SPI:3===_.value?p.lam=n-ay.HALF_PI:p.lam=n):6===this.face?(p.phi=(o=Math.acos(a))-ay.HALF_PI,1===_.value?p.lam=-n+ay.HALF_PI:2===_.value?p.lam=-n:3===_.value?p.lam=-n-ay.HALF_PI:p.lam=n<0?-n-ay.SPI:-n+ay.SPI):(d=(l=(h=a)*h)>=1?0:Math.sqrt(1-l)*Math.sin(n),l+=d*d,u=l>=1?0:Math.sqrt(1-l),2===_.value?(l=u,u=-d,d=l):3===_.value?(u=-u,d=-d):4===_.value&&(l=u,u=d,d=-l),2===this.face?(l=h,h=-u,u=l):3===this.face?(h=-h,u=-u):4===this.face&&(l=h,h=u,u=-l),p.phi=Math.acos(-d)-ay.HALF_PI,p.lam=Math.atan2(u,h),2===this.face?p.lam=o0(p.lam,-ay.HALF_PI):3===this.face?p.lam=o0(p.lam,-ay.SPI):4===this.face&&(p.lam=o0(p.lam,+ay.HALF_PI))),0!==this.es&&(c=+(p.p
1hi<0),g=Math.tan(p.phi),f=this.b/Math.sqrt(g*g+this.one_minus_f_squared),p.phi=Math.atan(Math.sqrt(this.a*this.a-f*f)/(this.one_minus_f*f)),c&&(p.phi=-p.phi)),p.lam+=this.long0,t.x=p.lam,t.y=p.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]}),ln.Proj.projections.add({init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=(0,aX.default)(t.x-this.long0,this.over),i=Math.abs(t.y),s=Math.floor(i*o4);s<0?s=0:s>=18&&(s=17),i=ay.R2D*(i-o3*s);var r={x:o8(o1[s],i)*e,y:o8(o2[s],i)};return t.y<0&&(r.y=-r.y),r.x=r.x*this.a*.8487+this.x0,r.y=r.y*this.a*1.3523+this.y0,r},inverse:function(t){var e={x:(t.x-this.x0)/(.8487*this.a),y:Math.abs(t.y-this.y0)/(1.3523*this.a)};if(e.y>=1)e.x/=o1[18][0],e.y=t.y<0?-ay.HALF_PI:ay.HALF_PI;else{var i=Math.floor(18*e.y);for(i<0?i=0:i>=18&&(i=17);;)if(o2[i][0]>e.y)--i;else if(o2[i+1][0]<=e.y)++i;else break;var s=o2[i],r=5*(e.y-s[0])/(o2[i+1][0]-s[0]);r=function(t,e,i,s){for(var r=e;s;--s){var n=t(r);if(r-=n,Math.abs(n)<i)break}return r}(function(t){return(o8(s,t)-e.y)/(s[1]+t*(2*s[2]+3*t*s[3]))},r,ay.EPSLN,100),e.x/=o8(o1[i],r),e.y=(5*i+r)*ay.D2R,t.y<0&&(e.y=-e.y)}return e.x=(0,aX.default)(e.x+this.long0,this.over),e},names:["Robinson","robin"]}),ln.Proj.projections.add({init:function(){this.name="geocent"},forward:function(t){return ol(t,this.es,this.a)},inverse:function(t){return oh(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]}),ln.Proj.projections.add({init:function(){if(Object.keys(o5).forEach((function(t){if(void 0===this[t])this[t]=o5[t].def;else if(o5[t].num&&isNaN(this[t]))throw Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);else o5[t].num&&(this[t]=parseFloat(this[t]));o5[t].degrees&&(this[t]=this[t]*ay.D2R)}).bind(this)),Math.abs(Math.abs(this.lat0)-ay.HALF_PI)<ay.EPSLN?this.mode=1*!!(this.lat0<0):Math.abs(this.lat0)<ay.EPSLN?this.mode=2:(this.mode=3,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var e,i,s,r,n=Math.sin(t.y),a=Math.cos(t.y),o=Math.cos(t.x);switch(this.mode){case 3:i=this.sinph0*n+this.cosph0*a*o;break;case 2:i=a*o;break;case 1:i=-n;break;case 0:i=n}switch(e=(i=this.pn1/(this.p-i))*a*Math.sin(t.x),this.mode){case 3:i*=this.cosph0*n-this.sinph0*a*o;break;case 2:i*=n;break;case 0:i*=-(a*o);break;case 1:i*=a*o}return r=1/((s=i*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-i*this.sg)*this.cw*r,i=s*r,t.x=e*this.a,t.y=i*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var e,i,s,r,n,a={x:t.x,y:t.y};s=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*s,i=this.pn1*t.y*this.cw*s,t.x=e*this.cg+i*this.sg,t.y=i*this.cg-e*this.sg;var o=(0,oF.default)(t.x,t.y);if(Math.abs(o)<ay.EPSLN)a.x=0,a.y=t.y;else{switch(n=1-o*o*this.pfact,r=Math.sqrt(1-(n=(this.p-Math.sqrt(n))/(this.pn1/o+o/this.pn1))*n),this.mode){case 3:a.y=Math.asin(r*this.sinph0+t.y*n*this.cosph0/o),t.y=(r-this.sinph0*Math.sin(a.y))*o,t.x*=n*this.cosph0;break;case 2:a.y=Math.asin(t.y*n/o),t.y=r*o,t.x*=n;break;case 0:a.y=Math.asin(r),t.y=-t.y;break;case 1:a.y=-Math.asin(r)}a.x=Math.atan2(t.x,t.y)}return t.x=a.x+this.long0,t.y=a.y,t},names:["Tilted_Perspective","tpers"]}),ln.Proj.projections.add({init:function(){if(this.flip_axis=+("x"===this.sweep),this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw Error();if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=1/t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var e,i,s,r,n=t.x,a=t.y;if(n-=this.long0,"ellipse"===this.shape){a=Math.atan(this.radius_p2*Math.tan(a));var o=this.radius_p/(0,oF.default)(this.radius_p*Math.cos(a),Math.sin(a));if(i=o*Math.cos(n)*Math.cos(a),s=o*Math.sin(n)*Math.cos(a),r=o*Math.sin(a),(this.radius_g-i)*i-s*s-r*r*this.radius_p_inv2<0)return t.x=NaN,t.y=NaN,t;e=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(s/(0,oF.default)(r,e)),t.y=this.radius_g_1*Math.atan(r/e)):(t.x=this.radius_g_1*Math.atan(s/e),t.y=this.radius_g_1*Math.atan(r/(0,oF.default)(s,e)))}else"sphere"===this.shape&&(i=Math.cos(n)*(e=Math.cos(a)),s=Math.sin(n)*e,r=Math.sin(a),e=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(s/(0,oF.default)(r,e)),t.y=this.radius_g_1*Math.atan(r/e)):(t.x=this.radius_g_1*Math.atan(s/e),t.y=this.radius_g_1*Math.atan(r/(0,oF.default)(s,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var e,i,s,r,n=-1,a=0,o=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(o=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*(0,oF.default)(1,o)):(a=Math.tan(t.x/this.radius_g_1),o=Math.tan(t.y/this.radius_g_1)*(0,oF.default)(1,a));var l=o/this.radius_p;if(e=a*a+l*l+n*n,(s=(i=2*this.radius_g*n)*i-4*e*this.C)<0)return t.x=NaN,t.y=NaN,t;r=(-i-Math.sqrt(s))/(2*e),n=this.radius_g+r*n,a*=r,o*=r,t.x=Math.atan2(a,n),t.y=Math.atan(o*Math.cos(t.x)/n),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(o=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+o*o)):(a=Math.tan(t.x/this.radius_g_1),o=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+a*a)),e=a*a+o*o+n*n,(s=(i=2*this.radius_g*n)*i-4*e*this.C)<0)return t.x=NaN,t.y=NaN,t;r=(-i-Math.sqrt(s))/(2*e),n=this.radius_g+r*n,a*=r,o*=r,t.x=Math.atan2(a,n),t.y=Math.atan(o*Math.cos(t.x)/n)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]}),ln.Proj.projections.add({init:function(){this.es=0,this.long0=void 0!==this.long0?this.long0:0,this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0},forward:function(t){var e=(0,aX.default)(t.x-this.long0,this.over),i=Math.asin(o6*Math.sin(t.y)),s=i*i,r=s*s*s;return t.x=e*Math.cos(i)/(o6*(1.340264+-.24331799999999998*s+r*(.0062510000000000005+.034164*s))),t.y=i*(1.340264+-.081106*s+r*(893e-6+.003796
1*s)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var e,i,s,r,n,a=t.y;for(n=0;n<12&&(i=(e=a*a)*e*e,s=a*(1.340264+-.081106*e+i*(893e-6+.003796*e))-t.y,a-=r=s/(1.340264+-.24331799999999998*e+i*(.0062510000000000005+.034164*e)),!(1e-9>Math.abs(r)));++n);return i=(e=a*a)*e*e,t.x=o6*t.x*(1.340264+-.24331799999999998*e+i*(.0062510000000000005+.034164*e))/Math.cos(a),t.y=Math.asin(Math.sin(a)/o6),t.x=(0,aX.default)(t.x+this.long0,this.over),t},names:["eqearth","Equal Earth","Equal_Earth"]}),ln.Proj.projections.add({init:function(){var t;if(this.phi1=this.lat1,1e-10>Math.abs(this.phi1))throw Error();this.es?(this.en=(0,oY.default)(this.es),this.m1=(0,oQ.default)(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en),this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=o9,this.forward=o7):(Math.abs(this.phi1)+1e-10>=ay.HALF_PI?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=le,this.forward=lt)},names:["bonne","Bonne (Werner lat_1=90)"]}),ln.Proj.projections.add({init:function(){let t;if(this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.title=this.title||"General Oblique Transformation",this.isIdentity=a$.includes(this.o_proj),!this.o_proj)throw Error("Missing parameter: o_proj");if("ob_tran"===this.o_proj)throw Error("Invalid value for o_proj: "+this.o_proj);let e=oo(this.projStr.replace("+proj=ob_tran","").replace("+o_proj=","+proj=").trim());if(!e)throw Error("Invalid parameter: o_proj. Unknown projection "+this.o_proj);e.long0=0,this.obliqueProjection=e;let i=Object.keys(lr),s=t=>{if(void 0===this[t])return;let e=parseFloat(this[t])*ay.D2R;if(isNaN(e))throw Error("Invalid value for "+t+": "+this[t]);return e};for(let e=0;e<i.length;e++){let r=lr[i[e]],n=Object.entries(r);if(n.some(([t])=>void 0!==this[t])){t=r;for(let t=0;t<n.length;t++){let[e,i]=n[t],r=s(e);if(void 0===r)throw Error("Missing parameter: "+e+".");this[i]=r}break}}if(!t)throw Error("No valid parameters provided for ob_tran projection.");let{lamp:r,phip:n}=function(t,e){let i,s;if(e===lr.ROTATE){let e=t.oLongC,r=t.oLatC,n=t.oAlpha;if(Math.abs(Math.abs(r)-ay.HALF_PI)<=ay.EPSLN)throw Error("Invalid value for o_lat_c: "+t.o_lat_c+" should be < 90°");s=e+Math.atan2(-1*Math.cos(n),-1*Math.sin(n)*Math.sin(r)),i=Math.asin(Math.cos(r)*Math.sin(n))}else if(e===lr.NEW_POLE)s=t.oLongP,i=t.oLatP;else{let e=t.oLong1,r=t.oLat1,n=t.oLong2,a=t.oLat2,o=Math.abs(r);if(Math.abs(r)>ay.HALF_PI-ay.EPSLN)throw Error("Invalid value for o_lat_1: "+t.o_lat_1+" should be < 90°");if(Math.abs(a)>ay.HALF_PI-ay.EPSLN)throw Error("Invalid value for o_lat_2: "+t.o_lat_2+" should be < 90°");if(Math.abs(r-a)<ay.EPSLN)throw Error("Invalid value for o_lat_1 and o_lat_2: o_lat_1 should be different from o_lat_2");if(o<ay.EPSLN)throw Error("Invalid value for o_lat_1: o_lat_1 should be different from zero");i=Math.atan(-1*Math.cos((s=Math.atan2(Math.cos(r)*Math.sin(a)*Math.cos(e)-Math.sin(r)*Math.cos(a)*Math.cos(n),Math.sin(r)*Math.cos(a)*Math.sin(n)-Math.cos(r)*Math.sin(a)*Math.sin(e)))-e)/Math.tan(r))}return{lamp:s,phip:i}}(this,t);this.lamp=r,Math.abs(n)>ay.EPSLN?(this.cphip=Math.cos(n),this.sphip=Math.sin(n),this.projectionType=li):this.projectionType=ls},forward:function(t){return this.projectionType.forward(this,t)},inverse:function(t){return this.projectionType.inverse(this,t)},names:["General Oblique Transformation","General_Oblique_Transformation","ob_tran"]});var la={};la=function(t,e,i){t="default"in t?t.default:t,i="default"in i?i.default:i;let s="layer-switcher-";class r extends t{constructor(t){let e=Object.assign({},t),i=document.createElement("div");super({element:i,target:e.target}),this.activationMode=e.activationMode||"mouseover",this.startActive=!0===e.startActive,this.label=void 0!==e.label?e.label:"",this.collapseLabel=void 0!==e.collapseLabel?e.collapseLabel:"»",this.tipLabel=e.tipLabel?e.tipLabel:"Legend",this.collapseTipLabel=e.collapseTipLabel?e.collapseTipLabel:"Collapse legend",this.groupSelectStyle=r.getGroupSelectStyle(e.groupSelectStyle),this.reverse=!1!==e.reverse,this.mapListeners=[],this.hiddenClassName="ol-unselectable ol-control layer-switcher",r.isTouchDevice_()&&
1(this.hiddenClassName+=" touch"),this.shownClassName="shown",i.className=this.hiddenClassName,this.button=document.createElement("button"),i.appendChild(this.button),this.panel=document.createElement("div"),this.panel.className="panel",i.appendChild(this.panel),r.enableTouchScroll_(this.panel),i.classList.add(s+"group-select-style-"+this.groupSelectStyle),i.classList.add(s+"activation-mode-"+this.activationMode),"click"===this.activationMode?(i.classList.add("activationModeClick"),this.button.onclick=t=>{let e=t||window.event;this.element.classList.contains(this.shownClassName)?this.hidePanel():this.showPanel(),e.preventDefault()}):(this.button.onmouseover=()=>{this.showPanel()},this.button.onclick=t=>{let e=t||window.event;this.showPanel(),e.preventDefault()},this.panel.onmouseout=t=>{this.panel.contains(t.relatedTarget)||this.hidePanel()}),this.updateButton()}setMap(t){for(let t=0;t<this.mapListeners.length;t++)e.unByKey(this.mapListeners[t]);this.mapListeners.length=0,super.setMap(t),t&&(this.startActive?this.showPanel():this.renderPanel(),"click"!==this.activationMode&&this.mapListeners.push(t.on("pointerdown",()=>{this.hidePanel()})))}showPanel(){this.element.classList.contains(this.shownClassName)||(this.element.classList.add(this.shownClassName),this.updateButton(),this.renderPanel()),this.dispatchEvent("show")}hidePanel(){this.element.classList.contains(this.shownClassName)&&(this.element.classList.remove(this.shownClassName),this.updateButton()),this.dispatchEvent("hide")}updateButton(){this.element.classList.contains(this.shownClassName)?(this.button.textContent=this.collapseLabel,this.button.setAttribute("title",this.collapseTipLabel),this.button.setAttribute("aria-label",this.collapseTipLabel)):(this.button.textContent=this.label,this.button.setAttribute("title",this.tipLabel),this.button.setAttribute("aria-label",this.tipLabel))}renderPanel(){this.dispatchEvent("render"),r.renderPanel(this.getMap(),this.panel,{groupSelectStyle:this.groupSelectStyle,reverse:this.reverse}),this.dispatchEvent("rendercomplete")}static renderPanel(t,e,i){let s=new Event("render");for(e.dispatchEvent(s),(i=i||{}).groupSelectStyle=r.getGroupSelectStyle(i.groupSelectStyle),r.ensureTopVisibleBaseLayerShown(t,i.groupSelectStyle);e.firstChild;)e.removeChild(e.firstChild);r.forEachRecursive(t,function(t,e,i){t.set("indeterminate",!1)}),"children"===i.groupSelectStyle||"none"===i.groupSelectStyle?r.setGroupVisibility(t):"group"===i.groupSelectStyle&&r.setChildVisibility(t);let n=document.createElement("ul");e.appendChild(n),r.renderLayers_(t,t,n,i,function(s){r.renderPanel(t,e,i)});let a=new Event("rendercomplete");e.dispatchEvent(a)}static isBaseGroup(t){if(!(t instanceof i))return!1;{let e=t.getLayers().getArray();return e.length&&"base"===e[0].get("type")}}static setGroupVisibility(t){r.getGroupsAndLayers(t,function(t){return t instanceof i&&!t.get("combine")&&!r.isBaseGroup(t)}).reverse().forEach(function(t){let e=t.getLayersArray().map(function(t){return t.getVisible()});e.every(function(t){return!0===t})?(t.setVisible(!0),t.set("indeterminate",!1)):e.every(function(t){return!1===t})?(t.setVisible(!1),t.set("indeterminate",!1)):(t.setVisible(!0),t.set("indeterminate",!0))})}static setChildVisibility(t){r.getGroupsAndLayers(t,function(t){return t instanceof i&&!t.get("combine")&&!r.isBaseGroup(t)}).forEach(function(t){let e=t.getVisible(),i=t.get("indeterminate");t.getLayers().getArray().forEach(function(t){t.set("indeterminate",!1),(!e||i)&&t.getVisible()&&t.set("indeterminate",!0)})})}static ensureTopVisibleBaseLayerShown(t,e){let i;r.forEachRecursive(t,function(t,e,s){"base"===t.get("type")&&t.getVisible()&&(i=t)}),i&&r.setVisible_(t,i,!0,e)}static getGroupsAndLayers(t,e){let i=[];return e=e||function(t,e,i){return!0},r.forEachRecursive(t,function(t,s,r){t.get("title")&&e(t,s,r)&&i.push(t)}),i}static setVisible_(t,e,s,n){e.setVisible(s),s&&"base"===e.get("type")&&r.forEachRecursive(t,function(t,i,s){t!=e&&"base"===t.get("type")&&t.setVisible(!1)}),e instanceof i&&!e.get("combine")&&"children"===n&&e.getLayers().forEach(i=>{r.setVisible_(t,i,e.getVisible(),n)})}
1static renderLayer_(t,e,n,a,o){let l=document.createElement("li"),h=e.get("title"),u=r.uuid(),d=document.createElement("label");if(e instanceof i&&!e.get("combine")){let i=r.isBaseGroup(e);if(l.classList.add("group"),i&&l.classList.add(s+"base-group"),e.get("fold")){l.classList.add(s+"fold"),l.classList.add(s+e.get("fold"));let t=document.createElement("button");t.onclick=function(t){let i=t||window.event;r.toggleFold_(e,l),i.preventDefault()},l.appendChild(t)}if(!i&&"none"!=a.groupSelectStyle){let i=document.createElement("input");i.type="checkbox",i.id=u,i.checked=e.getVisible(),i.indeterminate=e.get("indeterminate"),i.onchange=function(i){let s=i.target;r.setVisible_(t,e,s.checked,a.groupSelectStyle),o(e)},l.appendChild(i),d.htmlFor=u}d.innerHTML=h,l.appendChild(d);let n=document.createElement("ul");l.appendChild(n),r.renderLayers_(t,e,n,a,o)}else{l.className="layer";let i=document.createElement("input");"base"===e.get("type")?i.type="radio":i.type="checkbox",i.id=u,i.checked=e.get("visible"),i.indeterminate=e.get("indeterminate"),i.onchange=function(i){let s=i.target;r.setVisible_(t,e,s.checked,a.groupSelectStyle),o(e)},l.appendChild(i),d.htmlFor=u,d.innerHTML=h;let s=t.getView().getResolution();if(s>=e.getMaxResolution()||s<e.getMinResolution())d.className+=" disabled";else if(e.getMinZoom&&e.getMaxZoom){let i=t.getView().getZoom();(i<=e.getMinZoom()||i>e.getMaxZoom())&&(d.className+=" disabled")}l.appendChild(d)}return l}static renderLayers_(t,e,i,s,n){let a=e.getLayers().getArray().slice();s.reverse&&(a=a.reverse());for(let e=0,o;e<a.length;e++)(o=a[e]).get("title")&&i.appendChild(r.renderLayer_(t,o,e,s,n))}static forEachRecursive(t,e){t.getLayers().forEach(function(t,s,n){e(t,s,n),t instanceof i&&r.forEachRecursive(t,e)})}static uuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})}static enableTouchScroll_(t){if(r.isTouchDevice_()){let e=0;t.addEventListener("touchstart",function(t){e=this.scrollTop+t.touches[0].pageY},!1),t.addEventListener("touchmove",function(t){this.scrollTop=e-t.touches[0].pageY},!1)}}static isTouchDevice_(){try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}}static toggleFold_(t,e){e.classList.remove(s+t.get("fold")),t.set("fold","open"===t.get("fold")?"close":"open"),e.classList.add(s+t.get("fold"))}static getGroupSelectStyle(t){return["none","children","group"].indexOf(t)>=0?t:"children"}}return window.ol&&window.ol.control&&(window.ol.control.LayerSwitcher=r),r}(y("4DafG"),y("ejLRd"),y("3VGVQ"));var lo={};lo=function(t){t="default"in t?t.default:t;class e extends t{constructor(t){var i=t||{};void 0===i.autoPan&&(i.autoPan={animation:{duration:250}});var s=document.createElement("div");i.element=s,super(i),this.container=s,this.container.className="ol-popup",this.closer=document.createElement("a"),this.closer.className="ol-popup-closer",this.closer.href="#",this.container.appendChild(this.closer);var r=this;this.closer.addEventListener("click",function(t){r.container.style.display="none",r.closer.blur(),t.preventDefault()},!1),this.content=document.createElement("div"),this.content.className="ol-popup-content",this.container.appendChild(this.content),e.enableTouchScroll_(this.content)}show(t,e){return e instanceof HTMLElement?(this.content.innerHTML="",this.content.appendChild(e)):this.content.innerHTML=e,this.container.style.display="block",this.content.scrollTop=0,this.setPosition(t),this}static isTouchDevice_(){try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}}static enableTouchScroll_(t){if(e.isTouchDevice_()){var i=0;t.addEventListener("touchstart",function(t){i=this.scrollTop+t.touches[0].pageY},!1),t.addEventListener("touchmove",function(t){this.scrollTop=i-t.touches[0].pageY},!1)}}hide(){return this.container.style.display="none",this}isOpened(){return"block"==this.container.style.display}}return window.ol&&window.ol.Overlay&&(window.ol.Overlay.Popup=e),e}(y("VCbYw"));let ll=async()=>!1,lh=async()=>(await ll()&&await console.log("inDev",ll()),await ll()?"/":"/cartographie.html"),lu=async t=>{let e=await new URL(location.href);return await ll()&&(await console.log("pathname",t),await console.log("url.pathname",e.pathname),await console.log("mustAddLinkInteraction ",e.pathname===t)),e.pathname===t},ld=async t=>{try{return await new URL(t),!0}catch(t){return!1}},lc=(t,e=12)=>{let i,s;if(null==t)return"";let r=String(t).trim();if(!r)return"";if(r.includes("\n")||r.length<=e)return r;let n=[" ","-","_","/","–","—"],a=Math.floor(r.length/2),o=-1,l=1/0;for(let t=1;t<r.length-1;t++){let e=r[t];if(!n.includes(e))continue;let i=Math.abs(t-a);i<l&&(l=i,o=t)}return(-1!==o?(i=r.slice(0,o).trim(),s=r.slice(o+1).trim()):(i=r.slice(0,e).trim(),s=r.slice(e).trim()),s)?i+"\n"+s:i};var ii=y("4DafG"),S=y("31ZqB"),v=y("eHnTw"),B=y("5dXmB"),K=y("kBSVF"),z=y("eJ4LZ"),w=y("iTTi2"),C=y("cw4dl"),I=y("bsgMw"),Q=y("jZquI");function lg(t,e,i,s,r,n,a){let o=new XMLHttpRequest;o.open("GET","function"==typeof t?t(i,s,r):t,!0),"arraybuffer"==e.getType()&&(o.responseType="arraybuffer"),o.withCredentials=!1,o.onload=function(t){if(!o.status||o.status>=200&&o.status<300){let t=e.getType();try{let s;"text"==t||"json"==t?s=o.responseText:"xml"==t?s=o.responseXML||o.responseText:"arraybuffer"==t&&(s=o.response),s?n(e.readFeatures(s,{extent:i,featureProjection:r}),e.readProjection(s)):a()}catch{a()}}else a()},o.onerror=a,o.send()}function lf(t,e){return function(i,s,r,n,a){lg(t,e,i,s,r,(t,e)=>{this.addFeatures(t),void 0!==n&&n(t)},()=>{this.changed(),void 0!==a&&a()})}}var to=y("eQaCk");function lp(t,e){return[[-1/0,-1/0,1/0,1/0]]}function l_(t,e){return[t]}var U=y("kKEgb"),K=y("kBSVF"),Q=y("jZquI"),to=y("eQaCk"),Q=y("jZquI");function lm(t,e,i,s){let r=[],n=(0,Q.createEmpty)();for(let a=0,o=i.length;a<o;++a){let o=i[a];n=(0,Q.createOrUpdateFromFlatCoordinates)(t,e,o[0],s),r.push((n[0]+n[2])/2,(n[1]+n[3])/2),e=o[o.length-1]}return r}var K=y("kBSVF"),H=y("a6roo");function ly(t,e,i,s,r,n,a){let o,l,h=(i-e)/s;if(1===h)o=e;else if(2===h)o=e,l=r;else if(0!==h){let n=t[e],a=t[e+1],h=0,u=[0];for(let r=e+s;r<i;r+=s){let e=t[r],i=t[r+1];h+=Math.sqrt((e-n)*(e-n)+(i-a)*(i-a)),u.push(h),n=e,a=i}let d=r*h,c=(0,K.binarySearch)(u,d);c<0?(l=(d-u[-c-2])/(u[-c-1]-u[-c-2]),o=e+(-c-2)*s):o=e+c*s}a=a>1?a:2,n=n||Array(a);for(let e=0;e<a;++e)n[e]=void 0===o?NaN:void 0===l?t[o+e]:(0,H.lerp)(t[o+e],t[o+s+e],l);return n}function lx(t,e,i,s,r,n){let a;if(i==e)return null;if(r<t[e+s-1])return n?((a=t.slice(e,e+s))[s-1]=r,a):null;if(t[i-1]<r)return n?((a=t.slice(i-s,i))[s-1]=r,a):null;if(r==t[e+s-1])return t.slice(e,e+s);let o=e/s,l=i/s;for(;o<l;){let e=o+l>>1;r<t[(e+1)*s-1]?l=e:o=e+1}let h=t[o*s-1];if(r==h)return t.slice((o-1)*s,(o-1)*s+s);let u=(r-h)/(t[(o+1)*s-1]-h);a=[];for(let e=0;e<s-1;++e)a.push((0,H.lerp)(t[(o-1)*s+e],t[o*s+e],u));return a.push(r),a}var K=y("kBSVF"),Q=y("jZquI"),H=y("a6roo");class lS extends eS{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){(0,K.extend)(this.flatCoordinates,t.getFlatCoordinates()),this.changed()}clone(){let t=new lS(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,s){if(s<(0,Q.closestSquaredDistanceXY)(this.getExtent(),t,e))return s;let r=this.flatCoordinates,n=this.stride;for(let a=0,o=r.length;a<o;a+=n){let o=(0,H.squaredDistance)(t,e,r[a],r[a+1]);if(o<s){s=o;for(let t=0;t<n;++t)i[t]=r[a+t];i.length=n}}return s}getCoordinates(){return eA(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){let e=this.flatCoordinates.length/this.stride;return t<0||e<=t?null:new ej(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){let t=this.flatCoordinates,e=this.layout,i=this.stride,s=[];for(let r=0,n=t.length;r<n;r+=i){let n=new ej(t.slice(r,r+i),e);s.push(n)}return s}getType(){return"MultiPoint"}intersectsExtent(t){let e=this.flatCoordinates,i=this.stride;for(let s=0,r=e.length;s<r;s+=i){let i=e[s],r=e[s+1];if((0,Q.containsXY)(t,i,r))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=eR(this.flatCoordinates,0,t,this.stride),this.changed()}}var K=y("kBSVF"),Q=y("jZquI");class lv extends eS{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}appendCoordinate(t){(0,K.extend)(this.flatCoordinates,t),this.changed()}clone(){let t=new lv(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,s){return s<(0,Q.closestSquaredDistanceXY)(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(eM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),eC(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,s))}forEachSegment(t){return eV(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(e=void 0!==e&&e,lx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return eA(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return ly(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return nU(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){let e=[];return e.length=eF(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new lv(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return eq(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,this.getExtent())}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=eR(this.flatCoordinates,0,t,this.stride),this.changed()}}var K=y("kBSVF"),Q=y("jZquI");class lw extends eS{constructor(t,e,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(void 0!==e&&i)this.setFlatCoordinates(e,t),this.ends_=i;else{let e=[],i=[];for(let s=0,r=t.length;s<r;++s){let r=t[s];(0,K.extend)(e,r.getFlatCoordinates()),i.push(e.length)}let s=0===t.length?this.getLayout():t[0].getLayout();this.setFlatCoordinates(s,e),this.ends_=i}}appendLineString(t){(0,K.extend)(this.flatCoordinates,t.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){let t=new lw(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,s){return s<(0,Q.closestSquaredDistanceXY)(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(eP(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),eb(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,s))}getCoordinateAtM(t,e,i){return"XYM"!=this.layout&&"XYZM"!=this.layout||0===this.flatCoordinates.length?null:(e=void 0!==e&&e,i=void 0!==i&&i,function(t,e,
1i,s,r,n,a){let o;if(a)return lx(t,e,i[i.length-1],s,r,n);if(r<t[s-1])return n?((o=t.slice(0,s))[s-1]=r,o):null;if(t[t.length-1]<r)return n?((o=t.slice(t.length-s))[s-1]=r,o):null;for(let n=0,a=i.length;n<a;++n){let a=i[n];if(e!=a){if(r<t[e+s-1])return null;if(r<=t[a-1])return lx(t,e,a,s,r,!1);e=a}}return null}(this.flatCoordinates,0,this.ends_,this.stride,t,e,i))}getCoordinates(){return eL(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new lv(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){let t=this.flatCoordinates,e=this.ends_,i=this.layout,s=[],r=0;for(let n=0,a=e.length;n<a;++n){let a=e[n],o=new lv(t.slice(r,a),i);s.push(o),r=a}return s}getLength(){let t=this.ends_,e=0,i=0;for(let s=0,r=t.length;s<r;++s)i+=nU(this.flatCoordinates,e,t[s],this.stride),e=t[s];return i}getFlatMidpoints(){let t=[],e=this.flatCoordinates,i=0,s=this.ends_,r=this.stride;for(let n=0,a=s.length;n<a;++n){let a=s[n],o=ly(e,i,a,r,.5);(0,K.extend)(t,o),i=a}return t}getSimplifiedGeometryInternal(t){let e=[],i=[];return e.length=eG(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,i),new lw(e,"XY",i)}getType(){return"MultiLineString"}intersectsExtent(t){return function(t,e,i,s,r){for(let n=0,a=i.length;n<a;++n){if(eq(t,e,i[n],s,r))return!0;e=i[n]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);let i=eI(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}var K=y("kBSVF"),Q=y("jZquI");class lE extends eS{constructor(t,e,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){let s=t,r=[],n=[];for(let t=0,e=s.length;t<e;++t){let e=s[t],i=r.length,a=e.getEnds();for(let t=0,e=a.length;t<e;++t)a[t]+=i;(0,K.extend)(r,e.getFlatCoordinates()),n.push(a)}e=0===s.length?this.getLayout():s[0].getLayout(),t=r,i=n}void 0!==e&&i?(this.setFlatCoordinates(e,t),this.endss_=i):this.setCoordinates(t,e)}appendPolygon(t){let e;if(this.flatCoordinates){let i=this.flatCoordinates.length;(0,K.extend)(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let t=0,s=e.length;t<s;++t)e[t]+=i}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()}clone(){let t=this.endss_.length,e=Array(t);for(let i=0;i<t;++i)e[i]=this.endss_[i].slice();let i=new lE(this.flatCoordinates.slice(),this.layout,e);return i.applyProperties(this),i}closestPointXY(t,e,i,s){return s<(0,Q.closestSquaredDistanceXY)(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,i,s,r){for(let n=0,a=i.length;n<a;++n){let a=i[n];r=eP(t,e,a,s,r),e=a[a.length-1]}return r}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,i,s,r,n,a,o,l,h,u){u=u||[NaN,NaN];for(let d=0,c=i.length;d<c;++d){let c=i[d];h=eb(t,e,c,s,r,n,a,o,l,h,u),e=c[c.length-1]}return h}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,i,s))}containsXY(t,e){return function(t,e,i,s,r,n){if(0===i.length)return!1;for(let a=0,o=i.length;a<o;++a){let o=i[a];if(ez(t,e,o,s,r,n))return!0;e=o[o.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return function(t,e,i,s){let r=0;for(let n=0,a=i.length;n<a;++n){let a=i[n];r+=ew(t,e,a,s),e=a[a.length-1]}return r}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return void 0!==t?eJ(e=this.getOrientedFlatCoordinates().slice(),0,this.endss_,this.stride,t):e=this.flatCoordinates,eN(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){let t=lm(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=eW(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new lS(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){let t=this.flatCoordinates;eY(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=eJ(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){let e=[],i=[];
1return e.length=function(t,e,i,s,r,n,a,o){for(let l=0,h=i.length;l<h;++l){let h=i[l],u=[];a=eD(t,e,h,s,r,n,a,u),o.push(u),e=h[h.length-1]}return a}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,i),new lE(e,"XY",i)}getPolygon(t){let e;if(t<0||this.endss_.length<=t)return null;if(0===t)e=0;else{let i=this.endss_[t-1];e=i[i.length-1]}let i=this.endss_[t].slice(),s=i[i.length-1];if(0!==e)for(let t=0,s=i.length;t<s;++t)i[t]-=e;return new e$(this.flatCoordinates.slice(e,s),this.layout,i)}getPolygons(){let t=this.layout,e=this.flatCoordinates,i=this.endss_,s=[],r=0;for(let n=0,a=i.length;n<a;++n){let a=i[n].slice(),o=a[a.length-1];if(0!==r)for(let t=0,e=a.length;t<e;++t)a[t]-=r;let l=new e$(e.slice(r,o),t,a);s.push(l),r=o}return s}getType(){return"MultiPolygon"}intersectsExtent(t){return function(t,e,i,s,r){for(let n=0,a=i.length;n<a;++n){let a=i[n];if(eK(t,e,a,s,r))return!0;e=a[a.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);let i=eT(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{let t=i[i.length-1];this.flatCoordinates.length=0===t.length?0:t[t.length-1]}this.changed()}}let lM=ei();class lP{constructor(t,e,i,s,r,n){this.styleFunction,this.extent_,this.id_=n,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i||null,this.properties_=r,this.squaredTolerance_,this.stride_=s,this.simplifiedGeometry_}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_="Point"===this.type_?(0,Q.createOrUpdateFromCoordinate)(this.flatCoordinates_):(0,Q.createOrUpdateFromFlatCoordinates)(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){let t=(0,Q.getCenter)(this.getExtent());this.flatInteriorPoints_=eU(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){let t=function(t,e){let i,s=[],r=0,n=0;for(let a=0,o=e.length;a<o;++a){let o=e[a],l=eH(t,r,o,2);if(void 0===i&&(i=l),l===i)s.push(e.slice(n,a+1));else{if(0===s.length)continue;s[s.length-1].push(e[n])}n=a+1,r=o}return s}(this.flatCoordinates_,this.ends_),e=lm(this.flatCoordinates_,0,t,2);this.flatInteriorPoints_=eW(this.flatCoordinates_,0,t,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=ly(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];let t=this.flatCoordinates_,e=0,i=this.ends_;for(let s=0,r=i.length;s<r;++s){let r=i[s],n=ly(t,e,r,2,.5);(0,K.extend)(this.flatMidpoints_,n),e=r}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){let e=(t=tQ(t)).getExtent(),i=t.getWorldExtent();if(e&&i){let t=(0,Q.getHeight)(i)/(0,Q.getHeight)(e);el(lM,i[0],i[3],t,-t,0,0,0),ec(this.flatCoordinates_,0,this.flatCoordinates_.length,2,lM,this.flatCoordinates_)}}applyTransform(t){t(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){return new lP(this.type_,this.flatCoordinates_.slice(),this.ends_?.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=(0,to.memoizeOne)((t,e)=>{let i;if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);let s=this.simplifiedGeometry_.getFlatCoordinates();switch(this.type_){case"LineString":s.length=eF(s,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,s,0),i=[s.length];break;case"MultiLineString":i=[],s.length=eG(s,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,s,0,i);break;case"Polygon":i=[],s.length=eD(s,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),s,0,i)}return i&&(this.simplifiedGeometry_=new lP(this.type_,s,i,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}}lP.prototype.getFlatCoordinates=lP.prototype.getOrientedFlatCoordinates;var Q=y("jZquI"),U=y("kKEgb"),th=y("lVQul"),lC=class{constructor(t){this.rbush_=new(c(i3))(t),this.items_={}}insert(t,e){let i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[(0,th.getUid)(e)]=i}load(t,e){let i=Array(e.length);for(let s=0,r=e.length;s<r;s++){let r=t[s],n=e[s],a={minX:r[0],minY:r[1],maxX:r[2],maxY:r[3],value:n};i[s]=a,this.items_[(0,th.getUid)(n)]=a}this.rbush_.load(i)}remove(t){let e=(0,th.getUid)(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)}update(t,e){let i=this.items_[(0,th.getUid)(e)],s=[i.minX,i.minY,i.maxX,i.maxY];(0,Q.equals)(s,t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map(function(t){return t.value})}getInExtent(t){let e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(t){return t.value})}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let i;for(let s=0,r=t.length;s<r&&!(i=e(t[s]));s++);return i}isEmpty(){return(0,U.isEmpty)(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){let e=this.rbush_.toJSON();return(0,Q.createOrUpdate)(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){for(let e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]}},th=y("lVQul"),j=y("fnScq");class lb extends j.default{constructor(t){super(),this.projection=tQ(t.projection),this.attributions_=lR(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible??!0,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;let e=this;this.viewPromise_=new Promise(function(t,i){e.viewResolver=t,e.viewRejector=i})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=lR(t),this.changed()}setState(t){this.state_=t,this.changed()}}function lR(t){return t?"function"==typeof t?t:(Array.isArray(t)||(t=[t]),e=>t):null}var lI=lb,lT="addfeature",lA="removefeature";class lL extends w.default{constructor(t,e,i){super(t),this.feature=e,this.features=i}}var lN=class extends lI{constructor(t){let e,i;super({attributions:(t=t||{}).attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===t.wrapX||t.wrapX}),this.on,this.once,this.un,this.loader_=to.VOID,this.format_=t.format||null,this.overlaps_=void 0===t.overlaps||t.overlaps,this.url_=t.url,void 0!==t.loader?this.loader_=t.loader:void 0!==this.url_&&((0,z.assert)(this.format_,"`format` must be set when `url` is set"),this.loader_=lf(this.url_,this.format_)),this.strategy_=void 0!==t.strategy?t.strategy:lp;let s=void 0===t.useSpatialIndex||t.useSpatialIndex;this.featuresRtree_=s?new lC:null,this.loadedExtentsRtree_=new lC,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={}
1,this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(t.features)?i=t.features:t.features&&(i=(e=t.features).getArray()),s||void 0!==e||(e=new(0,S.default)(i)),void 0!==i&&this.addFeaturesInternal(i),void 0!==e&&this.bindFeaturesCollection_(e)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){let e=(0,th.getUid)(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);let i=t.getGeometry();if(i){let e=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(e,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new lL(lT,t))}setupChangeEvents_(t,e){e instanceof lP||(this.featureChangeKeys_[t]=[(0,I.listen)(e,C.default.CHANGE,this.handleFeatureChange_,this),(0,I.listen)(e,B.default.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let i=!0;if(void 0!==e.getId()){let t=String(e.getId());if(t in this.idIndex_)if(e instanceof lP){let s=this.idIndex_[t];s instanceof lP?Array.isArray(s)?s.push(e):this.idIndex_[t]=[s,e]:i=!1}else i=!1;else this.idIndex_[t]=e}return i&&((0,z.assert)(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){let e=[],i=[],s=[];for(let e=0,s=t.length;e<s;e++){let s=t[e],r=(0,th.getUid)(s);this.addToIndex_(r,s)&&i.push(s)}for(let t=0,r=i.length;t<r;t++){let r=i[t],n=(0,th.getUid)(r);this.setupChangeEvents_(n,r);let a=r.getGeometry();if(a){let t=a.getExtent();e.push(t),s.push(r)}else this.nullGeometryFeatures_[n]=r}if(this.featuresRtree_&&this.featuresRtree_.load(e,s),this.hasListener(lT))for(let t=0,e=i.length;t<e;t++)this.dispatchEvent(new lL(lT,i[t]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(lT,function(i){e||(e=!0,t.push(i.feature),e=!1)}),this.addEventListener(lA,function(i){e||(e=!0,t.remove(i.feature),e=!1)}),t.addEventListener(v.default.ADD,t=>{e||(e=!0,this.addFeature(t.element),e=!1)}),t.addEventListener(v.default.REMOVE,t=>{e||(e=!0,this.removeFeature(t.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(let t in this.featureChangeKeys_)this.featureChangeKeys_[t].forEach(I.unlistenByKey);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_)for(let t in this.featuresRtree_.forEach(t=>{this.removeFeatureInternal(t)}),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[t]);this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};let e=new lL("clear");this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){let i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,function(i){let s=i.getGeometry();if(s instanceof lP||s.intersectsCoordinate(t))return e(i)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(i){let s=i.getGeometry();if(s instanceof lP||s.intersectsExtent(t)){let t=e(i);if(t)return t}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),(0,U.isEmpty)(this.nullGeometryFeatures_)||(0,K.extend)(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){let e=[];return this.forEachFeatureAtCoordinateDirect(t,function(t){e.push(t)}),e}getFeaturesInExtent(t,e){return this.featuresRtree_?e&&e.canWrapX()&&this.getWrapX()?[].concat(...(0,Q.wrapAndSliceX)(t,e).map(t=>this.featuresRtree_.getInExtent(t))):this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){let i=t[0],s=t[1],r=null,n=[NaN,NaN],a=1/0,o=[-1/0,-1/0,1/0,1/0];return e=e||to.TRUE,this.featuresRtree_.forEachInExtent(o,function(t){if(e(t)){let e=t.getGeometry(),l=a;if((a=e instanceof lP?0:e.closestPointXY(i,s,n,a))<l){r=t;let e=Math.sqrt(a);o[0]=i-e,o[1]=s-e,o[2]=i+e,o[3]=s+e}}}),r}getExtent(t){return this.featuresRtree_?.getExtent(t)??null}getFeatureById(t){let e=this.idIndex_[t.toString()];return void 0!==e?e:null}getFeatureByUid(t){let e=this.uidIndex_[t];return void 0!==e?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){let e=t.target,i=(0,th.getUid)(e),s=e.getGeometry();if(s){let t=s.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(t,e)):this.featuresRtree_&&this.featuresRtree_.update(t,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);let r=e.getId();if(void 0!==r){let t=r.toString();this.idIndex_[t]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[t]=e)}
1else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new lL("changefeature",e))}hasFeature(t){let e=t.getId();return void 0!==e?e in this.idIndex_:(0,th.getUid)(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&(0,U.isEmpty)(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()}loadFeatures(t,e,i){let s=this.loadedExtentsRtree_,r=this.strategy_(t,e,i);for(let t=0,n=r.length;t<n;++t){let n=r[t];s.forEachInExtent(n,function(t){return(0,Q.containsExtent)(t.extent,n)})||(++this.loadingExtentsCount_,this.dispatchEvent(new lL("featuresloadstart")),this.loader_.call(this,n,e,i,t=>{--this.loadingExtentsCount_,this.dispatchEvent(new lL("featuresloadend",void 0,t))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new lL("featuresloaderror"))}),s.insert(n,{extent:n.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){let e=this.loadedExtentsRtree_,i=e.forEachInExtent(t,function(e){if((0,Q.equals)(e.extent,t))return e});i&&e.remove(i)}removeFeatures(t){let e=!1;for(let i=0,s=t.length;i<s;++i)e=this.removeFeatureInternal(t[i])||e;e&&this.changed()}removeFeature(t){!t||this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){let e=(0,th.getUid)(t);if(!(e in this.uidIndex_))return!1;e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t);let i=this.featureChangeKeys_[e];i?.forEach(I.unlistenByKey),delete this.featureChangeKeys_[e];let s=t.getId();if(void 0!==s){let e=s.toString(),i=this.idIndex_[e];i===t?delete this.idIndex_[e]:Array.isArray(i)&&(i.splice(i.indexOf(t),1),1===i.length&&(this.idIndex_[e]=i[0]))}return delete this.uidIndex_[e],this.hasListener(lA)&&this.dispatchEvent(new lL(lA,t)),!0}removeFromIdIndex_(t){for(let e in this.idIndex_)if(this.idIndex_[e]===t){delete this.idIndex_[e];break}}setLoader(t){this.loader_=t}setUrl(t){(0,z.assert)(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader(lf(t,this.format_))}setOverlaps(t){this.overlaps_=t,this.changed()}};let lF=new rT({text:"none set",font:"bold 20px Arial",placement:"line",fill:new rw({color:"#FFF"}),stroke:new rP({color:"#000000",width:3}),offsetX:-45,offsetY:0,rotation:0}),lG={basicStyleDistanceAccuracy:new rC({stroke:new rP({color:"rgb(255,0,51)",width:1}),fill:new rw({color:"rgba(0, 0, 255, 0.2)"})}),basicStyleDistanceOtherCircles:new rC({stroke:new rP({color:"rgba(29,105,239,0.61)",width:3}),fill:new rw({color:"rgba(250,250,249,0.075)"}),text:lF}),pointPositionCircle:new rC({image:new rv({radius:10,fill:new rw({color:"rgba(96,194,243,0.8)"})})})},lO=new lN,lD=new ag({style:function(t){let e=t.get("name");if("Accuracy"===e)return t.set("basicStyleDistanceAccuracy"),lG.basicStyleDistanceAccuracy;if("PointPosition"===e)return t.set("pointPositionCircle"),lG.pointPositionCircle;if("Distance150"===e)return console.log("feature",t),lG.basicStyleDistanceOtherCircles.getText().setText("150m"),t.set("basicStyleDistanceOtherCircles"),lG.basicStyleDistanceOtherCircles;if("Distance125"===e)return console.log("feature",t),lG.basicStyleDistanceOtherCircles.getText().setText("125m"),t.set("basicStyleDistanceOtherCircles"),lG.basicStyleDistanceOtherCircles;if("Distance100"===e)return console.log("feature",t),lG.basicStyleDistanceOtherCircles.getText().setText("100m"),t.set("basicStyleDistanceOtherCircles"),lG.basicStyleDistanceOtherCircles;if("Distance75"===e)return console.log("feature",t),lG.basicStyleDistanceOtherCircles.getText().setText("75m"),t.set("basicStyleDistanceOtherCircles"),lG.basicStyleDistanceOtherCircles;console.log("feature error :",t)},source:lO});lD.set("id","geolocatelayer");let lk=document.createElement("div");async function lj(){await navigator.geolocation.getCurrentPosition(async function(t){await ll()&&(await console.log("POS LON :"+t.coords.longitude),await console.log("POS LAT :"+t.coords.latitude),await console.log("POS ACC :"+t.coords.accuracy),await console.log("POS ALT :"+t.coords.altitude),await console.log("POS ALT ACC :"+t.coords.altitudeAccuracy));let e=[t.coords.longitude,t.coords.latitude],i=await e0(e,t.coords.accuracy),s=await e0(e,75),r=await e0(e,100),n=await e0(e,125),a=await e0(e,150);await lO.clear(!0);let o=[await new nf({geometry:await a.transform("EPSG:4326",await cu.getView().getProjection()),name:"Distance150"}),await new nf({geometry:await n.transform("EPSG:4326",await cu.getView().getProjection()),name:"Distance125"}),await new nf({geometry:await r.transform("EPSG:4326",await cu.getView().getProjection()),name:"Distance100"}),await new nf({geometry:await s.transform("EPSG:4326",await cu.getView().getProjection()),name:"Distance75"}),await new nf({geometry:await i.transform("EPSG:4326",await cu.getView().getProjection()),name:"Accuracy"})],l=await new nf({geometry:new ej(t2(e)),name:"PointPosition"});await l.set("precision",t.coords.accuracy,!1),o.push(l),await lO.addFeatures(o)},async function(t){await ll()&&await console.log(`ERROR: ${t.message}`)},{enableHighAccuracy:!0})}lk.className="ol-control ol-unselectable ol-locate-custom",lk.innerHTML='<button title="Aller à ma position GPS" type="button" class="ol-locate-custom">◎</button>',lk.addEventListener("click",async function(){await lj(),lO.isEmpty()||await cu.getView().fit(lO.getExtent(),{maxZoom:17,duration:500})});let lB=new(0,ii.default)({element:lk});var Q=y("jZquI");let lz=["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21"],lU=[156543.03392804103,78271.5169640205,39135.75848201024,19567.87924100
15125,9783.939620502562,4891.969810251281,2445.9849051256406,1222.9924525628203,611.4962262814101,305.74811314070485,152.87405657035254,76.43702828517625,38.218514142588134,19.109257071294063,9.554628535647034,4.777314267823517,2.3886571339117584,1.1943285669558792,.5971642834779396,.29858214173896974,.14929107086948493,.07464553543474241],lW=[-1983693.7581,4679169.1235,2683245.4409,7056666.4513],lV=["C","D","I","N","X","EO","NC"],lq=["A","B"],lZ=["EPSG:2154","+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"],lK="lon ⇄ : {x}, lat ⇅ : {y}",lH=new e6({maxZoom:19,minZoom:6,center:(0,Q.getCenter)(lW),zoom:6,enableRotation:!1});var C=y("cw4dl"),R=y("9LzRi"),th=y("lVQul");class lX extends R.default{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.key="",this.transition_=void 0===i.transition?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(C.default.CHANGE)}release(){this.setState(4)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(4!==this.state){if(3!==this.state&&this.state>t)throw Error("Tile load sequence violation");this.state=t,this.changed()}}load(){(0,th.abstract)()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;let s=e-i+1e3/60;return s>=this.transition_?1:ts(s/this.transition_)}inTransition(t){return!!this.transition_&&-1!==this.transitionStarts_[t]}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}disposeInternal(){this.release(),super.disposeInternal()}}var lY=lX,ie=y("cgxQK");function lQ(t){return t instanceof Image||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageBitmap?t:null}let lJ=Error("disposed"),l$=[256,256];var l0=class extends lY{constructor(t){super(t.tileCoord,0,{transition:t.transition,interpolate:t.interpolate}),this.loader_=t.loader,this.data_=null,this.error_=null,this.size_=t.size||null,this.controller_=t.controller||null}getSize(){if(this.size_)return this.size_;let t=lQ(this.data_);return t?[t.width,t.height]:l$}getData(){return this.data_}getError(){return this.error_}load(){if(0!==this.state&&3!==this.state)return;this.state=1,this.changed();let t=this;this.loader_().then(function(e){t.data_=e,t.state=2,t.changed()}).catch(function(e){t.error_=e,t.state=3,t.changed()})}disposeInternal(){this.controller_&&(this.controller_.abort(lJ),this.controller_=null),super.disposeInternal()}},ie=y("cgxQK"),T=y("lW8xZ"),l1=class extends lY{constructor(t,e,i,s,r,n){super(t,e,n),this.crossOrigin_=s?.crossOrigin,this.referrerPolicy_=s?.referrerPolicy,this.src_=i,this.key=i,this.image_,T.WORKER_OFFSCREEN_CANVAS?this.image_=new OffscreenCanvas(1,1):(this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_),void 0!==this.referrerPolicy_&&(this.image_.referrerPolicy=this.referrerPolicy_)),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(t){this.image_=t,this.state=2,this.unlistenImage_(),this.changed()}getCrossOrigin(){return this.crossOrigin_}getReferrerPolicy(){return this.referrerPolicy_}handleImageError_(){let t;this.state=3,this.unlistenImage_(),this.image_=((t=(0,ie.createCanvasContext2D)(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()}handleImageLoad_(){if(T.WORKER_OFFSCREEN_CANVAS)this.state=2;else{let t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=2:this.state=4}this.unlistenImage_(),this.changed()}load(){if(3==this.state&&(this.state=0,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_),void 0!==this.referrerPolicy_&&(this.image_.referrerPolicy=this.referrerPolicy_)),0==this.state){var t,e,i;let s,r,n,a;this.state=1,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=(t=this.image_,e=this.handleImageLoad_.bind(this),i=this.handleImageError_.bind(this),s=!0,r=!1,n=!1,a=[(0,I.listenOnce)(t,C.default.LOAD,function(){n=!0,r||e()})],t.src&&T.IMAGE_DECODE?(r=!0,t.decode().then(function(){s&&e()}).catch(function(t){s&&(n?e():i())})):a.push((0,I.listenOnce)(t,C.default.ERROR,i)),function(){s=!1,a.forEach(I.unlistenByKey)})}}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}disposeInternal(){this.unlistenImage_(),this.image_=null,super.disposeInternal()}};class l2{constructor(t,e,i,s){this.minX=t,this.maxX=e,this.minY=i,this.maxY=s}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(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)}
1getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function l4(t,e,i,s,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=s,r):new l2(t,e,i,s)}var K=y("kBSVF"),Q=y("jZquI"),ie=y("cgxQK"),C=y("cw4dl"),I=y("bsgMw"),Q=y("jZquI"),H=y("a6roo"),ie=y("cgxQK"),Q=y("jZquI"),H=y("a6roo");let l3=[];function l8(t,e,i,s,r){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(s,r),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,s)+1,Math.max(i,r)),t.restore()}function l5(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function l6(t,e,i,s){let r=t6(i,e,t),n=tJ(e,s,i),a=e.getMetersPerUnit();void 0!==a&&(n*=a);let o=t.getMetersPerUnit();void 0!==o&&(n/=o);let l=t.getExtent();if(!l||(0,Q.containsCoordinate)(l,r)){let e=tJ(t,n,r)/n;isFinite(e)&&e>0&&(n/=e)}return n}var Q=y("jZquI"),H=y("a6roo"),l7=class{constructor(t,e,i,s,r,n,a){this.sourceProj_=t,this.targetProj_=e;let o={},l=a?t1(t=>ea(a,t6(t,this.targetProj_,this.sourceProj_))):t5(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){let e=t[0]+"/"+t[1];return o[e]||(o[e]=l(t)),o[e]},this.maxSourceExtent_=s,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&(0,Q.getWidth)(s)>=(0,Q.getWidth)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,Q.getWidth)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,Q.getWidth)(this.targetProj_.getExtent()):null;let h=(0,Q.getTopLeft)(i),u=(0,Q.getTopRight)(i),d=(0,Q.getBottomRight)(i),c=(0,Q.getBottomLeft)(i),g=this.transformInv_(h),f=this.transformInv_(u),p=this.transformInv_(d),_=this.transformInv_(c),m=10+(n?Math.max(0,Math.ceil(Math.log2((0,Q.getArea)(i)/(n*n*65536)))):0);if(this.addQuad_(h,u,d,c,g,f,p,_,m),this.wrapsXInSource_){let t=1/0;this.triangles_.forEach(function(e,i,s){t=Math.min(t,e.source[0][0],e.source[1][0],e.source[2][0])}),this.triangles_.forEach(e=>{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){let i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);let s=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-s<this.sourceWorldWidth_/2&&(e.source=i)}})}o={}}addTriangle_(t,e,i,s,r,n){this.triangles_.push({source:[s,r,n],target:[t,e,i]})}addQuad_(t,e,i,s,r,n,a,o,l){let h=(0,Q.boundingExtent)([r,n,a,o]),u=this.sourceWorldWidth_?(0,Q.getWidth)(h)/this.sourceWorldWidth_:null,d=this.sourceWorldWidth_,c=this.sourceProj_.canWrapX()&&u>.5&&u<1,g=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){let r=(0,Q.boundingExtent)([t,e,i,s]);g=(0,Q.getWidth)(r)/this.targetWorldWidth_>.25||g}!c&&this.sourceProj_.isGlobal()&&u&&(g=u>.25||g)}if(!g&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3])&&!(0,Q.intersects)(h,this.maxSourceExtent_))return;let f=0;if(!g&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(n[0])||!isFinite(n[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(o[0])||!isFinite(o[1]))){if(l>0)g=!0;else if(1!=(f=8*!(isFinite(r[0])&&isFinite(r[1]))+4*!(isFinite(n[0])&&isFinite(n[1]))+2*!(isFinite(a[0])&&isFinite(a[1]))+ +!(isFinite(o[0])&&isFinite(o[1])))&&2!=f&&4!=f&&8!=f)return}if(l>0){if(!g){let e,s=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(s);e=c?((0,H.modulo)(r[0],d)+(0,H.modulo)(a[0],d))/2-(0,H.modulo)(n[0],d):(r[0]+a[0])/2-n[0];let o=(r[1]+a[1])/2-n[1];g=e*e+o*o>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){let h=[(e[0]+i[0])/2,(e[1]+i[1])/2],u=this.transformInv_(h),d=[(s[0]+t[0])/2,(s[1]+t[1])/2],c=this.transformInv_(d);this.addQuad_(t,e,h,d,r,n,u,c,l-1),this.addQuad_(d,h,i,s,c,u,a,o,l-1)}else{let h=[(t[0]+e[0])/2,(t[1]+e[1])/2],u=this.transformInv_(h),d=[(i[0]+s[0])/2,(i[1]+s[1])/2],c=this.transformInv_(d);this.addQuad_(t,h,d,s,r,u,c,o,l-1),this.addQuad_(h,e,i,d,u,n,a,c,l-1)}return}}
1if(c){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}(11&f)==0&&this.addTriangle_(t,i,s,r,a,o),(14&f)==0&&this.addTriangle_(t,i,e,r,a,n),f&&((13&f)==0&&this.addTriangle_(e,s,t,n,o,r),(7&f)==0&&this.addTriangle_(e,s,i,n,o,a))}calculateSourceExtent(){let t=(0,Q.createEmpty)();return this.triangles_.forEach(function(e,i,s){let r=e.source;(0,Q.extendCoordinate)(t,r[0]),(0,Q.extendCoordinate)(t,r[1]),(0,Q.extendCoordinate)(t,r[2])}),t}getTriangles(){return this.triangles_}},l9=class extends lY{constructor(t,e,i,s,r,n,a,o,l,h,u,d){let c;super(r,0,d),this.renderEdges_=void 0!==u&&u,this.pixelRatio_=a,this.gutter_=o,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=s,this.wrappedTileCoord_=n||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=t.canWrapX()?t.getExtent():void 0;let g=s.getTileCoordExtent(this.wrappedTileCoord_),f=this.targetTileGrid_.getExtent(),p=this.sourceTileGrid_.getExtent(),_=f?(0,Q.getIntersection)(g,f):g;if(0===(0,Q.getArea)(_)){this.state=4;return}let m=t.getExtent();m&&(p=p?(0,Q.getIntersection)(p,m):m);let y=s.getResolution(this.wrappedTileCoord_[0]),x=((!isFinite(c=l6(t,i,(0,Q.getCenter)(_),y))||c<=0)&&(0,Q.forEachCorner)(_,function(e){return isFinite(c=l6(t,i,e,y))&&c>0}),c);if(!isFinite(x)||x<=0||(this.triangulation_=new l7(t,i,_,p,x*(void 0!==h?h:.5),y),0===this.triangulation_.getTriangles().length)){this.state=4;return}this.sourceZ_=e.getZForResolution(x);let S=this.triangulation_.calculateSourceExtent();if(p&&(t.canWrapX()?(S[1]=(0,H.clamp)(S[1],p[1],p[3]),S[3]=(0,H.clamp)(S[3],p[1],p[3])):S=(0,Q.getIntersection)(S,p)),(0,Q.getArea)(S)){let i=0,s=0;t.canWrapX()&&(i=(0,Q.getWidth)(m),s=Math.floor((S[0]-m[0])/i)),(0,Q.wrapAndSliceX)(S.slice(),t,!0).forEac
1h(t=>{let r=e.getTileRangeForExtentAndZ(t,this.sourceZ_);for(let t=r.minX;t<=r.maxX;t++)for(let e=r.minY;e<=r.maxY;e++){let r=s*i;this.sourceTiles_.push({getTile:()=>l(this.sourceZ_,t,e,a),offset:r})}++s}),0===this.sourceTiles_.length&&(this.state=4)}else this.state=4}getImage(){return this.canvas_}reproject_(){let t=[];if(this.sourceTiles_.forEach(e=>{let i=e.tile;if(i&&2==i.getState()){let s=this.sourceTileGrid_.getTileCoordExtent(i.tileCoord);s[0]+=e.offset,s[2]+=e.offset;let r=this.clipExtent_?.slice();r&&(r[0]+=e.offset,r[2]+=e.offset),t.push({extent:s,clipExtent:r,image:i.getImage()})}}),this.sourceTiles_.length=0,0===t.length)this.state=3;else{let e=this.wrappedTileCoord_[0],s=this.targetTileGrid_.getTileSize(e),r="number"==typeof s?s:s[0],n="number"==typeof s?s:s[1],a=this.targetTileGrid_.getResolution(e),o=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=function(t,e,s,r,n,a,o,l,h,u,d,c){let g,f=(0,ie.createCanvasContext2D)(Math.round(s*t),Math.round(s*e),l3);if(c||(f.imageSmoothingEnabled=!1),0===h.length)return f.canvas;function p(t){return Math.round(t*s)/s}f.scale(s,s),f.globalCompositeOperation="lighter";let _=(0,Q.createEmpty)();h.forEach(function(t,e,i){(0,Q.extend)(_,t.extent)});let m=s/r,y=(c?1:1.0000000596046448)/m;g=(0,ie.createCanvasContext2D)(Math.round((0,Q.getWidth)(_)*m),Math.round((0,Q.getHeight)(_)*m),l3),c||(g.imageSmoothingEnabled=!1),h.forEach(function(t,e,i){if(t.image.width>0&&t.image.height>0){if(t.clipExtent){g.save();let e=(t.clipExtent[0]-_[0])*m,i=-(t.clipExtent[3]-_[3])*m,s=(0,Q.getWidth)(t.clipExtent)*m,r=(0,Q.getHeight)(t.clipExtent)*m;g.rect(c?e:Math.round(e),c?i:Math.round(i),c?s:Math.round(e+s)-Math.round(e),c?r:Math.round(i+r)-Math.round(i)),g.clip()}let e=(t.extent[0]-_[0])*m,i=-(t.extent[3]-_[3])*m,s=(0,Q.getWidth)(t.extent)*m,r=(0,Q.getHeight)(t.extent)*m;g.drawImage(t.image,u,u,t.image.width-2*u,t.image.height-2*u,c?e:Math.round(e),c?i:Math.round(i),c?s:Math.round(e+s)-Math.round(e),c?r:Math.round(i+r)-Math.round(i)),t.clipExtent&&g.restore()}});let x=(0,Q.getTopLeft)(o);
1return l.getTriangles().forEach(function(t,e,s){let r,n=t.source,o=t.target,l=n[0][0],u=n[0][1],d=n[1][0],m=n[1][1],S=n[2][0],v=n[2][1],w=p((o[0][0]-x[0])/a),E=p(-(o[0][1]-x[1])/a),M=p((o[1][0]-x[0])/a),P=p(-(o[1][1]-x[1])/a),C=p((o[2][0]-x[0])/a),b=p(-(o[2][1]-x[1])/a),R=l,I=u;l=0,u=0;let T=[[d-=R,m-=I,0,0,M-w],[S-=R,v-=I,0,0,C-w],[0,0,d,m,P-E],[0,0,S,v,b-E]],A=(0,H.solveLinearSystem)(T);if(A){if(f.save(),f.beginPath(),function(){if(void 0===i){let t=(0,ie.createCanvasContext2D)(6,6,l3);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",l8(t,4,5,4,0),l8(t,4,5,0,5);let e=t.getImageData(0,0,3,3).data;i=l5(e,0)||l5(e,4)||l5(e,8),(0,ie.releaseCanvas)(t),l3.push(t.canvas)}return i}()||!c){f.moveTo(M,P);let t=w-M,e=E-P;for(let i=0;i<4;i++)f.lineTo(M+p((i+1)*t/4),P+p(i*e/3)),3!=i&&f.lineTo(M+p((i+1)*t/4),P+p((i+1)*e/3));f.lineTo(C,b)}else f.moveTo(M,P),f.lineTo(w,E),f.lineTo(C,b);if(f.clip(),f.transform(A[0],A[2],A[1],A[3],w,E),f.translate(_[0]-R,_[3]-I),g)r=g.canvas,f.scale(y,-y);else{let t=h[0],e=t.extent;r=t.image,f.scale((0,Q.getWidth)(e)/r.width,-(0,Q.getHeight)(e)/r.height)}f.drawImage(r,0,0),f.restore()}}),g&&((0,ie.releaseCanvas)(g),l3.push(g.canvas)),d&&(f.save(),f.globalCompositeOperation="source-over",f.strokeStyle="black",f.lineWidth=1,l.getTriangles().forEac
1h(function(t,e,i){let s=t.target,r=(s[0][0]-x[0])/a,n=-(s[0][1]-x[1])/a,o=(s[1][0]-x[0])/a,l=-(s[1][1]-x[1])/a,h=(s[2][0]-x[0])/a,u=-(s[2][1]-x[1])/a;f.beginPath(),f.moveTo(o,l),f.lineTo(r,n),f.lineTo(h,u),f.closePath(),f.stroke()}),f.restore()),f.canvas}(r,n,this.pixelRatio_,o,this.sourceTileGrid_.getExtent(),a,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=2}this.changed()}load(){for(let t of this.sourceTiles_)t.tile=t.getTile();if(0==this.state){this.state=1,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:e})=>{let i=e.getState();if(0==i||1==i){t++;let i=(0,I.listen)(e,C.default.CHANGE,s=>{let r=e.getState();(2==r||3==r||4==r)&&((0,I.unlistenByKey)(i),0==--t&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(i)}}),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:t},e,i){0==t.getState()&&t.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(I.unlistenByKey),this.sourcesListenerKeys_=null}release(){this.canvas_&&((0,ie.releaseCanvas)(this.canvas_.getContext("2d")),l3.push(this.canvas_),this.canvas_=null),this.sourceTiles_.length=0,super.release()}},iN=y("jjfV9"),z=y("eJ4LZ"),ht=class{constructor(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}deleteOldest(){let t=this.pop();t instanceof iN.default&&t.dispose()}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.deleteOldest()}clear(){for(;this.oldest_;)this.deleteOldest()}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){let i=this.entries_[t];return(0,z.assert)(void 0!==i,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){let e=this.entries_[t];return(0,z.assert)(void 0!==e,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){let t,e=Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.key_;return e}getValues(){let t,e=Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.value_;return e}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){return this.entries_[t]?.value_}pop(){let t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){(0,z.assert)(!(t in this.entries_),"Tried to set a value for a key that is used already");let i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}};function he(t,e,i,s){return void 0!==s?(s[0]=t,s[1]=e,s[2]=i,s):[t,e,i]}function hi(t,e,i,s,r){return`${(0,th.getUid)(t)},${e},${i+"/"+s+"/"+r}`}var th=(y("lVQul"),y("lVQul"));function hs(t,e,i){if(!(i in t))return t[i]=new Set([e]),!0;let s=t[i],r=s.has(e);
1return r||s.add(e),!r}function hr(t,e){var i,s;let r=t.layerStatesArray[t.layerIndex];r.extent&&(e=(0,Q.getIntersection)(e,(i=r.extent,s=t.viewState.projection,i)));let n=r.layer.getRenderSource();if(!n.getWrapX()){let i=n.getTileGridForProjection(t.viewState.projection).getExtent();i&&(e=(0,Q.getIntersection)(e,i))}return e}var hn=class extends ad{constructor(t,e){super(t),e=e||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=(0,Q.createEmpty)(),this.tempTileRange_=new l2(0,0,0,0),this.tempTileCoord_=he(0,0,0);let i=void 0!==e.cacheSize?e.cacheSize:512;this.tileCache_=new ht(i),this.sourceTileCache_=null,this.maxStaleKeys=.5*i}getTileCache(){return this.tileCache_}getSourceTileCache(){return this.sourceTileCache_||(this.sourceTileCache_=new ht(512)),this.sourceTileCache_}getOrCreateTile(t,e,i,s){let r,n=this.tileCache_,a=this.getLayer().getSource(),o=hi(a,a.getKey(),t,e,i);if(n.containsKey(o))r=n.get(o);else{let l=s.viewState.projection,h=a.getProjection();if(!(r=a.getTile(t,e,i,s.pixelRatio,l,!h||t4(h,l)?void 0:this.getSourceTileCache())))return null;n.set(o,r)}return r}getTile(t,e,i,s){let r=this.getOrCreateTile(t,e,i,s);return r||null}getData(t){let e=this.frameState;if(!e)return null;let i=this.getLayer(),s=ea(e.pixelToCoordinateTransform,t.slice()),r=i.getExtent();if(r&&!(0,Q.containsCoordinate)(r,s))return null;let n=e.viewState,a=i.getRenderSource(),o=a.getTileGridForProjection(n.projection),l=a.getTilePixelRatio(e.pixelRatio);for(let t=o.getZForResolution(n.resolution);t>=o.getMinZoom();--t){let i,r=o.getTileCoordForCoordAndZ(s,t),h=this.getTile(t,r[1],r[2],e);if(!h||2!==h.getState())continue;let u=o.getOrigin(t),d=sg(o.getTileSize(t)),c=o.getResolution(t);if(h instanceof l1||h instanceof l9)i=h.getImage();else if(!(h instanceof l0))continue;else if(!(i=lQ(h.getData())))continue;let g=Math.floor(l*((s[0]-u[0])/c-r[1]*d[0])),f=Math.floor(l*((u[1]-s[1])/c-r[2]*d[1])),p=Math.round(l*a.getGutterForProjection(n.projection));return this.getImageData(i,g+p,f+p)}return null}prepareFrame(t){this.renderedProjection?t.viewState.projection!==this.renderedProjection&&(this.tileCache_.clear(),this.renderedProjection=t.viewState.projection):this.renderedProjection=t.viewState.projection;let e=this.getLayer().getSource();if(!e)return!1;let i=e.getRevision();return this.renderedSourceRevision_?this.renderedSourceRevision_!==i&&(this.renderedSourceRevision_=i,this.renderedSourceKey_===e.getKey()&&(this.tileCache_.clear(),this.sourceTileCache_?.clear())):this.renderedSourceRevision_=i,!0}enqueueTilesForNextExtent(){return!0}enqueueTiles(t,e,i,s,r){let n=t.viewState,a=this.getLayer(),o=a.getRenderSource(),l=o.getTileGridForProjection(n.projection),h=(0,th.getUid)(o);h in t.wantedTiles||(t.wantedTiles[h]={});let u=t.wantedTiles[h],d=a.getMapInternal(),c=Math.max(i-r,l.getMinZoom(),l.getZForResolution(Math.min(a.getMaxResolution(),d?d.getView().getResolutionForZoom(Math.max(a.getMinZoom(),0)):l.getResolution(0)),o.zDirection)),g=n.rotation,f=g?(0,Q.getRotatedViewport)(n.center,n.resolution,g,t.size):void 0;for(let r=i;r>=c;--r){let i=l.getTileRangeForExtentAndZ(e,r,this.tempTileRange_),n=l.getResolution(r);for(let e=i.minX;e<=i.maxX;++e)for(let a=i.minY;a<=i.maxY;++a){if(g&&!l.tileCoordIntersectsViewport([r,e,a],f))continue;let i=this.getTile(r,e,a,t);if(!i||!hs(s,i,r))continue;let o=i.getKey();if(u[o]=!0,0===i.getState()&&!t.tileQueue.isKeyQueued(o)){let s=he(r,e,a,this.tempTileCoord_);t.tileQueue.enqueue([i,h,l.getTileCoordCenter(s),n])}}}}findStaleTile_(t,e){let i=this.tileCache_,s=t[0],r=t[1],n=t[2],a=this.getStaleKeys();for(let t=0;t<a.length;++t){let o=hi(this.getLayer().getSource(),a[t],s,r,n);if(i.containsKey(o)){let t=i.peek(o);if(2===t.getState())return t.endTransition((0,th.getUid)(this)),hs(e,t,s),!0}}return!1}findAltTiles_(t,e,i,s){let r=t.getTileRangeForTileCoordAndZ(e,i,this.tempTileRange_);if(!r)return!1;let n=!0,a=this.tileCache_,o=this.getLayer().getRenderSource(),l=o.getKey();for(let t=r.minX;t<=r.maxX;++t)for(let e=r.minY;e<=r.maxY;++e){let r=hi(o,l,i,t,e),h=!1;if(a.containsKey(r)){let t=a.peek(r);2===t.getState()&&(hs(s,t,i),h=!0)}h||(n=!1)}return n}renderFrame(t,e){let i;this.renderComplete=!0;let s=t.layerStatesArray[t.layerIndex],r=t.viewState,n=r.projection,a=r.resolution,o=r.center,l=t.pixelRatio,h=this.getLayer(),u=h.getSource(),d=u.getTileGridForProjection(n),c=d.getZForResolution(a,u.zDirection),g=d.getResolution(c),f=u.getKey();this.renderedSourceKey_?this.renderedSourceKey_!==f&&(this.prependStaleKey(this.renderedSourceKey_),this.renderedSourceKey_=f):this.renderedSourceKey_=f;let p=t.extent,_=u.getTilePixelRatio(l);this.prepareContainer(t,e);let m=this.context.canvas.width,y=this.context.canvas.height,x=s.extent&&s.extent;x&&(p=(0,Q.getIntersection)(p,s.extent));let S=g*m/2/_,v=g*y/2/_,w=[o[0]-S,o[1]-v,o[0]+S,o[1]+v],E={};this.renderedTiles.length=0;let M=h.getPreload();
1if(t.nextExtent&&this.enqueueTilesForNextExtent()){let e=d.getZForResolution(r.nextResolution,u.zDirection),i=hr(t,t.nextExtent);this.enqueueTiles(t,i,e,E,M)}let P=hr(t,p);if(this.enqueueTiles(t,P,c,E,0),M>0&&setTimeout(()=>{this.enqueueTiles(t,P,c-1,E,M-1)},0),!(c in E))return this.container;let C=(0,th.getUid)(this),b=t.time;for(let e of E[c]){let i=e.getState();if(4===i)continue;let s=e.tileCoord;if(2===i&&1===e.getAlpha(C,b)){e.endTransition(C);continue}if(3!==i&&(this.renderComplete=!1),this.findStaleTile_(s,E)){!function(t,e,i){let s=t[i];s&&s.delete(e)}(E,e,c),t.animate=!0;continue}if(this.findAltTiles_(d,s,c+1,E))continue;let r=d.getMinZoom();for(let t=c-1;t>=r&&!this.findAltTiles_(d,s,t,E);--t);}let R=g/a*l/_,I=this.getRenderContext(t);el(this.tempTransform,m/2,y/2,R,R,0,-m/2,-y/2),s.extent&&this.clipUnrotated(I,t,x),u.getInterpolate()||(I.imageSmoothingEnabled=!1),this.preRender(I,t);let T=Object.keys(E).map(Number);T.sort(K.ascending);let A=[],L=[];for(let e=T.length-1;e>=0;--e){let s=T[e],r=u.getTilePixelSize(s,l,n),a=d.getResolution(s)/g,o=r[0]*a*R,h=r[1]*a*R,c=d.getTileCoordForCoordAndZ((0,Q.getTopLeft)(w),s),f=d.getTileCoordExtent(c),p=ea(this.tempTransform,[_*(f[0]-w[0])/g,_*(w[3]-f[3])/g]),m=_*u.getGutterForProjection(n);for(let e of E[s]){if(2!==e.getState())continue;let r=e.tileCoord,n=c[1]-r[1],a=Math.round(p[0]-(n-1)*o),l=c[2]-r[2],d=Math.round(p[1]-(l-1)*h),g=Math.round(p[0]-n*o),f=Math.round(p[1]-l*h),_=a-g,y=d-f,x=1===T.length,S=!1;i=[g,f,g+_,f,g+_,f+y,g,f+y];for(let t=0,e=A.length;t<e;++t)if(!x&&s<L[t]){let e=A[t];(0,Q.intersects)([g,f,g+_,f+y],[e[0],e[3],e[4],e[7]])&&(S||(I.save(),S=!0),I.beginPath(),I.moveTo(i[0],i[1]),I.lineTo(i[2],i[3]),I.lineTo(i[4],i[5]),I.lineTo(i[6],i[7]),I.moveTo(e[6],e[7]),I.lineTo(e[4],e[5]),I.lineTo(e[2],e[3]),I.lineTo(e[0],e[1]),I.clip())}A.push(i),L.push(s),this.drawTile(e,t,g,f,_,y,m,x),S&&I.restore(),this.renderedTiles.unshift(e),this.updateUsedTiles(t.usedTiles,u,e)}}if(this.renderedResolution=g,this.extentChanged=!this.renderedExtent_||!(0,Q.equals)(this.renderedExtent_,w),this.renderedExtent_=w,this.renderedPixelRatio=l,this.postRender(this.context,t),s.extent&&I.restore(),I.imageSmoothingEnabled=!0,this.renderComplete){let e=(t,e)=>{let i=(0,th.getUid)(u),s=e.wantedTiles[i],r=s?Object.keys(s).length:0;this.updateCacheSize(r),this.tileCache_.expireCache(),this.sourceTileCache_?.expireCache()};t.postRenderFunctions.push(e)}return this.container}updateCacheSize(t){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,2*t)}drawTile(t,e,i,s,r,n,a,o){let l;if(t instanceof l0){if(!(l=lQ(t.getData())))throw Error("Rendering array data is not yet supported")}else l=this.getTileImage(t);if(!l)return;let h=this.getRenderContext(e),u=(0,th.getUid)(this),d=e.layerStatesArray[e.layerIndex],c=d.opacity*(o?t.getAlpha(u,e.time):1),g=c!==h.globalAlpha;g&&(h.save(),h.globalAlpha=c),h.drawImage(l,a,a,l.width-2*a,l.height-2*a,i,s,r,n),g&&h.restore(),c!==d.opacity?e.animate=!0:o&&t.endTransition(u)}getImage(){let t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}updateUsedTiles(t,e,i){let s=(0,th.getUid)(e);s in t||(t[s]={}),t[s][i.getKey()]=!0}},ha="preload",ho="useInterimTilesOnError",hl=class extends i4{constructor(t){let e=Object.assign({},t=t||{}),i=t.cacheSize;delete t.cacheSize,delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.cacheSize_=i,this.setPreload(void 0!==t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(ha)}setPreload(t){this.set(ha,t)}getUseInterimTilesOnError(){return this.get(ho)}setUseInterimTilesOnError(t){this.set(ho,t)}getData(t){return super.getData(t)}},hh=class extends hl{constructor(t){super(t)}createRenderer(){return new hn(this,{cacheSize:this.getCacheSize()})}},Q=y("jZquI"),K=y("kBSVF"),z=y("eJ4LZ"),Q=y("jZquI"),H=y("a6roo");let hu=[0,0,0];var hd=class{constructor(t){let e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,(0,z.assert)((0,K.isSorted)(this.resolutions_,(t,e)=>e-t,!0),"`resolutions` must be sorted in descending order"),!t.origins)for(let t=0,i=this.resolutions_.length-1;t<i;++t)if(e){if(this.resolutions_[t]/this.resolutions_[t+1]!==e){e=void 0;break}}else e=this.resolutions_[t]/this.resolutions_[t+1];this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,(0,z.assert)(this.origins_.length==this.resolutions_.length,"Number of `origins` and `resolutions` must be equal"));let i=t.extent;void 0===i||this.origin_||this.origins_||(this.origin_=(0,Q.getTopLeft)(i)),(0,z.assert)(!this.origin_&&this.origins_||this.origin_&&!this.origins_,"Either `origin` or `origins` must be configured, never both"),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,(0,z.assert)(this.tileSizes_.length==this.resolutions_.length,"Number of `tileSizes` and `resolutions` must be equal")),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:256,(0,z.assert)(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,"Either `tileSize` or `tileSizes` must be configured, never both"),this.extent_=void 0!==i?i:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((t,e)=>{let s=new l2(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(i){let t=this.getTileRangeForExtentAndZ(i,e);s.minX=Math.max(t.minX,s.minX),s.maxX=Math.min(t.maxX,s.maxX),s.minY=Math.max(t.minY,s.minY),s.maxY=M
1ath.min(t.maxY,s.maxY)}return s}):i&&this.calculateTileRanges_(i)}forEachTileCoord(t,e,i){let s=this.getTileRangeForExtentAndZ(t,e);for(let t=s.minX,r=s.maxX;t<=r;++t)for(let r=s.minY,n=s.maxY;r<=n;++r)i([e,t,r])}forEachTileCoordParentTileRange(t,e,i,s){let r,n,a,o=null,l=t[0]-1;for(2===this.zoomFactor_?(n=t[1],a=t[2]):o=this.getTileCoordExtent(t,s);l>=this.minZoom;){if(r=void 0!==n&&void 0!==a?l4(n=Math.floor(n/2),n,a=Math.floor(a/2),a,i):this.getTileRangeForExtentAndZ(o,l,i),e(l,r))return!0;--l}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getOrigins(){return this.origins_}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){let i=2*t[1],s=2*t[2];return l4(i,i+1,s,s+1,e)}let s=this.getTileCoordExtent(t,i||this.tmpExtent_);return this.getTileRangeForExtentAndZ(s,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,i){if(e>this.maxZoom||e<this.minZoom)return null;let s=t[0],r=t[1],n=t[2];if(e===s)return l4(r,n,r,n,i);if(this.zoomFactor_){let t=Math.pow(this.zoomFactor_,e-s),a=Math.floor(r*t),o=Math.floor(n*t);return e<s?l4(a,a,o,o,i):l4(a,Math.floor(t*(r+1))-1,o,Math.floor(t*(n+1))-1,i)}let a=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,e,i)}getTileRangeForExtentAndZ(t,e,i){this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,hu);let s=hu[1],r=hu[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,hu),l4(s,hu[1],r,hu[2],i)}getTileCoordCenter(t){let e=this.getOrigin(t[0]),i=this.getResolution(t[0]),s=sg(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*s[0]*i,e[1]-(t[2]+.5)*s[1]*i]}getTileCoordExtent(t,e){let i=this.getOrigin(t[0]),s=this.getResolution(t[0]),r=sg(this.getTileSize(t[0]),this.tmpSize_),n=i[0]+t[1]*r[0]*s,a=i[1]-(t[2]+1)*r[1]*s,o=n+r[0]*s,l=a+r[1]*s;return(0,Q.createOrUpdate)(n,a,o,l,e)}getTileCoordForCoordAndResolution(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)}getTileCoordForXYAndResolution_(t,e,i,s,r){let n=this.getZForResolution(i),a=i/this.getResolution(n),o=this.getOrigin(n),l=sg(this.getTileSize(n),this.tmpSize_),h=a*(t-o[0])/i/l[0],u=a*(o[1]-e)/i/l[1];return s?(h=(0,H.ceil)(h,5)-1,u=(0,H.ceil)(u,5)-1):(h=(0,H.floor)(h,5),u=(0,H.floor)(u,5)),he(n,h,u,r)}getTileCoordForXYAndZ_(t,e,i,s,r){let n=this.getOrigin(i),a=this.getResolution(i),o=sg(this.getTileSize(i),this.tmpSize_),l=(t-n[0])/a/o[0],h=(n[1]-e)/a/o[1];return s?(l=(0,H.ceil)(l,5)-1,h=(0,H.ceil)(h,5)-1):(l=(0,H.floor)(l,5),h=(0,H.floor)(h,5)),he(i,l,h,r)}getTileCoordForCoordAndZ(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)}getTileCoordResolution(t){return this.resolutions_[t[0]]}getTileSize(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]}getFullTileRange(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null}getZForResolution(t,e){let i=(0,K.linearFindNearest)(this.resolutions_,t,e||0);return(0,H.clamp)(i,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return eZ(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){let e=this.resolutions_.length,i=Array(e);for(let s=this.minZoom;s<e;++s)i[s]=this.getTileRangeForExtentAndZ(t,s);this.fullTileRanges_=i}},hc=class extends hd{constructor(t){super({extent:t.extent,origin:t.origin,origins:t.origins,resolutions:t.resolutions,tileSize:t.tileSize,tileSizes:t.tileSizes,sizes:t.sizes}),this.matrixIds_=t.matrixIds}getMatrixId(t){return this.matrixIds_[t]}getMatrixIds(){return this.matrixIds_}},H=(y("a6roo"),y("a6roo"));function hg(t,e){let i=[];Object.keys(e).forEach(function(t){null!==e[t]&&void 0!==e[t]&&i.push(t+"="+encodeURIComponent(e[t]))});let s=i.join("&");return t=t.replace(/[?&]$/,""),(t+=t.includes("?")?"&":"?")+s}let hf=/\{z\}/g,hp=/\{x\}/g,h_=/\{y\}/g,hm=/\{-y\}/g;function hy(t){let e=[],i=/\{([a-z])-([a-z])\}/.exec(t);if(i){let s,r=i[1].charCodeAt(0),n=i[2].charCodeAt(0);for(s=r;s<=n;++s)e.push(t.replace(i[0],String.fromCharCode(s)));return e}if(i=/\{(\d+)-(\d+)\}/.exec(t)){let s=parseInt(i[2],10);for(let r=parseInt(i[1],10);r<=s;r++)e.push(t.replace(i[0],r.toString()));return e}return e.push(t),e}function hx(t){return 1===t.length?t[0]:function(e,i,s){var r,n;if(!e)return;let a=(r=e[0],n=e[1],(n<<r)+e[2]),o=(0,H.modulo)(a,t.length);return t[o](e,i,s)}}var C=y("cw4dl"),T=y("lW8xZ"),Q=y("jZquI");function hS(t){let e=t.getDefaultTileGrid();return e||(e=function(t){var e,i;let s;return e=hE(t),i=(i=void 0,"top-left"),s=hw(e,void 0,void 0),new hd({extent:e,origin:(0,Q.getCorner)(e,i),resolutions:s,tileSize:void 0})}(t),t.setDefaultTileGrid(e)),e}function hv(t){let e=t||{},i=e.extent||tQ("EPSG:3857").getExtent();return new hd({extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:hw(i,e.maxZoom,e.tileSize,e.maxResolution)})}function hw(t,e,i,s){e=void 0!==e?e:42,i=sg(void 0!==i?i:256);let r=(0,Q.getHeight)(t),n=(0,Q.getWidth)(t);s=s>0?s:Math.max(n/i[0],r/i[1]);let a=e+1,o=Array(a);for(let t=0;t<a;++t)o[t]=s/Math.pow(2,t);return o}function hE(t){let e=(t=tQ(t)).getExtent();if(!e){let i=180*td.degrees/t.getMetersPerUnit();e=(0,Q.createOrUpdate)(-i,-i,i,i)}return e}var th=(y("lVQul"),y("lVQul")),w=y("iTTi2"),th=y("lVQul");class hM extends w.default{constructor(t,e){super(t),this.tile=e}}var hP=class extends lI{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.tilePixelRatio_=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null,this.tileGrid&&sg(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),[256,256]),this.tmpSize=[0,0],this.key_=t.key||(0,th.getUid)(this),this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getResolutions(t){let e=t?this.getTileGridForProjection(t):this.tileGrid;return e?e.getResolutions():null}getTile(t,e,i,s,r,n){return(0,th.abstract)()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:hS(t)}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,i){var s;let r=this.getTileGridForProjection(i),n=this.getTilePixelRatio(e),a=sg(r.getTileSize(t),this.tmpSize);return 1==n?a:(void 0===(s=this.tmpSize)&&(s=[0,0]),s[0]=a[0]*n+.5|0,s[1]=a[1]*n+.5|0,s)}getTileCoordForTileUrlFunction(t,e){let i=void 0!==e?e:this.getProjection(),s=void 0!==e?this.getTileGridForProjection(i):this.tileGrid||this.getTileGridForProjection(i);
1return this.getWrapX()&&i.isGlobal()&&(t=function(t,e,i){let s=e[0],r=t.getTileCoordCenter(e),n=hE(i);if(!(0,Q.containsCoordinate)(n,r)){let e=(0,Q.getWidth)(n),i=Math.ceil((n[0]-r[0])/e);return r[0]+=e*i,t.getTileCoordForCoordAndZ(r,s)}return e}(s,t,i)),!function(t,e){let i=t[0],s=t[1],r=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;let n=e.getFullTileRange(i);return!n||n.containsXY(s,r)}(t,s)?null:t}clear(){}refresh(){this.clear(),super.refresh()}};class hC extends hP{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===hC.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(t){let e,i=t.target,s=(0,th.getUid)(i),r=i.getState();1==r?(this.tileLoadingKeys_[s]=!0,e="tileloadstart"):s in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[s],e=3==r?"tileloaderror":2==r?"tileloadend":void 0),void 0!=e&&this.dispatchEvent(new hM(e,i))}setTileLoadFunction(t){this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,void 0!==e?this.setKey(e):this.changed()}setUrl(t){let e=hy(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;let e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(function(t,e){let i=t.length,s=Array(i);for(let r=0;r<i;++r)s[r]=function(t,e){return function(i,s,r){var n,a,o;let l;if(!i)return;let h=i[0];if(e){let t=e.getFullTileRange(h);t&&(l=t.getHeight()-1)}return n=i[1],a=i[2],o=l,t.replace(hf,h.toString()).replace(hp,n.toString()).replace(h_,a.toString()).replace(hm,function(){if(void 0===o)throw Error("If the URL template has a {-y} placeholder, the grid extent must be known");return(o-a).toString()})}}(t[r],e);return hx(s)}(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,i){}}var hb=hC;function hR(t,e){if(T.WORKER_OFFSCREEN_CANVAS){let i=t.getCrossOrigin(),s="same-origin",r="same-origin";"anonymous"===i||""===i?(s="cors",r="omit"):"use-credentials"===i&&(s="cors",r="include"),fetch(e,{mode:s,credentials:r,referrerPolicy:t.getReferrerPolicy()}).then(t=>{if(!t.ok)throw Error(`HTTP ${t.status}`);return t.blob()}).then(t=>createImageBitmap(t)).then(e=>{let i=t.getImage();i.width=e.width,i.height=e.height,i.getContext("2d").drawImage(e,0,0),e.close?.(),i.dispatchEvent(new Event("load"))}).catch(()=>{t.getImage().dispatchEvent(new Event("error"))});return}t.getImage().src=e}var hI=class extends hb{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:hR,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:void 0===t.interpolate||t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.referrerPolicy=t.referrerPolicy,this.tileClass=void 0!==t.tileClass?t.tileClass:l1,this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(t){return this.getProjection()&&t&&!t4(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getTileGridForProjection(t){let e=this.getProjection();if(this.tileGrid&&(!e||t4(e,t)))return this.tileGrid;let i=(0,th.getUid)(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=hS(t)),this.tileGridForProjection[i]}createTile_(t,e,i,s,r,n){let a=[t,e,i],o=this.getTileCoordForTileUrlFunction(a,r),l=o?this.tileUrlFunction(o,s,r):void 0,h=new this.tileClass(a,4*(void 0===l),void 0!==l?l:"",{crossOrigin:this.crossOrigin,referrerPolicy:this.referrerPolicy},this.tileLoadFunction,this.tileOptions);return h.key=n,h.addEventListener(C.default.CHANGE,this.handleTileChange.bind(this)),h}getTile(t,e,i,s,r,n){let a=this.getProjection();if(!a||!r||t4(a,r))return this.getTileInternal(t,e,i,s,a||r);let o=[t,e,i],l=this.getKey(),h=this.getTileGridForProjection(a),u=this.getTileGridForProjection(r),d=this.getTileCoordForTileUrlFunction(o,r),c=new l9(a,h,r,u,o,d,this.getTilePixelRatio(s),this.getGutter(),(t,e,i,s)=>this.getTileInternal(t,e,i,s,a,n),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return c.key=l,c}getTileInternal(t,e,i,s,r,n){let a=this.getKey(),o=hi(this,a,t,e,i);
1if(n&&n.containsKey(o))return n.get(o);let l=this.createTile_(t,e,i,s,r,a);return n?.set(o,l),l}setRenderReprojectionEdges(t){this.renderReprojectionEdges_!=t&&(this.renderReprojectionEdges_=t,this.changed())}setTileGridForProjection(t,e){let i=tQ(t);if(i){let t=(0,th.getUid)(i);t in this.tileGridForProjection||(this.tileGridForProjection[t]=e)}}},hT=class extends hI{constructor(t){let e=void 0!==t.requestEncoding?t.requestEncoding:"KVP",i=t.tileGrid,s=t.urls;void 0===s&&void 0!==t.url&&(s=hy(t.url)),super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:s,wrapX:void 0!==t.wrapX&&t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.version_=void 0!==t.version?t.version:"1.0.0",this.format_=void 0!==t.format?t.format:"image/jpeg",this.dimensions_=void 0!==t.dimensions?t.dimensions:{},this.layer_=t.layer,this.matrixSet_=t.matrixSet,this.style_=t.style,this.requestEncoding_=e,this.setKey(this.getKeyForDimensions_()
1),s&&s.length>0&&(this.tileUrlFunction=hx(s.map(this.createFromWMTSTemplate.bind(this))))}setUrls(t){this.urls=t;let e=t.join("\n");this.setTileUrlFunction(hx(t.map(this.createFromWMTSTemplate.bind(this))),e)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){let t=this.urls?this.urls.slice(0):[];for(let e in this.dimensions_)t.push(e+"-"+this.dimensions_[e]);return t.join("/")}updateDimensions(t){Object.assign(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(t){let e=this.requestEncoding_,i={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};"KVP"==e&&Object.assign(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t="KVP"==e?hg(t,i):t.replace(/\{(\w+?)\}/g,function(t,e){return e.toLowerCase()in i?i[e.toLowerCase()]:t});let s=this.tileGrid,r=this.dimensions_;return function(i,n,a){if(!i)return;let o={TileMatrix:s.getMatrixId(i[0]),TileCol:i[1],TileRow:i[2]};Object.assign(o,r);let l=t;return"KVP"==e?hg(l,o):l.replace(/\{(\w+?)\}/g,function(t,e){return encodeURIComponent(o[e])})}}};let hA=["SHOM/shom.fr"],hL="https://services.data.shom.fr/INSPIRE/wmts",hN="3857",hF="image/png",hG="normal",hO=new hc({origin:[-0x131bf84,0x131bf84],resolutions:lU,matrixIds:lz}),hD=new hh({extent:[947226.4527192283,5054588.935234591,1076369.307183413,5325177.7955751205],opacity:.7,visible:!1,source:new hT({attributions:hA,url:hL,layer:"L3D_LIDAR_CORSE_2017_2018_PYR_3857_WMTS",matrixSet:hN,format:hF,style:hG,transition:0,tileGrid:hO})});hD.set("title","Partie maritime Litto3D® - Corse 2017-2018");let hk=new hh({extent:[329888.63179641863,5238106.618808954,494820.7025506407,5400367.275893897],opacity:.7,visible:!1,source:new hT({attributions:hA,url:hL,layer:"L3D_MAR_LR_2014_2015_WMTS_3857",matrixSet:hN,format:hF,style:hG,transition:0,tileGrid:hO})});hk.set("title","Partie maritime Litto3D® - Languedoc-Roussillon 2014-2015");let hj=new hh({extent:[-250000.13434856507,5100055.47188349,110206.29588534083,5727623.276760168],opacity:.7,visible:!1,source:new hT({attributions:hA,url:hL,layer:"L3D_MAR_AQT_2020_2022_PYR_3857_WMTS",matrixSet:hN,format:hF,style:hG,transition:0,tileGrid:hO})});hj.set("title","Partie maritime Litto3D® - Nouvelle-Aquitaine 2020-2022");let hB=new hh({extent:[-333419.68604438123,6026478.149816067,-298895.05916975543,6049682.899729898],opacity:.7,visible:!1,source:new hT({attributions:hA,url:hL,layer:"L3D_MAR_MORBIHAN_2015_PYR_3857_WMTS",matrixSet:hN,format:hF,style:hG,transition:0,tileGrid:hO})});hB.set("title","Partie maritime Litto3D® - Morbihan 2015");let hz=new hh({extent:[-562551.9335289,6129543.646593261,-473971.67511996854,6202026.815183191],opacity:.7,visible:!1,source:new hT({attributions:hA,url:hL,layer:"L3D_MAR_PNMI_2012_PYR_3857_WMTS",matrixSet:hN,format:hF,style:hG,transition:0,tileGrid:hO})});hz.set("title","Partie maritime Litto3D® - Parc Naturel Marin d'Iroise 2012");let hU=new hh({extent:[-220230.02780578067,6202161.398453447,329769.5199412698,6652147.969220315],opacity:.7,visible:!1,source:new hT({attributions:hA,url:hL,layer:"L3D_MAR_NHDF_2016_2018_PYR_3857_WMTS",matrixSet:hN,format:hF,style:hG,transition:0,tileGrid:hO})});hU.set("title","Partie maritime Litto3D® - Normandie et Hauts-De-France 2016-2018");let hW=["IGN-F/Géoportail"],hV="image/jpeg",hq="normal",hZ=new hc({origin:[-0x131bf84,0x131bf84],resolutions:lU,matrixIds:lz}),hK=new hh({extent:lW,opacity:1,visible:!1,source:new hT({attributions:hW,url:"https://data.geopf.fr/private/wmts?SERVICE=WMTS&VERSION=1.0.0&apikey=ign_scan_ws",layer:"GEOGRAPHICALGRIDSYSTEMS.MAPS",matrixSet:"PM",format:hV,style:hq,transition:0,tileGrid:hZ})});hK.set("title","Plan IGN");let hH=new hh({extent:lW,opacity:1,visible:!1,source:new hT({attributions:hW,url:"https://data.geopf.fr/wmts?SERVICE=WMTS&VERSION=1.0.0&apikey=ign_scan_ws",layer:"HR.ORTHOIMAGERY.ORTHOPHOTOS",matrixSet:"PM",format:hV,style:hq,transition:0,tileGrid:hZ})});hH.set("title","Photographies");let hX=new hh({extent:lW,source:new hT({attributions:["<a href='https://www.opalesurfcasting.net'><img src='https://www.opalesurfcasting.net/geoportail/logos/ecole_de_peche_50_opalesurfcasting.png' alt='logo o
1palesurfcasting.net'></a>"],url:"https://www.opalesurfcasting.net/carto/wmts/fond/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.jpeg",layer:"fond",requestEncoding:"REST",format:"image/jpeg",matrixSet:"france_metro_littoral_grid",style:"default",transition:0,tileGrid:new hc({origin:[-1983693.7581,7056666.4513],resolutions:lU,matrixIds:lz})})});hX.set("title","IGN + LSE + CIEM");let hY=new rT({stroke:new rP({color:"#fff",width:3}),fill:new rw({color:"#000"}),font:'bold 10px "sans-serif"',overflow:!0}),hQ={basicStylePoly:new rC({stroke:new rP({color:"rgba(0, 0, 255, 1.0)",width:.5}),fill:new rw({color:"rgba(0, 0, 255, 0.2)"}),text:hY}),basicStylePolyNoText:new rC({stroke:new rP({color:"rgba(0, 0, 255, 1.0)",width:.5}),fill:new rw({color:"rgba(0, 0, 255, 0.2)"})}),basicStylePolySelected:new rC({stroke:new rP({color:"rgba(0, 0, 255, 1.0)",width:.5}),fill:new rw({color:"rgba(0, 0, 255, 0.4)"}),text:hY}),basicStylePolySelectedNoText:new rC({stroke:new rP({color:"rgba(0, 0, 255, 1.0)",width:.5}),fill:new rw({color:"rgba(0, 0, 255, 0.4)"})}),redStylePoly:new rC({stroke:new rP({color:"#D20000",width:1}),fill:new rw({color:"rgba(210,0,0,0.2)"}),text:hY}),redStylePolySelected:new rC({stroke:new rP({color:"#D20000",width:1}),fill:new rw({color:"rgba(210,0,0,0.4)"}),text:hY}),orangeStylePoly:new rC({stroke:new rP({color:"#F58500",width:1}),fill:new rw({color:"rgba(245,133,0,0.2)"}),text:hY}),orangeStylePolySelected:new rC({stroke:new rP({color:"#F58500",width:1}),fill:new rw({color:"rgba(245,133,0,0.4)"}),text:hY}),greenStylePoly:new rC({stroke:new rP({color:"#8FED24",width:1}),fill:new rw({color:"rgba(143,237,36,0.2)"}),text:hY}),greenStylePolySelected:new rC({stroke:new rP({color:"#8FED24",width:1}),fill:new rw({color:"rgba(143,237,36,0.4)"}),text:hY}),orangeStyleCircle:new rC({image:new rv({radius:14,fill:new rw({color:"rgba(245,133,0,0.4)"})}),text:hY}),redStyleCircle:new rC({image:new rv({radius:14,fill:new rw({color:"rgba(210,0,0,0.4)"})}),text:hY}),greenStyleCircle:new rC({image:new rv({radius:14,fill:new rw({color:"rgba(143,237,36,0.4)"})}),text:hY}),blueStyleCircle:new rC({image:new rv({radius:14,fill:new rw({color:"rgba(96,194,243,0.4)"})}),text:hY}),blackStyleCircle:new rC({image:new rv({radius:14,fill:new rw({color:"rgba(0,0,0,0.4)"})}),text:hY}),orangeStyleCircleSelected:new rC({image:new rv({radius:14,fill:new rw({color:"rgba(245,133,0,0.8)"})}),text:hY}),redStyleCircleSelected:new rC({image:new rv({radius:14,fill:new rw({color:"rgba(210,0,0,0.8)"})}),text:hY}),greenStyleCircleSelected:new rC({image:new rv({radius:14,fill:new rw({color:"rgba(143,237,36,0.8)"})}),text:hY}),blueStyleCircleSelected:new rC({image:new rv({radius:14,fill:new rw({color:"rgba(96,194,243,0.8)"})}),text:hY}),blackStyleCircleSelected:new rC({image:new rv({radius:14,fill:new rw({color:"rgba(0,0,0,0.8)"})}),text:hY}),medPNRNStyle:new rC({stroke:new rP({color:"rgba(15,163,177,1.0)",width:1}),fill:new rw({color:"rgba(15,163,177,0.20)"}),text:hY}),medPNRNStyleSelected:new rC({stroke:new rP({color:"rgba(15,163,177,1.0)",width:2}),fill:new rw({color:"rgba(15,163,177,0.40)"}),text:hY})};function hJ(t,{selected:e=!1}={}){return e?hQ.medPNRNStyleSelected:hQ.medPNRNStyle}function h$(t){let e=t.get("nom")||t.get("layerTitle")||t.get("layerName"),i=hJ(t,{selected:!1});return i.getText().setText(lc(e,12)),t.set("styleSelected","specialFishingZone"),i}var z=y("eJ4LZ"),K=y("kBSVF");let h0="http://www.w3.org/2001/XMLSchema-instance";function h1(t,e){return un().createElementNS(t,e)}function h2(t,e){return(function t(e,i,s){if(e.nodeType==Node.CDATA_SECTION_NODE||e.nodeType==Node.TEXT_NODE)i?s.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g,"")):s.push(e.nodeValue);else{let r;for(r=e.firstChild;r;r=r.nextSibling)t(r,i,s)}return s})(t,e,[]).join("")}function h4(t){return"documentElement"in t}function h3(t){return new DOMParser().parseFromString(t,"application/xml")}function h8(t,e){return function(i,s){let r=t.call(e??this,i,s);if(void 0!==r){let t=s[s.length-1];(0,K.extend)(t,r)}}}function h5(t,e){return function(i,s){let r=t.call(e??this,i,s);void 0!==r&&s[s.length-1].push(r)}}function h6(t,e){return function(i,s){let r=t.call(e??this,i,s);void 0!==r&&(s[s.length-1]=r)}}function h7(t,e,i){return function(s,r){let n=t.call(i??this,s,r);void 0!==n&&(r[r.length-1][void 0!==e?e:s.localName]=n)}}function h9(t,e){return function(i,s,r){t.call(e??this,i,s,r),r[r.length-1].node.appendChild(i)}}function ut(t,e){return function(i,s,r){let n=s[s.length-1].node,a=t;return void 0===a&&(a=r),h1(void 0!==e?e:n.namespaceURI,a)}}let ue=ut();function ui(t,e,i,s){let r;for(r=e.firstElementChild;r;
1r=r.nextElementSibling){let e=t[r.namespaceURI];if(void 0!==e){let t=e[r.localName];void 0!==t&&t.call(s,r,i)}}}function us(t,e,i,s,r){return s.push(t),ui(e,i,s,r),s.pop()}function ur(t,e,i,s,r,n,a){let o,l;r.push(t);let h=(void 0!==n?n:s).length;for(let t=0;t<h;++t)void 0!==(o=s[t])&&void 0!==(l=i.call(a,o,r,void 0!==n?n[t]:void 0))&&e[l.namespaceURI][l.localName].call(a,l,o,r);return r.pop()}function un(){return void 0===h&&"u">typeof document&&(h=document.implementation.createDocument("","",null)),h}var Q=y("jZquI"),C=y("cw4dl"),I=y("bsgMw"),Q=y("jZquI");class ua extends em{constructor(t){super(),this.geometries_=t,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(I.unlistenByKey),this.changeEventsKeys_.length=0}listenGeometriesChange_(){let t=this.geometries_;for(let e=0,i=t.length;e<i;++e)this.changeEventsKeys_.push((0,I.listen)(t[e],C.default.CHANGE,this.changed,this))}clone(){let t=new ua(uo(this.geometries_));return t.applyProperties(this),t}closestPointXY(t,e,i,s){if(s<(0,Q.closestSquaredDistanceXY)(this.getExtent(),t,e))return s;let r=this.geometries_;for(let n=0,a=r.length;n<a;++n)s=r[n].closestPointXY(t,e,i,s);return s}containsXY(t,e){let i=this.geometries_;for(let s=0,r=i.length;s<r;++s)if(i[s].containsXY(t,e))return!0;return!1}computeExtent(t){(0,Q.createOrUpdateEmpty)(t);let e=this.geometries_;for(let i=0,s=e.length;i<s;++i)(0,Q.extend)(t,e[i].getExtent());return t}getGeometries(){return uo(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[],e=this.geometries_;for(let i=0,s=e.length;i<s;++i)e[i].getType()===this.getType()?t=t.concat(e[i].getGeometriesArrayRecursive()):t.push(e[i]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;let e=[],i=this.geometries_,s=!1;for(let r=0,n=i.length;r<n;++r){let n=i[r],a=n.getSimplifiedGeometry(t);e.push(a),a!==n&&(s=!0)}return s?new ua(e):(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getType(){return"GeometryCollection"}intersectsExtent(t){let e=this.geometries_;for(let i=0,s=e.length;i<s;++i)if(e[i].intersectsExtent(t))return!0;return!1}isEmpty(){return 0===this.geometries_.length}rotate(t,e){let i=this.geometries_;for(let s=0,r=i.length;s<r;++s)i[s].rotate(t,e);this.changed()}scale(t,e,i){i||(i=(0,Q.getCenter)(this.getExtent()));let s=this.geometries_;for(let r=0,n=s.length;r<n;++r)s[r].scale(t,e,i);this.changed()}setGeometries(t){this.setGeometriesArray(uo(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){let e=this.geometries_;for(let i=0,s=e.length;i<s;++i)e[i].applyTransform(t);this.changed()}translate(t,e){let i=this.geometries_;for(let s=0,r=i.length;s<r;++s)i[s].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function uo(t){return t.map(t=>t.clone())}var th=y("lVQul"),ul=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=nf,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let i=e.dataProjection?tQ(e.dataProjection):this.readProjection(t);e.extent&&i&&"tile-pixels"===i.getUnits()&&(i=tQ(i)).setWorldExtent(e.extent),e={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},t)}getType(){return(0,th.abstract)()}readFeature(t,e){return(0,th.abstract)()}readFeatures(t,e){return(0,th.abstract)()}readGeometry(t,e){return(0,th.abstract)()}readProjection(t){return(0,th.abstract)()}writeFeature(t,e){return(0,th.abstract)()}writeFeatures(t,e){return(0,th.abstract)()}writeGeometry(t,e){return(0,th.abstract)()}};function uh(t,e,i){let s=i?tQ(i.featureProjection):null,r=i?tQ(i.dataProjection):null,n=t;if(s&&r&&!t4(s,r)){e&&(n=t.clone());let i=e?s:r,a=e?r:s;"tile-pixels"===i.getUnits()?n.transform(i,a):n.applyTransform(t5(i,a))}if(e&&i&&void 0!==i.decimals){let e=Math.pow(10,i.decimals);n===t&&(n=t.clone()),n.applyTransform(function(t){for(let i=0,s=t.length;i<s;++i)t[i]=Math.round(t[i]*e)/e;return t})}return n}function uu(t,e){let i=e?tQ(e.featureProjection):null,s=e?tQ(e.dataProjection):null;return i&&s&&!t4(i,s)?t7(t,s,i):t}let ud={Point:ej,LineString:lv,Polygon:e$,MultiPoint:lS,MultiLineString:lw,MultiPolygon:lE};function uc(t,e){return t?Array.isArray(t)?new ua(t.map(t=>uc(t,e))):uh(new ud[t.type](t.flatCoordinates,t.layout||"XY",t.ends),!1,e):null}var K=(y("kBSVF"),y("kBSVF")),th=y("lVQul"),ug=class extends ul{constructor(){super(),this.xmlSerializer_=(void 0===l&&"u">typeof XMLSerializer&&(l=new XMLSerializer),l)}getType(){return"xml"}readFeature(t,e){if(!t)return null;if("string"==typeof t){let i=h3(t);return this.readFeatureFromDocument(i,e)}
1return h4(t)?this.readFeatureFromDocument(t,e):this.readFeatureFromNode(t,e)}readFeatureFromDocument(t,e){let i=this.readFeaturesFromDocument(t,e);return i.length>0?i[0]:null}readFeatureFromNode(t,e){return null}readFeatures(t,e){if(!t)return[];if("string"==typeof t){let i=h3(t);return this.readFeaturesFromDocument(i,e)}return h4(t)?this.readFeaturesFromDocument(t,e):this.readFeaturesFromNode(t,e)}readFeaturesFromDocument(t,e){let i=[];for(let s=t.firstChild;s;s=s.nextSibling)s.nodeType==Node.ELEMENT_NODE&&(0,K.extend)(i,this.readFeaturesFromNode(s,e));return i}readFeaturesFromNode(t,e){return(0,th.abstract)()}readGeometry(t,e){if(!t)return null;if("string"==typeof t){let i=h3(t);return this.readGeometryFromDocument(i,e)}return h4(t)?this.readGeometryFromDocument(t,e):this.readGeometryFromNode(t,e)}readGeometryFromDocument(t,e){return null}readGeometryFromNode(t,e){return null}readProjection(t){if(!t)return null;if("string"==typeof t){let e=h3(t);return this.readProjectionFromDocument(e)}return h4(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}readProjectionFromDocument(t){return this.dataProjection}readProjectionFromNode(t){return this.dataProjection}writeFeature(t,e){let i=this.writeFeatureNode(t,e);return this.xmlSerializer_.serializeToString(i)}writeFeatureNode(t,e){return null}writeFeatures(t,e){let i=this.writeFeaturesNode(t,e);return this.xmlSerializer_.serializeToString(i)}writeFeaturesNode(t,e){return null}writeGeometry(t,e){let i=this.writeGeometryNode(t,e);return this.xmlSerializer_.serializeToString(i)}writeGeometryNode(t,e){return null}};let uf="http://www.opengis.net/gml",up=/^\s*$/;class u_ extends ug{constructor(t){super(),t=t||{},this.featureType=t.featureType,this.featureNS=t.featureNS,this.srsName=t.srsName,this.schemaLocation="",this.FEATURE_COLLECTION_PARSERS={},this.FEATURE_COLLECTION_PARSERS[this.namespace]={featureMember:h5(this.readFeaturesInternal),featureMembers:h6(this.readFeaturesInternal)},this.supportedMediaTypes=["application/gml+xml"]}readFeaturesInternal(t,e){let i=t.localName,s=null;if("FeatureCollection"==i)s=us([],this.FEATURE_COLLECTION_PARSERS,t,e,this);else if("featureMembers"==i||"featureMember"==i||"member"==i){let r=e[0],n=r.featureType,a=r.featureNS;if(!n&&t.childNodes){n=[],a={};for(let e=0,i=t.childNodes.length;e<i;++e){let i=t.childNodes[e];if(1===i.nodeType){let t=i.nodeName.split(":").pop();if(!n.includes(t)){let e="",s=0,r=i.namespaceURI;for(let t in a){if(a[t]===r){e=t;break}++s}e||(a[e="p"+s]=r),n.push(e+":"+t)}}}"featureMember"!=i&&(r.featureType=n,r.featureNS=a)}if("string"==typeof a){let t=a;(a={}).p0=t}let o={},l=Array.isArray(n)?n:[n];for(let t in a){let e={};for(let s=0,r=l.length;s<r;++s)(l[s].includes(":")?l[s].split(":")[0]:"p0")===t&&(e[l[s].split(":").pop()]="featureMembers"==i?h5(this.readFeatureElement,this):h6(this.readFeatureElement,this));o[a[t]]=e}s="featureMember"==i||"member"==i?us(void 0,o,t,e):us([],o,t,e)}return null===s&&(s=[]),s}readGeometryOrExtent(t,e){let i=e[0];return i.srsName=t.firstElementChild.getAttribute("srsName"),i.srsDimension=t.firstElementChild.getAttribute("srsDimension"),us(null,this.GEOMETRY_PARSERS,t,e,this)}readExtentElement(t,e){let i=e[0],s=this.readGeometryOrExtent(t,e);return s?uu(s,i):void 0}readGeometryElement(t,e){let i=e[0],s=this.readGeometryOrExtent(t,e);return s?uh(s,!1,i):void 0}readFeatureElementInternal(t,e,i){var s;let r,n={};for(let s=t.firstElementChild;s;s=s.nextElementSibling){let t,a=s.localName;0===s.childNodes.length||1===s.childNodes.length&&(3===s.firstChild.nodeType||4===s.firstChild.nodeType)?(t=h2(s,!1),up.test(t)&&(t=void 0)):(i&&(t="boundedBy"===a?this.readExtentElement(s,e):this.readGeometryElement(s,e)),t?"boundedBy"!==a&&(r=a):t=this.readFeatureElementInternal(s,e,!1));let o=s.attributes.length;if(o>0&&!(t instanceof em)){t={_content_:t};for(let e=0;e<o;e++)t[s.attributes[e].name]=s.attributes[e].value}n[a]?(n[a]instanceof Array||(n[a]=[n[a]]),n[a].push(t)):n[a]=t}if(!i)return n;let a=new nf(n);r&&a.setGeometryName(r);let o=t.getAttribute("fid")||(s=this.namespace,t.getAttributeNS(s,"id")||"");return o&&a.setId(o),a}readFeatureElement(t,e){return this.readFeatureElementInternal(t,e,!0)}readPoint(t,e){let i=this.readFlatCoordinatesFromNode(t,e);if(i)return new ej(i,"XYZ")}readMultiPoint(t,e){let i=us([],this.MULTIPOINT_PARSERS,t,e,this);if(i)return new lS(i)}readMultiLineString(t,e){let i=us([],this.MULTILINESTRING_PARSERS,t,e,this);if(i)return new lw(i)}readMultiPolygon(t,e){let i=us([],this.MULTIPOLYGON_PARSERS,t,e,this);if(i)return new lE(i)}pointMemberParser(t,e){ui(this.POINTMEMBER_PARSERS,t,e,this)}lineStringMemberParser(t,e){ui(this.LINESTRINGMEMBER_PARSERS,t,e,this)}polygonMemberParser(t,e){ui(this.POLYGONMEMBER_PARSERS,t,e,this)}readLineString(t,e){let i=this.readFlatCoordinatesFromNode(t,e);if(i)return new lv(i,"XYZ")}readFlatLinearRing(t,e){let i=us(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this);if(i)return i}readLinearRing(t,e){let i=this.readFlatCoordinatesFromNode(t,e);if(i)return new ek(i,"XYZ")}readPolygon(t,e){let i=us([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this);if(i&&i[0]){let t,e,s=i[0],r=[s.length];for(t=1,e=i.length;t<e;++t)(0,K.extend)(s,i[t]),r.push(s.length);return new e$(s,"XYZ",r)}}readFlatCoordinatesFromNode(t,e){return us(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)}readGeometryFromNode(t,e){return this.readGeometryElement(t,[this.getReadOptions(t,e||{})])||null}
1readFeaturesFromNode(t,e){let i={featureType:this.featureType,featureNS:this.featureNS};return i&&Object.assign(i,this.getReadOptions(t,e)),this.readFeaturesInternal(t,[i])||[]}readProjectionFromNode(t){return tQ(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))}}u_.prototype.namespace=uf,u_.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}},u_.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}},u_.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}},u_.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:h5(u_.prototype.pointMemberParser),pointMembers:h5(u_.prototype.pointMemberParser)}},u_.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:h5(u_.prototype.lineStringMemberParser),lineStringMembers:h5(u_.prototype.lineStringMemberParser)}},u_.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:h5(u_.prototype.polygonMemberParser),polygonMembers:h5(u_.prototype.polygonMemberParser)}},u_.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:h5(u_.prototype.readFlatCoordinatesFromNode)}},u_.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:h5(u_.prototype.readLineString)}},u_.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:h5(u_.prototype.readPolygon)}},u_.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:h6(u_.prototype.readFlatLinearRing)}};var um=u_;function uy(t){return ux(h2(t,!1))}function ux(t){let e=/^\s*(\d+)\s*$/.exec(t);if(e)return parseInt(e[1],10)}let uS=/^\s/,uv=/\s$/,uw=/(\n|\t|\r|<|&| {2})/;function uE(t,e){"string"==typeof e&&(uS.test(e)||uv.test(e)||uw.test(e))?e.split("]]>").forEach((e,i,s)=>{var r;i<s.length-1&&(e+="]]"),i>0&&(e=">"+e),r=e,t.appendChild(un().createCDATASection(r))}):t.appendChild(un().createTextNode(e))}let uM=uf+" http://schemas.opengis.net/gml/2.1.2/feature.xsd",uP={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"};class uC extends um{constructor(t){super(t=t||{}),this.FEATURE_COLLECTION_PARSERS[uf].featureMember=h5(this.readFeaturesInternal),this.schemaLocation=t.schemaLocation?t.schemaLocation:uM}readFlatCoordinates(t,e){let i=h2(t,!1).replace(/^\s*|\s*$/g,""),s=e[0].srsName,r="enu";if(s){let t=tQ(s);t&&(r=t.getAxisOrientation())}let n=i.trim().split(/\s+/),a=[];for(let t=0,e=n.length;t<e;t++){let e=n[t].split(/,+/),i=parseFloat(e[0]),s=parseFloat(e[1]),o=3===e.length?parseFloat(e[2]):0;r.startsWith("en")?a.push(i,s,o):a.push(s,i,o)}return a}readBox(t,e){let i=us([null],this.BOX_PARSERS_,t,e,this);return(0,Q.createOrUpdate)(i[1][0],i[1][1],i[1][3],i[1][4])}innerBoundaryIsParser(t,e){let i=us(void 0,this.RING_PARSERS,t,e,this);i&&e[e.length-1].push(i)}outerBoundaryIsParser(t,e){let i=us(void 0,this.RING_PARSERS,t,e,this);i&&(e[e.length-1][0]=i)}GEOMETRY_NODE_FACTORY_(t,e,i){let s=e[e.length-1],r=s.multiSurface,n=s.surface,a=s.multiCurve;return Array.isArray(t)?i="Envelope":"MultiPolygon"===(i=t.getType())&&!0===r?i="MultiSurface":"Polygon"===i&&!0===n?i="Surface":"MultiLineString"===i&&!0===a&&(i="MultiCurve"),h1("http://www.opengis.net/gml",i)}writeFeatureElement(t,e,i){let s=e.getId();s&&t.setAttribute("fid",s);let r=i[i.length-1],n=r.featureNS,a=e.getGeometryName();r.serializers||(r.serializers={},r.serializers[n]={});let o=[],l=[];if(e.hasProperties()){let t=e.getProperties();for(let e in t){let i=t[e];null!=i&&(o.push(e),l.push(i),e==a||"function"==typeof i.getSimplifiedGeometry?e in r.serializers[n]||(r.serializers[n][e]=h9(this.writeGeometryElement,this)):e in r.serializers[n]||(r.serializers[n][e]=h9(uE)))}}let h=Object.assign({},r);h.node=t,ur(h,r.serializers,ut(void 0,n),l,i,o)}writeCurveOrLineString(t,e,i){let s=i[i.length-1].srsName;if("LineStringSegment"!==t.nodeName&&s&&t.setAttribute("srsName",s),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){let s=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(s),this.writeCoordinates_(s,e,i)}else if("Curve"===t.nodeName){let s=h1(t.namespaceURI,"segments");t.appendChild(s),this.writeCurveSegments_(s,e,i)}}writeLineStringOrCurveMember(t,e,i){let s=this.GEOMETRY_NODE_FACTORY_(e,i);s&&(t.appendChild(s),this.writeCurveOrLineString(s,e,i))}writeMultiCurveOrLineString(t,e,i){let s=i[i.length-1],r=s.hasZ,n=s.srsName,a=s.curve;n&&t.setAttribute("srsName",n);let o=e.getLineStrings();ur({node:t,hasZ:r,srsName:n,curve:a},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,o,i,void 0,this)}writeGeometryElement(t,e,i){let s,r=i[i.length-1],n=Object.assign({},r);n.node=t,s=Array.isArray(e)?uu(e,r):uh(e,!0,r),ur(n,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[s],i,void 0,this)}createCoordinatesNode_(t){let e=h1(t,"coordinates");return e.setAttribute("decimal","."),e.setAttribute("cs",","),e.setAttribute("ts"," "),e}writeCoordinates_(t,e,i){let s=i[i.length-1],r=s.hasZ,n=s.srsName,a=e.getCoordinates(),o=a.length,l=Array(o);for(let t=0;t<o;++t){let e=a[t];l[t]=this.getCoords_(e,n,r)}uE(t,l.join(" "))}writeCurveSegments_(t,e,i){let s=h1(t.namespaceURI,"LineStringSegment");t.appendChild(s),this.writeCurveOrLineString(s,e,i)}writeSurfaceOrPolygon(t,e,i){let s=i[i.length-1],r=s.hasZ,n=s.srsName;if("PolygonPatch"!==t.nodeName&&n&&t.setAttribute("srsName",n),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){let s=e.getLinearRings();ur({node:t,hasZ:r,srsName:n},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,s,i,void 0,this)}else if("Surface"===t.nodeName){let s=h1(t.namespaceURI,"patches");t.appendChild(s),this.writeSurfacePatches_(s,e,i)}}RING_NODE_FACTORY_(t,e,i){let s=e[e.length-1],r=s.node,n=s.exteriorWritten;return void 0===n&&(s.exteriorWritten=!0),h1(r.namespaceURI,void 0!==n?"innerBoundaryIs":"outerBoundaryIs")}writeSurfacePatches_(t,e,i){let s=h1(t.namespaceURI,"PolygonPatch");t.appendChild(s),this.writeSurfaceOrPolygon(s,e,i)}writeRing(t,e,i){let s=h1(t.namespaceURI,"LinearRing");t.appendChild(s),this.writeLinearRing(s,e,i)}getCoords_(t,e,i){let s=(e?tQ(e).getAxisOrientation():"enu").startsWith("en")?t[0]+","+t[1]:t[1]+","+t[0];return i&&(s+=","+(t[2]||0)),s}writePoint(t,e,i){let s=i[i.length-1],r=s.hasZ,n=s.srsName;n&&t.setAttribute("srsName",n);let a=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(a);let o=e.getCoordinates();uE(a,this.getCoords_(o,n,r))}writeMultiPoint(t,e,i){let s=i[i.length-1],r=s.hasZ,n=s.srsName;n&&t.setAttribute("srsName",n);let a=e.getPoints();ur({node:t,hasZ:r,srsName:n},this.POINTMEMBER_SERIALIZERS,ut("pointMember"),a,i,void 0,this)}writePointMember(t,e,i){let s=h1(t.namespaceURI,"Point");t.appendChild(s),this.writePoint(s,e,i)}writeLinearRing(t,e,i){let s=i[i.length-1].srsName;s&&t.setAttribute("srsName",s);let r=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(r),this.writeCoordinates_(r,e,i)}writeMultiSurfaceOrPolygon(t,e,i){let s=i[i.length-1],r=s.hasZ,n=s.srsName,a=s.surface;n&&t.setAttribute("srsName",n);let o=e.getPolygons();ur({node:t,hasZ:r,srsName:n,surface:a},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,o,i,void 0,this)}writeSurfaceOrPolygonMember(t,e,i){let s=this.GEOMETRY_NODE_FACTORY_(e,i);s&&(t.appendChild(s),this.writeSurfaceOrPolygon(s,e,i))}writeEnvelope(t,e,i){let s=i[i.length-1].srsName;s&&t.setAttribute("srsName",s);let r=[e[0]+" "+e[1],e[2]+" "+e[3]];ur({node:t},this.ENVELOPE_SERIALIZERS,ue,r,i,["lowerCorner","upperCorner"],this)}MULTIGEOMETRY_MEMBER_NODE_FACTORY_(t,e,i){return h1("http://www.opengis.net/gml",uP[e[e.length-1].node.nodeName])}}uC.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:h6(uC.prototype.readFlatCoordinates)}}
1,uC.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:uC.prototype.innerBoundaryIsParser,outerBoundaryIs:uC.prototype.outerBoundaryIsParser}},uC.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:h5(uC.prototype.readFlatCoordinates)}},uC.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:h6(um.prototype.readPoint),MultiPoint:h6(um.prototype.readMultiPoint),LineString:h6(um.prototype.readLineString),MultiLineString:h6(um.prototype.readMultiLineString),LinearRing:h6(um.prototype.readLinearRing),Polygon:h6(um.prototype.readPolygon),MultiPolygon:h6(um.prototype.readMultiPolygon),Box:h6(uC.prototype.readBox)}},uC.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:h9(uC.prototype.writeCurveOrLineString),MultiCurve:h9(uC.prototype.writeMultiCurveOrLineString),Point:h9(uC.prototype.writePoint),MultiPoint:h9(uC.prototype.writeMultiPoint),LineString:h9(uC.prototype.writeCurveOrLineString),MultiLineString:h9(uC.prototype.writeMultiCurveOrLineString),LinearRing:h9(uC.prototype.writeLinearRing),Polygon:h9(uC.prototype.writeSurfaceOrPolygon),MultiPolygon:h9(uC.prototype.writeMultiSurfaceOrPolygon),Surface:h9(uC.prototype.writeSurfaceOrPolygon),MultiSurface:h9(uC.prototype.writeMultiSurfaceOrPolygon),Envelope:h9(uC.prototype.writeEnvelope)}},uC.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:h9(uC.prototype.writeLineStringOrCurveMember),curveMember:h9(uC.prototype.writeLineStringOrCurveMember)}},uC.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:h9(uC.prototype.writeRing),innerBoundaryIs:h9(uC.prototype.writeRing)}},uC.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:h9(uC.prototype.writePointMember)}},uC.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:h9(uC.prototype.writeSurfaceOrPolygonMember),polygonMember:h9(uC.prototype.writeSurfaceOrPolygonMember)}},uC.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:h9(uE),upperCorner:h9(uE)}};var K=y("kBSVF"),Q=y("jZquI");let ub=uf+" http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",uR={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"};class uI extends um{constructor(t){super(t=t||{}),this.surface_=void 0!==t.surface&&t.surface,this.curve_=void 0!==t.curve&&t.curve,this.multiCurve_=void 0===t.multiCurve||t.multiCurve,this.multiSurface_=void 0===t.multiSurface||t.multiSurface,this.schemaLocation=t.schemaLocation?t.schemaLocation:ub,this.hasZ=void 0!==t.hasZ&&t.hasZ}readMultiCurve(t,e){let i=us([],this.MULTICURVE_PARSERS,t,e,this);if(i)return new lw(i)}readFlatCurveRing(t,e){let i=us([],this.MULTICURVE_PARSERS,t,e,this),s=[];for(let t=0,e=i.length;t<e;++t)(0,K.extend)(s,i[t].getFlatCoordinates());return s}readMultiSurface(t,e){let i=us([],this.MULTISURFACE_PARSERS,t,e,this);if(i)return new lE(i)}curveMemberParser(t,e){ui(this.CURVEMEMBER_PARSERS,t,e,this)}surfaceMemberParser(t,e){ui(this.SURFACEMEMBER_PARSERS,t,e,this)}readPatch(t,e){return us([null],this.PATCHES_PARSERS,t,e,this)}readSegment(t,e){return us([],this.SEGMENTS_PARSERS,t,e,this)}readPolygonPatch(t,e){return us([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this)}readLineStringSegment(t,e){return us([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)}interiorParser(t,e){let i=us(void 0,this.RING_PARSERS,t,e,this);i&&e[e.length-1].push(i)}exteriorParser(t,e){let i=us(void 0,this.RING_PARSERS,t,e,this);i&&(e[e.length-1][0]=i)}readSurface(t,e){let i=us([null],this.SURFACE_PARSERS,t,e,this);if(i&&i[0]){let t,e,s=i[0],r=[s.length];for(t=1,e=i.length;t<e;++t)(0,K.extend)(s,i[t]),r.push(s.length);return new e$(s,"XYZ",r)}}readCurve(t,e){let i=us([null],this.CURVE_PARSERS,t,e,this);if(i)return new lv(i,"XYZ")}readEnvelope(t,e){let i=us([null],this.ENVELOPE_PARSERS,t,e,this);return(0,Q.createOrUpdate)(i[1][0],i[1][1],i[2][0],i[2][1])}readFlatPos(t,e){let i,s=h2(t,!1),r=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,n=[];for(;i=r.exec(s);)n.push(parseFloat(i[1])),s=s.substr(i[0].length);if(""!==s)return;let a=e[0].srsName;if("neu"===(a?tQ(a).getAxisOrientation():"enu"))for(let t=0,e=n.length;t<e;t+=3){let e=n[t],i=n[t+1];n[t]=i,n[t+1]=e}let o=n.length;if(2==o&&n.push(0),0!==o)return n}readFlatPosList(t,e){let i,s,r,n=h2(t,!1).replace(/^\s*|\s*$/g,""),a=e[0],o=a.srsName,l=a.srsDimension,h=o?tQ(o).getAxisOrientation():"enu",u=n.split(/\s+/),d=2;t.getAttribute("srsDimension")?d=ux(t.getAttribute("srsDimension")):t.getAttribute("dimension")?d=ux(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?d=ux(t.parentNode.getAttribute("srsDimension")):l&&(d=ux(l));let c=h.startsWith("en"),g=[];for(let t=0,e=u.length;t<e;t+=d)i=parseFloat(u[t]),s=parseFloat(u[t+1]),r=3===d?parseFloat(u[t+2]):0,c?g.push(i,s,r):g.push(s,i,r);return g}writePos_(t,e,i){let s=i[i.length-1],r=s.hasZ;t.setAttribute("srsDimension",r?"3":"2");let n=s.srsName,a=n?tQ(n).getAxisOrientation():"enu",o=e.getCoordinates(),l=a.startsWith("en")?o[0]+" "+o[1]:o[1]+" "+o[0];r&&(l+=" "+(o[2]||0)),uE(t,l)}getCoords_(t,e,i){let s=(e?tQ(e).getAxisOrientation():"enu").startsWith("en")?t[0]+" "+t[1]:t[1]+" "+t[0];return i&&(s+=" "+(t[2]||0)),s}writePosList_(t,e,i){let s,r=i[i.length-1],n=r.hasZ;t.setAttribute("srsDimension",n?"3":"2");let a=r.srsName,o=e.getCoordinates(),l=o.length,h=Array(l);for(let t=0;t<l;++t)s=o[t],h[t]=this.getCoords_(s,a,n);uE(t,h.join(" "))}writePoint(t,e,i){let s=i[i.length-1].srsName;s&&t.setAttribute("srsName",s);let r=h1(t.namespaceURI,"pos");t.appendChild(r),this.writePos_(r,e,i)}writeEnvelope(t,e,i){let s=i[i.length-1].srsName;s&&t.setAttribute("srsName",s);let r=[e[0]+" "+e[1],e[2]+" "+e[3]];ur({node:t},this.ENVELOPE_SERIALIZERS,ue,r,i,["lowerCorner","upperCorner"],this)}writeLinearRing(t,e,i){let s=i[i.length-1].srsName;s&&t.setAttribute("srsName",s);let r=h1(t.namespaceURI,"posList");t.appendChild(r),this.writePosList_(r,e,i)}RING_NODE_FACTORY_(t,e,i){let s=e[e.length-1],r=s.node,n=s.exteriorWritten;return void 0===n&&(s.exteriorWritten=!0),h1(r.namespaceURI,void 0!==n?"interior":"exterior")}writeSurfaceOrPolygon(t,e,i){let s=i[i.length-1],r=s.hasZ,n=s.srsName;if("PolygonPatch"!==t.nodeName&&n&&t.setAttribute("srsName",n),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){let s=e.getLinearRings();ur({node:t,hasZ:r,srsName:n},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,s,i,void 0,this)}else if("Surface"===t.nodeName){let s=h1(t.namespaceURI,"patches");t.appendChild(s),this.writeSurfacePatches_(s,e,i)}}writeCurveOrLineString(t,e,i){let s=i[i.length-1].srsName;if("LineStringSegment"!==t.nodeName&&s&&t.setAttribute("srsName",s),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){let s=h1(t.namespaceURI,"posList");t.appendChild(s),this.writePosList_(s,e,i)}else if("Curve"===t.nodeName){let s=h1(t.namespaceURI,"segments");t.appendChild(s),this.writeCurveSegments_(s,e,i)}}writeMultiSurfaceOrPolygon(t,e,i){let s=i[i.length-1],r=s.hasZ,n=s.srsName,a=s.surface;n&&t.setAttribute("srsName",n);let o=e.getPolygons();ur({node:t,hasZ:r,srsName:n,surface:a},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,o,i,void 0,this)}writeMultiPoint(t,e,i){let s=i[i.length-1],r=s.srsName,n=s.hasZ;r&&t.setAttribute("srsName",r);let a=e.getPoints();ur({node:t,hasZ:n,srsName:r},this.POINTMEMBER_SERIALIZERS,ut("pointMember"),a,i,void 0,this)}writeMultiCurveOrLineString(t,e,i){let s=i[i.length-1],r=s.hasZ,n=s.srsName,a=s.curve;n&&t.setAttribute("srsName",n);let o=e.getLineStrings();ur({node:t,hasZ:r,srsName:n,curve:a},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,o,i,void 0,this)}writeRing(t,e,i){let s=h1(t.namespaceURI,"LinearRing");t.appendChild(s),this.writeLinearRing(s,e,i)}writeSurfaceOrPolygonMember(t,e,i){let s=this.GEOMETRY_NODE_FACTORY_(e,i);s&&(t.appendChild(s),this.writeSurfaceOrPolygon(s,e,i))}writePointMember(t,e,i){let s=h1(t.namespaceURI,"Point");t.appendChild(s),this.writePoint(s,e,i)}writeLineStringOrCurveMember(t,e,i){let s=this.GEOMETRY_NODE_FACTORY_(e,i);s&&(t.appendChild(s),this.writeCurveOrLineString(s,e,i))}writeSurfacePatches_(t,e,i){let s=h1(t.namespaceURI,"PolygonPatch");t.appendChild(s),this.writeSurfaceOrPolygon(s,e,i)}writeCurveSegments_(t,e,i){let s=h1(t.namespaceURI,"LineStringSegment");t.appendChild(s),this.writeCurveOrLineString(s,e,i)}writeGeometryElement(t,e,i){let s,r=i[i.length-1],n=Object.assign({},r);n.node=t,s=Array.isArray(e)?uu(e,r):uh(e,!0,r),ur(n,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[s],i,void 0,this)}writeFeatureElement(t,e,i){let s=e.getId();s&&t.setAttribute("fid",s);let r=i[i.length-1],n=r.featureNS,a=e.getGeometryName();r.serializers||(r.serializers={},r.serializers[n]={});let o=[],l=[];
1if(e.hasProperties()){let t=e.getProperties();for(let e in t){let i=t[e];null!=i&&(o.push(e),l.push(i),e==a||"function"==typeof i.getSimplifiedGeometry?e in r.serializers[n]||(r.serializers[n][e]=h9(this.writeGeometryElement,this)):e in r.serializers[n]||(r.serializers[n][e]=h9(uE)))}}let h=Object.assign({},r);h.node=t,ur(h,r.serializers,ut(void 0,n),l,i,o)}writeFeatureMembers_(t,e,i){let s=i[i.length-1],r=s.featureType,n=s.featureNS,a={};a[n]={},a[n][r]=h9(this.writeFeatureElement,this);let o=Object.assign({},s);o.node=t,ur(o,a,ut(r,n),e,i)}MULTIGEOMETRY_MEMBER_NODE_FACTORY_(t,e,i){let s=e[e.length-1].node;return h1(this.namespace,uR[s.nodeName])}GEOMETRY_NODE_FACTORY_(t,e,i){let s=e[e.length-1],r=s.multiSurface,n=s.surface,a=s.curve,o=s.multiCurve;return Array.isArray(t)?i="Envelope":"MultiPolygon"===(i=t.getType())&&!0===r?i="MultiSurface":"Polygon"===i&&!0===n?i="Surface":"LineString"===i&&!0===a?i="Curve":"MultiLineString"===i&&!0===o&&(i="MultiCurve"),h1(this.namespace,i)}writeGeometryNode(t,e){e=this.adaptOptions(e);let i=h1(this.namespace,"geom"),s={node:i,hasZ:this.hasZ,srsName:this.srsName,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_};return e&&Object.assign(s,e),this.writeGeometryElement(i,t,[s]),i}writeFeaturesNode(t,e){e=this.adaptOptions(e);let i=h1(this.namespace,"featureMembers");i.setAttributeNS(h0,"xsi:schemaLocation",this.schemaLocation);let s={srsName:this.srsName,hasZ:this.hasZ,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_,featureNS:this.featureNS,featureType:this.featureType};return e&&Object.assign(s,e),this.writeFeatureMembers_(i,t,[s]),i}}uI.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:h6(uI.prototype.readFlatPos),posList:h6(uI.prototype.readFlatPosList),coordinates:h6(uC.prototype.readFlatCoordinates)}},uI.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:uI.prototype.interiorParser,exterior:uI.prototype.exteriorParser}},uI.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:h6(um.prototype.readPoint),MultiPoint:h6(um.prototype.readMultiPoint),LineString:h6(um.prototype.readLineString),MultiLineString:h6(um.prototype.readMultiLineString),LinearRing:h6(um.prototype.readLinearRing),Polygon:h6(um.prototype.readPolygon),MultiPolygon:h6(um.prototype.readMultiPolygon),Surface:h6(uI.prototype.readSurface),MultiSurface:h6(uI.prototype.readMultiSurface),Curve:h6(uI.prototype.readCurve),MultiCurve:h6(uI.prototype.readMultiCurve),Envelope:h6(uI.prototype.readEnvelope)}},uI.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:h5(uI.prototype.curveMemberParser),curveMembers:h5(uI.prototype.curveMemberParser)}},uI.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:h5(uI.prototype.surfaceMemberParser),surfaceMembers:h5(uI.prototype.surfaceMemberParser)}},uI.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:h5(um.prototype.readLineString),Curve:h5(uI.prototype.readCurve)}},uI.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:h5(um.prototype.readPolygon),Surface:h5(uI.prototype.readSurface)}},uI.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:h6(uI.prototype.readPatch)}},uI.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:h6(uI.prototype.readSegment)}},uI.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:h5(uI.prototype.readFlatPosList),upperCorner:h5(uI.prototype.readFlatPosList)}},uI.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:h6(uI.prototype.readPolygonPatch)}},uI.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:h8(uI.prototype.readLineStringSegment)}},um.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:h6(um.prototype.readFlatLinearRing),Ring:h6(uI.prototype.readFlatCurveRing)}},uI.prototype.writeFeatures,uI.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:h9(uI.prototype.writeRing),interior:h9(uI.prototype.writeRing)}},uI.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:h9(uE),upperCorner:h9(uE)}},uI.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:h9(uI.prototype.writeSurfaceOrPolygonMember),polygonMember:h9(uI.prototype.writeSurfaceOrPolygonMember)}},uI.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:h9(uI.prototype.writePointMember)}},uI.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:h9(uI.prototype.writeLineStringOrCurveMember),curveMember:h9(uI.prototype.writeLineStringOrCurveMember)}},uI.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:h9(uI.prototype.writeCurveOrLineString),MultiCurve:h9(uI.prototype.writeMultiCurveOrLineString),Point:h9(uI.prototype.writePoint),MultiPoint:h9(uI.prototype.writeMultiPoint),LineString:h9(uI.prototype.writeCurveOrLineString),MultiLineString:h9(uI.prototype.writeMultiCurveOrLineString),LinearRing:h9(uI.prototype.writeLinearRing),Polygon:h9(uI.prototype.writeSurfaceOrPolygon),MultiPolygon:h9(uI.prototype.writeMultiSurfaceOrPolygon),Surface:h9(uI.prototype.writeSurfaceOrPolygon),MultiSurface:h9(uI.prototype.writeMultiSurfaceOrPolygon),Envelope:h9(uI.prototype.writeEnvelope)}};var uT=uI;class uA extends uT{constructor(t){super(t=t||{}
1),this.schemaLocation=t.schemaLocation?t.schemaLocation:this.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd"}writeGeometryElement(t,e,i){let s=i[i.length-1];i[i.length-1]=Object.assign({multiCurve:!0,multiSurface:!0},s),super.writeGeometryElement(t,e,i)}}uA.prototype.namespace="http://www.opengis.net/gml/3.2",uA.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:h6(uT.prototype.readFlatPos),posList:h6(uT.prototype.readFlatPosList),coordinates:h6(uC.prototype.readFlatCoordinates)}},uA.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:uT.prototype.interiorParser,exterior:uT.prototype.exteriorParser}},uA.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:h6(um.prototype.readPoint),MultiPoint:h6(um.prototype.readMultiPoint),LineString:h6(um.prototype.readLineString),MultiLineString:h6(um.prototype.readMultiLineString),LinearRing:h6(um.prototype.readLinearRing),Polygon:h6(um.prototype.readPolygon),MultiPolygon:h6(um.prototype.readMultiPolygon),Surface:h6(uA.prototype.readSurface),MultiSurface:h6(uT.prototype.readMultiSurface),Curve:h6(uA.prototype.readCurve),MultiCurve:h6(uT.prototype.readMultiCurve),Envelope:h6(uA.prototype.readEnvelope)}},uA.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:h5(uT.prototype.curveMemberParser),curveMembers:h5(uT.prototype.curveMemberParser)}},uA.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:h5(uT.prototype.surfaceMemberParser),surfaceMembers:h5(uT.prototype.surfaceMemberParser)}},uA.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:h5(um.prototype.readLineString),Curve:h5(uT.prototype.readCurve)}},uA.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:h5(um.prototype.readPolygon),Surface:h5(uT.prototype.readSurface)}},uA.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:h6(uT.prototype.readPatch)}},uA.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:h6(uT.prototype.readSegment)}},uA.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:h5(uT.prototype.readFlatPosList),upperCorner:h5(uT.prototype.readFlatPosList)}},uA.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:h6(uT.prototype.readPolygonPatch)}},uA.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:h8(uT.prototype.readLineStringSegment)}},uA.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:h5(um.prototype.pointMemberParser),pointMembers:h5(um.prototype.pointMemberParser)}},uA.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:h5(um.prototype.lineStringMemberParser),lineStringMembers:h5(um.prototype.lineStringMemberParser)}},uA.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:h5(um.prototype.polygonMemberParser),polygonMembers:h5(um.prototype.polygonMemberParser)}},uA.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:h5(um.prototype.readFlatCoordinatesFromNode)}},uA.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:h5(um.prototype.readLineString)}},uA.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:h5(um.prototype.readPolygon)}},uA.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:h6(um.prototype.readFlatLinearRing),Ring:h6(uA.prototype.readFlatCurveRing)}},uA.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:h9(uT.prototype.writeRing),interior:h9(uT.prototype.writeRing)}},uA.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:h9(uE),upperCorner:h9(uE)}},uA.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:h9(uT.prototype.writeSurfaceOrPolygonMember),polygonMember:h9(uT.prototype.writeSurfaceOrPolygonMember)}},uA.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:h9(uT.prototype.writePointMember)}},uA.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:h9(uT.prototype.writeLineStringOrCurveMember),curveMember:h9(uT.prototype.writeLineStringOrCurveMember)}},uA.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:h9(uT.prototype.writeCurveOrLineString),MultiCurve:h9(uT.prototype.writeMultiCurveOrLineString),Point:h9(uA.prototype.writePoint),MultiPoint:h9(uT.prototype.writeMultiPoint),LineString:h9(uT.prototype.writeCurveOrLineString),MultiLineString:h9(uT.prototype.writeMultiCurveOrLineString),LinearRing:h9(uT.prototype.writeLinearRing),Polygon:h9(uT.prototype.writeSurfaceOrPolygon),MultiPolygon:h9(uT.prototype.writeMultiSurfaceOrPolygon),Surface:h9(uT.prototype.writeSurfaceOrPolygon),MultiSurface:h9(uT.prototype.writeMultiSurfaceOrPolygon),Envelope:h9(uT.prototype.writeEnvelope)}};var z=y("eJ4LZ"),uL=class{constructor(t){this.tagName_=t}getTagName(){return this.tagName_}},uN=class extends uL{constructor(t,e){super(t),this.conditions=e,(0,z.assert)(this.conditions.length>=2,"At least 2 conditions are required")}},uF=class extends uN{constructor(t){super("And",Array.prototype.slice.call(arguments))}},uG=class extends uL{constructor(t,e,i){if(super("BBOX"),this.geometryName=t,this.extent=e,4!==e.length)throw Error("Expected an extent with four values ([minX, minY, maxX, maxY])");this.srsName=i}};
1let uO={"http://www.opengis.net/gml":{boundedBy:h7(um.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:h5(um.prototype.readFeaturesInternal)}},uD={"http://www.opengis.net/wfs":{totalInserted:h7(uy),totalUpdated:h7(uy),totalDeleted:h7(uy)},"http://www.opengis.net/wfs/2.0":{totalInserted:h7(uy),totalUpdated:h7(uy),totalDeleted:h7(uy)}},uk={"http://www.opengis.net/wfs":{TransactionSummary:h7(uX,"transactionSummary"),InsertResults:h7(u$,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:h7(uX,"transactionSummary"),InsertResults:h7(u$,"insertIds")}},uj={"http://www.opengis.net/wfs":{PropertyName:h9(uE)},"http://www.opengis.net/wfs/2.0":{PropertyName:h9(uE)}},uB={"http://www.opengis.net/wfs":{Insert:h9(u0),Update:h9(u3),Delete:h9(u4),Property:h9(u8),Native:h9(u5)},"http://www.opengis.net/wfs/2.0":{Insert:h9(u0),Update:h9(u3),Delete:h9(u4),Property:h9(u8),Native:h9(u5)}},uz="feature",uU="http://www.w3.org/2000/xmlns/",uW={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},uV={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},uq={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},uZ={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},uK={"2.0.0":uA,"1.1.0":uT,"1.0.0":uC};function uH(t,e,i,s){ur(s,uB,ut(t),e,i)}function uX(t,e){return us({},uD,t,e)}let uY={"http://www.opengis.net/ogc":{FeatureId:h5(function(t,e){return t.getAttribute("fid")})},"http://www.opengis.net/ogc/1.1":{FeatureId:h5(function(t,e){return t.getAttribute("fid")})}};function uQ(t,e){ui(uY,t,e)}let uJ={"http://www.opengis.net/wfs":{Feature:uQ},"http://www.opengis.net/wfs/2.0":{Feature:uQ}};function u$(t,e){return us([],uJ,t,e)}function u0(t,e,i){let s=i[i.length-1],r=s.featureType,n=s.featureNS,a=s.gmlVersion,o=h1(n,r);t.appendChild(o),2===a?uC.prototype.writeFeatureElement(o,e,i):3===a?uT.prototype.writeFeatureElement(o,e,i):uA.prototype.writeFeatureElement(o,e,i)}function u1(t,e,i){let s=uW[i[i.length-1].version],r=h1(s,"Filter"),n=h1(s,"FeatureId");r.appendChild(n),n.setAttribute("fid",e),t.appendChild(r)}function u2(t,e){let i=(t=t||uz)+":";return e.startsWith(i)?e:i+e}function u4(t,e,i){let s=i[i.length-1];(0,z.assert)(void 0!==e.getId(),"Features must have an id set");let r=s.featureType,n=s.featurePrefix,a=s.featureNS,o=u2(n,r);t.setAttribute("typeName",o),t.setAttributeNS(uU,"xmlns:"+n,a);let l=e.getId();void 0!==l&&u1(t,l,i)}function u3(t,e,i){let s=i[i.length-1];(0,z.assert)(void 0!==e.getId(),"Features must have an id set");let r=s.version,n=s.featureType,a=s.featurePrefix,o=s.featureNS,l=u2(a,n),h=e.getGeometryName();t.setAttribute("typeName",l),t.setAttributeNS(uU,"xmlns:"+a,o);let u=e.getId();if(void 0!==u){let n=e.getKeys(),a=[];for(let t=0,i=n.length;t<i;t++){let i=e.get(n[t]);if(void 0!==i){let e=n[t];i&&"function"==typeof i.getSimplifiedGeometry&&(e=h),a.push({name:e,value:i})}}ur({version:r,gmlVersion:s.gmlVersion,node:t,hasZ:s.hasZ,srsName:s.srsName},uB,ut("Property"),a,i),u1(t,u,i)}}function u8(t,e,i){let s=i[i.length-1],r=s.version,n=uV[r],a=h1(n,"2.0.0"===r?"ValueReference":"Name"),o=s.gmlVersion;if(t.appendChild(a),uE(a,e.name),void 0!==e.value&&null!==e.value){let s=h1(n,"Value");t.appendChild(s),e.value&&"function"==typeof e.value.getSimplifiedGeometry?2===o?uC.prototype.writeGeometryElement(s,e.value,i):3===o?uT.prototype.writeGeometryElement(s,e.value,i):uA.prototype.writeGeometryElement(s,e.value,i):uE(s,e.value)}}function u5(t,e,i){e.vendorId&&t.setAttribute("vendorId",e.vendorId),void 0!==e.safeToIgnore&&t.setAttribute("safeToIgnore",String(e.safeToIgnore)),void 0!==e.value&&uE(t,e.value)}let u6={"http://www.opengis.net/wfs":{Query:h9(u7)},"http://www.opengis.net/wfs/2.0":{Query:h9(u7)},"http://www.opengis.net/ogc":{During:h9(di),And:h9(ds),Or:h9(ds),Not:h9(dr),BBOX:h9(u9),Contains:h9(dt),Intersects:h9(dt),Within:h9(dt),DWithin:h9(de),PropertyIsEqualTo:h9(dn),PropertyIsNotEqualTo:h9(dn),PropertyIsLessThan:h9(dn),PropertyIsLessThanOrEqualTo:h9(dn),PropertyIsGreaterThan:h9(dn),PropertyIsGreaterThanOrEqualTo:h9(dn),PropertyIsNull:h9(da),PropertyIsBetween:h9(dl),PropertyIsLike:h9(dh)},"http://www.opengis.net/fes/2.0":{During:h9(di),And:h9(ds),Or:h9(ds),Not:h9(dr),BBOX:h9(u9),Contains:h9(dt),Disjoint:h9(dt),Intersects:h9(dt),ResourceId:h9(function(t,e,
1i){t.setAttribute("rid",e.rid)}),Within:h9(dt),DWithin:h9(de),PropertyIsEqualTo:h9(dn),PropertyIsNotEqualTo:h9(dn),PropertyIsLessThan:h9(dn),PropertyIsLessThanOrEqualTo:h9(dn),PropertyIsGreaterThan:h9(dn),PropertyIsGreaterThanOrEqualTo:h9(dn),PropertyIsNull:h9(da),PropertyIsBetween:h9(dl),PropertyIsLike:h9(dh)}};function u7(t,e,i){let s,r,n=i[i.length-1],a=n.version,o=n.featurePrefix,l=n.featureNS,h=n.propertyNames,u=n.srsName;s=o?u2(o,e):e,r="2.0.0"===a?"typeNames":"typeName",t.setAttribute(r,s),u&&t.setAttribute("srsName",u),l&&t.setAttributeNS(uU,"xmlns:"+o,l);let d=Object.assign({},n);d.node=t,ur(d,uj,ut("PropertyName"),h,i);let c=n.filter;if(c){var g,f,p;let e,s,r=h1(dp(a),"Filter");t.appendChild(r),g=r,f=c,e=(p=i)[p.length-1],Object.assign(s={node:g},{context:e}),ur(s,u6,ut(f.getTagName()),[f],p)}}function u9(t,e,i){let s=i[i.length-1],r=s.context.version;s.srsName=e.srsName;let n=uK[r];dc(r,t,e.geometryName),n.prototype.writeGeometryElement(t,e.extent,i)}function dt(t,e,i){let s=i[i.length-1],r=s.context.version;s.srsName=e.srsName;let n=uK[r];dc(r,t,e.geometryName),n.prototype.writeGeometryElement(t,e.geometry,i)}function de(t,e,i){let s=i[i.length-1].context.version;dt(t,e,i);let r=h1(dp(s),"Distance");uE(r,e.distance.toString()),"2.0.0"===s?r.setAttribute("uom",e.unit):r.setAttribute("units",e.unit),t.appendChild(r)}function di(t,e,i){du(uq[i[i.length-1].context.version],"ValueReference",t,e.propertyName);let s=h1(uf,"TimePeriod");t.appendChild(s);let r=h1(uf,"begin");s.appendChild(r),dg(r,e.begin);let n=h1(uf,"end");s.appendChild(n),dg(n,e.end)}function ds(t,e,i){let s=i[i.length-1].context,r={node:t};Object.assign(r,{context:s});let n=e.conditions;for(let t=0,e=n.length;t<e;++t){let e=n[t];ur(r,u6,ut(e.getTagName()),[e],i)}}function dr(t,e,i){let s=i[i.length-1].context,r={node:t};Object.assign(r,{context:s});let n=e.condition;ur(r,u6,ut(n.getTagName()),[n],i)}function dn(t,e,i){let s=i[i.length-1].context.version;void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString()),dc(s,t,e.propertyName),dd(s,t,""+e.expression)}function da(t,e,i){dc(i[i.length-1].context.version,t,e.propertyName)}function dl(t,e,i){let s=i[i.length-1].context.version,r=dp(s);dc(s,t,e.propertyName);let n=h1(r,"LowerBoundary");t.appendChild(n),dd(s,n,""+e.lowerBoundary);let a=h1(r,"UpperBoundary");t.appendChild(a),dd(s,a,""+e.upperBoundary)}function dh(t,e,i){let s=i[i.length-1].context.version;t.setAttribute("wildCard",e.wildCard),t.setAttribute("singleChar",e.singleChar),t.setAttribute("escapeChar",e.escapeChar),void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString()),dc(s,t,e.propertyName),dd(s,t,""+e.pattern)}function du(t,e,i,s){let r=h1(t,e);uE(r,s),i.appendChild(r)}function dd(t,e,i){du(dp(t),"Literal",e,i)}function dc(t,e,i){"2.0.0"===t?du(uq[t],"ValueReference",e,i):du(uW[t],"PropertyName",e,i)}function dg(t,e){let i=h1(uf,"TimeInstant");t.appendChild(i);let s=h1(uf,"timePosition");i.appendChild(s),uE(s,e)}function df(t,e,i){let s=Object.assign({},i[i.length-1]);s.node=t,ur(s,u6,ut("Query"),e,i)}function dp(t){return"2.0.0"===t?uq[t]:uW[t]}var d_=class extends ug{constructor(t){super(),t=t||{},this.version_=t.version?t.version:"1.1.0",this.featureType_=t.featureType,this.featureNS_=t.featureNS,this.gmlFormat_=t.gmlFormat?t.gmlFormat:new uK[this.version_],this.schemaLocation_=t.schemaLocation?t.schemaLocation:uZ[this.version_]}getFeatureType(){return this.featureType_}setFeatureType(t){this.featureType_=t}readFeaturesFromNode(t,e){let i={node:t};Object.assign(i,{featureType:this.featureType_,featureNS:this.featureNS_}),Object.assign(i,this.getReadOptions(t,e||{}));let s=[i],r=us([],"2.0.0"===this.version_?uO:this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,s,this.gmlFormat_);return r||(r=[]),r}readTransactionResponse(t){if(t){if("string"==typeof t){let e=h3(t);return this.readTransactionResponseFromDocument(e)}return h4(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t)}}readFeatureCollectionMetadata(t){if(t){if("string"==typeof t){let e=h3(t);return this.readFeatureCollectionMetadataFromDocument(e)}
1return h4(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}}readFeatureCollectionMetadataFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(e)}readFeatureCollectionMetadataFromNode(t){let e={};return e.numberOfFeatures=ux(t.getAttribute("numberOfFeatures")),us(e,uO,t,[],this.gmlFormat_)}readTransactionResponseFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(e)}readTransactionResponseFromNode(t){return us({},uk,t,[])}writeGetFeature(t){let e=h1(uV[this.version_],"GetFeature");e.setAttribute("service","WFS"),e.setAttribute("version",this.version_),t.handle&&e.setAttribute("handle",t.handle),t.outputFormat&&e.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&e.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&e.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&e.setAttribute("startIndex",String(t.startIndex)),void 0!==t.count&&e.setAttribute("count",String(t.count)),void 0!==t.viewParams&&e.setAttribute("viewParams",t.viewParams),e.setAttributeNS(h0,"xsi:schemaLocation",this.schemaLocation_);let i={node:e};if(Object.assign(i,{version:this.version_,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.featureNS_,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),(0,z.assert)(Array.isArray(t.featureTypes),"`options.featureTypes` must be an Array"),"string"==typeof t.featureTypes[0]){let s=t.filter;t.bbox&&((0,z.assert)(t.geometryName,"`options.geometryName` must also be provided when `options.bbox` is set"),s=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,s)),Object.assign(i,{geometryName:t.geometryName,filter:s}),df(e,t.featureTypes,[i])}else t.featureTypes.forEach(s=>{let r=this.combineBboxAndFilter(s.geometryName,s.bbox,t.srsName,t.filter);Object.assign(i,{geometryName:s.geometryName,filter:r}),df(e,[s.name],[i])});return e}combineBboxAndFilter(t,e,i,s){let r=new uG(t,e,i);return s?function(t){let e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(uF,e))}(s,r):r}writeTransaction(t,e,i,s){var r,n,a,o;let l,h,u,d=[],c=s.version?s.version:this.version_,g=h1(uV[c],"Transaction");g.setAttribute("service","WFS"),g.setAttribute("version",c),s&&(u=s.gmlOptions?s.gmlOptions:{},s.handle&&g.setAttribute("handle",s.handle)),g.setAttributeNS(h0,"xsi:schemaLocation",uZ[c]);let f=(r=g,n=u,a=c,h=(o=s).featurePrefix?o.featurePrefix:uz,"1.0.0"===a?l=2:"1.1.0"===a?l=3:"2.0.0"===a&&(l=3.2),Object.assign({node:r},{version:a,featureNS:o.featureNS,featureType:o.featureType,featurePrefix:h,gmlVersion:l,hasZ:o.hasZ,srsName:o.srsName},n));return t&&uH("Insert",t,d,f),e&&uH("Update",e,d,f),i&&uH("Delete",i,d,f),s.nativeElements&&uH("Native",s.nativeElements,d,f),g}readProjectionFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(e);return null}readProjectionFromNode(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild){t=t.firstElementChild.firstElementChild;for(let e=t.firstElementChild;e;e=e.nextElementSibling)if(0!==e.childNodes.length&&(1!==e.childNodes.length||3!==e.firstChild.nodeType)){let t=[{}];return this.gmlFormat_.readGeometryElement(e,t),tQ(t.pop().srsName)}}return null}};let dm=new lN({attributions:["<a href='https://www.atlas-sanitaire-coquillages.fr' target='_blank' rel='noopener'><img src='https://www.opalesurfcasting.net/geoportail/logos/eaufrance.png' alt ='eaufrance logo'></a>"],strategy:l_,loader:async(t,e,i)=>{let s="2.0.0",r=["ZoneProdConchy_FXX"],n="http://xml.sandre.eaufrance.fr/",a="EPSG:4326",o=t7(t,i,a);o=[o[1],o[0],o[3],o[2]],await ll()&&(await console.log("extent 3857:"+t),await console.log(a+" : "+o));let l=new d_({version:s}).writeGetFeature({featureNS:n,featurePrefix:"sa",featureTypes:r,srsName:a,geometryName:"msGeometry",propertyNames:["msGeometry","LbZCY","CdZCY","DatePubliTextReglem","URLTexteReglem","ValClasGP1","ValClasGP2","ValClasGP3"],bbox:o});await fetch("https://www.opalesurfcasting.net/cgi-bin/proxy.cgi?url=https://services.sandre.eaufrance.fr/geo/sandre?",{method:"POST",body:new XMLSerializer().serializeToString(l)}
1).then(async t=>t.text()).then(async t=>{let e=new d_({version:s,featureNS:n,featureType:r}).readFeatures(t,{dataProjection:a,featureProjection:i}),o=await dy(e);await dm.addFeatures(o)})}});async function dy(t){let e=[];for(let i=0,s=t.length;i<s;i++){let s;try{s=await t[i].getGeometry().getType()}catch(e){await console.log("Géométrie manquante pour : "+await t[i].get("CdZCY"));continue}if("MultiPolygon"===s){let e=await t[i].getGeometry().getPolygons(),s=[];for(let t=0,i=e.length;t<i;t++)if(!(await e[t].getArea()>1e4))continue;else s.push(e[t].getCoordinates());await t[i].getGeometry().setCoordinates(s)}e.push(t[i])}return e}let dx=new ag({minResolution:.29,maxResolution:153,style:function(t){let e=t.get("ValClasGP1"),i=t.get("ValClasGP2"),s=t.get("ValClasGP3"),r=t.get("CdZCY");return lV.includes(e)&&lV.includes(i)&&lV.includes(s)?(hQ.redStylePoly.getText().setText(r),t.set("styleSelected","redStylePoly"),hQ.redStylePoly):lq.includes(e)&&lq.includes(i)&&lq.includes(s)?(hQ.greenStylePoly.getText().setText(r),t.set("styleSelected","greenStylePoly"),hQ.greenStylePoly):lq.includes(e)||lq.includes(i)||lq.includes(s)?(hQ.orangeStylePoly.getText().setText(r),t.set("styleSelected","orangeStylePoly"),hQ.orangeStylePoly):(hQ.basicStylePoly.getText().setText(r),t.set("styleSelected","basicStylePoly"),hQ.basicStylePoly)},declutter:!0,source:dm});dx.set("id","ZPC"),dx.set("title","Classement sanitaire des zones de production conchylicoles");let dS=new lN({attributions:["<a href='https://www.bretagne.ars.sante.fr/la-peche-pied-recreative-en-bretagne' target='_blank' rel='noopener'><img src='https://www.opalesurfcasting.net/geoportail/logos/ARSBretagne.jpg' alt ='ARS Bretagne logo'></a>"],strategy:l_,loader:async(t,e,i)=>{let s="1.0.0",r=["alert_fishing_zone_point"],n="http://mapserver.gis.umn.edu/mapserver",a="EPSG:3857",o=t7(t,i,a);await ll()&&(await console.log("extent 3857:"+t),await console.log(a+" : "+o));let l=new d_({version:s}).writeGetFeature({featureNS:n,featureTypes:r,srsName:a,geometryName:"the_geom",propertyNames:["the_geom","libelle","commune","pdfname"],bbox:o});await fetch("https://www.opalesurfcasting.net/cgi-bin/proxy.cgi?url=https://www.pecheapied-responsable.fr/geoadmin/?",{method:"POST",body:new XMLSerializer().serializeToString(l)}).then(async t=>await t.text()).then(async t=>{let e=new d_({version:s,featureNS:n,featureType:r}).readFeatures(t,{dataProjection:a,featureProjection:i});await dS.addFeatures(e)})}}),dv=new ag({minResolution:.29,maxResolution:153,style:function(t){return"2"===t.get("consigne_n")?(hQ.blackStyleCircle.getText().setText("ARS"),t.set("styleSelected","blackStyleCircle"),hQ.blackStyleCircle):"4"===t.get("consigne_n")?(hQ.redStyleCircle.getText().setText("ARS"),t.set("styleSelected","redStyleCircle"),hQ.redStyleCircle):"1"===t.get("consigne_n")?(hQ.greenStyleCircle.getText().setText("ARS"),t.set("styleSelected","greenStyleCircle"),hQ.greenStyleCircle):"0"===t.get("consigne_n")?(hQ.blueStyleCircle.getText().setText("ARS"),t.set("styleSelected","blueStyleCircle"),hQ.blueStyleCircle):(hQ.orangeStyleCircle.getText().setText("ARS"),t.set("styleSelected","orangeStyleCircle"),hQ.orangeStyleCircle)},declutter:!0,source:dS});dv.set("id","ARSBretagne"),dv.set("title","ARS Bretagne - Coquillages");var U=y("kKEgb"),th=y("lVQul");function dw(t){return"string"==typeof t?JSON.parse(t)||null:null!==t?t:null}var dE=class extends ul{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(dw(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(dw(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return(0,th.abstract)()}readFeaturesFromObject(t,e){return(0,th.abstract)()}readGeometry(t,e){return this.readGeometryFromObject(dw(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return(0,th.abstract)()}readProjection(t){return this.readProjectionFromObject(dw(t))}readProjectionFromObject(t){return(0,th.abstract)()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return(0,th.abstract)()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return(0,th.abstract)()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return(0,th.abstract)()}};function dM(t,e){let i;if(!t)return null;switch(t.type){case"Point":let s;i={type:"Point",flatCoordinates:s=t.coordinates,layout:ey(s.length)};break;case"LineString":let r,n;i={type:"LineString",flatCoordinates:n=(r=t.coordinates).flat(),ends:[n.length],layout:ey(r[0]?.length||2)};break;case"Polygon":let a,o,l,h;a=t.coordinates,o=[],l=a[0]?.[0]?.length,h=eI(o,0,a,l),i={type:"Polygon",flatCoordinates:o,ends:h,layout:ey(l)};break;case"MultiPoint":let u;i={type:"MultiPoint",flatCoordinates:(u=t.coordinates).flat(),layout:ey(u[0]?.length||2)};break;case"MultiLineString":let d,c,g,f;d=t.coordinates,c=d[0]?.[0]?.length||2,f=eI(g=[],0,d,c),i={type:"MultiLineString",flatCoordinates:g,ends:f,layout:ey(c)};break;case"MultiPolygon":let p,_,m,y;p=t.coordinates,_=[],m=p[0]?.[0]?.[0].length||2,y=eT(_,0,p,m),i={type:"MultiPolygon",flatCoordinates:_,ends:y,layout:ey(m)};break;case"GeometryCollection":i=t.geometries.map(function(t){return dM(t,void 0)});break;default:throw Error("Unsupported GeoJSON type: "+t.type)}return i}function dP(t,e){var i,s,r,n,a,o;let l,h=(t=uh(t,!0,e)).getType();switch(h){case"Point":l={type:"Point",coordinates:t.getCoordinates()};break;case"LineString":l={type:"LineString",coordinates:t.getCoordinates()};break;case"Polygon":let u;i=t,(s=e)&&(u=s.rightHanded),l={type:"Polygon",coordinates:i.getCoordinates(u)};break;case"MultiPoint":l={type:"MultiPoint",coordinates:t.getCoordinates()};break;case"MultiLineString":l={type:"MultiLineString",coordinates:t.getCoordinates()};break;case"MultiPolygon":let d;r=t,(n=e)&&(d=n.rightHanded),l={type:"MultiPolygon",coordinates:r.getCoordinates(d)};break;case"GeometryCollection":a=t,o=Object.assign({},o=e),delete o.featureProjection,l={type:"GeometryCollection",geometries:a.getGeometriesArray().map(function(t){return dP(t,o)})};break;case"Circle":l={type:"GeometryCollection",geometries:[]};break;default:throw Error("Unsupported geometry type: "+h)}return l}var dC=class extends dE{constructor(t){t=t||{},super(),this.dataProjection=tQ(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=tQ(t.featureProjection)),t.featureClass&&(this.featureClass=t.featureClass),this.geometryName_=t.geometryName,this.extractGeometryName_=t.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(t,e){let i=null,s=dM((i="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,e);if(this.featureClass===lP)return function t(e,i){var s,r;let n=e.geometry;if(!n)return[];if(Array.isArray(n))return n.map(i=>t({...e,geometry:i})).flat();let a="MultiPolygon"===n.type?"Polygon":n.type;if("GeometryCollection"===a||"Circle"===a)throw Error("Unsupported geometry type: "+a);let o=n.layout.length;return uh(new lP(a,"Polygon"===a?(s=n.flatCoordinates,r=n.ends,Array.isArray(r[0])?!eY(s,0,r,o)&&eJ(s=s.slice(),0,r,o):!eX(s,0,r,o)&&eQ(s=s.slice(),0,r,o),s):n.flatCoordinates,n.ends?.flat(),o,e.properties||{},e.id).enableSimplifyTransformed(),!1,i)}({geometry:s,id:i.id,properties:i.properties},e);let r=new nf;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&i.geometry_name&&r.setGeometryName(i.geometry_name),r.setGeometry(uc(s,e)),"id"in i&&r.setId(i.id
1),i.properties&&r.setProperties(i.properties,!0),r}readFeaturesFromObject(t,e){let i=null;if("FeatureCollection"===t.type){i=[];let s=t.features;for(let t=0,r=s.length;t<r;++t){let r=this.readFeatureFromObject(s[t],e);r&&i.push(r)}}else i=[this.readFeatureFromObject(t,e)];return i.flat()}readGeometryFromObject(t,e){var i;return uc(dM(t,i=e),i)}readProjectionFromObject(t){let e,i=t.crs;if(i)if("name"==i.type)e=tQ(i.properties.name);else if("EPSG"===i.type)e=tQ("EPSG:"+i.properties.code);else throw Error("Unknown SRS type");else e=this.dataProjection;return e}writeFeatureObject(t,e){e=this.adaptOptions(e);let i={type:"Feature",geometry:null,properties:null},s=t.getId();if(void 0!==s&&(i.id=s),!t.hasProperties())return i;let r=t.getProperties(),n=t.getGeometry();return n&&(i.geometry=dP(n,e),delete r[t.getGeometryName()]),(0,U.isEmpty)(r)||(i.properties=r),i}writeFeaturesObject(t,e){e=this.adaptOptions(e);let i=[];for(let s=0,r=t.length;s<r;++s)i.push(this.writeFeatureObject(t[s],e));return{type:"FeatureCollection",features:i}}writeGeometryObject(t,e){return dP(t,this.adaptOptions(e))}};let db=new ag({minResolution:.29,maxResolution:153,style:function(t){return"Interdit"===t.get("Statut")?(hQ.redStyleCircle.getText().setText("ARS"),t.set("styleSelected","redStyleCircle"),hQ.redStyleCircle):(hQ.orangeStyleCircle.getText().setText("ARS"),t.set("styleSelected","orangeStyleCircle"),hQ.orangeStyleCircle)},source:new lN({format:new dC({}),attributions:["<a href='https://www.pays-de-la-loire.ars.sante.fr/ou-pecher-peche-pied-en-pays-de-la-loire' target='_blank' rel='noopener'><img src='https://www.opalesurfcasting.net/geoportail/logos/Logo_ARS_PAYS_DE_LOIRE.png' alt ='ARS Pays-de-Loire logo'></a>"],url:"https://www.opalesurfcasting.net/geoportail/GEOJson/coquillagesARSPaysDeLoire.geojson"})});db.set("id","ARSPDL"),db.set("title","ARS Pays-de-Loire - Coquillages");let dR=["SHOM/shom.fr"],dI="https://services.data.shom.fr/INSPIRE/wmts",dT="3857",dA="image/png",dL="normal",dN=new hc({origin:[-0x131bf84,0x131bf84],resolutions:lU,matrixIds:lz}),dF=new hh({extent:[947226.4527192283,5054588.935234591,1076369.307183413,5325177.7955751205],opacity:.7,visible:!1,source:new hT({attributions:dR,url:dI,layer:"EPAVES_PYR-PNG_WLD_3857_WMTS",matrixSet:dT,format:dA,style:dL,transition:0,tileGrid:dN})});dF.set("title","Épaves et obstructions maritimes - Corse");let dG=new hh({extent:[485054.6436233468,5308136.936238948,839002.7569649155,5433957.640423981],opacity:.7,visible:!1,source:new hT({attributions:dR,url:dI,layer:"EPAVES_PYR-PNG_WLD_3857_WMTS",matrixSet:dT,format:dA,style:dL,transition:0,tileGrid:dN})});dG.set("title","Épaves et obstructions maritimes - Provence-Alpes-Côte d'Azur");let dO=new hh({extent:[329888.63179641863,5238106.618808954,494820.7025506407,5400367.275893897],opacity:.7,visible:!1,source:new hT({attributions:dR,url:dI,layer:"EPAVES_PYR-PNG_WLD_3857_WMTS",matrixSet:dT,format:dA,style:dL,transition:0,tileGrid:dN})});dO.set("title","Epaves et obstructions maritimes - Languedoc-Roussillon");let dD=new hh({extent:[-375e3,5e6,-4e4,572e4],opacity:.7,visible:!1,source:new hT({attributions:dR,url:dI,layer:"EPAVES_PYR-PNG_WLD_3857_WMTS",matrixSet:dT,format:dA,style:dL,transition:0,tileGrid:dN})});dD.set("title","Epaves et obstructions maritimes - Aquitaine - Atlantique Sud");let dk=new hh({extent:[-375e3,572e4,-1e5,599e4],opacity:.7,visible:!1,source:new hT({attributions:dR,url:dI,layer:"EPAVES_PYR-PNG_WLD_3857_WMTS",matrixSet:dT,format:dA,style:dL,transition:0,tileGrid:dN})});dk.set("title","Epaves et obstructions maritimes - Pays-de-Loire, Charente-Maritime Atlantique Nord");let dj=new hh({extent:[-375e3,598e4,-263842.6665892786,6049682.899729898],opacity:.7,visible:!1,source:new hT({attributions:dR,url:dI,layer:"EPAVES_PYR-PNG_WLD_3857_WMTS",matrixSet:dT,format:dA,style:dL,transition:0,tileGrid:dN})});dj.set("title","Epaves et obstructions maritimes - Bretagne - Morbihan");let dB=new hh({extent:[-591361.4177461993,6037412.596039738,-341361.21851757343,6237411.389036475],opacity:.7,visible:!1,source:new hT({attributions:dR,url:dI,layer:"EPAVES_PYR-PNG_WLD_3857_WMTS",matrixSet:dT,format:dA,style:dL,transition:0,tileGrid:dN})});dB.set("title","Epaves et obstructions maritimes - Bretagne - Finistère");let dz=new hh({extent:[-428725.8680870424,6185304.591176296,-167388.8919160296,6263585.258919287],opacity:.7,visible:!1,source:new hT({attributions:dR,url:dI,layer:"EPAVES_PYR-PNG_WLD_3857_WMTS",matrixSet:dT,format:dA,style:dL,transition:0,tileGrid:dN})});dz.set("title","Epaves et obstructions maritimes - Bretagne - Côtes d'Armor");let dU=new hh({extent:[-220230.02780578067,6202161.398453447,329769.5199412698,6652147.969220315],opacity:.7,visible:!1,source:new hT({attributions:dR,url:dI,layer:"EPAVES_PYR-PNG_WLD_3857_WMTS",matrixSet:dT,format:dA,style:dL,transition:0,tileGrid:dN})});dU.set("title","Epaves et obstructions maritime - Normandie et Hauts-De-France");var z=y("eJ4LZ"),K=y("kBSVF"),Q=y("jZquI"),th=y("lVQul");let dW={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},dV={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};var dq=class extends hn{constructor(t,e){super(t,e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.renderedOpacity_=1,this.tmpTransform_=ei(),this.tileClipContexts_=null}
1enqueueTilesForNextExtent(){return"vector"!==this.getLayer().getRenderMode()}drawTile(t,e,i,s,r,n,a,o){this.updateExecutorGroup_(t,e.pixelRatio,e.viewState.projection),this.tileImageNeedsRender_(t)&&this.renderTileImage_(t,e),super.drawTile(t,e,i,s,r,n,a,o)}getTile(t,e,i,s){let r=this.getOrCreateTile(t,e,i,s);if(!r)return null;let n=s.viewState,a=n.resolution,o=s.viewHints,l=this.getLayer().getSource(),h=l.getTileGridForProjection(n.projection),u=!(o[0]||o[1]),d=h.getZForResolution(a,l.zDirection)===t;return u&&d?r.wantedResolution=a:r.wantedResolution||(r.wantedResolution=h.getResolution(t)),r}prepareFrame(t){let e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,i){let s=this.getLayer(),r=s.getRevision(),n=s.getRenderOrder()||null,a=t.wantedResolution,o=t.getReplayState(s);if(!o.dirty&&o.renderedResolution===a&&o.renderedRevision==r&&o.renderedPixelRatio===e&&o.renderedRenderOrder==n)return;let l=s.getSource(),h=!!s.getDeclutter(),u=l.getTileGrid(),d=l.getTileGridForProjection(i).getTileCoordExtent(t.wrappedTileCoord),c=l.getSourceTiles(e,i,t),g=(0,th.getUid)(s);delete t.hitDetectionImageData[g],t.executorGroups[g]=[],o.dirty=!1;for(let r=0,f=c.length;r<f;++r){let f=c[r];if(2!=f.getState())continue;let p=l.getProjection(),_=f.tileCoord,m=u.getTileCoordExtent(_);i&&p&&!t4(i,p)&&(m=t7(m,p,i,32));let y=(0,Q.getIntersection)(d,m),x=(0,Q.buffer)(y,s.getRenderBuffer()*a,this.tempExtent),S=(0,Q.equals)(m,y)?null:x,v=new nz(0,y,a,e),w=ar(a,e),E=function(t,e){let i,r=t.getStyleFunction()||s.getStyleFunction();if(r&&(i=r(t,a)),i){let s=this.renderFeature(t,w,i,v,h,e);o.dirty=o.dirty||s}},M=f.getFeatures();n&&n!==o.renderedRenderOrder&&M.sort(n);for(let t=0,e=M.length;t<e;++t){let e=M[t];i&&f.projection&&!t4(i,f.projection)&&(e=e.clone()).getGeometry().applyTransform(t5(f.projection,i)),(!S||(0,Q.intersects)(S,e.getGeometry().getExtent()))&&E.call(this,e,t)}let P=v.finish(),C=new n7("vector"!==s.getRenderMode()&&h&&1===c.length?null:y,a,e,l.getOverlaps(),P,s.getRenderBuffer(),!0);t.executorGroups[g].push(C)}o.renderedRevision=r,o.renderedPixelRatio=e,o.renderedRenderOrder=n,o.renderedResolution=a}forEachFeatureAtCoordinate(t,e,i,s,r){let n,a=e.viewState.resolution,o=e.viewState.rotation;i=void 0==i?0:i;let l=this.getLayer(),h=l.getSource().getTileGridForProjection(e.viewState.projection),u=(0,Q.boundingExtent)([t]);(0,Q.buffer)(u,a*i,u);let d={},c=function(t,e,i){let n=t.getId();void 0===n&&(n=(0,th.getUid)(t));let a=d[n];if(a){if(!0!==a&&i<a.distanceSq){if(0===i)return d[n]=!0,r.splice(r.lastIndexOf(a),1),s(t,l,e);a.geometry=e,a.distanceSq=i}}else{if(0===i)return d[n]=!0,s(t,l,e);r.push(d[n]={feature:t,layer:l,geometry:e,distanceSq:i,callback:s})}},g=this.renderedTiles,f=(0,th.getUid)(l),p=l.getDeclutter(),_=p?e.declutter?.[p]?.all().map(t=>t.value):null;i:for(let e=0,s=g.length;e<s;++e){let s=g[e],r=h.getTileCoordExtent(s.wrappedTileCoord);if(!(0,Q.intersects)(r,u))continue;let l=s.executorGroups[f];for(let e=0,s=l.length;e<s;++e)if(n=l[e].forEachFeatureAtCoordinate(t,a,o,i,c,_))break i}return n}getFeatures(t){return 0===this.renderedTiles.length?Promise.resolve([]):new Promise((e,i)=>{let s=this.getLayer(),r=s.getSource(),n=this.renderedProjection,a=n.getExtent(),o=this.renderedResolution,l=r.getTileGridForProjection(n),h=ea(this.renderedPixelToCoordinateTransform_,t.slice()),u=l.getTileCoordForCoordAndResolution(h,o).toString(),d=this.renderedTiles.find(t=>t.tileCoord.toString()===u&&2===t.getState());if(!d||d.loadingSourceTiles>0)return void e([]);r.getWrapX()&&n.canWrapX()&&!(0,Q.containsExtent)(a,l.getTileCoordExtent(d.tileCoord))&&te(h,n);let c=(0,th.getUid)(s),g=l.getTileCoordExtent(d.wrappedTileCoord),f=(0,Q.getTopLeft)(g),p=[(h[0]-f[0])/o,(f[1]-h[1])/o],_=d.getSourceTiles().reduce((t,e)=>t.concat(e.getFeatures()),[]),m=d.hitDetectionImageData[c];if(!m){let t=sg(l.getTileSize(l.getZForResolution(o,r.zDirection))),e=this.renderedRotation_,i=[this.getRenderTransform(l.getTileCoordCenter(d.wrappedTileCoord),o,0,.5,.5*t[0],.5*t[1],0)];m=at(t,i,_,s.getStyleFunction(),l.getTileCoordExtent(d.wrappedTileCoord),d.getReplayState(s).renderedResolution,e),d.hitDetectionImageData[c]=m}e(ae(p,_,m))})}getFeaturesInExtent(t){let e=[],i=this.getTileCache();if(0===i.getCount())return e;let s=this.getLayer().getSource().getTileGridForProjection(this.frameState.viewState.projection),r=s.getZForResolution(this.renderedResolution),n={};
1return i.forEach(i=>{if(i.tileCoord[0]!==r||2!==i.getState())return;let a=i.getSourceTiles();for(let i=0,r=a.length;i<r;++i){let r=a[i],o=r.getKey();if(o in n)continue;n[o]=!0;let l=r.tileCoord;if((0,Q.intersects)(t,s.getTileCoordExtent(l))){let i=r.getFeatures();if(i)for(let s=0,r=i.length;s<r;++s){let r=i[s],n=r.getGeometry();(0,Q.intersects)(t,n.getExtent())&&e.push(r)}}}}),e}handleFontsChanged(){let t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderDeclutter(t,e){let i=this.context,s=i.globalAlpha;i.globalAlpha=e.opacity;let r=t.viewHints,n=!(r[0]||r[1]),a=[this.context.canvas.width,this.context.canvas.height],o=this.getLayer().getDeclutter(),l=o?t.declutter?.[o]:void 0,h=(0,th.getUid)(this.getLayer()),u=this.renderedTiles;for(let e=0,i=u.length;e<i;++e){let i=u[e],s=i.executorGroups[h];if(s)for(let e=s.length-1;e>=0;--e)s[e].execute(this.context,a,this.getTileRenderTransform(i,t),t.viewState.rotation,n,n4,l)}i.globalAlpha=s}renderDeferredInternal(t){let e=this.renderedTiles,i=(0,th.getUid)(this.getLayer()),s=e.reduce((t,e,s)=>(e.executorGroups[i].forEach(e=>t.push({executorGroup:e,index:s})),t),[]),r=s.map(({executorGroup:t})=>t.getDeferredZIndexContexts()),n={};for(let t=0,e=s.length;t<e;++t){let e=s[t].executorGroup.getDeferredZIndexContexts();for(let t in e)n[t]=!0}Object.keys(n).map(Number).sort(K.ascending).forEach(t=>{r.forEach((e,i)=>{e[t]&&(e[t].forEach(t=>{let{executorGroup:e,index:r}=s[i],n=e.getRenderedContext(),a=n.globalAlpha;n.globalAlpha=this.renderedOpacity_;let o=this.tileClipContexts_[r];o&&o.draw(n),t.draw(n),o&&n.restore(),n.globalAlpha=a,t.clear()}),e[t].length=0)})})}getTileRenderTransform(t,e){let i=e.pixelRatio,s=e.viewState,r=s.center,n=s.resolution,a=s.rotation,o=e.size,l=Math.round(o[0]*i),h=Math.round(o[1]*i),u=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),d=t.tileCoord,c=u.getTileCoordExtent(t.wrappedTileCoord),g=u.getTileCoordExtent(d,this.tempExtent)[0]-c[0];return er(eo(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(r,n,a,i,l,h,g))}postRender(t,e){let i=e.viewHints,s=!(i[0]||i[1]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation,this.renderedOpacity_=e.layerStatesArray[e.layerIndex].opacity;let r=this.getLayer(),n=r.getRenderMode(),a=t.globalAlpha;t.globalAlpha=this.renderedOpacity_;let o=r.getDeclutter(),l=o?dV[n].filter(t=>!n4.includes(t)):dV[n],h=e.viewState,u=h.rotation,d=r.getSource(),c=d.getTileGridForProjection(h.projection).getZForResolution(h.resolution,d.zDirection),g=this.renderedTiles,f=[],p=[],_=[],m=(0,th.getUid)(r),y=!0;for(let i=g.length-1;i>=0;--i){let n,a=g[i];y=y&&!a.getReplayState(r).dirty;let h=a.executorGroups[m].filter(t=>t.hasExecutors(l));if(0===h.length)continue;let d=this.getTileRenderTransform(a,e),x=a.tileCoord[0],S=!1,v=h[0].getClipCoords(d),w=t;if(v){w=(n=new nV).getContext();for(let t=0,e=f.length;t<e;++t)if(c!==x&&x<p[t]){let e=f[t];(0,Q.intersects)([v[0],v[3],v[4],v[7]],[e[0],e[3],e[4],e[7]])&&(S||(w.save(),S=!0),w.beginPath(),w.moveTo(v[0],v[1]),w.lineTo(v[2],v[3]),w.lineTo(v[4],v[5]),w.lineTo(v[6],v[7]),w.moveTo(e[6],e[7]),w.lineTo(e[4],e[5]),w.lineTo(e[2],e[3]),w.lineTo(e[0],e[1]),w.clip())}f.push(v),p.push(x)}for(let i=0,r=h.length;i<r;++i)h[i].execute(t,[t.canvas.width,t.canvas.height],d,u,s,l,e.declutter?.[o]);S&&(w===t?w.restore():_[i]=n)}t.globalAlpha=a,this.ready=y,this.tileClipContexts_=_,e.declutter||this.renderDeferredInternal(e),super.postRender(t,e)}renderFeature(t,e,i,s,r,n){if(!i)return!1;let a=!1;if(Array.isArray(i))for(let o=0,l=i.length;o<l;++o)a=an(s,t,i[o],e,this.boundHandleStyleImageChange_,void 0,r,n)||a;else a=an(s,t,i,e,this.boundHandleStyleImageChange_,void 0,r,n);return a}tileImageNeedsRender_(t){let e=this.getLayer();if("vector"===e.getRenderMode())return!1;let i=t.getReplayState(e),s=e.getRevision(),r=t.wantedResolution;return i.renderedTileResolution!==r||i.renderedTileRevision!==s}renderTileImage_(t,e){let i=this.getLayer(),s=t.getReplayState(i),r=i.getRevision(),n=t.executorGroups[(0,th.getUid)(i)];s.renderedTileRevision=r;let a=t.wrappedTileCoord,o=a[0],l=i.getSource(),h=e.pixelRatio,u=e.viewState.projection,d=l.getTileGridForProjection(u),c=d.getResolution(t.tileCoord[0]),g=e.pixelRatio/t.wantedResolution*c,f=d.getResolution(o),p=t.getContext();h=Math.round(Math.max(h,g/h));let _=l.getTilePixelSize(o,h,u);p.canvas.width=_[0],p.canvas.height=_[1];let m=h/g;if(1!==m){let t=es(this.tmpTransform_);eo(t,m,m),p.setTransform.apply(p,t)}let y=d.getTileCoordExtent(a,this.tempExtent),x=g/f,S=es(this.tmpTransform_);eo(S,x,-x),er(S,en(ee,1,0,0,1,-y[0],-y[3]));for(let t=0,e=n.length;t<e;++t)n[t].execute(p,[p.canvas.width*m,p.canvas.height*m],S,0,!0,dW[i.getRenderMode()],null);s.renderedTileResolution=t.wantedResolution}},dZ=class extends r1{constructor(t){let e=Object.assign({},t=t||{});delete e.preload;let i=void 0===t.cacheSize?0:t.cacheSize;delete t.cacheSize,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.cacheSize_=i;let s=t.renderMode||"hybrid";(0,z.assert)("hybrid"==s||"vector"==s,"`renderMode` must be `'hybrid'` or `'vector'`"),this.renderMode_=s,this.setPreload(t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError),this.getBackgroun
1d,this.setBackground}createRenderer(){return new dq(this,{cacheSize:this.cacheSize_})}getFeatures(t){return super.getFeatures(t)}getFeaturesInExtent(t){return this.getRenderer().getFeaturesInExtent(t)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(ha)}getUseInterimTilesOnError(){return this.get(ho)}setPreload(t){this.set(ha,t)}setUseInterimTilesOnError(t){this.set(ho,t)}},ie=y("cgxQK"),th=y("lVQul");let dK=[];var dH=class extends lY{constructor(t,e,i,s,r){super(t,e,{transition:0}),this.context_=null,this.executorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=s.bind(void 0,this),this.removeSourceTiles_=r,this.wrappedTileCoord=i}getContext(){return this.context_||(this.context_=(0,ie.createCanvasContext2D)(1,1,dK)),this.context_}hasContext(){return!!this.context_}getImage(){return this.hasContext()?this.getContext().canvas:null}getReplayState(t){let e=(0,th.getUid)(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedPixelRatio:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){this.context_&&((0,ie.releaseCanvas)(this.context_),dK.push(this.context_.canvas),this.context_=null),this.removeSourceTiles_(this),this.sourceTiles.length=0,super.release()}},dX=class extends lY{constructor(t,e,i,s,r,n){super(t,e,n),this.extent=null,this.format_=s,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=r,this.url_=i,this.key=i}getTileUrl(){return this.url_}getFormat(){return this.format_}getFeatures(){return this.features_}load(){0==this.state&&(this.setState(1),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(t,e){this.setFeatures(t)}onError(){this.setState(3)}setFeatures(t){this.features_=t,this.setState(2)}setLoader(t){this.loader_=t}},C=y("cw4dl"),Q=y("jZquI"),U=y("kKEgb"),dY=class extends hb{constructor(t){let e=t.projection||"EPSG:3857",i=t.extent||hE(e),s=t.tileGrid||hv({extent:i,maxResolution:t.maxResolution,maxZoom:void 0!==t.maxZoom?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,projection:e,state:t.state,tileGrid:s,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:dQ,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:void 0===t.zDirection?1:t.zDirection}),this.format_=t.format?t.format:null,this.tileKeysBySourceTileUrl_={},this.sourceTiles_={},this.overlaps_=void 0==t.overlaps||t.overlaps,this.tileClass=t.tileClass?t.tileClass:dX,this.tileGrids_={}}getOverlaps(){return this.overlaps_}getSourceTiles(t,e,i){if(0===i.getState()){i.setState(1);let s=i.wrappedTileCoord,r=this.getTileGridForProjection(e),n=r.getTileCoordExtent(s),a=s[0],o=r.getResolution(a);(0,Q.buffer)(n,-o,n);let l=this.projection;e&&this.projection&&!t4(e,l)&&(n=t7(n,e,l));let h=this.tileGrid,u=h.getExtent();u&&(0,Q.getIntersection)(n,u,n);let d=o;e&&l&&!t4(e,l)&&(d=o/l.getMetersPerUnit()/e.getMetersPerUnit());let c=h.getZForResolution(d,this.zDirection);h.forEachTileCoord(n,c,s=>{let r=this.tileUrlFunction(s,t,e);this.sourceTiles_[r]||(this.sourceTiles_[r]=new this.tileClass(s,4*!r,r,this.format_,this.tileLoadFunction));let n=this.sourceTiles_[r];i.sourceTiles.push(n),this.tileKeysBySourceTileUrl_[r]||(this.tileKeysBySourceTileUrl_[r]=[]),this.tileKeysBySourceTileUrl_[r].push(i.getKey());let a=n.getState();if(a<2){let t=e=>{this.handleTileChange(e);let s=n.getState();if(2===s||3===s){let e=n.getKey();e in i.errorTileKeys?2===n.getState()&&delete i.errorTileKeys[e]:i.loadingSourceTiles--,3===s?i.errorTileKeys[e]=!0:n.removeEventListener(C.default.CHANGE,t),0===i.loadingSourceTiles&&i.setState((0,U.isEmpty)(i.errorTileKeys)?2:3)}};n.addEventListener(C.default.CHANGE,t),i.loadingSourceTiles++}0===a&&(n.extent=h.getTileCoordExtent(s),n.projection=this.projection,n.resolution=h.getResolution(s[0]),n.load())}),i.loadingSourceTiles||i.setState(i.sourceTiles.some(t=>3===t.getState())?3:2)}return i.sourceTiles}removeSourceTiles(t){let e=t.getKey(),i=t.sourceTiles;for(let t=0,s=i.length;t<s;++t){let s=i[t].getTileUrl();if(!this.tileKeysBySourceTileUrl_[s])return;let r=this.tileKeysBySourceTileUrl_[s].indexOf(e);-1!==r&&(this.tileKeysBySourceTileUrl_[s].splice(r,1),0===this.tileKeysBySourceTileUrl_[s].length&&(delete this.tileKeysBySourceTileUrl_[s],delete this.sourceTiles_[s]))}}getTile(t,e,i,s,r){let n=[t,e,i],a=this.getTileCoordForTileUrlFunction(n,r),o=this.getTileGrid().getExtent(),l=this.projection,h=this.getTileGridForProjection(r);if(a&&o){let e=h.getTileCoordExtent(a);(0,Q.buffer)(e,-h.getResolution(t),e),(0,Q.intersects)(o,!r||!l||t4(r,l)?e:t7(e,r,l))||(a=null)}let u=!0;if(null!==a){let e=this.tileGrid,i=h.getResolution(t),n=i;r&&l&&!t4(r,l)&&(n=i/l.getMetersPerUnit()/r.getMetersPerUnit());let o=e.getZForResolution(n,1),d=h.getTileCoordExtent(a);(0,Q.buffer)(d,-i,d),e.forEachTileCoord(!r||!l||t4(r,l)?d:t7(d,r,l),o,t=>{u=u&&!this.tileUrlFunction(t,s,l)})}
1let d=new dH(n,4*!!u,a,this.getSourceTiles.bind(this,s,r),this.removeSourceTiles.bind(this));return d.key=this.getKey(),d}getTileGridForProjection(t){let e=t.getCode(),i=this.tileGrids_[e];if(!i){let s=this.projection;if(null!==s&&!t4(s,t))return hS(t);let r=this.tileGrid,n=r.getResolutions().slice(),a=n.map(function(t,e){return r.getOrigin(e)}),o=n.map(function(t,e){return r.getTileSize(e)});for(let t=n.length;t<43;++t)n.push(n[t-1]/2),a.push(a[t-1]),o.push(o[t-1]);i=new hd({extent:r.getExtent(),origins:a,resolutions:n,tileSizes:o}),this.tileGrids_[e]=i}return i}getTilePixelRatio(t){return t}getTilePixelSize(t,e,i){let s=sg(this.getTileGridForProjection(i).getTileSize(t),this.tmpSize);return[Math.round(s[0]*e),Math.round(s[1]*e)]}setOverlaps(t){this.overlaps_=t,this.changed()}};function dQ(t,e){t.setLoader(function(i,s,r){lg(e,t.getFormat(),i,s,r,t.onLoad.bind(t),t.onError.bind(t))})}let dJ=6378137*Math.PI,d$=[-dJ,-dJ,dJ,dJ],d0=new Map;function d1(t,e,i){return Math.max(e,Math.min(i,t))}function d2(t,e){let i=2**e;return d1(Math.floor((t-d$[0])/(d$[2]-d$[0])*i),0,i-1)}function d4(t,e){let i=2**e;return d1(Math.floor((d$[3]-t)/(d$[3]-d$[1])*i),0,i-1)}async function d3(t){if(d0.has(t))return d0.get(t);let e=(async()=>{try{let e=await fetch(`${t}/manifest.json`);if(!e.ok)return null;let i=await e.json();if(!i||!Array.isArray(i.bounds3857))return null;let s="number"==typeof i.z?i.z:void 0,r="number"==typeof i.minZ?i.minZ:void 0,n="number"==typeof i.maxZ?i.maxZ:void 0;return{bounds3857:i.bounds3857,z:s,minZ:r,maxZ:n}}catch(t){return null}})();return d0.set(t,e),e}async function d8(t){let e=[...new Set((t||[]).filter(Boolean))];return await Promise.all(e.map(async t=>({baseUrl:t,manifest:await d3(t)})))}function d5(t){let{baseUrlDev:e,baseUrlProd:i,minZ:s,maxZ:r,dataProjection:n="EPSG:3857",featureProjection:a="EPSG:3857",featureId:o="id",attributions:l,wrapX:h=!1,debug404:u=!1,blockUntilManifest:d=!1,onManifestLoaded:c}=t,g=null,f=new Map,p=new dY({attributions:l,wrapX:h,format:new dC({dataProjection:n,featureProjection:a,featureId:o}),tileGrid:hv({minZoom:s,maxZoom:r}),tileLoadFunction:(t,e)=>{let i=u&&!1;fetch(e).then(async s=>{if(!s.ok){i&&404===s.status?console.debug("[xyzGeojsonVectorTileSource] 404",e):i&&console.debug("[xyzGeojsonVectorTileSource] tile load failed",s.status,e),t.setFeatures([]);return}let r=await s.json();try{let e=t.getFormat().readFeatures(r);for(let t of e)try{let e=function(t,e){try{let e=t?.getId?.();if(null!=e&&""!==String(e).trim())return String(e)}catch(t){}for(let i of[e,"id","fid","ID","Id","nom","name","CdZCY","code","codeNatZone","uuid"])if(i)try{let e=t?.get?.(i);if(null!=e&&""!==String(e).trim())return String(e)}catch(t){}}(t,o);if(void 0!==e){t?.setId?.(e);try{t?.set?.("__stableId",e,!0)}catch(t){}}}catch(t){}t.setFeatures(e)}catch(s){i&&console.debug("[xyzGeojsonVectorTileSource] non-GeoJSON tile payload (treated as empty)",e),t.setFeatures([])}}).catch(s=>{i&&console.debug("[xyzGeojsonVectorTileSource] tile load error",e,s),t.setFeatures([])})},tileUrlFunction:t=>{if(!t)return;let[e,n,a]=t;if(!g&&d)return`${i}/manifest.json`;if(g){let t=g&&"number"==typeof g.minZ?g.minZ:g&&"number"==typeof g.z?g.z:s,o=g&&"number"==typeof g.maxZ?g.maxZ:g&&"number"==typeof g.z?g.z:r;if(e<t||e>o){u&&console.debug("[xyzGeojsonVectorTileSource] skip (z out of range)",{z:e,x:n,y:a,range:[t,o],baseUrl:i});return}let l=function(t){if(!g?.bounds3857)return null;let e=f.get(t);if(e)return e;let i=function(t,e){if(!Array.isArray(t)||4!==t.length)return null;let[i,s,r,n]=t;if(![i,s,r,n].every(Number.isFinite))return null;let a=d2(i,e),o=d2(r,e),l=d4(n,e),h=d4(s,e);return{xMin:Math.min(a,o),xMax:Math.max(a,o),yMin:Math.min(l,h),yMax:Math.max(l,h)}}(g.bounds3857,t);return i?(f.set(t,i),i):null}(e);if(l&&(n<l.xMin||n>l.xMax||a<l.yMin||a>l.yMax)){u&&console.debug("[xyzGeojsonVectorTileSource] skip (out of bounds)",{z:e,x:n,y:a,cov:l,baseUrl:i});return}}return`${i}/${e}/${n}/${a}.geojson`}});return d3(i).then(t=>{g=t;try{c?.(g)}catch(t){}}).catch(()=>{}),p}let d6=new dZ({source:d5({baseUrlDev:"/dev-assets/tiles/PNCZM/v1",baseUrlProd:"https://www.opalesurfcasting.net/geoportail/tiles/PNCZM/v1",minZ:6,maxZ:11,dataProjection:"EPSG:3857",featureProjection:"EPSG:3857",attributions:["<a href='https://www.calanques-parcnational.fr' target='_blank' rel='noopener'><img src='https://www.opalesurfcasting.net/geoportail/logos/logo_parc_calanques.png' alt='Parc National des Calanques - Zone maritime - logo'></a>"],debug404:!1,blockUntilManifest:!1,onManifestLoaded:()=>{try{d6.changed?.()}catch(t){}}}),declutter:!0,style:h$,renderMode:"vector"});d6.set("id","PNCZM"),d6.set("title","Parc National des Calanques");
1let d7=new dZ({source:d5({baseUrlDev:"/dev-assets/tiles/PNMGL/v1",baseUrlProd:"https://www.opalesurfcasting.net/geoportail/tiles/PNMGL/v1",minZ:6,maxZ:11,dataProjection:"EPSG:3857",featureProjection:"EPSG:3857",attributions:["<a href='https://parc-marin-golfe-lion.fr/' target='_blank' rel='noopener'><img src='https://www.opalesurfcasting.net/geoportail/logos/pnm_parc_logo.png' alt='Parc Naturel Marin du Golfe du Lion - logo'></a>"],debug404:!1,blockUntilManifest:!1,onManifestLoaded:()=>{try{d7.changed?.()}catch(t){}}}),declutter:!0,style:h$,renderMode:"vector"});d7.set("id","PNMGL"),d7.set("title","Parc Naturel Marin du Golfe du Lion");let d9=new dZ({source:d5({baseUrlDev:"/dev-assets/tiles/PNMCCA/v1",baseUrlProd:"https://www.opalesurfcasting.net/geoportail/tiles/PNMCCA/v1",minZ:6,maxZ:11,dataProjection:"EPSG:3857",featureProjection:"EPSG:3857",attributions:["<a href='https://parc-marin-cap-corse-agriate.fr/' target='_blank' rel='noopener'><img src='https://www.opalesurfcasting.net/geoportail/logos/pnm_parc_logo_CCA.png' alt='Parc Naturel marin Cap Corse et Agriate - logo'></a>"],debug404:!1,blockUntilManifest:!1,onManifestLoaded:()=>{try{d9.changed?.()}catch(t){}}}),declutter:!0,style:h$,renderMode:"vector"});d9.set("id","PNMCCA"),d9.set("title","Parc Naturel Marin du Cap Corse et de l'Agriate");let ct=new dZ({source:d5({baseUrlDev:"/dev-assets/tiles/RNBB/v1",baseUrlProd:"https://www.opalesurfcasting.net/geoportail/tiles/RNBB/v1",minZ:6,maxZ:11,dataProjection:"EPSG:3857",featureProjection:"EPSG:3857",attributions:["<a href='https://www.rnbb.fr/' target='_blank' rel='noopener'><img src='https://www.opalesurfcasting.net/geoportail/logos/logo_rnbb.gif' alt='Réserve Naturelle des Bouches de Bonifacio - logo'></a>"],debug404:!1,blockUntilManifest:!1,onManifestLoaded:()=>{try{ct.changed?.()}catch(t){}}}),declutter:!0,style:h$,renderMode:"vector"});ct.set("id","RNBB"),ct.set("title","Réserve Naturelle des Bouches de Bonifacio");let ce=new dZ({source:d5({baseUrlDev:"/dev-assets/tiles/RNMCB/v1",baseUrlProd:"https://www.opalesurfcasting.net/geoportail/tiles/RNMCB/v1",minZ:6,maxZ:11,dataProjection:"EPSG:3857",featureProjection:"EPSG:3857",attributions:["<a href='https://www.ledepartement66.fr/reglementation/' target='_blank' rel='noopener'><img src='https://www.opalesurfcasting.net/geoportail/logos/logo-rnmcb.jpg' alt='Réserve Naturelle Marine de Cerbère-Banyuls - logo'></a>"],debug404:!1,blockUntilManifest:!1,onManifestLoaded:()=>{try{ce.changed?.()}catch(t){}}}),declutter:!0,style:h$,renderMode:"vector",zIndex:1e3});function ci(t){return String(t??"").trim()}ce.set("id","RNMCB"),ce.set("title","Réserve Naturelle Marine de Cerbère-Banyuls");let cs=null,cr=null;async function cn(){return cs||cr||(cr=(async()=>{try{let t,e=async t=>{let e=await fetch(t,{cache:"no-cache"});if(!e.ok)throw Error("HTTP "+e.status);return await e.json()};try{t=await e("https://www.opalesurfcasting.net/geoportail/specialFishingZonesPopupTexts.json")}catch(t){}return cs=t||{}}catch(t){return cs={}}finally{cr=null}})())}async function ca(t,e){let i=await cn(),s=ci(t),r=ci(e),n=i?.[s];return n?r&&n[r]?n[r]:n["*"]?n["*"]:{}:{}}async function co(t){let e=await cn(),i=ci(t),s=e?.[i],r=s?.enable;return"boolean"!=typeof r||r}let cl=new rC({image:new rM({src:"data:image/svg+xml;utf8,"+encodeURIComponent(`
2<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
3  <circle cx="16" cy="16" r="13" fill="#fff" stroke="#0066cc" stroke-width="2"/>
4  <path d="M6 17c2.5 0 2.5-2.6 5-2.6s2.5 2.6 5 2.6 2.5-2.6 5-2.6 2.5 2.6 5 2.6"
5    fill="none"
6    stroke="#0066cc"
7    stroke-width="2.4"
8    stroke-linecap="round"/>
9</svg>`),width:28,height:28,anchor:[.5,.5]})}),ch=new ag({source:new lN({url:"https://www.opalesurfcasting.net/geoportail/GEOJson/french_tide_points_epsg3857.geojson",format:new dC({dataProjection:"EPSG:3857",featureProjection:"EPSG:3857"})}),style:cl,declutter:!0});ch.set("id","FRENCH_TIDE_POINTS"),ch.set("title","Horaires de marées");let cu=null,cd=new am,cc=null;function cg(){try{d7.changed?.()}catch(t){}try{d6.changed?.()}catch(t){}try{d9.changed?.()}catch(t){}try{ct.changed?.()}catch(t){}try{ce.changed?.()}catch(t){}}let cf=new Set(["PNCZM","PNMGL","PNMCCA","RNBB","RNMCB"]),cp=new is({collapsible:!1});"u">typeof myGeoDatas?(s="GeoportalMapDiv",r=void 0!==myGeoDatas[0]?myGeoDatas[0]:null,n=void 0!==myGeoDatas[1]?myGeoDatas[1]:null,a=void 0!==myGeoDatas[2]?myGeoDatas[2]:null):(s="GeoportalMapDivCartes",r=null,n=null,a=null);let c_=!1;async function cm(){if(c_)return;function t(t){try{let e=t?.get("title"),i=t?.getSource?.();if(!i||!e)return;
9i.getFeatures?.().forEach(t=>{t.get("layerTitle")||t.set("layerTitle",e)}),i.on?.("addfeature",t=>{let i=t?.feature;i&&!i.get("layerTitle")&&i.set("layerTitle",e)}),i.on?.("featuresloadend",t=>{let i=t?.features;if(Array.isArray(i))for(let t of i)t&&!t.get?.("layerTitle")&&t.set?.("layerTitle",e)})}catch(t){}}c_=!0,ln.defs([lZ]),function(t){let e,i,s=Object.keys(t.defs),r=s.length;for(e=0;e<r;++e){let i=s[e];if(!tM(i)){let e=t.defs(i),s=e.units;s||"longlat"!==e.projName||(s="degrees"),tY(new tc({code:i,axisOrientation:e.axis,metersPerUnit:e.to_meter,units:s}))}}for(e=0;e<r;++e){let n=s[e],a=tM(n);for(i=0;i<r;++i){let e=s[i],r=tM(e);if(!tb(n,e))if(t.defs[n]===t.defs[e])t$([a,r]);else{let i=t(n,e);!function(t,e,i,s){let r=tQ(t),n=tQ(e);tC(r,n,t1(i)),tC(n,r,t1(s))}(a,r,et(a,r,i.forward),et(r,a,i.inverse))}}}}(ln);try{await d8(["https://www.opalesurfcasting.net/geoportail/tiles/PNCZM/v1","https://www.opalesurfcasting.net/geoportail/tiles/PNMCCA/v1","https://www.opalesurfcasting.net/geoportail/tiles/PNMGL/v1","https://www.opalesurfcasting.net/geoportail/tiles/RNBB/v1","https://www.opalesurfcasting.net/geoportail/tiles/RNMCB/v1"])}catch(t){}cu=await new r6({target:s,layers:[new(0,iH.default)({title:"Cartes de base",fold:"close",layers:[hX]}),new(0,iH.default)({title:"Pêche sous autorisation – règles spécifiques",fold:"close",layers:[ct,d9,d6,d7,ce]}),new(0,iH.default)({title:"Coquillages",fold:"close",layers:[dx,dv,db]}),new(0,iH.default)({title:"IGN",fold:"close",layers:[hK,hH]}),new(0,iH.default)({title:"SHOM",fold:"close",layers:[new(0,iH.default)({title:"Litto3D",fold:"close",layers:[hD,hk,hj,hB,hz,hU]}),new(0,iH.default)({title:"Epaves et obstructions maritimes",fold:"close",layers:[dF,dG,dO,dD,dk,dj,dB,dz,dU]})]}),new(0,iH.default)({title:"Marées",fold:"close",layers:[ch]}),lD],view:lH,controls:await io({attribution:!1,rotate:!1}).extend([cp,lB,new ia({zoomInTipLabel:"Zoomer",zoomOutTipLabel:"Dézoomer"}),new ne,new ns({label:"⛶",tipLabel:"Plein-écran"}),new nh({className:"ol-mouse-position-custom ol-unselectable",projection:"EPSG:4326",coordinateFormat:t=>J(t,lK,6)})]),interactions:await iK({}).extend([cd=new am({layers:[db,dv,dx,d7,d6,d9,ct,ce],style:t=>{let e=cd.getLayer(t)?.get("id");if(cf.has(e)){let e=t.get("nom")||t.get("layerTitle")||t.get("layerName")||cd.getLayer(t)?.get("title"),i=hJ(t,{selected:!0});return i.getText().setText(lc(e,12)),i}if("ZPC"===e){let e=t.get("styleSelected"),i=t.get("CdZCY");return"orangeStylePoly"===e?(hQ.orangeStylePolySelected.getText().setText(i),hQ.orangeStylePolySelected):"redStylePoly"===e?(hQ.redStylePolySelected.getText().setText(i),hQ.redStylePolySelected):"greenStylePoly"===e?(hQ.greenStylePolySelected.getText().setText(i),hQ.greenStylePolySelected):(hQ.basicStylePolySelected.getText().setText(i),hQ.basicStylePolySelected)}if("ARSPDL"===e||"ARSBretagne"===e){let e=t.get("styleSelected");if("orangeStyleCircle"===e)return hQ.orangeStyleCircleSelected.getText().setText("ARS"),hQ.orangeStyleCircleSelected;if("greenStyleCircle"===e)return hQ.greenStyleCircleSelected.getText().setText("ARS"),hQ.greenStyleCircleSelected;if("blueStyleCircle"===e)return hQ.blueStyleCircleSelected.getText().setText("ARS"),hQ.blueStyleCircleSelected;else if("redStyleCircle"===e)return hQ.redStyleCircleSelected.getText().setText("ARS"),hQ.redStyleCircleSelected;else if("blackStyleCircle"===e)return hQ.blackStyleCircleSelected.getText().setText("ARS"),hQ.blackStyleCircleSelected}}})])});let e=await new(c(lo))({insertFirst:!0});function i(t){let e=t.getStyle();t.setStyle((i,s)=>{let r=i?.get?.("__stableId")||(i?.getId?.()!=null?String(i.getId()):null),n=null!=cc&&null!=r&&String(r)===String(cc),a=i.get("nom")||i.get("layerTitle")||i.get("layerName")||t.get("title");if(n){let t=hJ(i,{selected:!0});return t.getText().setText(lc(a,12)),t}return"function"==typeof e?e(i,s):e})}cu.addOverlay(e),cd.on("select",t=>{let e=t?.selected?.[0];cc=e?e.get("__stableId")||(e.getId?.()!=null?String(e.getId()):null):null,cg()}),cu.on("click",t=>{if(!cu.hasFeatureAtPixel(t.pixel,{layerFilter:t=>[db,dv,dx,d7,d6,d9,ct,ce].includes(t)})){cc=null;try{cd.getFeatures().clear()}catch(t){}cg()}}),i(d7),i(d6),i(d9),i(ct),i(ce),t(d7),t(d9),t(ct),t(ce),t(d6),await cu.on("singleclick",async t=>{let i=await cu.forEachFeatureAtPixel(t.pixel,async(t,e)=>({feature:t,layer:e}));function s(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function r(t){try{let e=new URL(String(t),location.href);if("http:"===e.protocol||"https:"===e.protocol)return e.href}catch(t){}return"#"}let n=!1;if(i){let o=await i.layer,l=await i.feature,h=null;if(await ll()&&(console.log(o),console.log(l),console.log(o.get("id"))),"FRENCH_TIDE_POINTS"===o.get("id")){let t,e=(t=l.get("id_article"))?`https://www.opalesurfcasting.net/article${t}`:null;e&&window.open(e,"_blank","noopener");return}if("ZPC"===o.get("id")){let t=await l.get("CdZCY"),e=await l.get("LbZCY"),i=await l.get("ValClasGP1"),o=await l.get("ValClasGP2"),u=await l.get("ValClasGP3"),d=await l.get("URLTexteReglem"),c=await l.get("styleSelected");function a(t,e){let i=lq.includes(e);return'<div style="display:flex; gap:10px; padding:8px 10px; border-radius:8px; background:#fafafa;"><div style="min-width:80px; font-weight:800;">'+t+'</div><div style="flex:1;">'+s(e)+" — "+(i?"<strong>Pêche autorisée*</strong>":"<strong>Pêche interdite</strong>")+"</div></div>"}await ll()&&console.log(await l.getGeometry().getType()),h='<p style="margin:0 0 12px 0;"><strong>Zone '+s(t)+'</strong><br><span style="font-size:smaller;">'+s(e)+'</span></p><div style="margin:0 0 12px 0; padding:12px; border:2px solid #d8d8d8; border-radius:12px; background:#ffffff;"><div style="font-weight:800; font-size:15px; margin-bottom:8px;">Pour les coquillages du :</div><div style="display:flex; flex-direction:column; gap:8px; font-size:14px;">'+a("Groupe 1",i)+a("Groupe 2",o)+a("Groupe 3",u)+"</div></div>"+("greenStylePoly"===c||"orangeStylePoly"===c?'<p style="margin:0 0 10px 0; font-size:smaller;">* sous réserve des éventuels arrêtés locaux de gestion</p>':"")+'<div style="margin:8px 0 10px 0; padding:8px 10px; border:1px solid #e6e6e6; border-radius:8px; background:#fafafa; font-size:smaller;"><div style="font-weight:600; margin:0 0 4px 0;">Groupes de coquillages</div><ul style="margin:0; padding-left:16px;"><li><strong>Groupe 1</strong> : Gastéropodes, échinodermes, tuniciers, brouteurs.</li><li><strong>Groupe 2</strong> : Bivalves fouisseurs (coquillages vivant dans le sable / sédiment), filtreurs.</li><li><strong>Groupe 3</strong> : Bivalves non fouisseurs (vivant fixés ou en pleine eau), filtreurs.</li></ul></div>'+('<p style="margin:0;"><a href="'+r(d))+'" class="urlArrete" target="_blank" rel="noopener" style="font-size:smaller; font-weight:700; text-decoration:none;">Voir l\'arrêté de classement sanitaire</a></p>',n=!0}else if(await o.get("id")==="PNCZM"||await o.get("id")==="PNMGL"||await o.get("id")==="PNMCCA"||await o.get("id")==="RNBB"||await o.get("id")==="RNMCB"){let t=await o.get("id"),e=await o.get("title"),i=await l.get("nom"),a=await l.get("rule_id")||await l.get("id")||await l.get("nom")||t,u=await ca(t,a),d=await co(t),c=u.autorisation,g=u.quota,f=u.declaration,p=u.maille,_=u.lienPageOpalesurfcasting,m=null!=c&&""!==String(c).trim(),y=null!=f&&""!==String(f).trim(),x=null!=g&&""!==String(g).trim(),S=null!=p&&""!==String(p).trim(),v=null!=_&&""!==String(_).trim();if(h='<p style="margin:0;"><strong>'+s(e)+"</strong>"+(i?'<br><span style="font-size:smaller;">'+s(i)+"</span>":"")+"</p>",d){(m&&(h+='<div style="margin-top:12px; padding:10px 12px; border:1px solid #cfe3ff; border-radius:10px; background:#f6fbff;"><div style="display:flex; align-items:center; gap:8px; margin:0 0 6px 0;"><span aria-hidden="true">✅</span><div style="font-weight:800;">Autorisation de pêche:</div></div><div style="font-size:14px; line-height:1.35; white-space:pre-wrap;">'+s(c)+"</div></div>"),x&&(h+='<div style="margin-top:12px; padding:10px 12px; border:1px solid #cbe7cb; border-radius:10px; background:#f6fff6;"><div style="display:flex; align-items:center; gap:8px; margin:0 0 6px 0;"><span aria-hidden="true">🧺</span><div style="font-weight:800;">Quotas - Limitation des captures :</div></div><div style="font-size:14px; line-height:1.35; white-space:pre-wrap;">'+s(g)+"</div></div>"),S&&(h+='<div style="margin-top:12px; padding:10px 12px; border:1px solid #e2d6ff; border-radius:10px; background:#faf7ff;"><div style="display:flex; align-items:center; gap:8px; margin:0 0 6px 0;"><span aria-hidden="true">📏</span><div style="font-weight:800;">Tailles minimales (maille) :</div></div><div style="font-size:14px; line-height:1.35; white-space:pre-wrap;">'+s(p)+"</div></div>"),y)&&(h+='<div style="margin-top:12px; padding:10px 12px; border:1px solid #ffe0a3; border-radius:10px; background:#fffaf0;"><div style="display:flex; align-items:center; gap:8px; margin:0 0 6px 0;"><span aria-hidden="true">📝</span><div style="font-weight:800;">Déclaration des captures:</div></div><div style="font-size:14px; line-height:1.35; white-space:pre-wrap;">
9'+("PNMGL"===t?s(f).replace(/\(([^()]{1,80})\)/g,(t,e)=>/^[A-Za-zÀ-ÿ .-]+$/.test(e)?"(<i>"+e+"</i>)":t):s(f))+"</div></div>");if(v){let t="opalesurfcasting.net";try{t=new URL(String(_),location.href).host||t}catch(t){}let e=u.lienPageOpalesurfcastingLabel||"Voir les détails sur opalesurfcasting";h+='<div style="margin-top:12px; padding:10px 12px; border:1px solid #d8d8d8; border-radius:12px; background:#ffffff;"><div style="display:flex; align-items:center; gap:10px;"><div aria-hidden="true" style="font-size:18px; line-height:1;">🔗</div><div style="flex:1;"><a href="'+r(_)+'" target="_blank" rel="noopener" style="display:inline-block; font-weight:800; text-decoration:none;">'+s(e)+'</a><div style="font-size:12px; opacity:0.75; margin-top:2px;">'+s(t)+"</div></div></div></div>"}n=!0}else h+='<div style="margin-top:12px; padding:10px 12px; border:1px dashed #d8d8d8; border-radius:12px; background:#fafafa;"><div style="font-weight:800;">Bientôt disponible</div><div style="font-size:14px; line-height:1.35; margin-top:6px;">Le détail de la réglementation pour cette zone sera disponible prochainement.</div></div>',n=!0}else if(await o.get("id")==="ARSPDL")h="<p>"+await l.get("COMMUNE")+" - "+await l.get("Site")+" - "+await l.get("GISEMENT")+"<p>"+await l.get("TYPE")+"</p><p>"+await l.get("ESPECE")+'</p><p><a href="'+await l.get("LIEN_FICHE")+'" class="urlArrete" target="_blank" rel="noopener" style="font-size: smaller;">Voir la fiche de l\'ARS Pays-de-Loire</a></p>',n=!0;else if(await o.get("id")==="ARSBretagne"){let t,e=await l.get("commune"),i=await l.get("libelle"),s=await l.get("consigne_n"),r="https://www.pecheapied-responsable.fr/fiche/";switch(s){case"0":t="tolérée";break;case"1":t="autorisée";break;case"2":t="interdite en permanence";break;case"3":t="déconseillée";break;case"4":t="interdite temporairement"}t="Pêche à pied des coquillages "+t;let a=await l.get("pdfname");if(h="<p>"+e.toUpperCase()+"</p><p>"+i+"</p><p>"+t+"</p>",await typeof a==="undefined"?h+="<p>Fiche d'information de l'ARS Bretagne manquante.</p>":h+='<p><a href="'+r+a+'" class="urlArrete" target="_blank" rel="noopener" style="font-size: smaller;">Fiche d\'information de l\'ARS Bretagne</a></p>',await typeof await l.get("pdf_interdiction")!=="undefined"){let t=await l.get("pdf_interdiction");h+='<p><a href="'+(await ld(await t)?await t:r+await t)+'" class="urlArrete" target="_blank" rel="noopener" style="font-size: smaller;">Arrêté d\'interdiction temporaire</a></p>'}if(await typeof await l.get("pdfarrete")!=="undefined"){let t=await l.get("pdfarrete");h+='<p><a href="'+(await ld(t)?await t:r+await t)+'" class="urlArrete" target="_blank" rel="noopener" style="font-size: smaller;">Arrêté d\'interdiction permanente</a></p>'}n=!0}else await o.get("id")==="geolocatelayer"&&"PointPosition"===l.get("name")&&(h="<p>Vous êtes ici : </p><p>"+J(t6(await l.getGeometry().getCoordinates(),await cu.getView().getProjection(),"EPSG:4326"),lK,6)+"</p><p>Marge d'erreur : "+await l.get("precision")+" mètre(s)</p><p>Lignes de distance :</p><ul><li>75 mètres</li><li>100 mètres</li><li>125 mètres</li><li>150 mètres</li></ul>",n=!0);!0===n&&await e.show(t.coordinate,h)}});let o=new URLSearchParams(window.location.search);async function l(){let t=await cu.getSize()[0]<705;cp.setCollapsible(t),cp.setCollapsed(t)}o.has("map-x")&&o.has("map-y")&&o.has("map-z")||lH.fit(lW,cu.getSize()),a&&n&&r&&(lH.setZoom(a),lH.setCenter(t2([r,n]))),await ll()&&(console.log("mapExtent :"+lH.calculateExtent(cu.getSize())),console.dir(lH.getProjection()),console.dir(cu.getSize())),window.addEventListener("resize",await l),await l(),await lu(await lh())&&cu.addInteraction(new ng({prefix:"map-",replace:!0,params:["x","y","z","l"]})),cu.addControl(new(c(la))({label:"☰",tipLabel:"Légende"}))}try{"complete"===document.readyState?cm().catch(t=>{console.error("[cartographie] init failed",t)}):window.addEventListener("load",()=>{cm().catch(t=>{console.error("[cartographie] init failed",t)})},{once:!0})}catch(t){console.error("[cartographie] init scheduling failed",t)}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.