@maptiler/geocoding-control 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MapLibreBasedGeocodingControl.d.ts +3 -6
- package/leaflet.d.ts +3 -6
- package/leaflet.js +1 -1
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +1 -1
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.js +1 -1
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +1 -1
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.js +1 -1
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +1 -1
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +1 -1
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +1 -1
- package/openlayers.umd.js.map +1 -1
- package/package.json +6 -2
- package/react.js +1 -1
- package/react.umd.js +1 -1
- package/svelte/GeocodingControl.svelte +1 -1
- package/svelte/MapLibreBasedGeocodingControl.d.ts +3 -6
- package/svelte/leaflet.d.ts +3 -6
- package/svelte/types.d.ts +29 -58
- package/types.d.ts +29 -58
- package/vanilla.js +1 -1
- package/vanilla.umd.js +1 -1
package/openlayers.umd.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`+c.weight+`
|
|
4
4
|
`+d;fr.get(p)===void 0&&(fr.set(p,100,!0),a(c.style,c.weight,d)||(fr.set(p,0,!0),s===void 0&&(s=setInterval(u,32))))}}}(),S_=function(){let i;return function(t){let e=pl[t];if(e==null){if(qu){const n=Dc(t),r=Oh(t,"Žg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else i||(i=document.createElement("div"),i.innerHTML="M",i.style.minHeight="0",i.style.maxHeight="none",i.style.height="auto",i.style.padding="0",i.style.border="none",i.style.position="absolute",i.style.display="block",i.style.left="-99999px"),i.style.font=t,document.body.appendChild(i),e=i.offsetHeight,document.body.removeChild(i);pl[t]=e}return e}}();function Oh(i,t){return Fs||(Fs=$n(1,1)),i!=dl&&(Fs.font=i,dl=Fs.font),Fs.measureText(t)}function Wa(i,t){return Oh(i,t).width}function Ah(i,t,e){if(t in e)return e[t];const n=t.split(`
|
|
5
5
|
`).reduce((r,s)=>Math.max(r,Wa(i,s)),0);return e[t]=n,n}function w_(i,t){const e=[],n=[],r=[];let s=0,o=0,a=0,u=0;for(let l=0,c=t.length;l<=c;l+=2){const h=t[l];if(h===`
|
|
6
|
-
`||l===c){s=Math.max(s,o),r.push(o),o=0,a+=u;continue}const f=t[l+1]||i.font,g=Wa(f,h);e.push(g),o+=g;const d=S_(f);n.push(d),u=Math.max(u,d)}return{width:s,height:a,widths:e,heights:n,lineWidths:r}}function R_(i,t,e,n,r,s,o,a,u,l,c){i.save(),e!==1&&(i.globalAlpha*=e),t&&i.setTransform.apply(i,t),n.contextInstructions?(i.translate(u,l),i.scale(c[0],c[1]),N_(n,i)):c[0]<0||c[1]<0?(i.translate(u,l),i.scale(c[0],c[1]),i.drawImage(n,r,s,o,a,0,0,o,a)):i.drawImage(n,r,s,o,a,u,l,o*c[0],a*c[1]),i.restore()}function N_(i,t){const e=i.contextInstructions;for(let n=0,r=e.length;n<r;n+=2)Array.isArray(e[n+1])?t[e[n]].apply(t,e[n+1]):t[e[n]]=e[n+1]}function qa(i,t){return Array.isArray(i)?i:(t===void 0?t=[i,i]:(t[0]=i,t[1]=i),t)}function zt(){}function L_(i,t){for(const e in t)i[e]=t[e];return i}function Dh(i){return i()}function Fh(){return Object.create(null)}function Bi(i){i.forEach(Dh)}function kh(i){return typeof i=="function"}function Jr(i,t){return i!=i?t==t:i!==t||i&&typeof i=="object"||typeof i=="function"}let Ha;function nn(i,t){return i===t?!0:(Ha||(Ha=document.createElement("a")),Ha.href=t,i===Ha.href)}function b_(i){return Object.keys(i).length===0}function T_(i,t,e,n){if(i){const r=Gh(i,t,e,n);return i[0](r)}}function Gh(i,t,e,n){return i[1]&&n?L_(e.ctx.slice(),i[1](n(t))):e.ctx}function P_(i,t,e,n){if(i[2]&&n){const r=i[2](n(e));if(t.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(t.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=t.dirty[a]|r[a];return s}return t.dirty|r}return t.dirty}function M_(i,t,e,n,r,s){if(r){const o=Gh(t,e,n,s);i.p(o,r)}}function O_(i){if(i.ctx.length>32){const t=[],e=i.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function Bh(i){return i??""}function ct(i,t){i.appendChild(t)}function jt(i,t,e){i.insertBefore(t,e||null)}function Vt(i){i.parentNode&&i.parentNode.removeChild(i)}function It(i){return document.createElement(i)}function gr(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function dr(i){return document.createTextNode(i)}function dn(){return dr(" ")}function A_(){return dr("")}function Ye(i,t,e,n){return i.addEventListener(t,e,n),()=>i.removeEventListener(t,e,n)}function D_(i){return function(t){return t.preventDefault(),i.call(this,t)}}function D(i,t,e){e==null?i.removeAttribute(t):i.getAttribute(t)!==e&&i.setAttribute(t,e)}function F_(i){return Array.from(i.childNodes)}function Go(i,t){t=""+t,i.data!==t&&(i.data=t)}function zh(i,t){i.value=t??""}function pr(i,t,e){i.classList.toggle(t,!!e)}function k_(i,t,{bubbles:e=!1,cancelable:n=!1}={}){return new CustomEvent(i,{detail:t,bubbles:e,cancelable:n})}let Bo;function zo(i){Bo=i}function Vh(){if(!Bo)throw new Error("Function called outside component initialization");return Bo}function G_(i){Vh().$$.on_destroy.push(i)}function B_(){const i=Vh();return(t,e,{cancelable:n=!1}={})=>{const r=i.$$.callbacks[t];if(r){const s=k_(t,e,{cancelable:n});return r.slice().forEach(o=>{o.call(i,s)}),!s.defaultPrevented}return!0}}function Xh(i,t){const e=i.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const ks=[],_l=[];let Gs=[];const Yh=[],z_=Promise.resolve();let ml=!1;function V_(){ml||(ml=!0,z_.then(Uh))}function yl(i){Gs.push(i)}const vl=new Set;let Bs=0;function Uh(){if(Bs!==0)return;const i=Bo;do{try{for(;Bs<ks.length;){const t=ks[Bs];Bs++,zo(t),X_(t.$$)}}catch(t){throw ks.length=0,Bs=0,t}for(zo(null),ks.length=0,Bs=0;_l.length;)_l.pop()();for(let t=0;t<Gs.length;t+=1){const e=Gs[t];vl.has(e)||(vl.add(e),e())}Gs.length=0}while(ks.length);for(;Yh.length;)Yh.pop()();ml=!1,vl.clear(),zo(i)}function X_(i){if(i.fragment!==null){i.update(),Bi(i.before_update);const t=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,t),i.after_update.forEach(yl)}}function Y_(i){const t=[],e=[];Gs.forEach(n=>i.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),Gs=t}const ja=new Set;let Qr;function Za(){Qr={r:0,c:[],p:Qr}}function Ka(){Qr.r||Bi(Qr.c),Qr=Qr.p}function Kt(i,t){i&&i.i&&(ja.delete(i),i.i(t))}function pe(i,t,e,n){if(i&&i.o){if(ja.has(i))return;ja.add(i),Qr.c.push(()=>{ja.delete(i),n&&(e&&i.d(1),n())}),i.o(t)}else n&&n()}function Wh(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function U_(i,t){pe(i,1,1,()=>{t.delete(i.key)})}function W_(i,t,e,n,r,s,o,a,u,l,c,h){let f=i.length,g=s.length,d=f;const p={};for(;d--;)p[i[d].key]=d;const _=[],m=new Map,y=new Map,v=[];for(d=g;d--;){const b=h(r,s,d),T=e(b);let w=o.get(T);w?n&&v.push(()=>w.p(b,t)):(w=l(T,b),w.c()),m.set(T,_[d]=w),T in p&&y.set(T,Math.abs(d-p[T]))}const I=new Set,C=new Set;function L(b){Kt(b,1),b.m(a,c),o.set(b.key,b),c=b.first,g--}for(;f&&g;){const b=_[g-1],T=i[f-1],w=b.key,O=T.key;b===T?(c=b.first,f--,g--):m.has(O)?!o.has(w)||I.has(w)?L(b):C.has(O)?f--:y.get(w)>y.get(O)?(C.add(w),L(b)):(I.add(O),f--):(u(T,o),f--)}for(;f--;){const b=i[f];m.has(b.key)||u(b,o)}for(;g;)L(_[g-1]);return Bi(v),_}function _r(i){i&&i.c()}function zi(i,t,e){const{fragment:n,after_update:r}=i.$$;n&&n.m(t,e),yl(()=>{const s=i.$$.on_mount.map(Dh).filter(kh);i.$$.on_destroy?i.$$.on_destroy.push(...s):Bi(s),i.$$.on_mount=[]}),r.forEach(yl)}function Vi(i,t){const e=i.$$;e.fragment!==null&&(Y_(e.after_update),Bi(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function q_(i,t){i.$$.dirty[0]===-1&&(ks.push(i),V_(),i.$$.dirty.fill(0)),i.$$.dirty[t/31|0]|=1<<t%31}function $r(i,t,e,n,r,s,o=null,a=[-1]){const u=Bo;zo(i);const l=i.$$={fragment:null,ctx:[],props:s,update:zt,not_equal:r,bound:Fh(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Fh(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=e?e(i,t.props||{},(h,f,...g)=>{const d=g.length?g[0]:f;return l.ctx&&r(l.ctx[h],l.ctx[h]=d)&&(!l.skip_bound&&l.bound[h]&&l.bound[h](d),c&&q_(i,h)),f}):[],l.update(),c=!0,Bi(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const h=F_(t.target);l.fragment&&l.fragment.l(h),h.forEach(Vt)}else l.fragment&&l.fragment.c();t.intro&&Kt(i.$$.fragment),zi(i,t.target,t.anchor),Uh()}zo(u)}class ts{constructor(){Kn(this,"$$");Kn(this,"$$set")}$destroy(){Vi(this,1),this.$destroy=zt}$on(t,e){if(!kh(e))return zt;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const r=n.indexOf(e);r!==-1&&n.splice(r,1)}}$set(t){this.$$set&&!b_(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const H_="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(H_);function j_(i){let t,e;return{c(){t=gr("svg"),e=gr("path"),D(e,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),D(t,"viewBox","0 0 14 14"),D(t,"width","13"),D(t,"height","13"),D(t,"class","svelte-en2qvf")},m(n,r){jt(n,t,r),ct(t,e)},p:zt,i:zt,o:zt,d(n){n&&Vt(t)}}}class qh extends ts{constructor(t){super(),$r(this,t,null,j_,Jr,{})}}function Z_(i){let t,e;return{c(){t=gr("svg"),e=gr("path"),D(e,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),D(t,"viewBox","0 0 30 30"),D(t,"fill","none"),D(t,"xmlns","http://www.w3.org/2000/svg"),D(t,"class","svelte-d2loi5")},m(n,r){jt(n,t,r),ct(t,e)},p:zt,i:zt,o:zt,d(n){n&&Vt(t)}}}class Hh extends ts{constructor(t){super(),$r(this,t,null,Z_,Jr,{})}}function K_(i){let t,e;return{c(){t=It("img"),nn(t.src,e=i[3]+"area.svg")||D(t,"src",e),D(t,"alt",i[6]),D(t,"class","svelte-ltkwvy")},m(n,r){jt(n,t,r)},p(n,r){r&8&&!nn(t.src,e=n[3]+"area.svg")&&D(t,"src",e),r&64&&D(t,"alt",n[6])},d(n){n&&Vt(t)}}}function J_(i){let t,e;return{c(){t=It("img"),nn(t.src,e=i[3]+"poi.svg")||D(t,"src",e),D(t,"alt",i[6]),D(t,"class","svelte-ltkwvy")},m(n,r){jt(n,t,r)},p(n,r){r&8&&!nn(t.src,e=n[3]+"poi.svg")&&D(t,"src",e),r&64&&D(t,"alt",n[6])},d(n){n&&Vt(t)}}}function Q_(i){let t,e;return{c(){t=It("img"),nn(t.src,e=i[3]+"postal_code.svg")||D(t,"src",e),D(t,"alt",i[6]),D(t,"class","svelte-ltkwvy")},m(n,r){jt(n,t,r)},p(n,r){r&8&&!nn(t.src,e=n[3]+"postal_code.svg")&&D(t,"src",e),r&64&&D(t,"alt",n[6])},d(n){n&&Vt(t)}}}function $_(i){let t,e;return{c(){t=It("img"),nn(t.src,e=i[3]+"street.svg")||D(t,"src",e),D(t,"alt",i[6]),D(t,"class","svelte-ltkwvy")},m(n,r){jt(n,t,r)},p(n,r){r&8&&!nn(t.src,e=n[3]+"street.svg")&&D(t,"src",e),r&64&&D(t,"alt",n[6])},d(n){n&&Vt(t)}}}function tm(i){let t,e;return{c(){t=It("img"),nn(t.src,e=i[3]+"road.svg")||D(t,"src",e),D(t,"alt",i[6]),D(t,"class","svelte-ltkwvy")},m(n,r){jt(n,t,r)},p(n,r){r&8&&!nn(t.src,e=n[3]+"road.svg")&&D(t,"src",e),r&64&&D(t,"alt",n[6])},d(n){n&&Vt(t)}}}function em(i){let t,e;return{c(){t=It("img"),nn(t.src,e=i[3]+"housenumber.svg")||D(t,"src",e),D(t,"alt",i[6]),D(t,"class","svelte-ltkwvy")},m(n,r){jt(n,t,r)},p(n,r){r&8&&!nn(t.src,e=n[3]+"housenumber.svg")&&D(t,"src",e),r&64&&D(t,"alt",n[6])},d(n){n&&Vt(t)}}}function nm(i){let t,e,n,r;return{c(){t=It("img"),nn(t.src,e=i[5])||D(t,"src",e),D(t,"alt",i[4]),D(t,"class","svelte-ltkwvy")},m(s,o){jt(s,t,o),n||(r=Ye(t,"error",i[13]),n=!0)},p(s,o){o&32&&!nn(t.src,e=s[5])&&D(t,"src",e),o&16&&D(t,"alt",s[4])},d(s){s&&Vt(t),n=!1,r()}}}function jh(i){let t,e;return{c(){t=It("span"),e=dr(i[6]),D(t,"class","secondary svelte-ltkwvy")},m(n,r){jt(n,t,r),ct(t,e)},p(n,r){r&64&&Go(e,n[6])},d(n){n&&Vt(t)}}}function im(i){var b,T;let t,e,n,r,s,o,a,u,l=i[0].place_name.replace(/,.*/,"")+"",c,h,f=i[2]==="always"||i[2]&&!i[0].address&&((b=i[0].properties)==null?void 0:b.kind)!=="road"&&((T=i[0].properties)==null?void 0:T.kind)!=="road_relation"&&!i[0].id.startsWith("address.")&&!i[0].id.startsWith("postal_code.")&&(!i[0].id.startsWith("poi.")||!i[5]),g,d,p=i[0].place_name.replace(/[^,]*,?\s*/,"")+"",_,m,y;function v(w,O){var z,F;return O&1&&(e=null),O&1&&(n=null),O&1&&(r=null),w[5]?nm:w[0].address?em:((z=w[0].properties)==null?void 0:z.kind)==="road"||((F=w[0].properties)==null?void 0:F.kind)==="road_relation"?tm:(e==null&&(e=!!w[0].id.startsWith("address.")),e?$_:(n==null&&(n=!!w[0].id.startsWith("postal_code.")),n?Q_:(r==null&&(r=!!w[0].id.startsWith("poi.")),r?J_:K_)))}let I=v(i,-1),C=I(i),L=f&&jh(i);return{c(){t=It("li"),C.c(),s=dn(),o=It("span"),a=It("span"),u=It("span"),c=dr(l),h=dn(),L&&L.c(),g=dn(),d=It("span"),_=dr(p),D(u,"class","primary svelte-ltkwvy"),D(a,"class","svelte-ltkwvy"),D(d,"class","line2 svelte-ltkwvy"),D(o,"class","texts svelte-ltkwvy"),D(t,"tabindex","0"),D(t,"data-selected",i[1]),D(t,"class","svelte-ltkwvy"),pr(t,"selected",i[1])},m(w,O){jt(w,t,O),C.m(t,null),ct(t,s),ct(t,o),ct(o,a),ct(a,u),ct(u,c),ct(a,h),L&&L.m(a,null),ct(o,g),ct(o,d),ct(d,_),m||(y=[Ye(t,"mouseenter",i[11]),Ye(t,"focus",i[12])],m=!0)},p(w,[O]){var z,F;I===(I=v(w,O))&&C?C.p(w,O):(C.d(1),C=I(w),C&&(C.c(),C.m(t,s))),O&1&&l!==(l=w[0].place_name.replace(/,.*/,"")+"")&&Go(c,l),O&37&&(f=w[2]==="always"||w[2]&&!w[0].address&&((z=w[0].properties)==null?void 0:z.kind)!=="road"&&((F=w[0].properties)==null?void 0:F.kind)!=="road_relation"&&!w[0].id.startsWith("address.")&&!w[0].id.startsWith("postal_code.")&&(!w[0].id.startsWith("poi.")||!w[5])),f?L?L.p(w,O):(L=jh(w),L.c(),L.m(a,null)):L&&(L.d(1),L=null),O&1&&p!==(p=w[0].place_name.replace(/[^,]*,?\s*/,"")+"")&&Go(_,p),O&2&&D(t,"data-selected",w[1]),O&2&&pr(t,"selected",w[1])},i:zt,o:zt,d(w){w&&Vt(t),C.d(),L&&L.d(),m=!1,Bi(y)}}}function rm(i,t,e){var y;let n,r,{feature:s}=t,{selected:o=!1}=t,{showPlaceType:a}=t,{missingIconsCache:u}=t,{iconsBaseUrl:l}=t;const c=(y=s.properties)==null?void 0:y.categories;let h,f,g=0;function d(v){f&&u.add(f),e(9,g++,g)}function p(v){Xh.call(this,i,v)}function _(v){Xh.call(this,i,v)}const m=v=>d(v.currentTarget);return i.$$set=v=>{"feature"in v&&e(0,s=v.feature),"selected"in v&&e(1,o=v.selected),"showPlaceType"in v&&e(2,a=v.showPlaceType),"missingIconsCache"in v&&e(8,u=v.missingIconsCache),"iconsBaseUrl"in v&&e(3,l=v.iconsBaseUrl)},i.$$.update=()=>{var v,I,C,L;if(i.$$.dirty&1848)do e(10,n--,n),e(4,h=c==null?void 0:c[n]),e(5,f=h?l+h.replace(/ /g,"_")+".svg":void 0);while(n>-1&&(!f||u.has(f)));i.$$.dirty&1&&e(6,r=s.id.startsWith("poi.")?(I=(v=s.properties)==null?void 0:v.categories)==null?void 0:I.join(", "):((L=(C=s.properties)==null?void 0:C.place_type_name)==null?void 0:L[0])??s.place_type[0])},e(10,n=(c==null?void 0:c.length)??0),[s,o,a,l,h,f,r,d,u,g,n,p,_,m]}class sm extends ts{constructor(t){super(),$r(this,t,rm,im,Jr,{feature:0,selected:1,showPlaceType:2,missingIconsCache:8,iconsBaseUrl:3})}}function om(i){let t;return{c(){t=It("div"),t.innerHTML='<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>',D(t,"class","svelte-7cmwmc")},m(e,n){jt(e,t,n)},p:zt,i:zt,o:zt,d(e){e&&Vt(t)}}}class am extends ts{constructor(t){super(),$r(this,t,null,om,Jr,{})}}function um(i){let t,e;return{c(){t=gr("svg"),e=gr("path"),D(e,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),D(t,"viewBox","0 0 60.006 21.412"),D(t,"width","14"),D(t,"height","20"),D(t,"class","svelte-en2qvf")},m(n,r){jt(n,t,r),ct(t,e)},p:zt,i:zt,o:zt,d(n){n&&Vt(t)}}}class lm extends ts{constructor(t){super(),$r(this,t,null,um,Jr,{})}}function cm(i){let t,e;return{c(){t=gr("svg"),e=gr("path"),D(e,"d","M13.101 14.261 8.74 9.899a4.797 4.797 0 0 1-1.425.748 5.165 5.165 0 0 1-1.603.248c-1.446 0-2.677-.5-3.693-1.503S.495 7.164.495 5.717c0-1.446.508-2.678 1.524-3.693C3.035 1.008 4.266.5 5.712.5c1.448 0 2.672.508 3.675 1.524 1.002 1.015 1.503 2.247 1.503 3.693 0 .558-.08 1.092-.239 1.603-.159.512-.411.98-.757 1.405l4.382 4.4a.74.74 0 0 1 .229.568.81.81 0 0 1-.249.568.787.787 0 0 1-.577.239.787.787 0 0 1-.578-.239ZM5.712 9.223c.97 0 1.796-.342 2.48-1.026a3.378 3.378 0 0 0 1.026-2.48c0-.982-.34-1.818-1.016-2.509-.677-.69-1.507-1.035-2.49-1.035a3.42 3.42 0 0 0-2.509 1.035 3.42 3.42 0 0 0-1.035 2.51c0 .982.345 1.812 1.035 2.488.691.678 1.527 1.017 2.51 1.017Z"),D(t,"width","14"),D(t,"height","14"),D(t,"viewBox","0 0 15 15"),D(t,"class","svelte-en2qvf")},m(n,r){jt(n,t,r),ct(t,e)},p:zt,i:zt,o:zt,d(n){n&&Vt(t)}}}class hm extends ts{constructor(t){super(),$r(this,t,null,cm,Jr,{})}}function fm(i,t,e){const n=t[1],r=t[0],s=n-r;return i===n&&e?i:((i-r)%s+s)%s+r}function Zh(i){const t=[...i];return t[2]<t[0]&&(t[2]+=360),t}let Vo;async function gm(i,t,e){const n=i==null?void 0:i.getCenterAndZoom();for(const r of t??[])if(!(n&&(r.minZoom!=null&&r.minZoom>n[0]||r.maxZoom!=null&&r.maxZoom<n[0]))){if(r.type==="fixed")return r.coordinates.join(",");t:if(r.type==="client-geolocation"){if(Vo&&r.cachedLocationExpiry&&Vo.time+r.cachedLocationExpiry>Date.now()){if(!Vo.coords)break t;return Vo.coords}let s;try{return s=await new Promise((o,a)=>{e.signal.addEventListener("abort",()=>{a(Error("aborted"))}),navigator.geolocation.getCurrentPosition(u=>{o([u.coords.longitude,u.coords.latitude].map(l=>l.toFixed(6)).join(","))},u=>{a(u)},r)}),s}catch{}finally{r.cachedLocationExpiry&&(Vo={time:Date.now(),coords:s})}if(e.signal.aborted)return}if(r.type==="server-geolocation")return"ip";if(n&&r.type==="map-center")return n[1].toFixed(6)+","+n[2].toFixed(6)}}function Kh(i,t,e){const n=i.slice();return n[78]=t[e],n[80]=e,n}function Jh(i){let t,e;return t=new am({}),{c(){_r(t.$$.fragment)},m(n,r){zi(t,n,r),e=!0},i(n){e||(Kt(t.$$.fragment,n),e=!0)},o(n){pe(t.$$.fragment,n),e=!1},d(n){Vi(t,n)}}}function Qh(i){let t,e,n,r,s;return e=new lm({}),{c(){t=It("button"),_r(e.$$.fragment),D(t,"type","button"),D(t,"title",i[9]),D(t,"class","svelte-1r7dvt7"),pr(t,"active",i[0])},m(o,a){jt(o,t,a),zi(e,t,null),n=!0,r||(s=Ye(t,"click",i[64]),r=!0)},p(o,a){(!n||a[0]&512)&&D(t,"title",o[9]),(!n||a[0]&1)&&pr(t,"active",o[0])},i(o){n||(Kt(e.$$.fragment,o),n=!0)},o(o){pe(e.$$.fragment,o),n=!1},d(o){o&&Vt(t),Vi(e),r=!1,s()}}}function dm(i){let t,e=[],n=new Map,r,s,o,a=Wh(i[13]);const u=l=>l[78].id+(l[78].address?","+l[78].address:"");for(let l=0;l<a.length;l+=1){let c=Kh(i,a,l),h=u(c);n.set(h,e[l]=$h(h,c))}return{c(){t=It("ul");for(let l=0;l<e.length;l+=1)e[l].c();D(t,"class","svelte-1r7dvt7")},m(l,c){jt(l,t,c);for(let h=0;h<e.length;h+=1)e[h]&&e[h].m(t,null);r=!0,s||(o=[Ye(t,"mouseleave",i[68]),Ye(t,"blur",i[69])],s=!0)},p(l,c){c[0]&8940544&&(a=Wh(l[13]),Za(),e=W_(e,c,u,1,l,a,n,t,U_,$h,null,Kh),Ka())},i(l){if(!r){for(let c=0;c<a.length;c+=1)Kt(e[c]);r=!0}},o(l){for(let c=0;c<e.length;c+=1)pe(e[c]);r=!1},d(l){l&&Vt(t);for(let c=0;c<e.length;c+=1)e[c].d();s=!1,Bi(o)}}}function pm(i){let t,e,n,r,s,o;return e=new Hh({}),{c(){t=It("div"),_r(e.$$.fragment),n=dn(),r=It("div"),s=dr(i[7]),D(r,"class","svelte-1r7dvt7"),D(t,"class","no-results svelte-1r7dvt7")},m(a,u){jt(a,t,u),zi(e,t,null),ct(t,n),ct(t,r),ct(r,s),o=!0},p(a,u){(!o||u[0]&128)&&Go(s,a[7])},i(a){o||(Kt(e.$$.fragment,a),o=!0)},o(a){pe(e.$$.fragment,a),o=!1},d(a){a&&Vt(t),Vi(e)}}}function _m(i){let t="",e;return{c(){e=dr(t)},m(n,r){jt(n,e,r)},p:zt,i:zt,o:zt,d(n){n&&Vt(e)}}}function mm(i){let t,e,n,r,s,o,a,u,l,c,h;return e=new Hh({}),u=new qh({}),{c(){t=It("div"),_r(e.$$.fragment),n=dn(),r=It("div"),s=dr(i[6]),o=dn(),a=It("button"),_r(u.$$.fragment),D(r,"class","svelte-1r7dvt7"),D(a,"class","svelte-1r7dvt7"),D(t,"class","error svelte-1r7dvt7")},m(f,g){jt(f,t,g),zi(e,t,null),ct(t,n),ct(t,r),ct(r,s),ct(t,o),ct(t,a),zi(u,a,null),l=!0,c||(h=Ye(a,"click",i[65]),c=!0)},p(f,g){(!l||g[0]&64)&&Go(s,f[6])},i(f){l||(Kt(e.$$.fragment,f),Kt(u.$$.fragment,f),l=!0)},o(f){pe(e.$$.fragment,f),pe(u.$$.fragment,f),l=!1},d(f){f&&Vt(t),Vi(e),Vi(u),c=!1,h()}}}function $h(i,t){let e,n,r;function s(){return t[66](t[80])}function o(){return t[67](t[78])}return n=new sm({props:{feature:t[78],showPlaceType:t[10],selected:t[14]===t[80],missingIconsCache:t[19],iconsBaseUrl:t[11]}}),n.$on("mouseenter",s),n.$on("focus",o),{key:i,first:null,c(){e=A_(),_r(n.$$.fragment),this.first=e},m(a,u){jt(a,e,u),zi(n,a,u),r=!0},p(a,u){t=a;const l={};u[0]&8192&&(l.feature=t[78]),u[0]&1024&&(l.showPlaceType=t[10]),u[0]&24576&&(l.selected=t[14]===t[80]),u[0]&2048&&(l.iconsBaseUrl=t[11]),n.$set(l)},i(a){r||(Kt(n.$$.fragment,a),r=!0)},o(a){pe(n.$$.fragment,a),r=!1},d(a){a&&Vt(e),Vi(n,a)}}}function ym(i){let t,e,n,r,s,o,a,u,l,c,h,f,g,d,p,_,m,y,v,I,C,L=!1;s=new hm({}),h=new qh({});let b=i[18]&&Jh(),T=i[5]===!0&&Qh(i);const w=i[56].default,O=T_(w,i,i[55],null),z=[mm,_m,pm,dm],F=[];function U(R,P){var B,X;return R[17]?0:R[15]?((B=R[13])==null?void 0:B.length)===0?2:R[15]&&((X=R[13])!=null&&X.length)?3:-1:1}return~(_=U(i))&&(m=F[_]=z[_](i)),{c(){t=dn(),e=It("form"),n=It("div"),r=It("button"),_r(s.$$.fragment),o=dn(),a=It("input"),u=dn(),l=It("div"),c=It("button"),_r(h.$$.fragment),f=dn(),b&&b.c(),g=dn(),T&&T.c(),d=dn(),O&&O.c(),p=dn(),m&&m.c(),D(r,"class","search-button svelte-1r7dvt7"),D(r,"type","button"),D(a,"placeholder",i[8]),D(a,"aria-label",i[8]),D(a,"class","svelte-1r7dvt7"),D(c,"type","button"),D(c,"title",i[3]),D(c,"class","svelte-1r7dvt7"),D(l,"class","clear-button-container svelte-1r7dvt7"),pr(l,"displayable",i[1]!==""),D(n,"class","input-group svelte-1r7dvt7"),D(e,"tabindex","0"),D(e,"class",y=Bh(i[2])+" svelte-1r7dvt7"),pr(e,"can-collapse",i[4]&&i[1]==="")},m(R,P){jt(R,t,P),jt(R,e,P),ct(e,n),ct(n,r),zi(s,r,null),ct(n,o),ct(n,a),i[58](a),zh(a,i[1]),ct(n,u),ct(n,l),ct(l,c),zi(h,c,null),ct(l,f),b&&b.m(l,null),ct(n,g),T&&T.m(n,null),ct(n,d),O&&O.m(n,null),ct(e,p),~_&&F[_].m(e,null),v=!0,I||(C=[Ye(r,"click",i[57]),Ye(a,"input",i[59]),Ye(a,"focus",i[60]),Ye(a,"blur",i[61]),Ye(a,"keydown",i[21]),Ye(a,"input",i[62]),Ye(c,"click",i[63]),Ye(e,"submit",D_(i[20]))],I=!0)},p(R,P){(!v||P[0]&256)&&D(a,"placeholder",R[8]),(!v||P[0]&256)&&D(a,"aria-label",R[8]),P[0]&2&&a.value!==R[1]&&zh(a,R[1]),(!v||P[0]&8)&&D(c,"title",R[3]),R[18]?b?P[0]&262144&&Kt(b,1):(b=Jh(),b.c(),Kt(b,1),b.m(l,null)):b&&(Za(),pe(b,1,1,()=>{b=null}),Ka()),(!v||P[0]&2)&&pr(l,"displayable",R[1]!==""),R[5]===!0?T?(T.p(R,P),P[0]&32&&Kt(T,1)):(T=Qh(R),T.c(),Kt(T,1),T.m(n,d)):T&&(Za(),pe(T,1,1,()=>{T=null}),Ka()),O&&O.p&&(!v||P[1]&16777216)&&M_(O,w,R,R[55],v?P_(w,R[55],P,null):O_(R[55]),null);let B=_;_=U(R),_===B?~_&&F[_].p(R,P):(m&&(Za(),pe(F[B],1,1,()=>{F[B]=null}),Ka()),~_?(m=F[_],m?m.p(R,P):(m=F[_]=z[_](R),m.c()),Kt(m,1),m.m(e,null)):m=null),(!v||P[0]&4&&y!==(y=Bh(R[2])+" svelte-1r7dvt7"))&&D(e,"class",y),(!v||P[0]&22)&&pr(e,"can-collapse",R[4]&&R[1]==="")},i(R){v||(Kt(L),Kt(s.$$.fragment,R),Kt(h.$$.fragment,R),Kt(b),Kt(T),Kt(O,R),Kt(m),v=!0)},o(R){pe(L),pe(s.$$.fragment,R),pe(h.$$.fragment,R),pe(b),pe(T),pe(O,R),pe(m),v=!1},d(R){R&&(Vt(t),Vt(e)),Vi(s),i[58](null),Vi(h),b&&b.d(),T&&T.d(),O&&O.d(R),~_&&F[_].d(),I=!1,Bi(C)}}}function vm(i,t,e){let n,{$$slots:r={},$$scope:s}=t,{class:o=void 0}=t,{apiKey:a}=t,{bbox:u=void 0}=t,{clearButtonTitle:l="clear"}=t,{clearOnBlur:c=!1}=t,{collapsed:h=!1}=t,{country:f=void 0}=t,{debounceSearch:g=200}=t,{enableReverse:d=!1}=t,{errorMessage:p="Something went wrong…"}=t,{filter:_=()=>!0}=t,{flyTo:m=!0}=t,{fuzzyMatch:y=!0}=t,{language:v=void 0}=t,{limit:I=void 0}=t,{mapController:C=void 0}=t,{minLength:L=2}=t,{noResultsMessage:b="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=t,{placeholder:T="Search"}=t,{proximity:w=[{type:"server-geolocation"}]}=t,{reverseActive:O=d==="always"}=t,{reverseButtonTitle:z="toggle reverse geocoding"}=t,{searchValue:F=""}=t,{showFullGeometry:U=!0}=t,{showPlaceType:R="ifNeeded"}=t,{showResultsWhileTyping:P=!0}=t,{types:B=void 0}=t,{excludeTypes:X=!1}=t,{zoom:J=16}=t,{maxZoom:ot=18}=t,{apiUrl:Ct="https://api.maptiler.com/geocoding"}=t,{fetchParameters:Bt={}}=t,{iconsBaseUrl:G="https://cdn.maptiler.com/maptiler-geocoding-control/v1.1.0/icons/"}=t,{adjustUrlQuery:ze=N=>{}}=t;function Pe(){Ve.focus()}function $e(){Ve.blur()}function ku(N,Rt=!0){e(1,F=N),Rt?(e(14,Dt=-1),zr()):(Io(),setTimeout(()=>{Ve.focus(),Ve.select()}))}function yc(){e(13,gt=void 0),e(52,lt=void 0),e(14,Dt=-1)}function Gu(){e(51,we=[]),e(52,lt=void 0)}let ir=!1,gt,we,lt,Sa="",Ve,Dt=-1,Zn,yo=[],rr,sr,Br,wa;const vo=new Set,mi=B_();G_(()=>{C&&(C.setEventHandler(void 0),C.indicateReverse(!1),C.setSelectedMarker(-1),C.setMarkers(void 0,void 0))});function zr(N){if(sr&&(clearTimeout(sr),sr=void 0),Dt>-1&>)e(52,lt=gt[Dt]),e(1,F=lt.place_name.replace(/,.*/,"")),e(17,Zn=void 0),e(51,we=void 0),e(14,Dt=-1);else if(F){const Rt=N||!Eo();xs(F,{exact:!0}).then(()=>{e(51,we=gt),e(52,lt=void 0),Rt&&xo()}).catch(Ht=>e(17,Zn=Ht))}}function Eo(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(F)}async function xs(N,{byId:Rt=!1,exact:Ht=!1}={}){e(17,Zn=void 0),rr==null||rr.abort();const ae=new AbortController;e(18,rr=ae);try{const vt=Eo(),Me=new URLSearchParams;if(v!==void 0&&Me.set("language",Array.isArray(v)?v.join(","):v??""),B&&Me.set("types",B.join(",")),X&&Me.set("excludeTypes",String(X)),u&&Me.set("bbox",u.map(fn=>fn.toFixed(6)).join(",")),f&&Me.set("country",Array.isArray(f)?f.join(","):f),!Rt&&!vt){const fn=await gm(C,w,ae);fn&&Me.set("proximity",fn),(Ht||!P)&&Me.set("autocomplete","false"),Me.set("fuzzyMatch",String(y))}I!==void 0&&(!vt||(B==null?void 0:B.length)===1)&&Me.set("limit",String(I)),Me.set("key",a),ze(Me);const or=Ct+"/"+encodeURIComponent(N)+".json?"+Me.toString();if(or===Sa){Rt?(e(13,gt=void 0),e(52,lt=yo[0])):e(13,gt=yo);return}Sa=or;const Oe=await fetch(or,{signal:ae.signal,...Bt});if(!Oe.ok)throw new Error;const Xe=await Oe.json();mi("response",{url:or,featureCollection:Xe}),Rt?(e(13,gt=void 0),e(52,lt=Xe.features[0]),yo=[lt]):(e(13,gt=Xe.features.filter(_)),yo=gt,vt&&Ve.focus())}catch(vt){if(vt&&typeof vt=="object"&&"name"in vt&&vt.name==="AbortError")return;throw vt}finally{ae===rr&&e(18,rr=void 0)}}function xo(){var Ht;if(!(we!=null&&we.length)||!m)return;const N=[180,90,-180,-90],Rt=!we.some(ae=>!ae.matching_text);for(const ae of we)if(Rt||!ae.matching_text)for(const vt of[0,1,2,3])N[vt]=Math[vt<2?"min":"max"](N[vt],((Ht=ae.bbox)==null?void 0:Ht[vt])??ae.center[vt%2]);C&&we.length>0&&(lt&&N[0]===N[2]&&N[1]===N[3]?C.flyTo(lt.center,J):C.fitBounds(Zh(N),50,ot))}function Co(N){e(0,O=d==="always"),ku(fm(N[0],[-180,180],!0).toFixed(6)+","+N[1].toFixed(6))}function vc(N){if(!gt)return;let Rt=N.key==="ArrowDown"?1:N.key==="ArrowUp"?-1:0;Rt?(Dt===-1&&Rt===-1&&e(14,Dt=gt.length),e(14,Dt+=Rt),Dt>=gt.length&&e(14,Dt=-1),N.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(N.key)&&e(14,Dt=-1)}function Io(N=!0){if(e(17,Zn=void 0),P){if(sr&&clearTimeout(sr),F.length<L)return;const Rt=F;sr=window.setTimeout(()=>{xs(Rt).catch(Ht=>e(17,Zn=Ht))},N?g:0)}else e(13,gt=void 0),e(17,Zn=void 0)}function So(N){e(52,lt=N),e(1,F=N.place_name),e(14,Dt=-1)}const Ra=()=>Ve.focus();function Ec(N){_l[N?"unshift":"push"](()=>{Ve=N,e(16,Ve)})}function xc(){F=this.value,e(1,F),e(12,ir),e(26,c)}const Bu=()=>e(12,ir=!0),zu=()=>e(12,ir=!1),Na=()=>Io(),Vu=()=>{e(1,F=""),Ve.focus()},La=()=>e(0,O=!O),Cs=()=>e(17,Zn=void 0),Is=N=>e(14,Dt=N),Ss=N=>So(N),Xu=()=>e(14,Dt=-1),Yu=()=>{};return i.$$set=N=>{"class"in N&&e(2,o=N.class),"apiKey"in N&&e(24,a=N.apiKey),"bbox"in N&&e(25,u=N.bbox),"clearButtonTitle"in N&&e(3,l=N.clearButtonTitle),"clearOnBlur"in N&&e(26,c=N.clearOnBlur),"collapsed"in N&&e(4,h=N.collapsed),"country"in N&&e(27,f=N.country),"debounceSearch"in N&&e(28,g=N.debounceSearch),"enableReverse"in N&&e(5,d=N.enableReverse),"errorMessage"in N&&e(6,p=N.errorMessage),"filter"in N&&e(29,_=N.filter),"flyTo"in N&&e(30,m=N.flyTo),"fuzzyMatch"in N&&e(31,y=N.fuzzyMatch),"language"in N&&e(32,v=N.language),"limit"in N&&e(33,I=N.limit),"mapController"in N&&e(34,C=N.mapController),"minLength"in N&&e(35,L=N.minLength),"noResultsMessage"in N&&e(7,b=N.noResultsMessage),"placeholder"in N&&e(8,T=N.placeholder),"proximity"in N&&e(36,w=N.proximity),"reverseActive"in N&&e(0,O=N.reverseActive),"reverseButtonTitle"in N&&e(9,z=N.reverseButtonTitle),"searchValue"in N&&e(1,F=N.searchValue),"showFullGeometry"in N&&e(37,U=N.showFullGeometry),"showPlaceType"in N&&e(10,R=N.showPlaceType),"showResultsWhileTyping"in N&&e(38,P=N.showResultsWhileTyping),"types"in N&&e(39,B=N.types),"excludeTypes"in N&&e(40,X=N.excludeTypes),"zoom"in N&&e(41,J=N.zoom),"maxZoom"in N&&e(42,ot=N.maxZoom),"apiUrl"in N&&e(43,Ct=N.apiUrl),"fetchParameters"in N&&e(44,Bt=N.fetchParameters),"iconsBaseUrl"in N&&e(11,G=N.iconsBaseUrl),"adjustUrlQuery"in N&&e(45,ze=N.adjustUrlQuery),"$$scope"in N&&e(55,s=N.$$scope)},i.$$.update=()=>{if(i.$$.dirty[0]&67112960&&setTimeout(()=>{e(15,Br=ir),c&&!ir&&e(1,F="")}),i.$$.dirty[0]&8194|i.$$.dirty[1]&16&&F.length<L&&(e(52,lt=void 0),e(13,gt=void 0),e(17,Zn=void 0),e(51,we=gt)),i.$$.dirty[1]&2097216&&U&<&&!lt.address&<.geometry.type==="Point"&&xs(lt.id,{byId:!0}).catch(N=>e(17,Zn=N)),i.$$.dirty[0]&1073741824|i.$$.dirty[1]&6294536&&(C&<&<.id!==wa&&m&&(!lt.bbox||lt.bbox[0]===lt.bbox[2]&<.bbox[1]===lt.bbox[3]?C.flyTo(lt.center,lt.id.startsWith("poi.")||lt.id.startsWith("address.")?ot:J):C.fitBounds(Zh(lt.bbox),50,ot),e(13,gt=void 0),e(51,we=void 0),e(14,Dt=-1)),e(53,wa=lt==null?void 0:lt.id)),i.$$.dirty[0]&8192|i.$$.dirty[1]&1048576&&we!==gt&&e(51,we=void 0),i.$$.dirty[1]&3145736&&C&&C.setMarkers(we,lt),i.$$.dirty[0]&2&&e(14,Dt=-1),i.$$.dirty[0]&40961|i.$$.dirty[1]&8&&C&&C.setEventHandler(N=>{switch(N.type){case"mapClick":O&&Co(N.coordinates);break;case"markerClick":{const Rt=gt==null?void 0:gt.find(Ht=>Ht.id===N.id);Rt&&So(Rt)}break;case"markerMouseEnter":e(14,Dt=Br?(gt==null?void 0:gt.findIndex(Rt=>Rt.id===N.id))??-1:-1);break;case"markerMouseLeave":e(14,Dt=-1);break}}),i.$$.dirty[0]&16384|i.$$.dirty[1]&8&&(C==null||C.setSelectedMarker(Dt)),i.$$.dirty[0]&24576&&e(54,n=gt==null?void 0:gt[Dt]),i.$$.dirty[0]&2|i.$$.dirty[1]&8){const N=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(F);C==null||C.setReverseMarker(N?[Number(N[1]),Number(N[2])]:void 0)}i.$$.dirty[1]&8388608&&mi("select",n),i.$$.dirty[1]&2097152&&mi("pick",lt),i.$$.dirty[0]&40960&&mi("optionsVisibilityChange",Br&&!!gt),i.$$.dirty[0]&8192&&mi("featuresListed",gt),i.$$.dirty[1]&1048576&&mi("featuresMarked",we),i.$$.dirty[0]&1&&mi("reverseToggle",O),i.$$.dirty[0]&2&&mi("queryChange",F),i.$$.dirty[0]&1|i.$$.dirty[1]&8&&C&&C.indicateReverse(O)},[O,F,o,l,h,d,p,b,T,z,R,G,ir,gt,Dt,Br,Ve,Zn,rr,vo,zr,vc,Io,So,a,u,c,f,g,_,m,y,v,I,C,L,w,U,P,B,X,J,ot,Ct,Bt,ze,Pe,$e,ku,yc,Gu,we,lt,wa,n,s,r,Ra,Ec,xc,Bu,zu,Na,Vu,La,Cs,Is,Ss,Xu,Yu]}let Em=class extends ts{constructor(t){super(),$r(this,t,vm,ym,Jr,{class:2,apiKey:24,bbox:25,clearButtonTitle:3,clearOnBlur:26,collapsed:4,country:27,debounceSearch:28,enableReverse:5,errorMessage:6,filter:29,flyTo:30,fuzzyMatch:31,language:32,limit:33,mapController:34,minLength:35,noResultsMessage:7,placeholder:8,proximity:36,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:37,showPlaceType:10,showResultsWhileTyping:38,types:39,excludeTypes:40,zoom:41,maxZoom:42,apiUrl:43,fetchParameters:44,iconsBaseUrl:11,adjustUrlQuery:45,focus:46,blur:47,setQuery:48,clearList:49,clearMap:50},null,[-1,-1,-1])}get focus(){return this.$$.ctx[46]}get blur(){return this.$$.ctx[47]}get setQuery(){return this.$$.ctx[48]}get clearList(){return this.$$.ctx[49]}get clearMap(){return this.$$.ctx[50]}};class El extends ar{constructor(t){if(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)if(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new El(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const n=this.getStyle();return n&&t.setStyle(n),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_&&(Qn(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=Jn(t,Rn.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?xm(t):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_()}}function xm(i){if(typeof i=="function")return i;let t;return Array.isArray(i)?t=i:(ue(typeof i.getZIndex=="function",41),t=[i]),function(){return t}}const Xi=El;class xl{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null}clone(){const t=this.getColor();return new xl({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const Xo=xl;function tf(i,t,e,n,r,s,o){let a,u;const l=(e-t)/n;if(l===1)a=t;else if(l===2)a=t,u=r;else if(l!==0){let c=i[t],h=i[t+1],f=0;const g=[0];for(let _=t+n;_<e;_+=n){const m=i[_],y=i[_+1];f+=Math.sqrt((m-c)*(m-c)+(y-h)*(y-h)),g.push(f),c=m,h=y}const d=r*f,p=vd(g,d);p<0?(u=(d-g[-p-2])/(g[-p-1]-g[-p-2]),a=t+(-p-2)*n):a=t+p*n}o=o>1?o:2,s=s||new Array(o);for(let c=0;c<o;++c)s[c]=a===void 0?NaN:u===void 0?i[a+c]:gn(i[a+c],i[a+n+c],u);return s}function Cl(i,t,e,n,r,s){if(e==t)return null;let o;if(r<i[t+n-1])return s?(o=i.slice(t,t+n),o[n-1]=r,o):null;if(i[e-1]<r)return s?(o=i.slice(e-n,e),o[n-1]=r,o):null;if(r==i[t+n-1])return i.slice(t,t+n);let a=t/n,u=e/n;for(;a<u;){const f=a+u>>1;r<i[(f+1)*n-1]?u=f:a=f+1}const l=i[a*n-1];if(r==l)return i.slice((a-1)*n,(a-1)*n+n);const c=i[(a+1)*n-1],h=(r-l)/(c-l);o=[];for(let f=0;f<n-1;++f)o.push(gn(i[(a-1)*n+f],i[a*n+f],h));return o.push(r),o}function Cm(i,t,e,n,r,s,o){if(o)return Cl(i,t,e[e.length-1],n,r,s);let a;if(r<i[n-1])return s?(a=i.slice(0,n),a[n-1]=r,a):null;if(i[i.length-1]<r)return s?(a=i.slice(i.length-n),a[n-1]=r,a):null;for(let u=0,l=e.length;u<l;++u){const c=e[u];if(t!=c){if(r<i[t+n-1])return null;if(r<=i[c-1])return Cl(i,t,c,n,r,!1);t=c}}return null}function ef(i,t,e,n){let r=i[t],s=i[t+1],o=0;for(let a=t+n;a<e;a+=n){const u=i[a],l=i[a+1];o+=Math.sqrt((u-r)*(u-r)+(l-s)*(l-s)),r=u,s=l}return o}const Ja=class wc extends Hr{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){this.flatCoordinates?Fi(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()}clone(){const t=new wc(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<Xr(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(il(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,r))}forEachSegment(t){return Sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return this.layout!="XYM"&&this.layout!="XYZM"?null:(e=e!==void 0?e:!1,Cl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return hr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return tf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return ef(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=ul(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new wc(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return za(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Ba(this.flatCoordinates,0,t,this.stride),this.changed()}};class Il{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new Il({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(),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_}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}setWidth(t){this.width_=t}}const Qa=Il,Zt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class Sl{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=qa(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Sl({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 Et()}getImage(t){return Et()}getHitDetectionImage(){return Et()}getPixelRatio(t){return 1}getImageState(){return Et()}getImageSize(){return Et()}getOrigin(){return Et()}getSize(){return Et()}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_=qa(t)}listenImageChange(t){Et()}load(){Et()}unlistenImageChange(t){Et()}}const nf=Sl;function vi(i){return Array.isArray(i)?uh(i):i}class wl extends nf{constructor(t){const e=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:1,rotateWithView:e,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius!==void 0?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new wl({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]/2-e[0]/n[0],t[1]/2+e[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const n=this.renderOptions_,r=$n(n.size*t,n.size*t);this.draw_(n,r,t),e=r.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return Zt.LOADED}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,n){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let r=this.radius_,s=this.radius2_===void 0?r:this.radius2_;if(r<s){const L=r;r=s,s=L}const o=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/o,u=s*Math.sin(a),l=Math.sqrt(s*s-u*u),c=r-l,h=Math.sqrt(u*u+c*c),f=h/u;if(t==="miter"&&f<=n)return f*e;const g=e/2/f,d=e/2*(c/h),_=Math.sqrt((r+g)*(r+g)+d*d)-r;if(this.radius2_===void 0||t==="bevel")return _*2;const m=r*Math.sin(a),y=Math.sqrt(r*r-m*m),v=s-y,C=Math.sqrt(m*m+v*v)/m;if(C<=n){const L=C*e/2-s-r;return 2*Math.max(_,L)}return _*2}createRenderOptions(){let t=Ds,e=0,n=null,r=0,s,o=0;this.stroke_&&(s=this.stroke_.getColor(),s===null&&(s=Do),s=vi(s),o=this.stroke_.getWidth(),o===void 0&&(o=ko),n=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=Ds),e=this.stroke_.getMiterLimit(),e===void 0&&(e=Ao));const a=this.calculateLineJoinSize_(t,o,e),u=Math.max(this.radius_,this.radius2_||0),l=Math.ceil(2*u+a);return{strokeStyle:s,strokeWidth:o,size:l,lineDash:n,lineDashOffset:r,lineJoin:t,miterLimit:e}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]}draw_(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let r=this.fill_.getColor();r===null&&(r=en),e.fillStyle=vi(r),e.fill()}this.stroke_&&(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())}createHitDetectionCanvas_(t){if(this.fill_){let e=this.fill_.getColor(),n=0;if(typeof e=="string"&&(e=Ga(e)),e===null?n=1:Array.isArray(e)&&(n=e.length===4?e[3]:1),n===0){const r=$n(t.size,t.size);this.hitDetectionCanvas_=r.canvas,this.drawHitDetectionCanvas_(t,r)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(t){let e=this.points_;const n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{const r=this.radius2_===void 0?n:this.radius2_;this.radius2_!==void 0&&(e*=2);const s=this.angle_-Math.PI/2,o=2*Math.PI/e;for(let a=0;a<e;a++){const u=s+a*o,l=a%2===0?n:r;t.lineTo(l*Math.cos(u),l*Math.sin(u))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=en,e.fill(),this.stroke_&&(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())}}const rf=wl;class Rl extends rf{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:t.scale!==void 0?t.scale:1,rotation:t.rotation!==void 0?t.rotation:0,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new Rl({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}setRadius(t){this.radius_=t,this.render()}}const sf=Rl;class $a{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=of,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new $a({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().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){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=of,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function Im(i){let t;if(typeof i=="function")t=i;else{let e;Array.isArray(i)?e=i:(ue(typeof i.getZIndex=="function",41),e=[i]),t=function(){return e}}return t}let Nl=null;function Sm(i,t){if(!Nl){const e=new Xo({color:"rgba(255,255,255,0.4)"}),n=new Qa({color:"#3399CC",width:1.25});Nl=[new $a({image:new sf({fill:e,stroke:n,radius:5}),fill:e,stroke:n})]}return Nl}function of(i){return i.getGeometry()}const tu=$a,wm="#333";class Ll{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=qa(t.scale!==void 0?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_=t.fill!==void 0?t.fill:new Xo({color:wm}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}clone(){const t=this.getScale();return new Ll({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}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_}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_}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}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=qa(t!==void 0?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}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const af=Ll;function Rm(i,t,e,n,r){uf(i,t,e||0,n||i.length-1,r||Nm)}function uf(i,t,e,n,r){for(;n>e;){if(n-e>600){var s=n-e+1,o=t-e+1,a=Math.log(s),u=.5*Math.exp(2*a/3),l=.5*Math.sqrt(a*u*(s-u)/s)*(o-s/2<0?-1:1),c=Math.max(e,Math.floor(t-o*u/s+l)),h=Math.min(n,Math.floor(t+(s-o)*u/s+l));uf(i,t,c,h,r)}var f=i[t],g=e,d=n;for(Yo(i,e,t),r(i[n],f)>0&&Yo(i,e,n);g<d;){for(Yo(i,g,d),g++,d--;r(i[g],f)<0;)g++;for(;r(i[d],f)>0;)d--}r(i[e],f)===0?Yo(i,e,d):(d++,Yo(i,d,n)),d<=t&&(e=d+1),t<=d&&(n=d-1)}}function Yo(i,t,e){var n=i[t];i[t]=i[e],i[e]=n}function Nm(i,t){return i<t?-1:i>t?1:0}let lf=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!nu(t,e))return n;const r=this.toBBox,s=[];for(;e;){for(let o=0;o<e.children.length;o++){const a=e.children[o],u=e.leaf?r(a):a;nu(t,u)&&(e.leaf?n.push(a):Tl(t,u)?this._all(a,n):s.push(a))}e=s.pop()}return n}collides(t){let e=this.data;if(!nu(t,e))return!1;const n=[];for(;e;){for(let r=0;r<e.children.length;r++){const s=e.children[r],o=e.leaf?this.toBBox(s):s;if(nu(t,o)){if(e.leaf||Tl(t,o))return!0;n.push(s)}}e=n.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let n=0;n<t.length;n++)this.insert(t[n]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=e;else if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const n=this.data;this.data=e,e=n}this._insert(e,this.data.height-e.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=Vs([]),this}remove(t,e){if(!t)return this;let n=this.data;const r=this.toBBox(t),s=[],o=[];let a,u,l;for(;n||s.length;){if(n||(n=s.pop(),u=s[s.length-1],a=o.pop(),l=!0),n.leaf){const c=Lm(t,n.children,e);if(c!==-1)return n.children.splice(c,1),s.push(n),this._condense(s),this}!l&&!n.leaf&&Tl(n,r)?(s.push(n),o.push(a),a=0,u=n,n=n.children[0]):u?(a++,n=u.children[a],l=!1):n=null}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){const n=[];for(;t;)t.leaf?e.push(...t.children):n.push(...t.children),t=n.pop();return e}_build(t,e,n,r){const s=n-e+1;let o=this._maxEntries,a;if(s<=o)return a=Vs(t.slice(e,n+1)),zs(a,this.toBBox),a;r||(r=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/Math.pow(o,r-1))),a=Vs([]),a.leaf=!1,a.height=r;const u=Math.ceil(s/o),l=u*Math.ceil(Math.sqrt(o));cf(t,e,n,l,this.compareMinX);for(let c=e;c<=n;c+=l){const h=Math.min(c+l-1,n);cf(t,c,h,u,this.compareMinY);for(let f=c;f<=h;f+=u){const g=Math.min(f+u-1,h);a.children.push(this._build(t,f,g,r-1))}}return zs(a,this.toBBox),a}_chooseSubtree(t,e,n,r){for(;r.push(e),!(e.leaf||r.length-1===n);){let s=1/0,o=1/0,a;for(let u=0;u<e.children.length;u++){const l=e.children[u],c=bl(l),h=Pm(t,l)-c;h<o?(o=h,s=c<s?c:s,a=l):h===o&&c<s&&(s=c,a=l)}e=a||e.children[0]}return e}_insert(t,e,n){const r=n?t:this.toBBox(t),s=[],o=this._chooseSubtree(r,this.data,e,s);for(o.children.push(t),Wo(o,r);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(r,s,e)}_split(t,e){const n=t[e],r=n.children.length,s=this._minEntries;this._chooseSplitAxis(n,s,r);const o=this._chooseSplitIndex(n,s,r),a=Vs(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,zs(n,this.toBBox),zs(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=Vs([t,e]),this.data.height=t.height+1,this.data.leaf=!1,zs(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let r,s=1/0,o=1/0;for(let a=e;a<=n-e;a++){const u=Uo(t,0,a,this.toBBox),l=Uo(t,a,n,this.toBBox),c=Mm(u,l),h=bl(u)+bl(l);c<s?(s=c,r=a,o=h<o?h:o):c===s&&h<o&&(o=h,r=a)}return r||n-e}_chooseSplitAxis(t,e,n){const r=t.leaf?this.compareMinX:bm,s=t.leaf?this.compareMinY:Tm,o=this._allDistMargin(t,e,n,r),a=this._allDistMargin(t,e,n,s);o<a&&t.children.sort(r)}_allDistMargin(t,e,n,r){t.children.sort(r);const s=this.toBBox,o=Uo(t,0,e,s),a=Uo(t,n-e,n,s);let u=eu(o)+eu(a);for(let l=e;l<n-e;l++){const c=t.children[l];Wo(o,t.leaf?s(c):c),u+=eu(o)}for(let l=n-e-1;l>=e;l--){const c=t.children[l];Wo(a,t.leaf?s(c):c),u+=eu(a)}return u}_adjustParentBBoxes(t,e,n){for(let r=n;r>=0;r--)Wo(e[r],t)}_condense(t){for(let e=t.length-1,n;e>=0;e--)t[e].children.length===0?e>0?(n=t[e-1].children,n.splice(n.indexOf(t[e]),1)):this.clear():zs(t[e],this.toBBox)}};function Lm(i,t,e){if(!e)return t.indexOf(i);for(let n=0;n<t.length;n++)if(e(i,t[n]))return n;return-1}function zs(i,t){Uo(i,0,i.children.length,t,i)}function Uo(i,t,e,n,r){r||(r=Vs(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s=t;s<e;s++){const o=i.children[s];Wo(r,i.leaf?n(o):o)}return r}function Wo(i,t){return i.minX=Math.min(i.minX,t.minX),i.minY=Math.min(i.minY,t.minY),i.maxX=Math.max(i.maxX,t.maxX),i.maxY=Math.max(i.maxY,t.maxY),i}function bm(i,t){return i.minX-t.minX}function Tm(i,t){return i.minY-t.minY}function bl(i){return(i.maxX-i.minX)*(i.maxY-i.minY)}function eu(i){return i.maxX-i.minX+(i.maxY-i.minY)}function Pm(i,t){return(Math.max(t.maxX,i.maxX)-Math.min(t.minX,i.minX))*(Math.max(t.maxY,i.maxY)-Math.min(t.minY,i.minY))}function Mm(i,t){const e=Math.max(i.minX,t.minX),n=Math.max(i.minY,t.minY),r=Math.min(i.maxX,t.maxX),s=Math.min(i.maxY,t.maxY);return Math.max(0,r-e)*Math.max(0,s-n)}function Tl(i,t){return i.minX<=t.minX&&i.minY<=t.minY&&t.maxX<=i.maxX&&t.maxY<=i.maxY}function nu(i,t){return t.minX<=i.maxX&&t.minY<=i.maxY&&t.maxX>=i.minX&&t.maxY>=i.minY}function Vs(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function cf(i,t,e,n,r){const s=[t,e];for(;s.length;){if(e=s.pop(),t=s.pop(),e-t<=n)continue;const o=t+Math.ceil((e-t)/n/2)*n;Rm(i,o,t,e,r),s.push(t,o,o,e)}}function Om(i,t,e){const n=i;let r=!0,s=!1,o=!1;const a=[ba(n,Rn.LOAD,function(){o=!0,s||t()})];return n.src&&Ld?(s=!0,n.decode().then(function(){r&&t()}).catch(function(u){r&&(o?t():e())})):a.push(ba(n,Rn.ERROR,e)),function(){r=!1,a.forEach(Qn)}}let qo=null;class Am extends Tc{constructor(t,e,n,r,s,o){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=r,this.canvas_={},this.color_=o,this.unlisten_=null,this.imageState_=s,this.size_=n,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===Zt.LOADED){qo||(qo=$n(1,1,void 0,{willReadFrequently:!0})),qo.drawImage(this.image_,0,0);try{qo.getImageData(0,0,1,1),this.tainted_=!1}catch{qo=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(Rn.CHANGE)}handleImageError_(){this.imageState_=Zt.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Zt.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}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_()){const t=this.size_[0],e=this.size_[1],n=$n(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Zt.IDLE){this.image_||this.initializeImage_(),this.imageState_=Zt.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=Om(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==Zt.LOADED)return;const e=this.image_,n=document.createElement("canvas");n.width=Math.ceil(e.width*t),n.height=Math.ceil(e.height*t);const r=n.getContext("2d");r.scale(t,t),r.drawImage(e,0,0),r.globalCompositeOperation="multiply",r.fillStyle=oh(this.color_),r.fillRect(0,0,n.width/t,n.height/t),r.globalCompositeOperation="destination-in",r.drawImage(e,0,0),this.canvas_[t]=n}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Dm(i,t,e,n,r,s){let o=ch.get(t,n,s);return o||(o=new Am(i,t,e,n,r,s),ch.set(t,n,s,o)),o}function hf(i,t,e,n){return e!==void 0&&n!==void 0?[e/i,n/t]:e!==void 0?e/i:n!==void 0?n/t:1}class Pl extends nf{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,r=t.scale!==void 0?t.scale:1,s=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:r,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:s,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const o=t.img!==void 0?t.img:null;this.imgSize_=t.imgSize;let a=t.src;ue(!(a!==void 0&&o),4),ue(!o||o&&this.imgSize_,5),(a===void 0||a.length===0)&&o&&(a=o.src||ge(o)),ue(a!==void 0&&a.length>0,6),ue(!((t.width!==void 0||t.height!==void 0)&&t.scale!==void 0),69);const u=t.src!==void 0?Zt.IDLE:Zt.LOADED;if(this.color_=t.color!==void 0?Ga(t.color):null,this.iconImage_=Dm(o,a,this.imgSize_!==void 0?this.imgSize_:null,this.crossOrigin_,u,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null,t.width!==void 0||t.height!==void 0){let l,c;if(t.size)[l,c]=t.size;else{const h=this.getImage(1);if(h instanceof HTMLCanvasElement||h.src&&h.complete)l=h.width,c=h.height;else{this.initialOptions_=t;const f=()=>{if(this.unlistenImageChange(f),!this.initialOptions_)return;const g=this.iconImage_.getSize();this.setScale(hf(g[0],g[1],t.width,t.height))};this.listenImageChange(f);return}}l!==void 0&&this.setScale(hf(l,c,t.width,t.height))}}clone(){let t,e,n;return this.initialOptions_?(e=this.initialOptions_.width,n=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new Pl({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_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:n,size:this.size_!==null?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_;const r=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!r)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=r[0]),this.anchorYUnits_=="fraction"&&(t[1]*=r[1])}if(this.anchorOrigin_!="top-left"){if(!r)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+r[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+r[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]-e[0]/n[0],t[1]+e[1]/n[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return 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(this.offsetOrigin_!="top-left"){const e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=n[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();if(this.size_)return this.size_[0]*t[0];if(this.iconImage_.getImageState()==Zt.LOADED)return this.iconImage_.getSize()[0]*t[0]}getHeight(){const t=this.getScaleArray();if(this.size_)return this.size_[1]*t[1];if(this.iconImage_.getImageState()==Zt.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(Rn.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(Rn.CHANGE,t)}}const Ml=Pl;function ff(i){return new tu({fill:Ho(i,""),stroke:jo(i,""),text:Fm(i),image:km(i)})}function Ho(i,t){const e=i[t+"fill-color"];if(e)return e==="none"?null:new Xo({color:e})}function jo(i,t){const e=i[t+"stroke-width"],n=i[t+"stroke-color"];if(!(!e&&!n))return new Qa({width:e,color:n,lineCap:i[t+"stroke-line-cap"],lineJoin:i[t+"stroke-line-join"],lineDash:i[t+"stroke-line-dash"],lineDashOffset:i[t+"stroke-line-dash-offset"],miterLimit:i[t+"stroke-miter-limit"]})}function Fm(i){const t=i["text-value"];return t?new af({text:t,font:i["text-font"],maxAngle:i["text-max-angle"],offsetX:i["text-offset-x"],offsetY:i["text-offset-y"],overflow:i["text-overflow"],placement:i["text-placement"],repeat:i["text-repeat"],scale:i["text-scale"],rotateWithView:i["text-rotate-with-view"],rotation:i["text-rotation"],textAlign:i["text-align"],justify:i["text-justify"],textBaseline:i["text-baseline"],padding:i["text-padding"],fill:Ho(i,"text-"),backgroundFill:Ho(i,"text-background-"),stroke:jo(i,"text-"),backgroundStroke:jo(i,"text-background-")}):void 0}function km(i){const t=i["icon-src"],e=i["icon-img"];if(t||e)return new Ml({src:t,img:e,imgSize:i["icon-img-size"],anchor:i["icon-anchor"],anchorOrigin:i["icon-anchor-origin"],anchorXUnits:i["icon-anchor-x-units"],anchorYUnits:i["icon-anchor-y-units"],color:i["icon-color"],crossOrigin:i["icon-cross-origin"],offset:i["icon-offset"],displacement:i["icon-displacement"],opacity:i["icon-opacity"],scale:i["icon-scale"],width:i["icon-width"],height:i["icon-height"],rotation:i["icon-rotation"],rotateWithView:i["icon-rotate-with-view"],size:i["icon-size"],declutterMode:i["icon-declutter-mode"]});const n=i["shape-points"];if(n){const s="shape-";return new rf({points:n,fill:Ho(i,s),stroke:jo(i,s),radius:i["shape-radius"],radius1:i["shape-radius1"],radius2:i["shape-radius2"],angle:i["shape-angle"],displacement:i["shape-displacement"],rotation:i["shape-rotation"],rotateWithView:i["shape-rotate-with-view"],scale:i["shape-scale"],declutterMode:i["shape-declutter-mode"]})}const r=i["circle-radius"];if(r){const s="circle-";return new sf({radius:r,fill:Ho(i,s),stroke:jo(i,s),displacement:i["circle-displacement"],scale:i["circle-scale"],rotation:i["circle-rotation"],rotateWithView:i["circle-rotate-with-view"],declutterMode:i["circle-declutter-mode"]})}}const gf={RENDER_ORDER:"renderOrder"};class Gm extends E_{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter!==void 0?t.declutter:!1,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(gf.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new lf(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(gf.RENDER_ORDER,t)}setStyle(t){let e;if(t===void 0)e=Sm;else if(t===null)e=null;else if(typeof t=="function")e=t;else if(t instanceof tu)e=t;else if(Array.isArray(t)){const n=t.length,r=new Array(n);for(let s=0;s<n;++s){const o=t[s];o instanceof tu?r[s]=o:r[s]=ff(o)}e=r}else e=ff(t);this.style_=e,this.styleFunction_=t===null?void 0:Im(this.style_),this.changed()}}const Bm=Gm,Zo={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},iu=[Zo.FILL],mr=[Zo.STROKE],es=[Zo.BEGIN_PATH],df=[Zo.CLOSE_PATH],Z=Zo;class zm{drawCustom(t,e,n,r){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}const pf=zm;class Vm extends pf{constructor(t,e,n,r){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=r,this.maxLineWidth=0,this.resolution=n,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return e==1?t:t.map(function(n){return n*e})}appendFlatPointCoordinates(t,e){const n=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,s=this.coordinates;let o=s.length;for(let a=0,u=t.length;a<u;a+=e)r[0]=t[a],r[1]=t[a+1],Hd(n,r)&&(s[o++]=r[0],s[o++]=r[1]);return o}appendFlatLineCoordinates(t,e,n,r,s,o){const a=this.coordinates;let u=a.length;const l=this.getBufferedMaxExtent();o&&(e+=r);let c=t[e],h=t[e+1];const f=this.tmpCoordinate_;let g=!0,d,p,_;for(d=e+r;d<n;d+=r)f[0]=t[d],f[1]=t[d+1],_=Ku(l,f),_!==p?(g&&(a[u++]=c,a[u++]=h,g=!1),a[u++]=f[0],a[u++]=f[1]):_===de.INTERSECTING?(a[u++]=f[0],a[u++]=f[1],g=!1):g=!0,c=f[0],h=f[1],p=_;return(s&&g||d===e+r)&&(a[u++]=c,a[u++]=h),u}drawCustomCoordinates_(t,e,n,r,s){for(let o=0,a=n.length;o<a;++o){const u=n[o],l=this.appendFlatLineCoordinates(t,e,u,r,!1,!1);s.push(l),e=u}return e}drawCustom(t,e,n,r){this.beginGeometry(t,e);const s=t.getType(),o=t.getStride(),a=this.coordinates.length;let u,l,c,h,f;switch(s){case"MultiPolygon":u=t.getOrientedFlatCoordinates(),h=[];const g=t.getEndss();f=0;for(let d=0,p=g.length;d<p;++d){const _=[];f=this.drawCustomCoordinates_(u,f,g[d],o,_),h.push(_)}this.instructions.push([Z.CUSTOM,a,h,t,n,ll]),this.hitDetectionInstructions.push([Z.CUSTOM,a,h,t,r||n,ll]);break;case"Polygon":case"MultiLineString":c=[],u=s=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),f=this.drawCustomCoordinates_(u,0,t.getEnds(),o,c),this.instructions.push([Z.CUSTOM,a,c,t,n,Oo]),this.hitDetectionInstructions.push([Z.CUSTOM,a,c,t,r||n,Oo]);break;case"LineString":case"Circle":u=t.getFlatCoordinates(),l=this.appendFlatLineCoordinates(u,0,u.length,o,!1,!1),this.instructions.push([Z.CUSTOM,a,l,t,n,hr]),this.hitDetectionInstructions.push([Z.CUSTOM,a,l,t,r||n,hr]);break;case"MultiPoint":u=t.getFlatCoordinates(),l=this.appendFlatPointCoordinates(u,o),l>a&&(this.instructions.push([Z.CUSTOM,a,l,t,n,hr]),this.hitDetectionInstructions.push([Z.CUSTOM,a,l,t,r||n,hr]));break;case"Point":u=t.getFlatCoordinates(),this.coordinates.push(u[0],u[1]),l=this.coordinates.length,this.instructions.push([Z.CUSTOM,a,l,t,n]),this.hitDetectionInstructions.push([Z.CUSTOM,a,l,t,r||n]);break}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[Z.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Z.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const n=t.length;let r,s,o=-1;for(e=0;e<n;++e)r=t[e],s=r[0],s==Z.END_GEOMETRY?o=e:s==Z.BEGIN_GEOMETRY&&(r[2]=e,Ed(this.hitDetectionInstructions,o,e),o=-1)}setFillStrokeStyle(t,e){const n=this.state;if(t){const r=t.getColor();n.fillStyle=vi(r||en)}else n.fillStyle=void 0;if(e){const r=e.getColor();n.strokeStyle=vi(r||Do);const s=e.getLineCap();n.lineCap=s!==void 0?s:Ya;const o=e.getLineDash();n.lineDash=o?o.slice():ki;const a=e.getLineDashOffset();n.lineDashOffset=a||Gi;const u=e.getLineJoin();n.lineJoin=u!==void 0?u:Ds;const l=e.getWidth();n.lineWidth=l!==void 0?l:ko;const c=e.getMiterLimit();n.miterLimit=c!==void 0?c:Ao,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0}createFill(t){const e=t.fillStyle,n=[Z.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(!0),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Z.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)}updateStrokeStyle(t,e){const n=t.strokeStyle,r=t.lineCap,s=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,u=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=r||s!=t.currentLineDash&&!ws(t.currentLineDash,s)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=u||t.currentMiterLimit!=l)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=r,t.currentLineDash=s,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=u,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Z.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=qd(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;ju(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const Ko=Vm;class Xm extends Ko{constructor(t,e,n,r){super(t,e,n,r),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){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),r=t.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(n,r);this.instructions.push([Z.DRAW_IMAGE,s,o,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([Z.DRAW_IMAGE,s,o,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){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),r=t.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(n,r);this.instructions.push([Z.DRAW_IMAGE,s,o,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([Z.DRAW_IMAGE,s,o,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){const n=t.getAnchor(),r=t.getSize(),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=r[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const Ym=Xm;class Um extends Ko{constructor(t,e,n,r){super(t,e,n,r)}drawFlatCoordinates_(t,e,n,r){const s=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,n,r,!1,!1),a=[Z.MOVE_TO_LINE_TO,s,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),n}drawLineString(t,e){const n=this.state,r=n.strokeStyle,s=n.lineWidth;if(r===void 0||s===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Z.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ki,Gi],es);const o=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push(mr),this.endGeometry(e)}drawMultiLineString(t,e){const n=this.state,r=n.strokeStyle,s=n.lineWidth;if(r===void 0||s===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Z.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ki,Gi],es);const o=t.getEnds(),a=t.getFlatCoordinates(),u=t.getStride();let l=0;for(let c=0,h=o.length;c<h;++c)l=this.drawFlatCoordinates_(a,l,o[c],u);this.hitDetectionInstructions.push(mr),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(mr),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(mr),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(es)}}const Wm=Um;class qm extends Ko{constructor(t,e,n,r){super(t,e,n,r)}drawFlatCoordinatess_(t,e,n,r){const s=this.state,o=s.fillStyle!==void 0,a=s.strokeStyle!==void 0,u=n.length;this.instructions.push(es),this.hitDetectionInstructions.push(es);for(let l=0;l<u;++l){const c=n[l],h=this.coordinates.length,f=this.appendFlatLineCoordinates(t,e,c,r,!0,!a),g=[Z.MOVE_TO_LINE_TO,h,f];this.instructions.push(g),this.hitDetectionInstructions.push(g),a&&(this.instructions.push(df),this.hitDetectionInstructions.push(df)),e=c}return o&&(this.instructions.push(iu),this.hitDetectionInstructions.push(iu)),a&&(this.instructions.push(mr),this.hitDetectionInstructions.push(mr)),e}drawCircle(t,e){const n=this.state,r=n.fillStyle,s=n.strokeStyle;if(r===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Z.SET_FILL_STYLE,en]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Z.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ki,Gi]);const o=t.getFlatCoordinates(),a=t.getStride(),u=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,a,!1,!1);const l=[Z.CIRCLE,u];this.instructions.push(es,l),this.hitDetectionInstructions.push(es,l),n.fillStyle!==void 0&&(this.instructions.push(iu),this.hitDetectionInstructions.push(iu)),n.strokeStyle!==void 0&&(this.instructions.push(mr),this.hitDetectionInstructions.push(mr)),this.endGeometry(e)}drawPolygon(t,e){const n=this.state,r=n.fillStyle,s=n.strokeStyle;if(r===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Z.SET_FILL_STYLE,en]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Z.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ki,Gi]);const o=t.getEnds(),a=t.getOrientedFlatCoordinates(),u=t.getStride();this.drawFlatCoordinatess_(a,0,o,u),this.endGeometry(e)}drawMultiPolygon(t,e){const n=this.state,r=n.fillStyle,s=n.strokeStyle;if(r===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Z.SET_FILL_STYLE,en]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Z.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ki,Gi]);const o=t.getEndss(),a=t.getOrientedFlatCoordinates(),u=t.getStride();let l=0;for(let c=0,h=o.length;c<h;++c)l=this.drawFlatCoordinatess_(a,l,o[c],u);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(t!==0){const e=this.coordinates;for(let n=0,r=e.length;n<r;++n)e[n]=jr(e[n],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;t.fillStyle!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)}}const _f=qm;function Hm(i,t,e,n,r){const s=[];let o=e,a=0,u=t.slice(e,2);for(;a<i&&o+r<n;){const[l,c]=u.slice(-2),h=t[o+r],f=t[o+r+1],g=Math.sqrt((h-l)*(h-l)+(f-c)*(f-c));if(a+=g,a>=i){const d=(i-a+g)/g,p=gn(l,h,d),_=gn(c,f,d);u.push(p,_),s.push(u),u=[p,_],a==i&&(o+=r),a=0}else if(a<i)u.push(t[o+r],t[o+r+1]),o+=r;else{const d=g-a,p=gn(l,h,d/g),_=gn(c,f,d/g);u.push(p,_),s.push(u),u=[p,_],a=0,o+=r}}return a>0&&s.push(u),s}function jm(i,t,e,n,r){let s=e,o=e,a=0,u=0,l=e,c,h,f,g,d,p,_,m,y,v;for(h=e;h<n;h+=r){const I=t[h],C=t[h+1];d!==void 0&&(y=I-d,v=C-p,g=Math.sqrt(y*y+v*v),_!==void 0&&(u+=f,c=Math.acos((_*y+m*v)/(f*g)),c>i&&(u>a&&(a=u,s=l,o=h),u=0,l=h-r)),f=g,_=y,m=v),d=I,p=C}return u+=g,u>a?[l,h]:[s,o]}const ru={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class Zm extends Ko{constructor(t,e,n,r){super(t,e,n,r),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[en]={fillStyle:en},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const n=this.textFillState_,r=this.textStrokeState_,s=this.textState_;if(this.text_===""||!s||!n&&!r)return;const o=this.coordinates;let a=o.length;const u=t.getType();let l=null,c=t.getStride();if(s.placement==="line"&&(u=="LineString"||u=="MultiLineString"||u=="Polygon"||u=="MultiPolygon")){if(!ti(this.getBufferedMaxExtent(),t.getExtent()))return;let h;if(l=t.getFlatCoordinates(),u=="LineString")h=[l.length];else if(u=="MultiLineString")h=t.getEnds();else if(u=="Polygon")h=t.getEnds().slice(0,1);else if(u=="MultiPolygon"){const p=t.getEndss();h=[];for(let _=0,m=p.length;_<m;++_)h.push(p[_][0])}this.beginGeometry(t,e);const f=s.repeat,g=f?void 0:s.textAlign;let d=0;for(let p=0,_=h.length;p<_;++p){let m;f?m=Hm(f*this.resolution,l,d,h[p],c):m=[l.slice(d,h[p])];for(let y=0,v=m.length;y<v;++y){const I=m[y];let C=0,L=I.length;if(g==null){const T=jm(s.maxAngle,I,0,I.length,2);C=T[0],L=T[1]}for(let T=C;T<L;T+=c)o.push(I[T],I[T+1]);const b=o.length;d=h[p],this.drawChars_(a,b),a=b}}this.endGeometry(e)}else{let h=s.overflow?null:[];switch(u){case"Point":case"MultiPoint":l=t.getFlatCoordinates();break;case"LineString":l=t.getFlatMidpoint();break;case"Circle":l=t.getCenter();break;case"MultiLineString":l=t.getFlatMidpoints(),c=2;break;case"Polygon":l=t.getFlatInteriorPoint(),s.overflow||h.push(l[2]/this.resolution),c=3;break;case"MultiPolygon":const m=t.getFlatInteriorPoints();l=[];for(let y=0,v=m.length;y<v;y+=3)s.overflow||h.push(m[y+2]/this.resolution),l.push(m[y],m[y+1]);if(l.length===0)return;c=2;break}const f=this.appendFlatPointCoordinates(l,c);if(f===a)return;if(h&&(f-a)/2!==l.length/c){let m=a/2;h=h.filter((y,v)=>{const I=o[(m+v)*2]===l[v*c]&&o[(m+v)*2+1]===l[v*c+1];return I||--m,I})}this.saveTextStates_(),(s.backgroundFill||s.backgroundStroke)&&(this.setFillStrokeStyle(s.backgroundFill,s.backgroundStroke),s.backgroundFill&&this.updateFillStyle(this.state,this.createFill),s.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let g=s.padding;if(g!=Kr&&(s.scale[0]<0||s.scale[1]<0)){let m=s.padding[0],y=s.padding[1],v=s.padding[2],I=s.padding[3];s.scale[0]<0&&(y=-y,I=-I),s.scale[1]<0&&(m=-m,v=-v),g=[m,y,v,I]}const d=this.pixelRatio;this.instructions.push([Z.DRAW_IMAGE,a,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,g==Kr?Kr:g.map(function(m){return m*d}),!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]);const p=1/d,_=this.state.fillStyle;s.backgroundFill&&(this.state.fillStyle=en,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([Z.DRAW_IMAGE,a,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[p,p],NaN,void 0,this.declutterImageWithText_,g,!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?en:this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]),s.backgroundFill&&(this.state.fillStyle=_,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,r=this.strokeKey_;t&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:e.font,textAlign:e.textAlign||Fo,justify:e.justify,textBaseline:e.textBaseline||Ua,scale:e.scale});const o=this.fillKey_;n&&(o in this.fillStates||(this.fillStates[o]={fillStyle:n.fillStyle}))}drawChars_(t,e){const n=this.textStrokeState_,r=this.textState_,s=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const u=this.pixelRatio,l=ru[r.textBaseline],c=this.textOffsetY_*u,h=this.text_,f=n?n.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([Z.DRAW_CHARS,t,e,l,r.overflow,a,r.maxAngle,u,c,s,f*u,h,o,1]),this.hitDetectionInstructions.push([Z.DRAW_CHARS,t,e,l,r.overflow,a&&en,r.maxAngle,1,c,s,f,h,o,1/u])}setTextStyle(t,e){let n,r,s;if(!t)this.text_="";else{const o=t.getFill();o?(r=this.textFillState_,r||(r={},this.textFillState_=r),r.fillStyle=vi(o.getColor()||en)):(r=null,this.textFillState_=r);const a=t.getStroke();if(!a)s=null,this.textStrokeState_=s;else{s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const d=a.getLineDash(),p=a.getLineDashOffset(),_=a.getWidth(),m=a.getMiterLimit();s.lineCap=a.getLineCap()||Ya,s.lineDash=d?d.slice():ki,s.lineDashOffset=p===void 0?Gi:p,s.lineJoin=a.getLineJoin()||Ds,s.lineWidth=_===void 0?ko:_,s.miterLimit=m===void 0?Ao:m,s.strokeStyle=vi(a.getColor()||Do)}n=this.textState_;const u=t.getFont()||Mh;I_(u);const l=t.getScaleArray();n.overflow=t.getOverflow(),n.font=u,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.repeat=t.getRepeat(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||Ua,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||Kr,n.scale=l===void 0?[1,1]:l;const c=t.getOffsetX(),h=t.getOffsetY(),f=t.getRotateWithView(),g=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=c===void 0?0:c,this.textOffsetY_=h===void 0?0:h,this.textRotateWithView_=f===void 0?!1:f,this.textRotation_=g===void 0?0:g,this.strokeKey_=s?(typeof s.strokeStyle=="string"?s.strokeStyle:ge(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.repeat||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=r?typeof r.fillStyle=="string"?r.fillStyle:"|"+ge(r.fillStyle):""}this.declutterImageWithText_=e}}const Km={Circle:_f,Default:Ko,Image:Ym,LineString:Wm,Polygon:_f,Text:Zm};class Jm{constructor(t,e,n,r){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=r,this.resolution_=n,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const n=this.buildersByZIndex_[e];for(const r in n){const s=n[r].finish();t[e][r]=s}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let r=this.buildersByZIndex_[n];r===void 0&&(r={},this.buildersByZIndex_[n]=r);let s=r[e];if(s===void 0){const o=Km[e];s=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[e]=s}return s}}const mf=Jm;class Qm extends Pc{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return Et()}getData(t){return null}prepareFrame(t){return Et()}renderFrame(t,e){return Et()}loadedTileCallback(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n}createLoadedTileFinder(t,e,n){return(r,s)=>{const o=this.loadedTileCallback.bind(this,n,r);return t.forEachLoadedTile(e,r,s,o)}}forEachFeatureAtCoordinate(t,e,n,r,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;(e.getState()===Zt.LOADED||e.getState()===Zt.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Zt.LOADED&&e!=Zt.ERROR&&t.addEventListener(Rn.CHANGE,this.boundHandleImageChange_),e==Zt.IDLE&&(t.load(),e=t.getState()),e==Zt.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const $m=Qm,yf=[];let Xs=null;function ty(){Xs=$n(1,1,void 0,{willReadFrequently:!0})}class ey extends $m{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=cr(),this.pixelTransform=cr(),this.inversePixelTransform=cr(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){Xs||ty(),Xs.clearRect(0,0,1,1);let r;try{Xs.drawImage(t,e,n,1,1,0,0,1,1),r=Xs.getImageData(0,0,1,1).data}catch{return Xs=null,null}return r}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const r=this.getLayer().getClassName();let s,o;if(t&&t.className===r&&(!n||t&&t.style.backgroundColor&&ws(Ga(t.style.backgroundColor),Ga(n)))){const a=t.firstElementChild;a instanceof HTMLCanvasElement&&(o=a.getContext("2d"))}if(o&&o.canvas.style.transform===e?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=r;let a=s.style;a.position="absolute",a.width="100%",a.height="100%",o=$n();const u=o.canvas;s.appendChild(u),a=u.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=s,this.context=o}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const r=Hc(n),s=jc(n),o=qc(n),a=Wc(n);tn(e.coordinateToPixelTransform,r),tn(e.coordinateToPixelTransform,s),tn(e.coordinateToPixelTransform,o),tn(e.coordinateToPixelTransform,a);const u=this.inversePixelTransform;tn(u,r),tn(u,s),tn(u,o),tn(u,a),t.save(),t.beginPath(),t.moveTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()}dispatchRenderEvent_(t,e,n){const r=this.getLayer();if(r.hasListener(t)){const s=new C_(t,this.inversePixelTransform,n,e);r.dispatchEvent(s)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(Mo.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(Mo.POSTRENDER,t,e)}getRenderTransform(t,e,n,r,s,o,a){const u=s/2,l=o/2,c=r/e,h=-c,f=-t[0]+a,g=-t[1];return Po(this.tempTransform,u,l,c,h,-n,f,g)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const ny=ey;function iy(i,t,e,n,r,s,o,a,u,l,c,h){let f=i[t],g=i[t+1],d=0,p=0,_=0,m=0;function y(){d=f,p=g,t+=n,f=i[t],g=i[t+1],m+=_,_=Math.sqrt((f-d)*(f-d)+(g-p)*(g-p))}do y();while(t<e-n&&m+_<s);let v=_===0?0:(s-m)/_;const I=gn(d,f,v),C=gn(p,g,v),L=t-n,b=m,T=s+a*u(l,r,c);for(;t<e-n&&m+_<T;)y();v=_===0?0:(T-m)/_;const w=gn(d,f,v),O=gn(p,g,v);let z;if(h){const B=[I,C,w,O];dh(B,0,4,2,h,B,B),z=B[0]>B[2]}else z=I>w;const F=Math.PI,U=[],R=L+n===t;t=L,_=0,m=b,f=i[t],g=i[t+1];let P;if(R){y(),P=Math.atan2(g-p,f-d),z&&(P+=P>0?-F:F);const B=(w+I)/2,X=(O+C)/2;return U[0]=[B,X,(T-s)/2,P,r],U}r=r.replace(/\n/g," ");for(let B=0,X=r.length;B<X;){y();let J=Math.atan2(g-p,f-d);if(z&&(J+=J>0?-F:F),P!==void 0){let Pe=J-P;if(Pe+=Pe>F?-2*F:Pe<-F?2*F:0,Math.abs(Pe)>o)return null}P=J;const ot=B;let Ct=0;for(;B<X;++B){const Pe=z?X-B-1:B,$e=a*u(l,r[Pe],c);if(t+n<e&&m+_<s+Ct+$e/2)break;Ct+=$e}if(B===ot)continue;const Bt=z?r.substring(X-ot,X-B):r.substring(ot,B);v=_===0?0:(s+Ct/2-m)/_;const G=gn(d,f,v),ze=gn(p,g,v);U.push([G,ze,Ct/2,J,Bt]),s+=Ct}return U}const Ys=Yr(),yr=[],Yi=[],Ui=[],vr=[];function vf(i){return i[3].declutterBox}const Ef=new RegExp("[֑-ࣿיִ-﷿ﹰ-ﻼࠀ--]");function Ol(i,t){return t==="start"?t=Ef.test(i)?"right":"left":t==="end"&&(t=Ef.test(i)?"left":"right"),ru[t]}function ry(i,t,e){return e>0&&i.push(`
|
|
6
|
+
`||l===c){s=Math.max(s,o),r.push(o),o=0,a+=u;continue}const f=t[l+1]||i.font,g=Wa(f,h);e.push(g),o+=g;const d=S_(f);n.push(d),u=Math.max(u,d)}return{width:s,height:a,widths:e,heights:n,lineWidths:r}}function R_(i,t,e,n,r,s,o,a,u,l,c){i.save(),e!==1&&(i.globalAlpha*=e),t&&i.setTransform.apply(i,t),n.contextInstructions?(i.translate(u,l),i.scale(c[0],c[1]),N_(n,i)):c[0]<0||c[1]<0?(i.translate(u,l),i.scale(c[0],c[1]),i.drawImage(n,r,s,o,a,0,0,o,a)):i.drawImage(n,r,s,o,a,u,l,o*c[0],a*c[1]),i.restore()}function N_(i,t){const e=i.contextInstructions;for(let n=0,r=e.length;n<r;n+=2)Array.isArray(e[n+1])?t[e[n]].apply(t,e[n+1]):t[e[n]]=e[n+1]}function qa(i,t){return Array.isArray(i)?i:(t===void 0?t=[i,i]:(t[0]=i,t[1]=i),t)}function zt(){}function L_(i,t){for(const e in t)i[e]=t[e];return i}function Dh(i){return i()}function Fh(){return Object.create(null)}function Bi(i){i.forEach(Dh)}function kh(i){return typeof i=="function"}function Jr(i,t){return i!=i?t==t:i!==t||i&&typeof i=="object"||typeof i=="function"}let Ha;function nn(i,t){return i===t?!0:(Ha||(Ha=document.createElement("a")),Ha.href=t,i===Ha.href)}function b_(i){return Object.keys(i).length===0}function T_(i,t,e,n){if(i){const r=Gh(i,t,e,n);return i[0](r)}}function Gh(i,t,e,n){return i[1]&&n?L_(e.ctx.slice(),i[1](n(t))):e.ctx}function P_(i,t,e,n){if(i[2]&&n){const r=i[2](n(e));if(t.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(t.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=t.dirty[a]|r[a];return s}return t.dirty|r}return t.dirty}function M_(i,t,e,n,r,s){if(r){const o=Gh(t,e,n,s);i.p(o,r)}}function O_(i){if(i.ctx.length>32){const t=[],e=i.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function Bh(i){return i??""}function ct(i,t){i.appendChild(t)}function jt(i,t,e){i.insertBefore(t,e||null)}function Vt(i){i.parentNode&&i.parentNode.removeChild(i)}function It(i){return document.createElement(i)}function gr(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function dr(i){return document.createTextNode(i)}function dn(){return dr(" ")}function A_(){return dr("")}function Ye(i,t,e,n){return i.addEventListener(t,e,n),()=>i.removeEventListener(t,e,n)}function D_(i){return function(t){return t.preventDefault(),i.call(this,t)}}function D(i,t,e){e==null?i.removeAttribute(t):i.getAttribute(t)!==e&&i.setAttribute(t,e)}function F_(i){return Array.from(i.childNodes)}function Go(i,t){t=""+t,i.data!==t&&(i.data=t)}function zh(i,t){i.value=t??""}function pr(i,t,e){i.classList.toggle(t,!!e)}function k_(i,t,{bubbles:e=!1,cancelable:n=!1}={}){return new CustomEvent(i,{detail:t,bubbles:e,cancelable:n})}let Bo;function zo(i){Bo=i}function Vh(){if(!Bo)throw new Error("Function called outside component initialization");return Bo}function G_(i){Vh().$$.on_destroy.push(i)}function B_(){const i=Vh();return(t,e,{cancelable:n=!1}={})=>{const r=i.$$.callbacks[t];if(r){const s=k_(t,e,{cancelable:n});return r.slice().forEach(o=>{o.call(i,s)}),!s.defaultPrevented}return!0}}function Xh(i,t){const e=i.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const ks=[],_l=[];let Gs=[];const Yh=[],z_=Promise.resolve();let ml=!1;function V_(){ml||(ml=!0,z_.then(Uh))}function yl(i){Gs.push(i)}const vl=new Set;let Bs=0;function Uh(){if(Bs!==0)return;const i=Bo;do{try{for(;Bs<ks.length;){const t=ks[Bs];Bs++,zo(t),X_(t.$$)}}catch(t){throw ks.length=0,Bs=0,t}for(zo(null),ks.length=0,Bs=0;_l.length;)_l.pop()();for(let t=0;t<Gs.length;t+=1){const e=Gs[t];vl.has(e)||(vl.add(e),e())}Gs.length=0}while(ks.length);for(;Yh.length;)Yh.pop()();ml=!1,vl.clear(),zo(i)}function X_(i){if(i.fragment!==null){i.update(),Bi(i.before_update);const t=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,t),i.after_update.forEach(yl)}}function Y_(i){const t=[],e=[];Gs.forEach(n=>i.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),Gs=t}const ja=new Set;let Qr;function Za(){Qr={r:0,c:[],p:Qr}}function Ka(){Qr.r||Bi(Qr.c),Qr=Qr.p}function Kt(i,t){i&&i.i&&(ja.delete(i),i.i(t))}function pe(i,t,e,n){if(i&&i.o){if(ja.has(i))return;ja.add(i),Qr.c.push(()=>{ja.delete(i),n&&(e&&i.d(1),n())}),i.o(t)}else n&&n()}function Wh(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function U_(i,t){pe(i,1,1,()=>{t.delete(i.key)})}function W_(i,t,e,n,r,s,o,a,u,l,c,h){let f=i.length,g=s.length,d=f;const p={};for(;d--;)p[i[d].key]=d;const _=[],m=new Map,y=new Map,v=[];for(d=g;d--;){const b=h(r,s,d),T=e(b);let w=o.get(T);w?n&&v.push(()=>w.p(b,t)):(w=l(T,b),w.c()),m.set(T,_[d]=w),T in p&&y.set(T,Math.abs(d-p[T]))}const I=new Set,C=new Set;function L(b){Kt(b,1),b.m(a,c),o.set(b.key,b),c=b.first,g--}for(;f&&g;){const b=_[g-1],T=i[f-1],w=b.key,O=T.key;b===T?(c=b.first,f--,g--):m.has(O)?!o.has(w)||I.has(w)?L(b):C.has(O)?f--:y.get(w)>y.get(O)?(C.add(w),L(b)):(I.add(O),f--):(u(T,o),f--)}for(;f--;){const b=i[f];m.has(b.key)||u(b,o)}for(;g;)L(_[g-1]);return Bi(v),_}function _r(i){i&&i.c()}function zi(i,t,e){const{fragment:n,after_update:r}=i.$$;n&&n.m(t,e),yl(()=>{const s=i.$$.on_mount.map(Dh).filter(kh);i.$$.on_destroy?i.$$.on_destroy.push(...s):Bi(s),i.$$.on_mount=[]}),r.forEach(yl)}function Vi(i,t){const e=i.$$;e.fragment!==null&&(Y_(e.after_update),Bi(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function q_(i,t){i.$$.dirty[0]===-1&&(ks.push(i),V_(),i.$$.dirty.fill(0)),i.$$.dirty[t/31|0]|=1<<t%31}function $r(i,t,e,n,r,s,o=null,a=[-1]){const u=Bo;zo(i);const l=i.$$={fragment:null,ctx:[],props:s,update:zt,not_equal:r,bound:Fh(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Fh(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=e?e(i,t.props||{},(h,f,...g)=>{const d=g.length?g[0]:f;return l.ctx&&r(l.ctx[h],l.ctx[h]=d)&&(!l.skip_bound&&l.bound[h]&&l.bound[h](d),c&&q_(i,h)),f}):[],l.update(),c=!0,Bi(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const h=F_(t.target);l.fragment&&l.fragment.l(h),h.forEach(Vt)}else l.fragment&&l.fragment.c();t.intro&&Kt(i.$$.fragment),zi(i,t.target,t.anchor),Uh()}zo(u)}class ts{constructor(){Kn(this,"$$");Kn(this,"$$set")}$destroy(){Vi(this,1),this.$destroy=zt}$on(t,e){if(!kh(e))return zt;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const r=n.indexOf(e);r!==-1&&n.splice(r,1)}}$set(t){this.$$set&&!b_(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const H_="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(H_);function j_(i){let t,e;return{c(){t=gr("svg"),e=gr("path"),D(e,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),D(t,"viewBox","0 0 14 14"),D(t,"width","13"),D(t,"height","13"),D(t,"class","svelte-en2qvf")},m(n,r){jt(n,t,r),ct(t,e)},p:zt,i:zt,o:zt,d(n){n&&Vt(t)}}}class qh extends ts{constructor(t){super(),$r(this,t,null,j_,Jr,{})}}function Z_(i){let t,e;return{c(){t=gr("svg"),e=gr("path"),D(e,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),D(t,"viewBox","0 0 30 30"),D(t,"fill","none"),D(t,"xmlns","http://www.w3.org/2000/svg"),D(t,"class","svelte-d2loi5")},m(n,r){jt(n,t,r),ct(t,e)},p:zt,i:zt,o:zt,d(n){n&&Vt(t)}}}class Hh extends ts{constructor(t){super(),$r(this,t,null,Z_,Jr,{})}}function K_(i){let t,e;return{c(){t=It("img"),nn(t.src,e=i[3]+"area.svg")||D(t,"src",e),D(t,"alt",i[6]),D(t,"class","svelte-ltkwvy")},m(n,r){jt(n,t,r)},p(n,r){r&8&&!nn(t.src,e=n[3]+"area.svg")&&D(t,"src",e),r&64&&D(t,"alt",n[6])},d(n){n&&Vt(t)}}}function J_(i){let t,e;return{c(){t=It("img"),nn(t.src,e=i[3]+"poi.svg")||D(t,"src",e),D(t,"alt",i[6]),D(t,"class","svelte-ltkwvy")},m(n,r){jt(n,t,r)},p(n,r){r&8&&!nn(t.src,e=n[3]+"poi.svg")&&D(t,"src",e),r&64&&D(t,"alt",n[6])},d(n){n&&Vt(t)}}}function Q_(i){let t,e;return{c(){t=It("img"),nn(t.src,e=i[3]+"postal_code.svg")||D(t,"src",e),D(t,"alt",i[6]),D(t,"class","svelte-ltkwvy")},m(n,r){jt(n,t,r)},p(n,r){r&8&&!nn(t.src,e=n[3]+"postal_code.svg")&&D(t,"src",e),r&64&&D(t,"alt",n[6])},d(n){n&&Vt(t)}}}function $_(i){let t,e;return{c(){t=It("img"),nn(t.src,e=i[3]+"street.svg")||D(t,"src",e),D(t,"alt",i[6]),D(t,"class","svelte-ltkwvy")},m(n,r){jt(n,t,r)},p(n,r){r&8&&!nn(t.src,e=n[3]+"street.svg")&&D(t,"src",e),r&64&&D(t,"alt",n[6])},d(n){n&&Vt(t)}}}function tm(i){let t,e;return{c(){t=It("img"),nn(t.src,e=i[3]+"road.svg")||D(t,"src",e),D(t,"alt",i[6]),D(t,"class","svelte-ltkwvy")},m(n,r){jt(n,t,r)},p(n,r){r&8&&!nn(t.src,e=n[3]+"road.svg")&&D(t,"src",e),r&64&&D(t,"alt",n[6])},d(n){n&&Vt(t)}}}function em(i){let t,e;return{c(){t=It("img"),nn(t.src,e=i[3]+"housenumber.svg")||D(t,"src",e),D(t,"alt",i[6]),D(t,"class","svelte-ltkwvy")},m(n,r){jt(n,t,r)},p(n,r){r&8&&!nn(t.src,e=n[3]+"housenumber.svg")&&D(t,"src",e),r&64&&D(t,"alt",n[6])},d(n){n&&Vt(t)}}}function nm(i){let t,e,n,r;return{c(){t=It("img"),nn(t.src,e=i[5])||D(t,"src",e),D(t,"alt",i[4]),D(t,"class","svelte-ltkwvy")},m(s,o){jt(s,t,o),n||(r=Ye(t,"error",i[13]),n=!0)},p(s,o){o&32&&!nn(t.src,e=s[5])&&D(t,"src",e),o&16&&D(t,"alt",s[4])},d(s){s&&Vt(t),n=!1,r()}}}function jh(i){let t,e;return{c(){t=It("span"),e=dr(i[6]),D(t,"class","secondary svelte-ltkwvy")},m(n,r){jt(n,t,r),ct(t,e)},p(n,r){r&64&&Go(e,n[6])},d(n){n&&Vt(t)}}}function im(i){var b,T;let t,e,n,r,s,o,a,u,l=i[0].place_name.replace(/,.*/,"")+"",c,h,f=i[2]==="always"||i[2]&&!i[0].address&&((b=i[0].properties)==null?void 0:b.kind)!=="road"&&((T=i[0].properties)==null?void 0:T.kind)!=="road_relation"&&!i[0].id.startsWith("address.")&&!i[0].id.startsWith("postal_code.")&&(!i[0].id.startsWith("poi.")||!i[5]),g,d,p=i[0].place_name.replace(/[^,]*,?\s*/,"")+"",_,m,y;function v(w,O){var z,F;return O&1&&(e=null),O&1&&(n=null),O&1&&(r=null),w[5]?nm:w[0].address?em:((z=w[0].properties)==null?void 0:z.kind)==="road"||((F=w[0].properties)==null?void 0:F.kind)==="road_relation"?tm:(e==null&&(e=!!w[0].id.startsWith("address.")),e?$_:(n==null&&(n=!!w[0].id.startsWith("postal_code.")),n?Q_:(r==null&&(r=!!w[0].id.startsWith("poi.")),r?J_:K_)))}let I=v(i,-1),C=I(i),L=f&&jh(i);return{c(){t=It("li"),C.c(),s=dn(),o=It("span"),a=It("span"),u=It("span"),c=dr(l),h=dn(),L&&L.c(),g=dn(),d=It("span"),_=dr(p),D(u,"class","primary svelte-ltkwvy"),D(a,"class","svelte-ltkwvy"),D(d,"class","line2 svelte-ltkwvy"),D(o,"class","texts svelte-ltkwvy"),D(t,"tabindex","0"),D(t,"data-selected",i[1]),D(t,"class","svelte-ltkwvy"),pr(t,"selected",i[1])},m(w,O){jt(w,t,O),C.m(t,null),ct(t,s),ct(t,o),ct(o,a),ct(a,u),ct(u,c),ct(a,h),L&&L.m(a,null),ct(o,g),ct(o,d),ct(d,_),m||(y=[Ye(t,"mouseenter",i[11]),Ye(t,"focus",i[12])],m=!0)},p(w,[O]){var z,F;I===(I=v(w,O))&&C?C.p(w,O):(C.d(1),C=I(w),C&&(C.c(),C.m(t,s))),O&1&&l!==(l=w[0].place_name.replace(/,.*/,"")+"")&&Go(c,l),O&37&&(f=w[2]==="always"||w[2]&&!w[0].address&&((z=w[0].properties)==null?void 0:z.kind)!=="road"&&((F=w[0].properties)==null?void 0:F.kind)!=="road_relation"&&!w[0].id.startsWith("address.")&&!w[0].id.startsWith("postal_code.")&&(!w[0].id.startsWith("poi.")||!w[5])),f?L?L.p(w,O):(L=jh(w),L.c(),L.m(a,null)):L&&(L.d(1),L=null),O&1&&p!==(p=w[0].place_name.replace(/[^,]*,?\s*/,"")+"")&&Go(_,p),O&2&&D(t,"data-selected",w[1]),O&2&&pr(t,"selected",w[1])},i:zt,o:zt,d(w){w&&Vt(t),C.d(),L&&L.d(),m=!1,Bi(y)}}}function rm(i,t,e){var y;let n,r,{feature:s}=t,{selected:o=!1}=t,{showPlaceType:a}=t,{missingIconsCache:u}=t,{iconsBaseUrl:l}=t;const c=(y=s.properties)==null?void 0:y.categories;let h,f,g=0;function d(v){f&&u.add(f),e(9,g++,g)}function p(v){Xh.call(this,i,v)}function _(v){Xh.call(this,i,v)}const m=v=>d(v.currentTarget);return i.$$set=v=>{"feature"in v&&e(0,s=v.feature),"selected"in v&&e(1,o=v.selected),"showPlaceType"in v&&e(2,a=v.showPlaceType),"missingIconsCache"in v&&e(8,u=v.missingIconsCache),"iconsBaseUrl"in v&&e(3,l=v.iconsBaseUrl)},i.$$.update=()=>{var v,I,C,L;if(i.$$.dirty&1848)do e(10,n--,n),e(4,h=c==null?void 0:c[n]),e(5,f=h?l+h.replace(/ /g,"_")+".svg":void 0);while(n>-1&&(!f||u.has(f)));i.$$.dirty&1&&e(6,r=s.id.startsWith("poi.")?(I=(v=s.properties)==null?void 0:v.categories)==null?void 0:I.join(", "):((L=(C=s.properties)==null?void 0:C.place_type_name)==null?void 0:L[0])??s.place_type[0])},e(10,n=(c==null?void 0:c.length)??0),[s,o,a,l,h,f,r,d,u,g,n,p,_,m]}class sm extends ts{constructor(t){super(),$r(this,t,rm,im,Jr,{feature:0,selected:1,showPlaceType:2,missingIconsCache:8,iconsBaseUrl:3})}}function om(i){let t;return{c(){t=It("div"),t.innerHTML='<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>',D(t,"class","svelte-7cmwmc")},m(e,n){jt(e,t,n)},p:zt,i:zt,o:zt,d(e){e&&Vt(t)}}}class am extends ts{constructor(t){super(),$r(this,t,null,om,Jr,{})}}function um(i){let t,e;return{c(){t=gr("svg"),e=gr("path"),D(e,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),D(t,"viewBox","0 0 60.006 21.412"),D(t,"width","14"),D(t,"height","20"),D(t,"class","svelte-en2qvf")},m(n,r){jt(n,t,r),ct(t,e)},p:zt,i:zt,o:zt,d(n){n&&Vt(t)}}}class lm extends ts{constructor(t){super(),$r(this,t,null,um,Jr,{})}}function cm(i){let t,e;return{c(){t=gr("svg"),e=gr("path"),D(e,"d","M13.101 14.261 8.74 9.899a4.797 4.797 0 0 1-1.425.748 5.165 5.165 0 0 1-1.603.248c-1.446 0-2.677-.5-3.693-1.503S.495 7.164.495 5.717c0-1.446.508-2.678 1.524-3.693C3.035 1.008 4.266.5 5.712.5c1.448 0 2.672.508 3.675 1.524 1.002 1.015 1.503 2.247 1.503 3.693 0 .558-.08 1.092-.239 1.603-.159.512-.411.98-.757 1.405l4.382 4.4a.74.74 0 0 1 .229.568.81.81 0 0 1-.249.568.787.787 0 0 1-.577.239.787.787 0 0 1-.578-.239ZM5.712 9.223c.97 0 1.796-.342 2.48-1.026a3.378 3.378 0 0 0 1.026-2.48c0-.982-.34-1.818-1.016-2.509-.677-.69-1.507-1.035-2.49-1.035a3.42 3.42 0 0 0-2.509 1.035 3.42 3.42 0 0 0-1.035 2.51c0 .982.345 1.812 1.035 2.488.691.678 1.527 1.017 2.51 1.017Z"),D(t,"width","14"),D(t,"height","14"),D(t,"viewBox","0 0 15 15"),D(t,"class","svelte-en2qvf")},m(n,r){jt(n,t,r),ct(t,e)},p:zt,i:zt,o:zt,d(n){n&&Vt(t)}}}class hm extends ts{constructor(t){super(),$r(this,t,null,cm,Jr,{})}}function fm(i,t,e){const n=t[1],r=t[0],s=n-r;return i===n&&e?i:((i-r)%s+s)%s+r}function Zh(i){const t=[...i];return t[2]<t[0]&&(t[2]+=360),t}let Vo;async function gm(i,t,e){const n=i==null?void 0:i.getCenterAndZoom();for(const r of t??[])if(!(n&&(r.minZoom!=null&&r.minZoom>n[0]||r.maxZoom!=null&&r.maxZoom<n[0]))){if(r.type==="fixed")return r.coordinates.join(",");t:if(r.type==="client-geolocation"){if(Vo&&r.cachedLocationExpiry&&Vo.time+r.cachedLocationExpiry>Date.now()){if(!Vo.coords)break t;return Vo.coords}let s;try{return s=await new Promise((o,a)=>{e.signal.addEventListener("abort",()=>{a(Error("aborted"))}),navigator.geolocation.getCurrentPosition(u=>{o([u.coords.longitude,u.coords.latitude].map(l=>l.toFixed(6)).join(","))},u=>{a(u)},r)}),s}catch{}finally{r.cachedLocationExpiry&&(Vo={time:Date.now(),coords:s})}if(e.signal.aborted)return}if(r.type==="server-geolocation")return"ip";if(n&&r.type==="map-center")return n[1].toFixed(6)+","+n[2].toFixed(6)}}function Kh(i,t,e){const n=i.slice();return n[78]=t[e],n[80]=e,n}function Jh(i){let t,e;return t=new am({}),{c(){_r(t.$$.fragment)},m(n,r){zi(t,n,r),e=!0},i(n){e||(Kt(t.$$.fragment,n),e=!0)},o(n){pe(t.$$.fragment,n),e=!1},d(n){Vi(t,n)}}}function Qh(i){let t,e,n,r,s;return e=new lm({}),{c(){t=It("button"),_r(e.$$.fragment),D(t,"type","button"),D(t,"title",i[9]),D(t,"class","svelte-1r7dvt7"),pr(t,"active",i[0])},m(o,a){jt(o,t,a),zi(e,t,null),n=!0,r||(s=Ye(t,"click",i[64]),r=!0)},p(o,a){(!n||a[0]&512)&&D(t,"title",o[9]),(!n||a[0]&1)&&pr(t,"active",o[0])},i(o){n||(Kt(e.$$.fragment,o),n=!0)},o(o){pe(e.$$.fragment,o),n=!1},d(o){o&&Vt(t),Vi(e),r=!1,s()}}}function dm(i){let t,e=[],n=new Map,r,s,o,a=Wh(i[13]);const u=l=>l[78].id+(l[78].address?","+l[78].address:"");for(let l=0;l<a.length;l+=1){let c=Kh(i,a,l),h=u(c);n.set(h,e[l]=$h(h,c))}return{c(){t=It("ul");for(let l=0;l<e.length;l+=1)e[l].c();D(t,"class","svelte-1r7dvt7")},m(l,c){jt(l,t,c);for(let h=0;h<e.length;h+=1)e[h]&&e[h].m(t,null);r=!0,s||(o=[Ye(t,"mouseleave",i[68]),Ye(t,"blur",i[69])],s=!0)},p(l,c){c[0]&8940544&&(a=Wh(l[13]),Za(),e=W_(e,c,u,1,l,a,n,t,U_,$h,null,Kh),Ka())},i(l){if(!r){for(let c=0;c<a.length;c+=1)Kt(e[c]);r=!0}},o(l){for(let c=0;c<e.length;c+=1)pe(e[c]);r=!1},d(l){l&&Vt(t);for(let c=0;c<e.length;c+=1)e[c].d();s=!1,Bi(o)}}}function pm(i){let t,e,n,r,s,o;return e=new Hh({}),{c(){t=It("div"),_r(e.$$.fragment),n=dn(),r=It("div"),s=dr(i[7]),D(r,"class","svelte-1r7dvt7"),D(t,"class","no-results svelte-1r7dvt7")},m(a,u){jt(a,t,u),zi(e,t,null),ct(t,n),ct(t,r),ct(r,s),o=!0},p(a,u){(!o||u[0]&128)&&Go(s,a[7])},i(a){o||(Kt(e.$$.fragment,a),o=!0)},o(a){pe(e.$$.fragment,a),o=!1},d(a){a&&Vt(t),Vi(e)}}}function _m(i){let t="",e;return{c(){e=dr(t)},m(n,r){jt(n,e,r)},p:zt,i:zt,o:zt,d(n){n&&Vt(e)}}}function mm(i){let t,e,n,r,s,o,a,u,l,c,h;return e=new Hh({}),u=new qh({}),{c(){t=It("div"),_r(e.$$.fragment),n=dn(),r=It("div"),s=dr(i[6]),o=dn(),a=It("button"),_r(u.$$.fragment),D(r,"class","svelte-1r7dvt7"),D(a,"class","svelte-1r7dvt7"),D(t,"class","error svelte-1r7dvt7")},m(f,g){jt(f,t,g),zi(e,t,null),ct(t,n),ct(t,r),ct(r,s),ct(t,o),ct(t,a),zi(u,a,null),l=!0,c||(h=Ye(a,"click",i[65]),c=!0)},p(f,g){(!l||g[0]&64)&&Go(s,f[6])},i(f){l||(Kt(e.$$.fragment,f),Kt(u.$$.fragment,f),l=!0)},o(f){pe(e.$$.fragment,f),pe(u.$$.fragment,f),l=!1},d(f){f&&Vt(t),Vi(e),Vi(u),c=!1,h()}}}function $h(i,t){let e,n,r;function s(){return t[66](t[80])}function o(){return t[67](t[78])}return n=new sm({props:{feature:t[78],showPlaceType:t[10],selected:t[14]===t[80],missingIconsCache:t[19],iconsBaseUrl:t[11]}}),n.$on("mouseenter",s),n.$on("focus",o),{key:i,first:null,c(){e=A_(),_r(n.$$.fragment),this.first=e},m(a,u){jt(a,e,u),zi(n,a,u),r=!0},p(a,u){t=a;const l={};u[0]&8192&&(l.feature=t[78]),u[0]&1024&&(l.showPlaceType=t[10]),u[0]&24576&&(l.selected=t[14]===t[80]),u[0]&2048&&(l.iconsBaseUrl=t[11]),n.$set(l)},i(a){r||(Kt(n.$$.fragment,a),r=!0)},o(a){pe(n.$$.fragment,a),r=!1},d(a){a&&Vt(e),Vi(n,a)}}}function ym(i){let t,e,n,r,s,o,a,u,l,c,h,f,g,d,p,_,m,y,v,I,C,L=!1;s=new hm({}),h=new qh({});let b=i[18]&&Jh(),T=i[5]===!0&&Qh(i);const w=i[56].default,O=T_(w,i,i[55],null),z=[mm,_m,pm,dm],F=[];function U(R,P){var B,X;return R[17]?0:R[15]?((B=R[13])==null?void 0:B.length)===0?2:R[15]&&((X=R[13])!=null&&X.length)?3:-1:1}return~(_=U(i))&&(m=F[_]=z[_](i)),{c(){t=dn(),e=It("form"),n=It("div"),r=It("button"),_r(s.$$.fragment),o=dn(),a=It("input"),u=dn(),l=It("div"),c=It("button"),_r(h.$$.fragment),f=dn(),b&&b.c(),g=dn(),T&&T.c(),d=dn(),O&&O.c(),p=dn(),m&&m.c(),D(r,"class","search-button svelte-1r7dvt7"),D(r,"type","button"),D(a,"placeholder",i[8]),D(a,"aria-label",i[8]),D(a,"class","svelte-1r7dvt7"),D(c,"type","button"),D(c,"title",i[3]),D(c,"class","svelte-1r7dvt7"),D(l,"class","clear-button-container svelte-1r7dvt7"),pr(l,"displayable",i[1]!==""),D(n,"class","input-group svelte-1r7dvt7"),D(e,"tabindex","0"),D(e,"class",y=Bh(i[2])+" svelte-1r7dvt7"),pr(e,"can-collapse",i[4]&&i[1]==="")},m(R,P){jt(R,t,P),jt(R,e,P),ct(e,n),ct(n,r),zi(s,r,null),ct(n,o),ct(n,a),i[58](a),zh(a,i[1]),ct(n,u),ct(n,l),ct(l,c),zi(h,c,null),ct(l,f),b&&b.m(l,null),ct(n,g),T&&T.m(n,null),ct(n,d),O&&O.m(n,null),ct(e,p),~_&&F[_].m(e,null),v=!0,I||(C=[Ye(r,"click",i[57]),Ye(a,"input",i[59]),Ye(a,"focus",i[60]),Ye(a,"blur",i[61]),Ye(a,"keydown",i[21]),Ye(a,"input",i[62]),Ye(c,"click",i[63]),Ye(e,"submit",D_(i[20]))],I=!0)},p(R,P){(!v||P[0]&256)&&D(a,"placeholder",R[8]),(!v||P[0]&256)&&D(a,"aria-label",R[8]),P[0]&2&&a.value!==R[1]&&zh(a,R[1]),(!v||P[0]&8)&&D(c,"title",R[3]),R[18]?b?P[0]&262144&&Kt(b,1):(b=Jh(),b.c(),Kt(b,1),b.m(l,null)):b&&(Za(),pe(b,1,1,()=>{b=null}),Ka()),(!v||P[0]&2)&&pr(l,"displayable",R[1]!==""),R[5]===!0?T?(T.p(R,P),P[0]&32&&Kt(T,1)):(T=Qh(R),T.c(),Kt(T,1),T.m(n,d)):T&&(Za(),pe(T,1,1,()=>{T=null}),Ka()),O&&O.p&&(!v||P[1]&16777216)&&M_(O,w,R,R[55],v?P_(w,R[55],P,null):O_(R[55]),null);let B=_;_=U(R),_===B?~_&&F[_].p(R,P):(m&&(Za(),pe(F[B],1,1,()=>{F[B]=null}),Ka()),~_?(m=F[_],m?m.p(R,P):(m=F[_]=z[_](R),m.c()),Kt(m,1),m.m(e,null)):m=null),(!v||P[0]&4&&y!==(y=Bh(R[2])+" svelte-1r7dvt7"))&&D(e,"class",y),(!v||P[0]&22)&&pr(e,"can-collapse",R[4]&&R[1]==="")},i(R){v||(Kt(L),Kt(s.$$.fragment,R),Kt(h.$$.fragment,R),Kt(b),Kt(T),Kt(O,R),Kt(m),v=!0)},o(R){pe(L),pe(s.$$.fragment,R),pe(h.$$.fragment,R),pe(b),pe(T),pe(O,R),pe(m),v=!1},d(R){R&&(Vt(t),Vt(e)),Vi(s),i[58](null),Vi(h),b&&b.d(),T&&T.d(),O&&O.d(R),~_&&F[_].d(),I=!1,Bi(C)}}}function vm(i,t,e){let n,{$$slots:r={},$$scope:s}=t,{class:o=void 0}=t,{apiKey:a}=t,{bbox:u=void 0}=t,{clearButtonTitle:l="clear"}=t,{clearOnBlur:c=!1}=t,{collapsed:h=!1}=t,{country:f=void 0}=t,{debounceSearch:g=200}=t,{enableReverse:d=!1}=t,{errorMessage:p="Something went wrong…"}=t,{filter:_=()=>!0}=t,{flyTo:m=!0}=t,{fuzzyMatch:y=!0}=t,{language:v=void 0}=t,{limit:I=void 0}=t,{mapController:C=void 0}=t,{minLength:L=2}=t,{noResultsMessage:b="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=t,{placeholder:T="Search"}=t,{proximity:w=[{type:"server-geolocation"}]}=t,{reverseActive:O=d==="always"}=t,{reverseButtonTitle:z="toggle reverse geocoding"}=t,{searchValue:F=""}=t,{showFullGeometry:U=!0}=t,{showPlaceType:R="ifNeeded"}=t,{showResultsWhileTyping:P=!0}=t,{types:B=void 0}=t,{excludeTypes:X=!1}=t,{zoom:J=16}=t,{maxZoom:ot=18}=t,{apiUrl:Ct="https://api.maptiler.com/geocoding"}=t,{fetchParameters:Bt={}}=t,{iconsBaseUrl:G="https://cdn.maptiler.com/maptiler-geocoding-control/v1.1.1/icons/"}=t,{adjustUrlQuery:ze=N=>{}}=t;function Pe(){Ve.focus()}function $e(){Ve.blur()}function ku(N,Rt=!0){e(1,F=N),Rt?(e(14,Dt=-1),zr()):(Io(),setTimeout(()=>{Ve.focus(),Ve.select()}))}function yc(){e(13,gt=void 0),e(52,lt=void 0),e(14,Dt=-1)}function Gu(){e(51,we=[]),e(52,lt=void 0)}let ir=!1,gt,we,lt,Sa="",Ve,Dt=-1,Zn,yo=[],rr,sr,Br,wa;const vo=new Set,mi=B_();G_(()=>{C&&(C.setEventHandler(void 0),C.indicateReverse(!1),C.setSelectedMarker(-1),C.setMarkers(void 0,void 0))});function zr(N){if(sr&&(clearTimeout(sr),sr=void 0),Dt>-1&>)e(52,lt=gt[Dt]),e(1,F=lt.place_name.replace(/,.*/,"")),e(17,Zn=void 0),e(51,we=void 0),e(14,Dt=-1);else if(F){const Rt=N||!Eo();xs(F,{exact:!0}).then(()=>{e(51,we=gt),e(52,lt=void 0),Rt&&xo()}).catch(Ht=>e(17,Zn=Ht))}}function Eo(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(F)}async function xs(N,{byId:Rt=!1,exact:Ht=!1}={}){e(17,Zn=void 0),rr==null||rr.abort();const ae=new AbortController;e(18,rr=ae);try{const vt=Eo(),Me=new URLSearchParams;if(v!==void 0&&Me.set("language",Array.isArray(v)?v.join(","):v??""),B&&Me.set("types",B.join(",")),X&&Me.set("excludeTypes",String(X)),u&&Me.set("bbox",u.map(fn=>fn.toFixed(6)).join(",")),f&&Me.set("country",Array.isArray(f)?f.join(","):f),!Rt&&!vt){const fn=await gm(C,w,ae);fn&&Me.set("proximity",fn),(Ht||!P)&&Me.set("autocomplete","false"),Me.set("fuzzyMatch",String(y))}I!==void 0&&(!vt||(B==null?void 0:B.length)===1)&&Me.set("limit",String(I)),Me.set("key",a),ze(Me);const or=Ct+"/"+encodeURIComponent(N)+".json?"+Me.toString();if(or===Sa){Rt?(e(13,gt=void 0),e(52,lt=yo[0])):e(13,gt=yo);return}Sa=or;const Oe=await fetch(or,{signal:ae.signal,...Bt});if(!Oe.ok)throw new Error;const Xe=await Oe.json();mi("response",{url:or,featureCollection:Xe}),Rt?(e(13,gt=void 0),e(52,lt=Xe.features[0]),yo=[lt]):(e(13,gt=Xe.features.filter(_)),yo=gt,vt&&Ve.focus())}catch(vt){if(vt&&typeof vt=="object"&&"name"in vt&&vt.name==="AbortError")return;throw vt}finally{ae===rr&&e(18,rr=void 0)}}function xo(){var Ht;if(!(we!=null&&we.length)||!m)return;const N=[180,90,-180,-90],Rt=!we.some(ae=>!ae.matching_text);for(const ae of we)if(Rt||!ae.matching_text)for(const vt of[0,1,2,3])N[vt]=Math[vt<2?"min":"max"](N[vt],((Ht=ae.bbox)==null?void 0:Ht[vt])??ae.center[vt%2]);C&&we.length>0&&(lt&&N[0]===N[2]&&N[1]===N[3]?C.flyTo(lt.center,J):C.fitBounds(Zh(N),50,ot))}function Co(N){e(0,O=d==="always"),ku(fm(N[0],[-180,180],!0).toFixed(6)+","+N[1].toFixed(6))}function vc(N){if(!gt)return;let Rt=N.key==="ArrowDown"?1:N.key==="ArrowUp"?-1:0;Rt?(Dt===-1&&Rt===-1&&e(14,Dt=gt.length),e(14,Dt+=Rt),Dt>=gt.length&&e(14,Dt=-1),N.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(N.key)&&e(14,Dt=-1)}function Io(N=!0){if(e(17,Zn=void 0),P){if(sr&&clearTimeout(sr),F.length<L)return;const Rt=F;sr=window.setTimeout(()=>{xs(Rt).catch(Ht=>e(17,Zn=Ht))},N?g:0)}else e(13,gt=void 0),e(17,Zn=void 0)}function So(N){e(52,lt=N),e(1,F=N.place_name),e(14,Dt=-1)}const Ra=()=>Ve.focus();function Ec(N){_l[N?"unshift":"push"](()=>{Ve=N,e(16,Ve)})}function xc(){F=this.value,e(1,F),e(12,ir),e(26,c)}const Bu=()=>e(12,ir=!0),zu=()=>e(12,ir=!1),Na=()=>Io(),Vu=()=>{e(1,F=""),Ve.focus()},La=()=>e(0,O=!O),Cs=()=>e(17,Zn=void 0),Is=N=>e(14,Dt=N),Ss=N=>So(N),Xu=()=>e(14,Dt=-1),Yu=()=>{};return i.$$set=N=>{"class"in N&&e(2,o=N.class),"apiKey"in N&&e(24,a=N.apiKey),"bbox"in N&&e(25,u=N.bbox),"clearButtonTitle"in N&&e(3,l=N.clearButtonTitle),"clearOnBlur"in N&&e(26,c=N.clearOnBlur),"collapsed"in N&&e(4,h=N.collapsed),"country"in N&&e(27,f=N.country),"debounceSearch"in N&&e(28,g=N.debounceSearch),"enableReverse"in N&&e(5,d=N.enableReverse),"errorMessage"in N&&e(6,p=N.errorMessage),"filter"in N&&e(29,_=N.filter),"flyTo"in N&&e(30,m=N.flyTo),"fuzzyMatch"in N&&e(31,y=N.fuzzyMatch),"language"in N&&e(32,v=N.language),"limit"in N&&e(33,I=N.limit),"mapController"in N&&e(34,C=N.mapController),"minLength"in N&&e(35,L=N.minLength),"noResultsMessage"in N&&e(7,b=N.noResultsMessage),"placeholder"in N&&e(8,T=N.placeholder),"proximity"in N&&e(36,w=N.proximity),"reverseActive"in N&&e(0,O=N.reverseActive),"reverseButtonTitle"in N&&e(9,z=N.reverseButtonTitle),"searchValue"in N&&e(1,F=N.searchValue),"showFullGeometry"in N&&e(37,U=N.showFullGeometry),"showPlaceType"in N&&e(10,R=N.showPlaceType),"showResultsWhileTyping"in N&&e(38,P=N.showResultsWhileTyping),"types"in N&&e(39,B=N.types),"excludeTypes"in N&&e(40,X=N.excludeTypes),"zoom"in N&&e(41,J=N.zoom),"maxZoom"in N&&e(42,ot=N.maxZoom),"apiUrl"in N&&e(43,Ct=N.apiUrl),"fetchParameters"in N&&e(44,Bt=N.fetchParameters),"iconsBaseUrl"in N&&e(11,G=N.iconsBaseUrl),"adjustUrlQuery"in N&&e(45,ze=N.adjustUrlQuery),"$$scope"in N&&e(55,s=N.$$scope)},i.$$.update=()=>{if(i.$$.dirty[0]&67112960&&setTimeout(()=>{e(15,Br=ir),c&&!ir&&e(1,F="")}),i.$$.dirty[0]&8194|i.$$.dirty[1]&16&&F.length<L&&(e(52,lt=void 0),e(13,gt=void 0),e(17,Zn=void 0),e(51,we=gt)),i.$$.dirty[1]&2097216&&U&<&&!lt.address&<.geometry.type==="Point"&&xs(lt.id,{byId:!0}).catch(N=>e(17,Zn=N)),i.$$.dirty[0]&1073741824|i.$$.dirty[1]&6294536&&(C&<&<.id!==wa&&m&&(!lt.bbox||lt.bbox[0]===lt.bbox[2]&<.bbox[1]===lt.bbox[3]?C.flyTo(lt.center,lt.id.startsWith("poi.")||lt.id.startsWith("address.")?ot:J):C.fitBounds(Zh(lt.bbox),50,ot),e(13,gt=void 0),e(51,we=void 0),e(14,Dt=-1)),e(53,wa=lt==null?void 0:lt.id)),i.$$.dirty[0]&8192|i.$$.dirty[1]&1048576&&we!==gt&&e(51,we=void 0),i.$$.dirty[1]&3145736&&C&&C.setMarkers(we,lt),i.$$.dirty[0]&2&&e(14,Dt=-1),i.$$.dirty[0]&40961|i.$$.dirty[1]&8&&C&&C.setEventHandler(N=>{switch(N.type){case"mapClick":O&&Co(N.coordinates);break;case"markerClick":{const Rt=gt==null?void 0:gt.find(Ht=>Ht.id===N.id);Rt&&So(Rt)}break;case"markerMouseEnter":e(14,Dt=Br?(gt==null?void 0:gt.findIndex(Rt=>Rt.id===N.id))??-1:-1);break;case"markerMouseLeave":e(14,Dt=-1);break}}),i.$$.dirty[0]&16384|i.$$.dirty[1]&8&&(C==null||C.setSelectedMarker(Dt)),i.$$.dirty[0]&24576&&e(54,n=gt==null?void 0:gt[Dt]),i.$$.dirty[0]&2|i.$$.dirty[1]&8){const N=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(F);C==null||C.setReverseMarker(N?[Number(N[1]),Number(N[2])]:void 0)}i.$$.dirty[1]&8388608&&mi("select",n),i.$$.dirty[1]&2097152&&mi("pick",lt),i.$$.dirty[0]&40960&&mi("optionsVisibilityChange",Br&&!!gt),i.$$.dirty[0]&8192&&mi("featuresListed",gt),i.$$.dirty[1]&1048576&&mi("featuresMarked",we),i.$$.dirty[0]&1&&mi("reverseToggle",O),i.$$.dirty[0]&2&&mi("queryChange",F),i.$$.dirty[0]&1|i.$$.dirty[1]&8&&C&&C.indicateReverse(O)},[O,F,o,l,h,d,p,b,T,z,R,G,ir,gt,Dt,Br,Ve,Zn,rr,vo,zr,vc,Io,So,a,u,c,f,g,_,m,y,v,I,C,L,w,U,P,B,X,J,ot,Ct,Bt,ze,Pe,$e,ku,yc,Gu,we,lt,wa,n,s,r,Ra,Ec,xc,Bu,zu,Na,Vu,La,Cs,Is,Ss,Xu,Yu]}let Em=class extends ts{constructor(t){super(),$r(this,t,vm,ym,Jr,{class:2,apiKey:24,bbox:25,clearButtonTitle:3,clearOnBlur:26,collapsed:4,country:27,debounceSearch:28,enableReverse:5,errorMessage:6,filter:29,flyTo:30,fuzzyMatch:31,language:32,limit:33,mapController:34,minLength:35,noResultsMessage:7,placeholder:8,proximity:36,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:37,showPlaceType:10,showResultsWhileTyping:38,types:39,excludeTypes:40,zoom:41,maxZoom:42,apiUrl:43,fetchParameters:44,iconsBaseUrl:11,adjustUrlQuery:45,focus:46,blur:47,setQuery:48,clearList:49,clearMap:50},null,[-1,-1,-1])}get focus(){return this.$$.ctx[46]}get blur(){return this.$$.ctx[47]}get setQuery(){return this.$$.ctx[48]}get clearList(){return this.$$.ctx[49]}get clearMap(){return this.$$.ctx[50]}};class El extends ar{constructor(t){if(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)if(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new El(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const n=this.getStyle();return n&&t.setStyle(n),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_&&(Qn(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=Jn(t,Rn.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?xm(t):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_()}}function xm(i){if(typeof i=="function")return i;let t;return Array.isArray(i)?t=i:(ue(typeof i.getZIndex=="function",41),t=[i]),function(){return t}}const Xi=El;class xl{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null}clone(){const t=this.getColor();return new xl({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const Xo=xl;function tf(i,t,e,n,r,s,o){let a,u;const l=(e-t)/n;if(l===1)a=t;else if(l===2)a=t,u=r;else if(l!==0){let c=i[t],h=i[t+1],f=0;const g=[0];for(let _=t+n;_<e;_+=n){const m=i[_],y=i[_+1];f+=Math.sqrt((m-c)*(m-c)+(y-h)*(y-h)),g.push(f),c=m,h=y}const d=r*f,p=vd(g,d);p<0?(u=(d-g[-p-2])/(g[-p-1]-g[-p-2]),a=t+(-p-2)*n):a=t+p*n}o=o>1?o:2,s=s||new Array(o);for(let c=0;c<o;++c)s[c]=a===void 0?NaN:u===void 0?i[a+c]:gn(i[a+c],i[a+n+c],u);return s}function Cl(i,t,e,n,r,s){if(e==t)return null;let o;if(r<i[t+n-1])return s?(o=i.slice(t,t+n),o[n-1]=r,o):null;if(i[e-1]<r)return s?(o=i.slice(e-n,e),o[n-1]=r,o):null;if(r==i[t+n-1])return i.slice(t,t+n);let a=t/n,u=e/n;for(;a<u;){const f=a+u>>1;r<i[(f+1)*n-1]?u=f:a=f+1}const l=i[a*n-1];if(r==l)return i.slice((a-1)*n,(a-1)*n+n);const c=i[(a+1)*n-1],h=(r-l)/(c-l);o=[];for(let f=0;f<n-1;++f)o.push(gn(i[(a-1)*n+f],i[a*n+f],h));return o.push(r),o}function Cm(i,t,e,n,r,s,o){if(o)return Cl(i,t,e[e.length-1],n,r,s);let a;if(r<i[n-1])return s?(a=i.slice(0,n),a[n-1]=r,a):null;if(i[i.length-1]<r)return s?(a=i.slice(i.length-n),a[n-1]=r,a):null;for(let u=0,l=e.length;u<l;++u){const c=e[u];if(t!=c){if(r<i[t+n-1])return null;if(r<=i[c-1])return Cl(i,t,c,n,r,!1);t=c}}return null}function ef(i,t,e,n){let r=i[t],s=i[t+1],o=0;for(let a=t+n;a<e;a+=n){const u=i[a],l=i[a+1];o+=Math.sqrt((u-r)*(u-r)+(l-s)*(l-s)),r=u,s=l}return o}const Ja=class wc extends Hr{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){this.flatCoordinates?Fi(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()}clone(){const t=new wc(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<Xr(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(il(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,r))}forEachSegment(t){return Sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return this.layout!="XYM"&&this.layout!="XYZM"?null:(e=e!==void 0?e:!1,Cl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return hr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return tf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return ef(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=ul(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new wc(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return za(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Ba(this.flatCoordinates,0,t,this.stride),this.changed()}};class Il{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new Il({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(),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_}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}setWidth(t){this.width_=t}}const Qa=Il,Zt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class Sl{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=qa(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Sl({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 Et()}getImage(t){return Et()}getHitDetectionImage(){return Et()}getPixelRatio(t){return 1}getImageState(){return Et()}getImageSize(){return Et()}getOrigin(){return Et()}getSize(){return Et()}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_=qa(t)}listenImageChange(t){Et()}load(){Et()}unlistenImageChange(t){Et()}}const nf=Sl;function vi(i){return Array.isArray(i)?uh(i):i}class wl extends nf{constructor(t){const e=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:1,rotateWithView:e,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius!==void 0?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new wl({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]/2-e[0]/n[0],t[1]/2+e[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const n=this.renderOptions_,r=$n(n.size*t,n.size*t);this.draw_(n,r,t),e=r.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return Zt.LOADED}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,n){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let r=this.radius_,s=this.radius2_===void 0?r:this.radius2_;if(r<s){const L=r;r=s,s=L}const o=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/o,u=s*Math.sin(a),l=Math.sqrt(s*s-u*u),c=r-l,h=Math.sqrt(u*u+c*c),f=h/u;if(t==="miter"&&f<=n)return f*e;const g=e/2/f,d=e/2*(c/h),_=Math.sqrt((r+g)*(r+g)+d*d)-r;if(this.radius2_===void 0||t==="bevel")return _*2;const m=r*Math.sin(a),y=Math.sqrt(r*r-m*m),v=s-y,C=Math.sqrt(m*m+v*v)/m;if(C<=n){const L=C*e/2-s-r;return 2*Math.max(_,L)}return _*2}createRenderOptions(){let t=Ds,e=0,n=null,r=0,s,o=0;this.stroke_&&(s=this.stroke_.getColor(),s===null&&(s=Do),s=vi(s),o=this.stroke_.getWidth(),o===void 0&&(o=ko),n=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=Ds),e=this.stroke_.getMiterLimit(),e===void 0&&(e=Ao));const a=this.calculateLineJoinSize_(t,o,e),u=Math.max(this.radius_,this.radius2_||0),l=Math.ceil(2*u+a);return{strokeStyle:s,strokeWidth:o,size:l,lineDash:n,lineDashOffset:r,lineJoin:t,miterLimit:e}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]}draw_(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let r=this.fill_.getColor();r===null&&(r=en),e.fillStyle=vi(r),e.fill()}this.stroke_&&(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())}createHitDetectionCanvas_(t){if(this.fill_){let e=this.fill_.getColor(),n=0;if(typeof e=="string"&&(e=Ga(e)),e===null?n=1:Array.isArray(e)&&(n=e.length===4?e[3]:1),n===0){const r=$n(t.size,t.size);this.hitDetectionCanvas_=r.canvas,this.drawHitDetectionCanvas_(t,r)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(t){let e=this.points_;const n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{const r=this.radius2_===void 0?n:this.radius2_;this.radius2_!==void 0&&(e*=2);const s=this.angle_-Math.PI/2,o=2*Math.PI/e;for(let a=0;a<e;a++){const u=s+a*o,l=a%2===0?n:r;t.lineTo(l*Math.cos(u),l*Math.sin(u))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=en,e.fill(),this.stroke_&&(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())}}const rf=wl;class Rl extends rf{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:t.scale!==void 0?t.scale:1,rotation:t.rotation!==void 0?t.rotation:0,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new Rl({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}setRadius(t){this.radius_=t,this.render()}}const sf=Rl;class $a{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=of,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new $a({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().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){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=of,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function Im(i){let t;if(typeof i=="function")t=i;else{let e;Array.isArray(i)?e=i:(ue(typeof i.getZIndex=="function",41),e=[i]),t=function(){return e}}return t}let Nl=null;function Sm(i,t){if(!Nl){const e=new Xo({color:"rgba(255,255,255,0.4)"}),n=new Qa({color:"#3399CC",width:1.25});Nl=[new $a({image:new sf({fill:e,stroke:n,radius:5}),fill:e,stroke:n})]}return Nl}function of(i){return i.getGeometry()}const tu=$a,wm="#333";class Ll{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=qa(t.scale!==void 0?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_=t.fill!==void 0?t.fill:new Xo({color:wm}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}clone(){const t=this.getScale();return new Ll({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}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_}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_}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}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=qa(t!==void 0?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}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const af=Ll;function Rm(i,t,e,n,r){uf(i,t,e||0,n||i.length-1,r||Nm)}function uf(i,t,e,n,r){for(;n>e;){if(n-e>600){var s=n-e+1,o=t-e+1,a=Math.log(s),u=.5*Math.exp(2*a/3),l=.5*Math.sqrt(a*u*(s-u)/s)*(o-s/2<0?-1:1),c=Math.max(e,Math.floor(t-o*u/s+l)),h=Math.min(n,Math.floor(t+(s-o)*u/s+l));uf(i,t,c,h,r)}var f=i[t],g=e,d=n;for(Yo(i,e,t),r(i[n],f)>0&&Yo(i,e,n);g<d;){for(Yo(i,g,d),g++,d--;r(i[g],f)<0;)g++;for(;r(i[d],f)>0;)d--}r(i[e],f)===0?Yo(i,e,d):(d++,Yo(i,d,n)),d<=t&&(e=d+1),t<=d&&(n=d-1)}}function Yo(i,t,e){var n=i[t];i[t]=i[e],i[e]=n}function Nm(i,t){return i<t?-1:i>t?1:0}let lf=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!nu(t,e))return n;const r=this.toBBox,s=[];for(;e;){for(let o=0;o<e.children.length;o++){const a=e.children[o],u=e.leaf?r(a):a;nu(t,u)&&(e.leaf?n.push(a):Tl(t,u)?this._all(a,n):s.push(a))}e=s.pop()}return n}collides(t){let e=this.data;if(!nu(t,e))return!1;const n=[];for(;e;){for(let r=0;r<e.children.length;r++){const s=e.children[r],o=e.leaf?this.toBBox(s):s;if(nu(t,o)){if(e.leaf||Tl(t,o))return!0;n.push(s)}}e=n.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let n=0;n<t.length;n++)this.insert(t[n]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=e;else if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const n=this.data;this.data=e,e=n}this._insert(e,this.data.height-e.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=Vs([]),this}remove(t,e){if(!t)return this;let n=this.data;const r=this.toBBox(t),s=[],o=[];let a,u,l;for(;n||s.length;){if(n||(n=s.pop(),u=s[s.length-1],a=o.pop(),l=!0),n.leaf){const c=Lm(t,n.children,e);if(c!==-1)return n.children.splice(c,1),s.push(n),this._condense(s),this}!l&&!n.leaf&&Tl(n,r)?(s.push(n),o.push(a),a=0,u=n,n=n.children[0]):u?(a++,n=u.children[a],l=!1):n=null}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){const n=[];for(;t;)t.leaf?e.push(...t.children):n.push(...t.children),t=n.pop();return e}_build(t,e,n,r){const s=n-e+1;let o=this._maxEntries,a;if(s<=o)return a=Vs(t.slice(e,n+1)),zs(a,this.toBBox),a;r||(r=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/Math.pow(o,r-1))),a=Vs([]),a.leaf=!1,a.height=r;const u=Math.ceil(s/o),l=u*Math.ceil(Math.sqrt(o));cf(t,e,n,l,this.compareMinX);for(let c=e;c<=n;c+=l){const h=Math.min(c+l-1,n);cf(t,c,h,u,this.compareMinY);for(let f=c;f<=h;f+=u){const g=Math.min(f+u-1,h);a.children.push(this._build(t,f,g,r-1))}}return zs(a,this.toBBox),a}_chooseSubtree(t,e,n,r){for(;r.push(e),!(e.leaf||r.length-1===n);){let s=1/0,o=1/0,a;for(let u=0;u<e.children.length;u++){const l=e.children[u],c=bl(l),h=Pm(t,l)-c;h<o?(o=h,s=c<s?c:s,a=l):h===o&&c<s&&(s=c,a=l)}e=a||e.children[0]}return e}_insert(t,e,n){const r=n?t:this.toBBox(t),s=[],o=this._chooseSubtree(r,this.data,e,s);for(o.children.push(t),Wo(o,r);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(r,s,e)}_split(t,e){const n=t[e],r=n.children.length,s=this._minEntries;this._chooseSplitAxis(n,s,r);const o=this._chooseSplitIndex(n,s,r),a=Vs(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,zs(n,this.toBBox),zs(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=Vs([t,e]),this.data.height=t.height+1,this.data.leaf=!1,zs(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let r,s=1/0,o=1/0;for(let a=e;a<=n-e;a++){const u=Uo(t,0,a,this.toBBox),l=Uo(t,a,n,this.toBBox),c=Mm(u,l),h=bl(u)+bl(l);c<s?(s=c,r=a,o=h<o?h:o):c===s&&h<o&&(o=h,r=a)}return r||n-e}_chooseSplitAxis(t,e,n){const r=t.leaf?this.compareMinX:bm,s=t.leaf?this.compareMinY:Tm,o=this._allDistMargin(t,e,n,r),a=this._allDistMargin(t,e,n,s);o<a&&t.children.sort(r)}_allDistMargin(t,e,n,r){t.children.sort(r);const s=this.toBBox,o=Uo(t,0,e,s),a=Uo(t,n-e,n,s);let u=eu(o)+eu(a);for(let l=e;l<n-e;l++){const c=t.children[l];Wo(o,t.leaf?s(c):c),u+=eu(o)}for(let l=n-e-1;l>=e;l--){const c=t.children[l];Wo(a,t.leaf?s(c):c),u+=eu(a)}return u}_adjustParentBBoxes(t,e,n){for(let r=n;r>=0;r--)Wo(e[r],t)}_condense(t){for(let e=t.length-1,n;e>=0;e--)t[e].children.length===0?e>0?(n=t[e-1].children,n.splice(n.indexOf(t[e]),1)):this.clear():zs(t[e],this.toBBox)}};function Lm(i,t,e){if(!e)return t.indexOf(i);for(let n=0;n<t.length;n++)if(e(i,t[n]))return n;return-1}function zs(i,t){Uo(i,0,i.children.length,t,i)}function Uo(i,t,e,n,r){r||(r=Vs(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s=t;s<e;s++){const o=i.children[s];Wo(r,i.leaf?n(o):o)}return r}function Wo(i,t){return i.minX=Math.min(i.minX,t.minX),i.minY=Math.min(i.minY,t.minY),i.maxX=Math.max(i.maxX,t.maxX),i.maxY=Math.max(i.maxY,t.maxY),i}function bm(i,t){return i.minX-t.minX}function Tm(i,t){return i.minY-t.minY}function bl(i){return(i.maxX-i.minX)*(i.maxY-i.minY)}function eu(i){return i.maxX-i.minX+(i.maxY-i.minY)}function Pm(i,t){return(Math.max(t.maxX,i.maxX)-Math.min(t.minX,i.minX))*(Math.max(t.maxY,i.maxY)-Math.min(t.minY,i.minY))}function Mm(i,t){const e=Math.max(i.minX,t.minX),n=Math.max(i.minY,t.minY),r=Math.min(i.maxX,t.maxX),s=Math.min(i.maxY,t.maxY);return Math.max(0,r-e)*Math.max(0,s-n)}function Tl(i,t){return i.minX<=t.minX&&i.minY<=t.minY&&t.maxX<=i.maxX&&t.maxY<=i.maxY}function nu(i,t){return t.minX<=i.maxX&&t.minY<=i.maxY&&t.maxX>=i.minX&&t.maxY>=i.minY}function Vs(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function cf(i,t,e,n,r){const s=[t,e];for(;s.length;){if(e=s.pop(),t=s.pop(),e-t<=n)continue;const o=t+Math.ceil((e-t)/n/2)*n;Rm(i,o,t,e,r),s.push(t,o,o,e)}}function Om(i,t,e){const n=i;let r=!0,s=!1,o=!1;const a=[ba(n,Rn.LOAD,function(){o=!0,s||t()})];return n.src&&Ld?(s=!0,n.decode().then(function(){r&&t()}).catch(function(u){r&&(o?t():e())})):a.push(ba(n,Rn.ERROR,e)),function(){r=!1,a.forEach(Qn)}}let qo=null;class Am extends Tc{constructor(t,e,n,r,s,o){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=r,this.canvas_={},this.color_=o,this.unlisten_=null,this.imageState_=s,this.size_=n,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===Zt.LOADED){qo||(qo=$n(1,1,void 0,{willReadFrequently:!0})),qo.drawImage(this.image_,0,0);try{qo.getImageData(0,0,1,1),this.tainted_=!1}catch{qo=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(Rn.CHANGE)}handleImageError_(){this.imageState_=Zt.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Zt.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}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_()){const t=this.size_[0],e=this.size_[1],n=$n(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Zt.IDLE){this.image_||this.initializeImage_(),this.imageState_=Zt.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=Om(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==Zt.LOADED)return;const e=this.image_,n=document.createElement("canvas");n.width=Math.ceil(e.width*t),n.height=Math.ceil(e.height*t);const r=n.getContext("2d");r.scale(t,t),r.drawImage(e,0,0),r.globalCompositeOperation="multiply",r.fillStyle=oh(this.color_),r.fillRect(0,0,n.width/t,n.height/t),r.globalCompositeOperation="destination-in",r.drawImage(e,0,0),this.canvas_[t]=n}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Dm(i,t,e,n,r,s){let o=ch.get(t,n,s);return o||(o=new Am(i,t,e,n,r,s),ch.set(t,n,s,o)),o}function hf(i,t,e,n){return e!==void 0&&n!==void 0?[e/i,n/t]:e!==void 0?e/i:n!==void 0?n/t:1}class Pl extends nf{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,r=t.scale!==void 0?t.scale:1,s=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:r,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:s,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const o=t.img!==void 0?t.img:null;this.imgSize_=t.imgSize;let a=t.src;ue(!(a!==void 0&&o),4),ue(!o||o&&this.imgSize_,5),(a===void 0||a.length===0)&&o&&(a=o.src||ge(o)),ue(a!==void 0&&a.length>0,6),ue(!((t.width!==void 0||t.height!==void 0)&&t.scale!==void 0),69);const u=t.src!==void 0?Zt.IDLE:Zt.LOADED;if(this.color_=t.color!==void 0?Ga(t.color):null,this.iconImage_=Dm(o,a,this.imgSize_!==void 0?this.imgSize_:null,this.crossOrigin_,u,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null,t.width!==void 0||t.height!==void 0){let l,c;if(t.size)[l,c]=t.size;else{const h=this.getImage(1);if(h instanceof HTMLCanvasElement||h.src&&h.complete)l=h.width,c=h.height;else{this.initialOptions_=t;const f=()=>{if(this.unlistenImageChange(f),!this.initialOptions_)return;const g=this.iconImage_.getSize();this.setScale(hf(g[0],g[1],t.width,t.height))};this.listenImageChange(f);return}}l!==void 0&&this.setScale(hf(l,c,t.width,t.height))}}clone(){let t,e,n;return this.initialOptions_?(e=this.initialOptions_.width,n=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new Pl({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_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:n,size:this.size_!==null?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_;const r=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!r)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=r[0]),this.anchorYUnits_=="fraction"&&(t[1]*=r[1])}if(this.anchorOrigin_!="top-left"){if(!r)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+r[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+r[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]-e[0]/n[0],t[1]+e[1]/n[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return 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(this.offsetOrigin_!="top-left"){const e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=n[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();if(this.size_)return this.size_[0]*t[0];if(this.iconImage_.getImageState()==Zt.LOADED)return this.iconImage_.getSize()[0]*t[0]}getHeight(){const t=this.getScaleArray();if(this.size_)return this.size_[1]*t[1];if(this.iconImage_.getImageState()==Zt.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(Rn.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(Rn.CHANGE,t)}}const Ml=Pl;function ff(i){return new tu({fill:Ho(i,""),stroke:jo(i,""),text:Fm(i),image:km(i)})}function Ho(i,t){const e=i[t+"fill-color"];if(e)return e==="none"?null:new Xo({color:e})}function jo(i,t){const e=i[t+"stroke-width"],n=i[t+"stroke-color"];if(!(!e&&!n))return new Qa({width:e,color:n,lineCap:i[t+"stroke-line-cap"],lineJoin:i[t+"stroke-line-join"],lineDash:i[t+"stroke-line-dash"],lineDashOffset:i[t+"stroke-line-dash-offset"],miterLimit:i[t+"stroke-miter-limit"]})}function Fm(i){const t=i["text-value"];return t?new af({text:t,font:i["text-font"],maxAngle:i["text-max-angle"],offsetX:i["text-offset-x"],offsetY:i["text-offset-y"],overflow:i["text-overflow"],placement:i["text-placement"],repeat:i["text-repeat"],scale:i["text-scale"],rotateWithView:i["text-rotate-with-view"],rotation:i["text-rotation"],textAlign:i["text-align"],justify:i["text-justify"],textBaseline:i["text-baseline"],padding:i["text-padding"],fill:Ho(i,"text-"),backgroundFill:Ho(i,"text-background-"),stroke:jo(i,"text-"),backgroundStroke:jo(i,"text-background-")}):void 0}function km(i){const t=i["icon-src"],e=i["icon-img"];if(t||e)return new Ml({src:t,img:e,imgSize:i["icon-img-size"],anchor:i["icon-anchor"],anchorOrigin:i["icon-anchor-origin"],anchorXUnits:i["icon-anchor-x-units"],anchorYUnits:i["icon-anchor-y-units"],color:i["icon-color"],crossOrigin:i["icon-cross-origin"],offset:i["icon-offset"],displacement:i["icon-displacement"],opacity:i["icon-opacity"],scale:i["icon-scale"],width:i["icon-width"],height:i["icon-height"],rotation:i["icon-rotation"],rotateWithView:i["icon-rotate-with-view"],size:i["icon-size"],declutterMode:i["icon-declutter-mode"]});const n=i["shape-points"];if(n){const s="shape-";return new rf({points:n,fill:Ho(i,s),stroke:jo(i,s),radius:i["shape-radius"],radius1:i["shape-radius1"],radius2:i["shape-radius2"],angle:i["shape-angle"],displacement:i["shape-displacement"],rotation:i["shape-rotation"],rotateWithView:i["shape-rotate-with-view"],scale:i["shape-scale"],declutterMode:i["shape-declutter-mode"]})}const r=i["circle-radius"];if(r){const s="circle-";return new sf({radius:r,fill:Ho(i,s),stroke:jo(i,s),displacement:i["circle-displacement"],scale:i["circle-scale"],rotation:i["circle-rotation"],rotateWithView:i["circle-rotate-with-view"],declutterMode:i["circle-declutter-mode"]})}}const gf={RENDER_ORDER:"renderOrder"};class Gm extends E_{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter!==void 0?t.declutter:!1,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(gf.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new lf(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(gf.RENDER_ORDER,t)}setStyle(t){let e;if(t===void 0)e=Sm;else if(t===null)e=null;else if(typeof t=="function")e=t;else if(t instanceof tu)e=t;else if(Array.isArray(t)){const n=t.length,r=new Array(n);for(let s=0;s<n;++s){const o=t[s];o instanceof tu?r[s]=o:r[s]=ff(o)}e=r}else e=ff(t);this.style_=e,this.styleFunction_=t===null?void 0:Im(this.style_),this.changed()}}const Bm=Gm,Zo={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},iu=[Zo.FILL],mr=[Zo.STROKE],es=[Zo.BEGIN_PATH],df=[Zo.CLOSE_PATH],Z=Zo;class zm{drawCustom(t,e,n,r){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}const pf=zm;class Vm extends pf{constructor(t,e,n,r){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=r,this.maxLineWidth=0,this.resolution=n,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return e==1?t:t.map(function(n){return n*e})}appendFlatPointCoordinates(t,e){const n=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,s=this.coordinates;let o=s.length;for(let a=0,u=t.length;a<u;a+=e)r[0]=t[a],r[1]=t[a+1],Hd(n,r)&&(s[o++]=r[0],s[o++]=r[1]);return o}appendFlatLineCoordinates(t,e,n,r,s,o){const a=this.coordinates;let u=a.length;const l=this.getBufferedMaxExtent();o&&(e+=r);let c=t[e],h=t[e+1];const f=this.tmpCoordinate_;let g=!0,d,p,_;for(d=e+r;d<n;d+=r)f[0]=t[d],f[1]=t[d+1],_=Ku(l,f),_!==p?(g&&(a[u++]=c,a[u++]=h,g=!1),a[u++]=f[0],a[u++]=f[1]):_===de.INTERSECTING?(a[u++]=f[0],a[u++]=f[1],g=!1):g=!0,c=f[0],h=f[1],p=_;return(s&&g||d===e+r)&&(a[u++]=c,a[u++]=h),u}drawCustomCoordinates_(t,e,n,r,s){for(let o=0,a=n.length;o<a;++o){const u=n[o],l=this.appendFlatLineCoordinates(t,e,u,r,!1,!1);s.push(l),e=u}return e}drawCustom(t,e,n,r){this.beginGeometry(t,e);const s=t.getType(),o=t.getStride(),a=this.coordinates.length;let u,l,c,h,f;switch(s){case"MultiPolygon":u=t.getOrientedFlatCoordinates(),h=[];const g=t.getEndss();f=0;for(let d=0,p=g.length;d<p;++d){const _=[];f=this.drawCustomCoordinates_(u,f,g[d],o,_),h.push(_)}this.instructions.push([Z.CUSTOM,a,h,t,n,ll]),this.hitDetectionInstructions.push([Z.CUSTOM,a,h,t,r||n,ll]);break;case"Polygon":case"MultiLineString":c=[],u=s=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),f=this.drawCustomCoordinates_(u,0,t.getEnds(),o,c),this.instructions.push([Z.CUSTOM,a,c,t,n,Oo]),this.hitDetectionInstructions.push([Z.CUSTOM,a,c,t,r||n,Oo]);break;case"LineString":case"Circle":u=t.getFlatCoordinates(),l=this.appendFlatLineCoordinates(u,0,u.length,o,!1,!1),this.instructions.push([Z.CUSTOM,a,l,t,n,hr]),this.hitDetectionInstructions.push([Z.CUSTOM,a,l,t,r||n,hr]);break;case"MultiPoint":u=t.getFlatCoordinates(),l=this.appendFlatPointCoordinates(u,o),l>a&&(this.instructions.push([Z.CUSTOM,a,l,t,n,hr]),this.hitDetectionInstructions.push([Z.CUSTOM,a,l,t,r||n,hr]));break;case"Point":u=t.getFlatCoordinates(),this.coordinates.push(u[0],u[1]),l=this.coordinates.length,this.instructions.push([Z.CUSTOM,a,l,t,n]),this.hitDetectionInstructions.push([Z.CUSTOM,a,l,t,r||n]);break}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[Z.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Z.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const n=t.length;let r,s,o=-1;for(e=0;e<n;++e)r=t[e],s=r[0],s==Z.END_GEOMETRY?o=e:s==Z.BEGIN_GEOMETRY&&(r[2]=e,Ed(this.hitDetectionInstructions,o,e),o=-1)}setFillStrokeStyle(t,e){const n=this.state;if(t){const r=t.getColor();n.fillStyle=vi(r||en)}else n.fillStyle=void 0;if(e){const r=e.getColor();n.strokeStyle=vi(r||Do);const s=e.getLineCap();n.lineCap=s!==void 0?s:Ya;const o=e.getLineDash();n.lineDash=o?o.slice():ki;const a=e.getLineDashOffset();n.lineDashOffset=a||Gi;const u=e.getLineJoin();n.lineJoin=u!==void 0?u:Ds;const l=e.getWidth();n.lineWidth=l!==void 0?l:ko;const c=e.getMiterLimit();n.miterLimit=c!==void 0?c:Ao,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0}createFill(t){const e=t.fillStyle,n=[Z.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(!0),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Z.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)}updateStrokeStyle(t,e){const n=t.strokeStyle,r=t.lineCap,s=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,u=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=r||s!=t.currentLineDash&&!ws(t.currentLineDash,s)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=u||t.currentMiterLimit!=l)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=r,t.currentLineDash=s,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=u,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Z.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=qd(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;ju(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const Ko=Vm;class Xm extends Ko{constructor(t,e,n,r){super(t,e,n,r),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){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),r=t.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(n,r);this.instructions.push([Z.DRAW_IMAGE,s,o,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([Z.DRAW_IMAGE,s,o,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){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),r=t.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(n,r);this.instructions.push([Z.DRAW_IMAGE,s,o,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([Z.DRAW_IMAGE,s,o,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){const n=t.getAnchor(),r=t.getSize(),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=r[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const Ym=Xm;class Um extends Ko{constructor(t,e,n,r){super(t,e,n,r)}drawFlatCoordinates_(t,e,n,r){const s=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,n,r,!1,!1),a=[Z.MOVE_TO_LINE_TO,s,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),n}drawLineString(t,e){const n=this.state,r=n.strokeStyle,s=n.lineWidth;if(r===void 0||s===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Z.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ki,Gi],es);const o=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push(mr),this.endGeometry(e)}drawMultiLineString(t,e){const n=this.state,r=n.strokeStyle,s=n.lineWidth;if(r===void 0||s===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Z.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ki,Gi],es);const o=t.getEnds(),a=t.getFlatCoordinates(),u=t.getStride();let l=0;for(let c=0,h=o.length;c<h;++c)l=this.drawFlatCoordinates_(a,l,o[c],u);this.hitDetectionInstructions.push(mr),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(mr),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(mr),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(es)}}const Wm=Um;class qm extends Ko{constructor(t,e,n,r){super(t,e,n,r)}drawFlatCoordinatess_(t,e,n,r){const s=this.state,o=s.fillStyle!==void 0,a=s.strokeStyle!==void 0,u=n.length;this.instructions.push(es),this.hitDetectionInstructions.push(es);for(let l=0;l<u;++l){const c=n[l],h=this.coordinates.length,f=this.appendFlatLineCoordinates(t,e,c,r,!0,!a),g=[Z.MOVE_TO_LINE_TO,h,f];this.instructions.push(g),this.hitDetectionInstructions.push(g),a&&(this.instructions.push(df),this.hitDetectionInstructions.push(df)),e=c}return o&&(this.instructions.push(iu),this.hitDetectionInstructions.push(iu)),a&&(this.instructions.push(mr),this.hitDetectionInstructions.push(mr)),e}drawCircle(t,e){const n=this.state,r=n.fillStyle,s=n.strokeStyle;if(r===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Z.SET_FILL_STYLE,en]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Z.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ki,Gi]);const o=t.getFlatCoordinates(),a=t.getStride(),u=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,a,!1,!1);const l=[Z.CIRCLE,u];this.instructions.push(es,l),this.hitDetectionInstructions.push(es,l),n.fillStyle!==void 0&&(this.instructions.push(iu),this.hitDetectionInstructions.push(iu)),n.strokeStyle!==void 0&&(this.instructions.push(mr),this.hitDetectionInstructions.push(mr)),this.endGeometry(e)}drawPolygon(t,e){const n=this.state,r=n.fillStyle,s=n.strokeStyle;if(r===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Z.SET_FILL_STYLE,en]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Z.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ki,Gi]);const o=t.getEnds(),a=t.getOrientedFlatCoordinates(),u=t.getStride();this.drawFlatCoordinatess_(a,0,o,u),this.endGeometry(e)}drawMultiPolygon(t,e){const n=this.state,r=n.fillStyle,s=n.strokeStyle;if(r===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Z.SET_FILL_STYLE,en]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Z.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ki,Gi]);const o=t.getEndss(),a=t.getOrientedFlatCoordinates(),u=t.getStride();let l=0;for(let c=0,h=o.length;c<h;++c)l=this.drawFlatCoordinatess_(a,l,o[c],u);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(t!==0){const e=this.coordinates;for(let n=0,r=e.length;n<r;++n)e[n]=jr(e[n],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;t.fillStyle!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)}}const _f=qm;function Hm(i,t,e,n,r){const s=[];let o=e,a=0,u=t.slice(e,2);for(;a<i&&o+r<n;){const[l,c]=u.slice(-2),h=t[o+r],f=t[o+r+1],g=Math.sqrt((h-l)*(h-l)+(f-c)*(f-c));if(a+=g,a>=i){const d=(i-a+g)/g,p=gn(l,h,d),_=gn(c,f,d);u.push(p,_),s.push(u),u=[p,_],a==i&&(o+=r),a=0}else if(a<i)u.push(t[o+r],t[o+r+1]),o+=r;else{const d=g-a,p=gn(l,h,d/g),_=gn(c,f,d/g);u.push(p,_),s.push(u),u=[p,_],a=0,o+=r}}return a>0&&s.push(u),s}function jm(i,t,e,n,r){let s=e,o=e,a=0,u=0,l=e,c,h,f,g,d,p,_,m,y,v;for(h=e;h<n;h+=r){const I=t[h],C=t[h+1];d!==void 0&&(y=I-d,v=C-p,g=Math.sqrt(y*y+v*v),_!==void 0&&(u+=f,c=Math.acos((_*y+m*v)/(f*g)),c>i&&(u>a&&(a=u,s=l,o=h),u=0,l=h-r)),f=g,_=y,m=v),d=I,p=C}return u+=g,u>a?[l,h]:[s,o]}const ru={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class Zm extends Ko{constructor(t,e,n,r){super(t,e,n,r),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[en]={fillStyle:en},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const n=this.textFillState_,r=this.textStrokeState_,s=this.textState_;if(this.text_===""||!s||!n&&!r)return;const o=this.coordinates;let a=o.length;const u=t.getType();let l=null,c=t.getStride();if(s.placement==="line"&&(u=="LineString"||u=="MultiLineString"||u=="Polygon"||u=="MultiPolygon")){if(!ti(this.getBufferedMaxExtent(),t.getExtent()))return;let h;if(l=t.getFlatCoordinates(),u=="LineString")h=[l.length];else if(u=="MultiLineString")h=t.getEnds();else if(u=="Polygon")h=t.getEnds().slice(0,1);else if(u=="MultiPolygon"){const p=t.getEndss();h=[];for(let _=0,m=p.length;_<m;++_)h.push(p[_][0])}this.beginGeometry(t,e);const f=s.repeat,g=f?void 0:s.textAlign;let d=0;for(let p=0,_=h.length;p<_;++p){let m;f?m=Hm(f*this.resolution,l,d,h[p],c):m=[l.slice(d,h[p])];for(let y=0,v=m.length;y<v;++y){const I=m[y];let C=0,L=I.length;if(g==null){const T=jm(s.maxAngle,I,0,I.length,2);C=T[0],L=T[1]}for(let T=C;T<L;T+=c)o.push(I[T],I[T+1]);const b=o.length;d=h[p],this.drawChars_(a,b),a=b}}this.endGeometry(e)}else{let h=s.overflow?null:[];switch(u){case"Point":case"MultiPoint":l=t.getFlatCoordinates();break;case"LineString":l=t.getFlatMidpoint();break;case"Circle":l=t.getCenter();break;case"MultiLineString":l=t.getFlatMidpoints(),c=2;break;case"Polygon":l=t.getFlatInteriorPoint(),s.overflow||h.push(l[2]/this.resolution),c=3;break;case"MultiPolygon":const m=t.getFlatInteriorPoints();l=[];for(let y=0,v=m.length;y<v;y+=3)s.overflow||h.push(m[y+2]/this.resolution),l.push(m[y],m[y+1]);if(l.length===0)return;c=2;break}const f=this.appendFlatPointCoordinates(l,c);if(f===a)return;if(h&&(f-a)/2!==l.length/c){let m=a/2;h=h.filter((y,v)=>{const I=o[(m+v)*2]===l[v*c]&&o[(m+v)*2+1]===l[v*c+1];return I||--m,I})}this.saveTextStates_(),(s.backgroundFill||s.backgroundStroke)&&(this.setFillStrokeStyle(s.backgroundFill,s.backgroundStroke),s.backgroundFill&&this.updateFillStyle(this.state,this.createFill),s.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let g=s.padding;if(g!=Kr&&(s.scale[0]<0||s.scale[1]<0)){let m=s.padding[0],y=s.padding[1],v=s.padding[2],I=s.padding[3];s.scale[0]<0&&(y=-y,I=-I),s.scale[1]<0&&(m=-m,v=-v),g=[m,y,v,I]}const d=this.pixelRatio;this.instructions.push([Z.DRAW_IMAGE,a,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,g==Kr?Kr:g.map(function(m){return m*d}),!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]);const p=1/d,_=this.state.fillStyle;s.backgroundFill&&(this.state.fillStyle=en,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([Z.DRAW_IMAGE,a,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[p,p],NaN,void 0,this.declutterImageWithText_,g,!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?en:this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]),s.backgroundFill&&(this.state.fillStyle=_,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,r=this.strokeKey_;t&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:e.font,textAlign:e.textAlign||Fo,justify:e.justify,textBaseline:e.textBaseline||Ua,scale:e.scale});const o=this.fillKey_;n&&(o in this.fillStates||(this.fillStates[o]={fillStyle:n.fillStyle}))}drawChars_(t,e){const n=this.textStrokeState_,r=this.textState_,s=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const u=this.pixelRatio,l=ru[r.textBaseline],c=this.textOffsetY_*u,h=this.text_,f=n?n.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([Z.DRAW_CHARS,t,e,l,r.overflow,a,r.maxAngle,u,c,s,f*u,h,o,1]),this.hitDetectionInstructions.push([Z.DRAW_CHARS,t,e,l,r.overflow,a&&en,r.maxAngle,1,c,s,f,h,o,1/u])}setTextStyle(t,e){let n,r,s;if(!t)this.text_="";else{const o=t.getFill();o?(r=this.textFillState_,r||(r={},this.textFillState_=r),r.fillStyle=vi(o.getColor()||en)):(r=null,this.textFillState_=r);const a=t.getStroke();if(!a)s=null,this.textStrokeState_=s;else{s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const d=a.getLineDash(),p=a.getLineDashOffset(),_=a.getWidth(),m=a.getMiterLimit();s.lineCap=a.getLineCap()||Ya,s.lineDash=d?d.slice():ki,s.lineDashOffset=p===void 0?Gi:p,s.lineJoin=a.getLineJoin()||Ds,s.lineWidth=_===void 0?ko:_,s.miterLimit=m===void 0?Ao:m,s.strokeStyle=vi(a.getColor()||Do)}n=this.textState_;const u=t.getFont()||Mh;I_(u);const l=t.getScaleArray();n.overflow=t.getOverflow(),n.font=u,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.repeat=t.getRepeat(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||Ua,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||Kr,n.scale=l===void 0?[1,1]:l;const c=t.getOffsetX(),h=t.getOffsetY(),f=t.getRotateWithView(),g=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=c===void 0?0:c,this.textOffsetY_=h===void 0?0:h,this.textRotateWithView_=f===void 0?!1:f,this.textRotation_=g===void 0?0:g,this.strokeKey_=s?(typeof s.strokeStyle=="string"?s.strokeStyle:ge(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.repeat||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=r?typeof r.fillStyle=="string"?r.fillStyle:"|"+ge(r.fillStyle):""}this.declutterImageWithText_=e}}const Km={Circle:_f,Default:Ko,Image:Ym,LineString:Wm,Polygon:_f,Text:Zm};class Jm{constructor(t,e,n,r){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=r,this.resolution_=n,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const n=this.buildersByZIndex_[e];for(const r in n){const s=n[r].finish();t[e][r]=s}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let r=this.buildersByZIndex_[n];r===void 0&&(r={},this.buildersByZIndex_[n]=r);let s=r[e];if(s===void 0){const o=Km[e];s=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[e]=s}return s}}const mf=Jm;class Qm extends Pc{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return Et()}getData(t){return null}prepareFrame(t){return Et()}renderFrame(t,e){return Et()}loadedTileCallback(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n}createLoadedTileFinder(t,e,n){return(r,s)=>{const o=this.loadedTileCallback.bind(this,n,r);return t.forEachLoadedTile(e,r,s,o)}}forEachFeatureAtCoordinate(t,e,n,r,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;(e.getState()===Zt.LOADED||e.getState()===Zt.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Zt.LOADED&&e!=Zt.ERROR&&t.addEventListener(Rn.CHANGE,this.boundHandleImageChange_),e==Zt.IDLE&&(t.load(),e=t.getState()),e==Zt.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const $m=Qm,yf=[];let Xs=null;function ty(){Xs=$n(1,1,void 0,{willReadFrequently:!0})}class ey extends $m{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=cr(),this.pixelTransform=cr(),this.inversePixelTransform=cr(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){Xs||ty(),Xs.clearRect(0,0,1,1);let r;try{Xs.drawImage(t,e,n,1,1,0,0,1,1),r=Xs.getImageData(0,0,1,1).data}catch{return Xs=null,null}return r}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const r=this.getLayer().getClassName();let s,o;if(t&&t.className===r&&(!n||t&&t.style.backgroundColor&&ws(Ga(t.style.backgroundColor),Ga(n)))){const a=t.firstElementChild;a instanceof HTMLCanvasElement&&(o=a.getContext("2d"))}if(o&&o.canvas.style.transform===e?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=r;let a=s.style;a.position="absolute",a.width="100%",a.height="100%",o=$n();const u=o.canvas;s.appendChild(u),a=u.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=s,this.context=o}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const r=Hc(n),s=jc(n),o=qc(n),a=Wc(n);tn(e.coordinateToPixelTransform,r),tn(e.coordinateToPixelTransform,s),tn(e.coordinateToPixelTransform,o),tn(e.coordinateToPixelTransform,a);const u=this.inversePixelTransform;tn(u,r),tn(u,s),tn(u,o),tn(u,a),t.save(),t.beginPath(),t.moveTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()}dispatchRenderEvent_(t,e,n){const r=this.getLayer();if(r.hasListener(t)){const s=new C_(t,this.inversePixelTransform,n,e);r.dispatchEvent(s)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(Mo.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(Mo.POSTRENDER,t,e)}getRenderTransform(t,e,n,r,s,o,a){const u=s/2,l=o/2,c=r/e,h=-c,f=-t[0]+a,g=-t[1];return Po(this.tempTransform,u,l,c,h,-n,f,g)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const ny=ey;function iy(i,t,e,n,r,s,o,a,u,l,c,h){let f=i[t],g=i[t+1],d=0,p=0,_=0,m=0;function y(){d=f,p=g,t+=n,f=i[t],g=i[t+1],m+=_,_=Math.sqrt((f-d)*(f-d)+(g-p)*(g-p))}do y();while(t<e-n&&m+_<s);let v=_===0?0:(s-m)/_;const I=gn(d,f,v),C=gn(p,g,v),L=t-n,b=m,T=s+a*u(l,r,c);for(;t<e-n&&m+_<T;)y();v=_===0?0:(T-m)/_;const w=gn(d,f,v),O=gn(p,g,v);let z;if(h){const B=[I,C,w,O];dh(B,0,4,2,h,B,B),z=B[0]>B[2]}else z=I>w;const F=Math.PI,U=[],R=L+n===t;t=L,_=0,m=b,f=i[t],g=i[t+1];let P;if(R){y(),P=Math.atan2(g-p,f-d),z&&(P+=P>0?-F:F);const B=(w+I)/2,X=(O+C)/2;return U[0]=[B,X,(T-s)/2,P,r],U}r=r.replace(/\n/g," ");for(let B=0,X=r.length;B<X;){y();let J=Math.atan2(g-p,f-d);if(z&&(J+=J>0?-F:F),P!==void 0){let Pe=J-P;if(Pe+=Pe>F?-2*F:Pe<-F?2*F:0,Math.abs(Pe)>o)return null}P=J;const ot=B;let Ct=0;for(;B<X;++B){const Pe=z?X-B-1:B,$e=a*u(l,r[Pe],c);if(t+n<e&&m+_<s+Ct+$e/2)break;Ct+=$e}if(B===ot)continue;const Bt=z?r.substring(X-ot,X-B):r.substring(ot,B);v=_===0?0:(s+Ct/2-m)/_;const G=gn(d,f,v),ze=gn(p,g,v);U.push([G,ze,Ct/2,J,Bt]),s+=Ct}return U}const Ys=Yr(),yr=[],Yi=[],Ui=[],vr=[];function vf(i){return i[3].declutterBox}const Ef=new RegExp("[֑-ࣿיִ-﷿ﹰ-ﻼࠀ--]");function Ol(i,t){return t==="start"?t=Ef.test(i)?"right":"left":t==="end"&&(t=Ef.test(i)?"left":"right"),ru[t]}function ry(i,t,e){return e>0&&i.push(`
|
|
7
7
|
`,""),i.push(t,""),i}class sy{constructor(t,e,n,r){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=cr(),this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,n,r){const s=t+e+n+r;if(this.labels_[s])return this.labels_[s];const o=r?this.strokeStates[r]:null,a=n?this.fillStates[n]:null,u=this.textStates[e],l=this.pixelRatio,c=[u.scale[0]*l,u.scale[1]*l],h=Array.isArray(t),f=u.justify?ru[u.justify]:Ol(Array.isArray(t)?t[0]:t,u.textAlign||Fo),g=r&&o.lineWidth?o.lineWidth:0,d=h?t:t.split(`
|
|
8
8
|
`).reduce(ry,[]),{width:p,height:_,widths:m,heights:y,lineWidths:v}=w_(u,d),I=p+g,C=[],L=(I+2)*c[0],b=(_+g)*c[1],T={width:L<0?Math.floor(L):Math.ceil(L),height:b<0?Math.floor(b):Math.ceil(b),contextInstructions:C};(c[0]!=1||c[1]!=1)&&C.push("scale",c),r&&(C.push("strokeStyle",o.strokeStyle),C.push("lineWidth",g),C.push("lineCap",o.lineCap),C.push("lineJoin",o.lineJoin),C.push("miterLimit",o.miterLimit),C.push("setLineDash",[o.lineDash]),C.push("lineDashOffset",o.lineDashOffset)),n&&C.push("fillStyle",a.fillStyle),C.push("textBaseline","middle"),C.push("textAlign","center");const w=.5-f;let O=f*I+w*g;const z=[],F=[];let U=0,R=0,P=0,B=0,X;for(let J=0,ot=d.length;J<ot;J+=2){const Ct=d[J];if(Ct===`
|
|
9
9
|
`){R+=U,U=0,O=f*I+w*g,++B;continue}const Bt=d[J+1]||u.font;Bt!==X&&(r&&z.push("font",Bt),n&&F.push("font",Bt),X=Bt),U=Math.max(U,y[P]);const G=[Ct,O+w*m[P]+f*(m[P]-v[B]),.5*(g+U)+R];O+=m[P],r&&z.push("strokeText",G),n&&F.push("fillText",G),++P}return Array.prototype.push.apply(C,z),Array.prototype.push.apply(C,F),this.labels_[s]=T,T}replayTextBackground_(t,e,n,r,s,o,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,s),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())}calculateImageOrLabelDimensions_(t,e,n,r,s,o,a,u,l,c,h,f,g,d,p,_){a*=f[0],u*=f[1];let m=n-a,y=r-u;const v=s+l>t?t-l:s,I=o+c>e?e-c:o,C=d[3]+v*f[0]+d[1],L=d[0]+I*f[1]+d[2],b=m-d[3],T=y-d[0];(p||h!==0)&&(yr[0]=b,vr[0]=b,yr[1]=T,Yi[1]=T,Yi[0]=b+C,Ui[0]=Yi[0],Ui[1]=T+L,vr[1]=Ui[1]);let w;return h!==0?(w=Po(cr(),n,r,1,1,h,-n,-r),tn(w,yr),tn(w,Yi),tn(w,Ui),tn(w,vr),Ur(Math.min(yr[0],Yi[0],Ui[0],vr[0]),Math.min(yr[1],Yi[1],Ui[1],vr[1]),Math.max(yr[0],Yi[0],Ui[0],vr[0]),Math.max(yr[1],Yi[1],Ui[1],vr[1]),Ys)):Ur(Math.min(b,b+C),Math.min(T,T+L),Math.max(b,b+C),Math.max(T,T+L),Ys),g&&(m=Math.round(m),y=Math.round(y)),{drawImageX:m,drawImageY:y,drawImageW:v,drawImageH:I,originX:l,originY:c,declutterBox:{minX:Ys[0],minY:Ys[1],maxX:Ys[2],maxY:Ys[3],value:_},canvasTransform:w,scale:f}}replayImageOrLabel_(t,e,n,r,s,o,a){const u=!!(o||a),l=r.declutterBox,c=t.canvas,h=a?a[2]*r.scale[0]/2:0;return l.minX-h<=c.width/e&&l.maxX+h>=0&&l.minY-h<=c.height/e&&l.maxY+h>=0&&(u&&this.replayTextBackground_(t,yr,Yi,Ui,vr,o,a),R_(t,r.canvasTransform,s,n,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0}fill_(t){if(this.alignFill_){const e=tn(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=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,n,r){const s=this.textStates[e],o=this.createLabel(t,e,r,n),a=this.strokeStates[n],u=this.pixelRatio,l=Ol(Array.isArray(t)?t[0]:t,s.textAlign||Fo),c=ru[s.textBaseline||Ua],h=a&&a.lineWidth?a.lineWidth:0,f=o.width/u-2*s.scale[0],g=l*f+2*(.5-l)*h,d=c*o.height/u+2*(.5-c)*h;return{label:o,anchorX:g,anchorY:d}}execute_(t,e,n,r,s,o,a,u){let l;this.pixelCoordinates_&&ws(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=qr(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),Ip(this.renderedTransform_,n));let c=0;const h=r.length;let f=0,g,d,p,_,m,y,v,I,C,L,b,T,w=0,O=0,z=null,F=null;const U=this.coordinateCache_,R=this.viewRotation_,P=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,B={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:R},X=this.instructions!=r||this.overlaps?0:200;let J,ot,Ct,Bt;for(;c<h;){const G=r[c];switch(G[0]){case Z.BEGIN_GEOMETRY:J=G[1],Bt=G[3],J.getGeometry()?a!==void 0&&!ti(a,Bt.getExtent())?c=G[2]+1:++c:c=G[2];break;case Z.BEGIN_PATH:w>X&&(this.fill_(t),w=0),O>X&&(t.stroke(),O=0),!w&&!O&&(t.beginPath(),_=NaN,m=NaN),++c;break;case Z.CIRCLE:f=G[1];const Pe=l[f],$e=l[f+1],ku=l[f+2],yc=l[f+3],Gu=ku-Pe,ir=yc-$e,gt=Math.sqrt(Gu*Gu+ir*ir);t.moveTo(Pe+gt,$e),t.arc(Pe,$e,gt,0,2*Math.PI,!0),++c;break;case Z.CLOSE_PATH:t.closePath(),++c;break;case Z.CUSTOM:f=G[1],g=G[2];const we=G[3],lt=G[4],Sa=G.length==6?G[5]:void 0;B.geometry=we,B.feature=J,c in U||(U[c]=[]);const Ve=U[c];Sa?Sa(l,f,g,2,Ve):(Ve[0]=l[f],Ve[1]=l[f+1],Ve.length=2),lt(Ve,B),++c;break;case Z.DRAW_IMAGE:f=G[1],g=G[2],I=G[3],d=G[4],p=G[5];let Dt=G[6];const Zn=G[7],yo=G[8],rr=G[9],sr=G[10];let Br=G[11];const wa=G[12];let vo=G[13];const mi=G[14],zr=G[15];if(!I&&G.length>=20){C=G[19],L=G[20],b=G[21],T=G[22];const N=this.drawLabelWithPointPlacement_(C,L,b,T);I=N.label,G[3]=I;const Rt=G[23];d=(N.anchorX-Rt)*this.pixelRatio,G[4]=d;const Ht=G[24];p=(N.anchorY-Ht)*this.pixelRatio,G[5]=p,Dt=I.height,G[6]=Dt,vo=I.width,G[13]=vo}let Eo;G.length>25&&(Eo=G[25]);let xs,xo,Co;G.length>17?(xs=G[16],xo=G[17],Co=G[18]):(xs=Kr,xo=!1,Co=!1),sr&&P?Br+=R:!sr&&!P&&(Br-=R);let vc=0;for(;f<g;f+=2){if(Eo&&Eo[vc++]<vo/this.pixelRatio)continue;const N=this.calculateImageOrLabelDimensions_(I.width,I.height,l[f],l[f+1],vo,Dt,d,p,yo,rr,Br,wa,s,xs,xo||Co,J),Rt=[t,e,I,N,Zn,xo?z:null,Co?F:null];if(u){if(mi==="none")continue;if(mi==="obstacle"){u.insert(N.declutterBox);continue}else{let Ht,ae;if(zr){const vt=g-f;if(!zr[vt]){zr[vt]=Rt;continue}if(Ht=zr[vt],delete zr[vt],ae=vf(Ht),u.collides(ae))continue}if(u.collides(N.declutterBox))continue;Ht&&(u.insert(ae),this.replayImageOrLabel_.apply(this,Ht)),u.insert(N.declutterBox)}}this.replayImageOrLabel_.apply(this,Rt)}++c;break;case Z.DRAW_CHARS:const Io=G[1],So=G[2],Ra=G[3],Ec=G[4];T=G[5];const xc=G[6],Bu=G[7],zu=G[8];b=G[9];const Na=G[10];C=G[11],L=G[12];const Vu=[G[13],G[13]],La=this.textStates[L],Cs=La.font,Is=[La.scale[0]*Bu,La.scale[1]*Bu];let Ss;Cs in this.widths_?Ss=this.widths_[Cs]:(Ss={},this.widths_[Cs]=Ss);const Xu=ef(l,Io,So,2),Yu=Math.abs(Is[0])*Ah(Cs,C,Ss);if(Ec||Yu<=Xu){const N=this.textStates[L].textAlign,Rt=(Xu-Yu)*Ol(C,N),Ht=iy(l,Io,So,2,C,Rt,xc,Math.abs(Is[0]),Ah,Cs,Ss,P?0:this.viewRotation_);t:if(Ht){const ae=[];let vt,Me,or,Oe,Xe;if(b)for(vt=0,Me=Ht.length;vt<Me;++vt){Xe=Ht[vt],or=Xe[4],Oe=this.createLabel(or,L,"",b),d=Xe[2]+(Is[0]<0?-Na:Na),p=Ra*Oe.height+(.5-Ra)*2*Na*Is[1]/Is[0]-zu;const fn=this.calculateImageOrLabelDimensions_(Oe.width,Oe.height,Xe[0],Xe[1],Oe.width,Oe.height,d,p,0,0,Xe[3],Vu,!1,Kr,!1,J);if(u&&u.collides(fn.declutterBox))break t;ae.push([t,e,Oe,fn,1,null,null])}if(T)for(vt=0,Me=Ht.length;vt<Me;++vt){Xe=Ht[vt],or=Xe[4],Oe=this.createLabel(or,L,T,""),d=Xe[2],p=Ra*Oe.height-zu;const fn=this.calculateImageOrLabelDimensions_(Oe.width,Oe.height,Xe[0],Xe[1],Oe.width,Oe.height,d,p,0,0,Xe[3],Vu,!1,Kr,!1,J);if(u&&u.collides(fn.declutterBox))break t;ae.push([t,e,Oe,fn,1,null,null])}u&&u.load(ae.map(vf));for(let fn=0,l0=ae.length;fn<l0;++fn)this.replayImageOrLabel_.apply(this,ae[fn])}}++c;break;case Z.END_GEOMETRY:if(o!==void 0){J=G[1];const N=o(J,Bt);if(N)return N}++c;break;case Z.FILL:X?w++:this.fill_(t),++c;break;case Z.MOVE_TO_LINE_TO:for(f=G[1],g=G[2],ot=l[f],Ct=l[f+1],y=ot+.5|0,v=Ct+.5|0,(y!==_||v!==m)&&(t.moveTo(ot,Ct),_=y,m=v),f+=2;f<g;f+=2)ot=l[f],Ct=l[f+1],y=ot+.5|0,v=Ct+.5|0,(f==g-2||y!==_||v!==m)&&(t.lineTo(ot,Ct),_=y,m=v);++c;break;case Z.SET_FILL_STYLE:z=G,this.alignFill_=G[2],w&&(this.fill_(t),w=0,O&&(t.stroke(),O=0)),t.fillStyle=G[1],++c;break;case Z.SET_STROKE_STYLE:F=G,O&&(t.stroke(),O=0),this.setStrokeStyle_(t,G),++c;break;case Z.STROKE:X?O++:t.stroke(),++c;break;default:++c;break}}w&&this.fill_(t),O&&t.stroke()}execute(t,e,n,r,s,o){this.viewRotation_=r,this.execute_(t,e,n,this.instructions,s,void 0,void 0,o)}executeHitDetection(t,e,n,r,s){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,r,s)}}const oy=sy,Al=["Polygon","Circle","LineString","Image","Text","Default"];class ay{constructor(t,e,n,r,s,o){this.maxExtent_=t,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=cr(),this.createExecutors_(s)}clip(t,e){const n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()}createExecutors_(t){for(const e in t){let n=this.executorsByZIndex_[e];n===void 0&&(n={},this.executorsByZIndex_[e]=n);const r=t[e];for(const s in r){const o=r[s];n[s]=new oy(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let r=0,s=t.length;r<s;++r)if(t[r]in n)return!0}return!1}forEachFeatureAtCoordinate(t,e,n,r,s,o){r=Math.round(r);const a=r*2+1,u=Po(this.hitDetectionTransform_,r+.5,r+.5,1/e,-1/e,-n,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=$n(a,a,void 0,{willReadFrequently:!0}));const c=this.hitDetectionContext_;c.canvas.width!==a||c.canvas.height!==a?(c.canvas.width=a,c.canvas.height=a):l||c.clearRect(0,0,a,a);let h;this.renderBuffer_!==void 0&&(h=Yr(),Kd(h,t),ju(h,e*(this.renderBuffer_+r),h));const f=uy(r);let g;function d(C,L){const b=c.getImageData(0,0,a,a).data;for(let T=0,w=f.length;T<w;T++)if(b[f[T]]>0){if(!o||g!=="Image"&&g!=="Text"||o.includes(C)){const O=(f[T]-3)/4,z=r-O%a,F=r-(O/a|0),U=s(C,L,z*z+F*F);if(U)return U}c.clearRect(0,0,a,a);break}}const p=Object.keys(this.executorsByZIndex_).map(Number);p.sort(Ro);let _,m,y,v,I;for(_=p.length-1;_>=0;--_){const C=p[_].toString();for(y=this.executorsByZIndex_[C],m=Al.length-1;m>=0;--m)if(g=Al[m],v=y[g],v!==void 0&&(I=v.executeHitDetection(c,u,n,d,h),I))return I}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const n=e[0],r=e[1],s=e[2],o=e[3],a=[n,r,n,o,s,o,s,r];return qr(a,0,8,2,t,a),a}isEmpty(){return No(this.executorsByZIndex_)}execute(t,e,n,r,s,o,a){const u=Object.keys(this.executorsByZIndex_).map(Number);u.sort(Ro),this.maxExtent_&&(t.save(),this.clip(t,n)),o=o||Al;let l,c,h,f,g,d;for(a&&u.reverse(),l=0,c=u.length;l<c;++l){const p=u[l].toString();for(g=this.executorsByZIndex_[p],h=0,f=o.length;h<f;++h){const _=o[h];d=g[_],d!==void 0&&d.execute(t,e,n,r,s,a)}}this.maxExtent_&&t.restore()}}const Dl={};function uy(i){if(Dl[i]!==void 0)return Dl[i];const t=i*2+1,e=i*i,n=new Array(e+1);for(let s=0;s<=i;++s)for(let o=0;o<=i;++o){const a=s*s+o*o;if(a>e)break;let u=n[a];u||(u=[],n[a]=u),u.push(((i+s)*t+(i+o))*4+3),s>0&&u.push(((i-s)*t+(i+o))*4+3),o>0&&(u.push(((i+s)*t+(i-o))*4+3),s>0&&u.push(((i-s)*t+(i-o))*4+3))}const r=[];for(let s=0,o=n.length;s<o;++s)n[s]&&r.push(...n[s]);return Dl[i]=r,r}const xf=ay;class ly extends pf{constructor(t,e,n,r,s,o,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=n,this.transform_=r,this.transformRotation_=r?ap(Math.atan2(r[1],r[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=o,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_=cr()}drawImages_(t,e,n,r){if(!this.image_)return;const s=qr(t,e,n,r,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,u=o.globalAlpha;this.imageOpacity_!=1&&(o.globalAlpha=u*this.imageOpacity_);let l=this.imageRotation_;this.transformRotation_===0&&(l-=this.viewRotation_),this.imageRotateWithView_&&(l+=this.viewRotation_);for(let c=0,h=s.length;c<h;c+=2){const f=s[c]-this.imageAnchorX_,g=s[c+1]-this.imageAnchorY_;if(l!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const d=f+this.imageAnchorX_,p=g+this.imageAnchorY_;Po(a,d,p,1,1,l,-d,-p),o.setTransform.apply(o,a),o.translate(d,p),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,f,g,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(o.globalAlpha=u)}drawText_(t,e,n,r){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const s=qr(t,e,n,r,this.transform_,this.pixelCoordinates_),o=this.context_;let a=this.textRotation_;for(this.transformRotation_===0&&(a-=this.viewRotation_),this.textRotateWithView_&&(a+=this.viewRotation_);e<n;e+=r){const u=s[e]+this.textOffsetX_,l=s[e+1]+this.textOffsetY_;a!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(o.translate(u-this.textOffsetX_,l-this.textOffsetY_),o.rotate(a),o.translate(this.textOffsetX_,this.textOffsetY_),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)):(this.textStrokeState_&&o.strokeText(this.text_,u,l),this.textFillState_&&o.fillText(this.text_,u,l))}}moveToLineTo_(t,e,n,r,s){const o=this.context_,a=qr(t,e,n,r,this.transform_,this.pixelCoordinates_);o.moveTo(a[0],a[1]);let u=a.length;s&&(u-=2);for(let l=2;l<u;l+=2)o.lineTo(a[l],a[l+1]);return s&&o.closePath(),n}drawRings_(t,e,n,r){for(let s=0,o=n.length;s<o;++s)e=this.moveToLineTo_(t,e,n[s],r,!0);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ti(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=Kp(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],r=e[3]-e[1],s=Math.sqrt(n*n+r*r),o=this.context_;o.beginPath(),o.arc(e[0],e[1],s,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.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);break}}drawFeature(t,e){const n=e.getGeometryFunction()(t);n&&(this.setStyle(e),this.drawGeometry(n))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let n=0,r=e.length;n<r;++n)this.drawGeometry(e[n])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ti(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),e.stroke()}if(this.text_!==""){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(ti(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const n=this.context_,r=t.getFlatCoordinates();let s=0;const o=t.getEnds(),a=t.getStride();n.beginPath();for(let u=0,l=o.length;u<l;++u)s=this.moveToLineTo_(r,s,o[u],a,!1);n.stroke()}if(this.text_!==""){const n=t.getFlatMidpoints();this.drawText_(n,0,n.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ti(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ti(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getOrientedFlatCoordinates();let r=0;const s=t.getEndss(),o=t.getStride();e.beginPath();for(let a=0,u=s.length;a<u;++a){const l=s[a];r=this.drawRings_(n,r,l,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,e.lineCap=t.lineCap),ws(n.lineDash,t.lineDash)||e.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.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){const e=this.context_,n=this.contextTextState_,r=t.textAlign?t.textAlign:Fo;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=r&&(n.textAlign=r,e.textAlign=r),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=r,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:r,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(!t)this.fillState_=null;else{const n=t.getColor();this.fillState_={fillStyle:vi(n||en)}}if(!e)this.strokeState_=null;else{const n=e.getColor(),r=e.getLineCap(),s=e.getLineDash(),o=e.getLineDashOffset(),a=e.getLineJoin(),u=e.getWidth(),l=e.getMiterLimit(),c=s||ki;this.strokeState_={lineCap:r!==void 0?r:Ya,lineDash:this.pixelRatio_===1?c:c.map(h=>h*this.pixelRatio_),lineDashOffset:(o||Gi)*this.pixelRatio_,lineJoin:a!==void 0?a:Ds,lineWidth:(u!==void 0?u:ko)*this.pixelRatio_,miterLimit:l!==void 0?l:Ao,strokeStyle:vi(n||Do)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),r=t.getAnchor(),s=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=r[0]*n,this.imageAnchorY_=r[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const o=t.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/n,o[1]*this.pixelRatio_/n],this.imageWidth_=e[0]*n}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const g=e.getColor();this.textFillState_={fillStyle:vi(g||en)}}const n=t.getStroke();if(!n)this.textStrokeState_=null;else{const g=n.getColor(),d=n.getLineCap(),p=n.getLineDash(),_=n.getLineDashOffset(),m=n.getLineJoin(),y=n.getWidth(),v=n.getMiterLimit();this.textStrokeState_={lineCap:d!==void 0?d:Ya,lineDash:p||ki,lineDashOffset:_||Gi,lineJoin:m!==void 0?m:Ds,lineWidth:y!==void 0?y:ko,miterLimit:v!==void 0?v:Ao,strokeStyle:vi(g||Do)}}const r=t.getFont(),s=t.getOffsetX(),o=t.getOffsetY(),a=t.getRotateWithView(),u=t.getRotation(),l=t.getScaleArray(),c=t.getText(),h=t.getTextAlign(),f=t.getTextBaseline();this.textState_={font:r!==void 0?r:Mh,textAlign:h!==void 0?h:Fo,textBaseline:f!==void 0?f:Ua},this.text_=c!==void 0?Array.isArray(c)?c.reduce((g,d,p)=>g+=p%2?" ":d,""):c:"",this.textOffsetX_=s!==void 0?this.pixelRatio_*s:0,this.textOffsetY_=o!==void 0?this.pixelRatio_*o:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=u!==void 0?u:0,this.textScale_=[this.pixelRatio_*l[0],this.pixelRatio_*l[1]]}}}const cy=ly,Ei=.5;function hy(i,t,e,n,r,s,o){const a=i[0]*Ei,u=i[1]*Ei,l=$n(a,u);l.imageSmoothingEnabled=!1;const c=l.canvas,h=new cy(l,Ei,r,null,o),f=e.length,g=Math.floor((256*256*256-1)/f),d={};for(let _=1;_<=f;++_){const m=e[_-1],y=m.getStyleFunction()||n;if(!y)continue;let v=y(m,s);if(!v)continue;Array.isArray(v)||(v=[v]);const C=(_*g).toString(16).padStart(7,"#00000");for(let L=0,b=v.length;L<b;++L){const T=v[L],w=T.getGeometryFunction()(m);if(!w||!ti(r,w.getExtent()))continue;const O=T.clone(),z=O.getFill();z&&z.setColor(C);const F=O.getStroke();F&&(F.setColor(C),F.setLineDash(null)),O.setText(void 0);const U=T.getImage();if(U){const X=U.getImageSize();if(!X)continue;const J=$n(X[0],X[1],void 0,{alpha:!1}),ot=J.canvas;J.fillStyle=C,J.fillRect(0,0,ot.width,ot.height),O.setImage(new Ml({img:ot,imgSize:X,anchor:U.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:U.getOrigin(),opacity:1,size:U.getSize(),scale:U.getScale(),rotation:U.getRotation(),rotateWithView:U.getRotateWithView()}))}const R=O.getZIndex()||0;let P=d[R];P||(P={},d[R]=P,P.Polygon=[],P.Circle=[],P.LineString=[],P.Point=[]);const B=w.getType();if(B==="GeometryCollection"){const X=w.getGeometriesArrayRecursive();for(let J=0,ot=X.length;J<ot;++J){const Ct=X[J];P[Ct.getType().replace("Multi","")].push(Ct,O)}}else P[B.replace("Multi","")].push(w,O)}}const p=Object.keys(d).map(Number).sort(Ro);for(let _=0,m=p.length;_<m;++_){const y=d[p[_]];for(const v in y){const I=y[v];for(let C=0,L=I.length;C<L;C+=2){h.setStyle(I[C+1]);for(let b=0,T=t.length;b<T;++b)h.setTransform(t[b]),h.drawGeometry(I[C])}}}return l.getImageData(0,0,c.width,c.height)}function fy(i,t,e){const n=[];if(e){const r=Math.floor(Math.round(i[0])*Ei),s=Math.floor(Math.round(i[1])*Ei),o=(Ae(r,0,e.width-1)+Ae(s,0,e.height-1)*e.width)*4,a=e.data[o],u=e.data[o+1],c=e.data[o+2]+256*(u+256*a),h=Math.floor((256*256*256-1)/t.length);c&&c%h===0&&n.push(t[c/h-1])}return n}const gy=.5,Cf={Point:Cy,LineString:vy,Polygon:Sy,MultiPoint:Iy,MultiLineString:Ey,MultiPolygon:xy,GeometryCollection:yy,Circle:_y};function dy(i,t){return parseInt(ge(i),10)-parseInt(ge(t),10)}function py(i,t){const e=Fl(i,t);return e*e}function Fl(i,t){return gy*i/t}function _y(i,t,e,n,r){const s=e.getFill(),o=e.getStroke();if(s||o){const u=i.getBuilder(e.getZIndex(),"Circle");u.setFillStrokeStyle(s,o),u.drawCircle(t,n)}const a=e.getText();if(a&&a.getText()){const u=(r||i).getBuilder(e.getZIndex(),"Text");u.setTextStyle(a),u.drawText(t,n)}}function If(i,t,e,n,r,s,o){let a=!1;const u=e.getImage();if(u){const l=u.getImageState();l==Zt.LOADED||l==Zt.ERROR?u.unlistenImageChange(r):(l==Zt.IDLE&&u.load(),u.listenImageChange(r),a=!0)}return my(i,t,e,n,s,o),a}function my(i,t,e,n,r,s){const o=e.getGeometryFunction()(t);if(!o)return;const a=o.simplifyTransformed(n,r);if(e.getRenderer())Sf(i,a,e,t);else{const l=Cf[a.getType()];l(i,a,e,t,s)}}function Sf(i,t,e,n){if(t.getType()=="GeometryCollection"){const s=t.getGeometries();for(let o=0,a=s.length;o<a;++o)Sf(i,s[o],e,n);return}i.getBuilder(e.getZIndex(),"Default").drawCustom(t,n,e.getRenderer(),e.getHitDetectionRenderer())}function yy(i,t,e,n,r){const s=t.getGeometriesArray();let o,a;for(o=0,a=s.length;o<a;++o){const u=Cf[s[o].getType()];u(i,s[o],e,n,r)}}function vy(i,t,e,n,r){const s=e.getStroke();if(s){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,s),a.drawLineString(t,n)}const o=e.getText();if(o&&o.getText()){const a=(r||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(o),a.drawText(t,n)}}function Ey(i,t,e,n,r){const s=e.getStroke();if(s){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,s),a.drawMultiLineString(t,n)}const o=e.getText();if(o&&o.getText()){const a=(r||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(o),a.drawText(t,n)}}function xy(i,t,e,n,r){const s=e.getFill(),o=e.getStroke();if(o||s){const u=i.getBuilder(e.getZIndex(),"Polygon");u.setFillStrokeStyle(s,o),u.drawMultiPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const u=(r||i).getBuilder(e.getZIndex(),"Text");u.setTextStyle(a),u.drawText(t,n)}}function Cy(i,t,e,n,r){const s=e.getImage(),o=e.getText();let a;if(s){if(s.getImageState()!=Zt.LOADED)return;let u=i;if(r){const c=s.getDeclutterMode();if(c!=="none")if(u=r,c==="obstacle"){const h=i.getBuilder(e.getZIndex(),"Image");h.setImageStyle(s,a),h.drawPoint(t,n)}else o&&o.getText()&&(a={})}const l=u.getBuilder(e.getZIndex(),"Image");l.setImageStyle(s,a),l.drawPoint(t,n)}if(o&&o.getText()){let u=i;r&&(u=r);const l=u.getBuilder(e.getZIndex(),"Text");l.setTextStyle(o,a),l.drawText(t,n)}}function Iy(i,t,e,n,r){const s=e.getImage(),o=e.getText();let a;if(s){if(s.getImageState()!=Zt.LOADED)return;let u=i;if(r){const c=s.getDeclutterMode();if(c!=="none")if(u=r,c==="obstacle"){const h=i.getBuilder(e.getZIndex(),"Image");h.setImageStyle(s,a),h.drawMultiPoint(t,n)}else o&&o.getText()&&(a={})}const l=u.getBuilder(e.getZIndex(),"Image");l.setImageStyle(s,a),l.drawMultiPoint(t,n)}if(o&&o.getText()){let u=i;r&&(u=r);const l=u.getBuilder(e.getZIndex(),"Text");l.setTextStyle(o,a),l.drawText(t,n)}}function Sy(i,t,e,n,r){const s=e.getFill(),o=e.getStroke();if(s||o){const u=i.getBuilder(e.getZIndex(),"Polygon");u.setFillStrokeStyle(s,o),u.drawPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const u=(r||i).getBuilder(e.getZIndex(),"Text");u.setTextStyle(a),u.drawText(t,n)}}class wy extends ny{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=Yr(),this.wrappedRenderedExtent_=Yr(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(t,e,n){const r=e.extent,s=e.viewState,o=s.center,a=s.resolution,u=s.projection,l=s.rotation,c=u.getExtent(),h=this.getLayer().getSource(),f=e.pixelRatio,g=e.viewHints,d=!(g[Ln.ANIMATING]||g[Ln.INTERACTING]),p=this.compositionContext_,_=Math.round(e.size[0]*f),m=Math.round(e.size[1]*f),y=h.getWrapX()&&u.canWrapX(),v=y?Nn(c):null,I=y?Math.ceil((r[2]-c[2])/v)+1:1;let C=y?Math.floor((r[0]-c[0])/v):0;do{const L=this.getRenderTransform(o,a,l,f,_,m,C*v);t.execute(p,1,L,l,d,void 0,n)}while(++C<I)}setupCompositionContext_(){if(this.opacity_!==1){const t=$n(this.context.canvas.width,this.context.canvas.height,yf);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(this.opacity_!==1){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,bd(this.compositionContext_),yf.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())}renderFrame(t,e){const n=t.pixelRatio,r=t.layerStatesArray[t.layerIndex];Sp(this.pixelTransform,1/n,1/n),wp(this.inversePixelTransform,this.pixelTransform);const s=Np(this.pixelTransform);this.useContainer(e,s,this.getBackground(t));const o=this.context,a=o.canvas,u=this.replayGroup_,l=this.declutterExecutorGroup;let c=u&&!u.isEmpty()||l&&!l.isEmpty();if(!c&&!(this.getLayer().hasListener(Mo.PRERENDER)||this.getLayer().hasListener(Mo.POSTRENDER)))return null;const h=Math.round(t.size[0]*n),f=Math.round(t.size[1]*n);a.width!=h||a.height!=f?(a.width=h,a.height=f,a.style.transform!==s&&(a.style.transform=s)):this.containerReused||o.clearRect(0,0,h,f),this.preRender(o,t);const g=t.viewState;g.projection,this.opacity_=r.opacity,this.setupCompositionContext_();let d=!1;if(c&&r.extent&&this.clipping){const p=To(r.extent);c=ti(p,t.extent),d=c&&!Ts(p,t.extent),d&&this.clipUnrotated(this.compositionContext_,t,p)}return c&&this.renderWorlds(u,t),d&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(o,t),this.renderedRotation_!==g.rotation&&(this.renderedRotation_=g.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise(e=>{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const n=[this.context.canvas.width,this.context.canvas.height];tn(this.pixelTransform,n);const r=this.renderedCenter_,s=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,u=this.wrappedRenderedExtent_,l=this.getLayer(),c=[],h=n[0]*Ei,f=n[1]*Ei;c.push(this.getRenderTransform(r,s,o,Ei,h,f,0).slice());const g=l.getSource(),d=a.getExtent();if(g.getWrapX()&&a.canWrapX()&&!Ts(d,u)){let p=u[0];const _=Nn(d);let m=0,y;for(;p<d[0];)--m,y=_*m,c.push(this.getRenderTransform(r,s,o,Ei,h,f,y).slice()),p+=_;for(m=0,p=u[2];p>d[2];)++m,y=_*m,c.push(this.getRenderTransform(r,s,o,Ei,h,f,y).slice()),p-=_}this.hitDetectionImageData_=hy(n,c,this.renderedFeatures_,l.getStyleFunction(),u,s,o)}e(fy(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,e,n,r,s){if(!this.replayGroup_)return;const o=e.viewState.resolution,a=e.viewState.rotation,u=this.getLayer(),l={},c=function(g,d,p){const _=ge(g),m=l[_];if(m){if(m!==!0&&p<m.distanceSq){if(p===0)return l[_]=!0,s.splice(s.lastIndexOf(m),1),r(g,u,d);m.geometry=d,m.distanceSq=p}}else{if(p===0)return l[_]=!0,r(g,u,d);s.push(l[_]={feature:g,layer:u,geometry:d,distanceSq:p,callback:r})}};let h;const f=[this.replayGroup_];return this.declutterExecutorGroup&&f.push(this.declutterExecutorGroup),f.some(g=>h=g.forEachFeatureAtCoordinate(t,o,a,n,c,g===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map(d=>d.value):null)),h}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),n=e.getSource();if(!n)return!1;const r=t.viewHints[Ln.ANIMATING],s=t.viewHints[Ln.INTERACTING],o=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(this.ready&&!o&&r||!a&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const u=t.extent,l=t.viewState,c=l.projection,h=l.resolution,f=t.pixelRatio,g=e.getRevision(),d=e.getRenderBuffer();let p=e.getRenderOrder();p===void 0&&(p=dy);const _=l.center.slice(),m=ju(u,d*h),y=m.slice(),v=[m.slice()],I=c.getExtent();if(n.getWrapX()&&c.canWrapX()&&!Ts(I,t.extent)){const P=Nn(I),B=Math.max(Nn(m)/2,P);m[0]=I[0]-B,m[2]=I[2]+B,cp(_,c);const X=Zc(v[0],c);X[0]<I[0]&&X[2]<I[2]?v.push([X[0]+P,X[1],X[2]+P,X[3]]):X[0]>I[0]&&X[2]>I[2]&&v.push([X[0]-P,X[1],X[2]-P,X[3]])}if(this.ready&&this.renderedResolution_==h&&this.renderedRevision_==g&&this.renderedRenderOrder_==p&&Ts(this.wrappedRenderedExtent_,m))return ws(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=_,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const C=new mf(Fl(h,f),m,h,f);let L;this.getLayer().getDeclutter()&&(L=new mf(Fl(h,f),m,h,f));let b;for(let P=0,B=v.length;P<B;++P)n.loadFeatures(v[P],h,c);const T=py(h,f);let w=!0;const O=P=>{let B;const X=P.getStyleFunction()||e.getStyleFunction();if(X&&(B=X(P,h)),B){const J=this.renderFeature(P,T,B,C,b,L);w=w&&!J}},z=ih(m),F=n.getFeaturesInExtent(z);p&&F.sort(p);for(let P=0,B=F.length;P<B;++P)O(F[P]);this.renderedFeatures_=F,this.ready=w;const U=C.finish(),R=new xf(m,h,f,n.getOverlaps(),U,e.getRenderBuffer());return L&&(this.declutterExecutorGroup=new xf(m,h,f,n.getOverlaps(),L.finish(),e.getRenderBuffer())),this.renderedResolution_=h,this.renderedRevision_=g,this.renderedRenderOrder_=p,this.renderedExtent_=y,this.wrappedRenderedExtent_=m,this.renderedCenter_=_,this.renderedProjection_=c,this.replayGroup_=R,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,n,r,s,o){if(!n)return!1;let a=!1;if(Array.isArray(n))for(let u=0,l=n.length;u<l;++u)a=If(r,t,n[u],e,this.boundHandleStyleImageChange_,s,o)||a;else a=If(r,t,n,e,this.boundHandleStyleImageChange_,s,o);return a}}const Ry=wy;class Ny extends Bm{constructor(t){super(t)}createRenderer(){return new Ry(this)}}const Ly=Ny;class by{constructor(t){this.rbush_=new lf(t),this.items_={}}insert(t,e){const n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[ge(e)]=n}load(t,e){const n=new Array(e.length);for(let r=0,s=e.length;r<s;r++){const o=t[r],a=e[r],u={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:a};n[r]=u,this.items_[ge(a)]=u}this.rbush_.load(n)}remove(t){const e=ge(t),n=this.items_[e];return delete this.items_[e],this.rbush_.remove(n)!==null}update(t,e){const n=this.items_[ge(e)],r=[n.minX,n.minY,n.maxX,n.maxY];Yc(r,t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map(function(e){return e.value})}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(r){return r.value})}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let n;for(let r=0,s=t.length;r<s;r++)if(n=e(t[r]),n)return n;return n}isEmpty(){return No(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return Ur(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}}const wf=by;class Ty extends ar{constructor(t){super(),this.projection=Ms(t.projection),this.attributions_=Rf(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,this.loading=!1,this.state_=t.state!==void 0?t.state:"ready",this.wrapX_=t.wrapX!==void 0?t.wrapX:!1,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise(function(n,r){e.viewResolver=n,e.viewRejector=r})}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_=Rf(t),this.changed()}setState(t){this.state_=t,this.changed()}}function Rf(i){return i?Array.isArray(i)?function(t){return i}:typeof i=="function"?i:function(t){return[i]}:null}const Py=Ty,ni={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function My(i,t){return[[-1/0,-1/0,1/0,1/0]]}let Oy=!1;function Ay(i,t,e,n,r,s,o){const a=new XMLHttpRequest;a.open("GET",typeof i=="function"?i(e,n,r):i,!0),t.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=Oy,a.onload=function(u){if(!a.status||a.status>=200&&a.status<300){const l=t.getType();let c;l=="json"||l=="text"?c=a.responseText:l=="xml"?(c=a.responseXML,c||(c=new DOMParser().parseFromString(a.responseText,"application/xml"))):l=="arraybuffer"&&(c=a.response),c?s(t.readFeatures(c,{extent:e,featureProjection:r}),t.readProjection(c)):o()}else o()},a.onerror=o,a.send()}function Nf(i,t){return function(e,n,r,s,o){const a=this;Ay(i,t,e,n,r,function(u,l){a.addFeatures(u),s!==void 0&&s(u)},o||Rs)}}class Er extends _t{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class Dy extends Py{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=Rs,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(ue(this.format_,7),this.loader_=Nf(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:My;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new wf:null,this.loadedExtentsRtree_=new wf,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,r;Array.isArray(t.features)?r=t.features:t.features&&(n=t.features,r=n.getArray()),!e&&n===void 0&&(n=new xp(r)),r!==void 0&&this.addFeaturesInternal(r),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=ge(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const r=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(r,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Er(ni.ADDFEATURE,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[Jn(e,Rn.CHANGE,this.handleFeatureChange_,this),Jn(e,wo.PROPERTYCHANGE,this.handleFeatureChange_,this)]}addToIndex_(t,e){let n=!0;const r=e.getId();return r!==void 0&&(r.toString()in this.idIndex_?n=!1:this.idIndex_[r.toString()]=e),n&&(ue(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],r=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],u=ge(a);this.addToIndex_(u,a)&&n.push(a)}for(let s=0,o=n.length;s<o;s++){const a=n[s],u=ge(a);this.setupChangeEvents_(u,a);const l=a.getGeometry();if(l){const c=l.getExtent();e.push(c),r.push(a)}else this.nullGeometryFeatures_[u]=a}if(this.featuresRtree_&&this.featuresRtree_.load(e,r),this.hasListener(ni.ADDFEATURE))for(let s=0,o=n.length;s<o;s++)this.dispatchEvent(new Er(ni.ADDFEATURE,n[s]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(ni.ADDFEATURE,function(n){e||(e=!0,t.push(n.feature),e=!1)}),this.addEventListener(ni.REMOVEFEATURE,function(n){e||(e=!0,t.remove(n.feature),e=!1)}),t.addEventListener(Os.ADD,n=>{e||(e=!0,this.addFeature(n.element),e=!1)}),t.addEventListener(Os.REMOVE,n=>{e||(e=!0,this.removeFeature(n.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(const n in this.featureChangeKeys_)this.featureChangeKeys_[n].forEach(Qn);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=r=>{this.removeFeatureInternal(r)};this.featuresRtree_.forEach(n);for(const r in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[r])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new Er(ni.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){const n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(r){if(r.getGeometry().intersectsCoordinate(t))return e(r)})}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(n){if(n.getGeometry().intersectsExtent(t)){const s=e(n);if(s)return s}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),No(this.nullGeometryFeatures_)||Fi(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(n){e.push(n)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const r=rp(t,e);return[].concat(...r.map(s=>this.featuresRtree_.getInExtent(s)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],r=t[1];let s=null;const o=[NaN,NaN];let a=1/0;const u=[-1/0,-1/0,1/0,1/0];return e=e||xd,this.featuresRtree_.forEachInExtent(u,function(l){if(e(l)){const c=l.getGeometry(),h=a;if(a=c.closestPointXY(n,r,o,a),a<h){s=l;const f=Math.sqrt(a);u[0]=n-f,u[1]=r-f,u[2]=n+f,u[3]=r+f}}}),s}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return e!==void 0?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return e!==void 0?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,n=ge(e),r=e.getGeometry();if(!r)n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);else{const o=r.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(o,e)):this.featuresRtree_&&this.featuresRtree_.update(o,e)}const s=e.getId();if(s!==void 0){const o=s.toString();this.idIndex_[o]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[o]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[n]=e;this.changed(),this.dispatchEvent(new Er(ni.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return e!==void 0?e in this.idIndex_:ge(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&No(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(t,e,n){const r=this.loadedExtentsRtree_,s=this.strategy_(t,e,n);for(let o=0,a=s.length;o<a;++o){const u=s[o];r.forEachInExtent(u,function(c){return Ts(c.extent,u)})||(++this.loadingExtentsCount_,this.dispatchEvent(new Er(ni.FEATURESLOADSTART)),this.loader_.call(this,u,e,n,c=>{--this.loadingExtentsCount_,this.dispatchEvent(new Er(ni.FEATURESLOADEND,void 0,c))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Er(ni.FEATURESLOADERROR))}),r.insert(u,{extent:u.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let n;e.forEachInExtent(t,function(r){if(Yc(r.extent,t))return n=r,!0}),n&&e.remove(n)}removeFeature(t){if(!t)return;const e=ge(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=ge(t),n=this.featureChangeKeys_[e];if(!n)return;n.forEach(Qn),delete this.featureChangeKeys_[e];const r=t.getId();return r!==void 0&&delete this.idIndex_[r.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Er(ni.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e}setLoader(t){this.loader_=t}setUrl(t){ue(this.format_,7),this.url_=t,this.setLoader(Nf(t,this.format_))}}const Fy=Dy;let ky=class Rc extends _h{constructor(t){super(),this.geometries_=t||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Qn),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(this.geometries_)for(let t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(Jn(this.geometries_[t],Rn.CHANGE,this.changed,this))}clone(){const t=new Rc(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t}closestPointXY(t,e,n,r){if(r<Xr(this.getExtent(),t,e))return r;const s=this.geometries_;for(let o=0,a=s.length;o<a;++o)r=s[o].closestPointXY(t,e,n,r);return r}containsXY(t,e){const n=this.geometries_;for(let r=0,s=n.length;r<s;++r)if(n[r].containsXY(t,e))return!0;return!1}computeExtent(t){Oa(t);const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)Zd(t,e[n].getExtent());return t}getGeometries(){return Lf(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)e[n].getType()===this.getType()?t=t.concat(e[n].getGeometriesArrayRecursive()):t.push(e[n]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=[],n=this.geometries_;let r=!1;for(let s=0,o=n.length;s<o;++s){const a=n[s],u=a.getSimplifiedGeometry(t);e.push(u),u!==a&&(r=!0)}if(r){const s=new Rc(null);return s.setGeometriesArray(e),s}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)if(e[n].intersectsExtent(t))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(t,e){const n=this.geometries_;for(let r=0,s=n.length;r<s;++r)n[r].rotate(t,e);this.changed()}scale(t,e,n){n||(n=Ps(this.getExtent()));const r=this.geometries_;for(let s=0,o=r.length;s<o;++s)r[s].scale(t,e,n);this.changed()}setGeometries(t){this.setGeometriesArray(Lf(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)e[n].applyTransform(t);this.changed()}translate(t,e){const n=this.geometries_;for(let r=0,s=n.length;r<s;++r)n[r].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}};function Lf(i){const t=[];for(let e=0,n=i.length;e<n;++e)t.push(i[e].clone());return t}const Gy=ky,bf=class Nc extends Hr{constructor(t,e,n){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&n)this.setFlatCoordinates(e,t),this.ends_=n;else{let r=this.getLayout();const s=t,o=[],a=[];for(let u=0,l=s.length;u<l;++u){const c=s[u];u===0&&(r=c.getLayout()),Fi(o,c.getFlatCoordinates()),a.push(o.length)}this.setFlatCoordinates(r,o),this.ends_=a}}appendLineString(t){this.flatCoordinates?Fi(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Nc(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<Xr(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rl(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ol(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,n,r))}getCoordinateAtM(t,e,n){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(e=e!==void 0?e:!1,n=n!==void 0?n:!1,Cm(this.flatCoordinates,0,this.ends_,this.stride,t,e,n))}getCoordinates(){return Oo(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new Ja(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){const t=this.flatCoordinates,e=this.ends_,n=this.layout,r=[];let s=0;for(let o=0,a=e.length;o<a;++o){const u=e[o],l=new Ja(t.slice(s,u),n);r.push(l),s=u}return r}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let n=0;const r=this.ends_,s=this.stride;for(let o=0,a=r.length;o<a;++o){const u=r[o],l=tf(e,n,u,s,.5);Fi(t,l),n=u}return t}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=e_(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,n),new Nc(e,"XY",n)}getType(){return"MultiLineString"}intersectsExtent(t){return u_(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=al(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}},By=class _d extends Hr{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){this.flatCoordinates?Fi(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()}clone(){const t=new _d(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){if(r<Xr(this.getExtent(),t,e))return r;const s=this.flatCoordinates,o=this.stride;for(let a=0,u=s.length;a<u;a+=o){const l=Wr(t,e,s[a],s[a+1]);if(l<r){r=l;for(let c=0;c<o;++c)n[c]=s[a+c];n.length=o}}return r}getCoordinates(){return hr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new As(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,n=this.stride,r=[];for(let s=0,o=t.length;s<o;s+=n){const a=new As(t.slice(s,s+n),e);r.push(a)}return r}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,n=this.stride;for(let r=0,s=e.length;r<s;r+=n){const o=e[r],a=e[r+1];if(Zu(t,o,a))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Ba(this.flatCoordinates,0,t,this.stride),this.changed()}};function zy(i,t,e,n){const r=[];let s=Yr();for(let o=0,a=e.length;o<a;++o){const u=e[o];s=Xc(i,t,u[0],n),r.push((s[0]+s[2])/2,(s[1]+s[3])/2),t=u[u.length-1]}return r}const Tf=class Lc extends Hr{constructor(t,e,n){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!n&&!Array.isArray(t[0])){let r=this.getLayout();const s=t,o=[],a=[];for(let u=0,l=s.length;u<l;++u){const c=s[u];u===0&&(r=c.getLayout());const h=o.length,f=c.getEnds();for(let g=0,d=f.length;g<d;++g)f[g]+=h;Fi(o,c.getFlatCoordinates()),a.push(f)}e=r,t=o,n=a}e!==void 0&&n?(this.setFlatCoordinates(e,t),this.endss_=n):this.setCoordinates(t,e)}appendPolygon(t){let e;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();else{const n=this.flatCoordinates.length;Fi(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let r=0,s=e.length;r<s;++r)e[r]+=n}this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let r=0;r<t;++r)e[r]=this.endss_[r].slice();const n=new Lc(this.flatCoordinates.slice(),this.layout,e);return n.applyProperties(this),n}closestPointXY(t,e,n,r){return r<Xr(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Jp(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Qp(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,n,r))}containsXY(t,e){return o_(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return r_(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),Lh(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,ll(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=zy(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=a_(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new By(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;f_(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Lh(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=i_(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,n),new Lc(e,"XY",n)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(t===0)e=0;else{const s=this.endss_[t-1];e=s[s.length-1]}const n=this.endss_[t].slice(),r=n[n.length-1];if(e!==0)for(let s=0,o=n.length;s<o;++s)n[s]-=e;return new Va(this.flatCoordinates.slice(e,r),this.layout,n)}getPolygons(){const t=this.layout,e=this.flatCoordinates,n=this.endss_,r=[];let s=0;for(let o=0,a=n.length;o<a;++o){const u=n[o].slice(),l=u[u.length-1];if(s!==0)for(let h=0,f=u.length;h<f;++h)u[h]-=s;const c=new Va(e.slice(s,l),t,u);r.push(c),s=l}return r}getType(){return"MultiPolygon"}intersectsExtent(t){return c_(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const n=t_(this.flatCoordinates,0,t,this.stride,this.endss_);if(n.length===0)this.flatCoordinates.length=0;else{const r=n[n.length-1];this.flatCoordinates.length=r.length===0?0:r[r.length-1]}this.changed()}};var Ue=63710088e-1,Pf={centimeters:Ue*100,centimetres:Ue*100,degrees:Ue/111325,feet:Ue*3.28084,inches:Ue*39.37,kilometers:Ue/1e3,kilometres:Ue/1e3,meters:Ue,metres:Ue,miles:Ue/1609.344,millimeters:Ue*1e3,millimetres:Ue*1e3,nauticalmiles:Ue/1852,radians:1,yards:Ue*1.0936};function su(i,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=i,n}function Vy(i,t,e){if(e===void 0&&(e={}),!i)throw new Error("coordinates is required");if(!Array.isArray(i))throw new Error("coordinates must be an Array");if(i.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Mf(i[0])||!Mf(i[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:i};return su(n,t,e)}function Xy(i,t,e){e===void 0&&(e={});for(var n=0,r=i;n<r.length;n++){var s=r[n];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:i};return su(a,t,e)}function kl(i,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=i,e}function Yy(i,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:i};return su(n,t,e)}function Uy(i,t){t===void 0&&(t="kilometers");var e=Pf[t];if(!e)throw new Error(t+" units is invalid");return i*e}function Wy(i,t){t===void 0&&(t="kilometers");var e=Pf[t];if(!e)throw new Error(t+" units is invalid");return i/e}function Mf(i){return!isNaN(i)&&i!==null&&!Array.isArray(i)}function Of(i,t,e){if(i!==null)for(var n,r,s,o,a,u,l,c=0,h=0,f,g=i.type,d=g==="FeatureCollection",p=g==="Feature",_=d?i.features.length:1,m=0;m<_;m++){l=d?i.features[m].geometry:p?i.geometry:i,f=l?l.type==="GeometryCollection":!1,a=f?l.geometries.length:1;for(var y=0;y<a;y++){var v=0,I=0;if(o=f?l.geometries[y]:l,o!==null){u=o.coordinates;var C=o.type;switch(c=e&&(C==="Polygon"||C==="MultiPolygon")?1:0,C){case null:break;case"Point":if(t(u,h,m,v,I)===!1)return!1;h++,v++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(t(u[n],h,m,v,I)===!1)return!1;h++,C==="MultiPoint"&&v++}C==="LineString"&&v++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(r=0;r<u[n].length-c;r++){if(t(u[n][r],h,m,v,I)===!1)return!1;h++}C==="MultiLineString"&&v++,C==="Polygon"&&I++}C==="Polygon"&&v++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(I=0,r=0;r<u[n].length;r++){for(s=0;s<u[n][r].length-c;s++){if(t(u[n][r][s],h,m,v,I)===!1)return!1;h++}I++}v++}break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(Of(o.geometries[n],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Af(i,t){if(i.type==="Feature")t(i,0);else if(i.type==="FeatureCollection")for(var e=0;e<i.features.length&&t(i.features[e],e)!==!1;e++);}function Df(i,t){var e,n,r,s,o,a,u,l,c,h,f=0,g=i.type==="FeatureCollection",d=i.type==="Feature",p=g?i.features.length:1;for(e=0;e<p;e++){for(a=g?i.features[e].geometry:d?i.geometry:i,l=g?i.features[e].properties:d?i.properties:{},c=g?i.features[e].bbox:d?i.bbox:void 0,h=g?i.features[e].id:d?i.id:void 0,u=a?a.type==="GeometryCollection":!1,o=u?a.geometries.length:1,r=0;r<o;r++){if(s=u?a.geometries[r]:a,s===null){if(t(null,f,l,c,h)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(s,f,l,c,h)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<s.geometries.length;n++)if(t(s.geometries[n],f,l,c,h)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}f++}}function Gl(i){var t=[1/0,1/0,-1/0,-1/0];return Of(i,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}Gl.default=Gl;function qy(i,t){t===void 0&&(t={});var e=Gl(i),n=(e[0]+e[2])/2,r=(e[1]+e[3])/2;return Vy([n,r],t.properties,t)}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,r=1 in arguments&&parseInt(Number(arguments[1]),10)||0;r=r<0?Math.max(n+r,0):Math.min(r,n);var s=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:n;for(s=s<0?Math.max(n+arguments[2],0):Math.min(s,n);r<s;)e[r]=t,++r;return e},writable:!0}),Number.isFinite=Number.isFinite||function(i){return typeof i=="number"&&isFinite(i)},Number.isInteger=Number.isInteger||function(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(i){return i!==i},Math.trunc=Math.trunc||function(i){return i<0?Math.ceil(i):Math.floor(i)};var ns=function(){};ns.prototype.interfaces_=function(){return[]},ns.prototype.getClass=function(){return ns},ns.prototype.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n};var xt=function(i){function t(e){i.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=new i().stack}return i&&(t.__proto__=i),t.prototype=Object.create(i&&i.prototype),t.prototype.constructor=t,t}(Error),H=function(){},Ff={MAX_VALUE:{configurable:!0}};H.isNaN=function(t){return Number.isNaN(t)},H.doubleToLongBits=function(t){return t},H.longBitsToDouble=function(t){return t},H.isInfinite=function(t){return!Number.isFinite(t)},Ff.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(H,Ff);var rn=function(){},ou=function(){},Us=function(){};function sn(){}var E=function i(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=i.NULL_ORDINATE;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.z=t.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=i.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},is={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};E.prototype.setOrdinate=function(t,e){switch(t){case E.X:this.x=e;break;case E.Y:this.y=e;break;case E.Z:this.z=e;break;default:throw new xt("Invalid ordinate index: "+t)}},E.prototype.equals2D=function(){if(arguments.length===1){var t=arguments[0];return!(this.x!==t.x||this.y!==t.y)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return!(!ns.equalsWithTolerance(this.x,e.x,n)||!ns.equalsWithTolerance(this.y,e.y,n))}},E.prototype.getOrdinate=function(t){switch(t){case E.X:return this.x;case E.Y:return this.y;case E.Z:return this.z}throw new xt("Invalid ordinate index: "+t)},E.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||H.isNaN(this.z))&&H.isNaN(t.z)},E.prototype.equals=function(t){return t instanceof E?this.equals2D(t):!1},E.prototype.equalInZ=function(t,e){return ns.equalsWithTolerance(this.z,t.z,e)},E.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},E.prototype.clone=function(){},E.prototype.copy=function(){return new E(this)},E.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},E.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)},E.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},E.prototype.hashCode=function(){var t=17;return t=37*t+E.hashCode(this.x),t=37*t+E.hashCode(this.y),t},E.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},E.prototype.interfaces_=function(){return[rn,ou,sn]},E.prototype.getClass=function(){return E},E.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=H.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},is.DimensionalComparator.get=function(){return Wi},is.serialVersionUID.get=function(){return 6683108902428367e3},is.NULL_ORDINATE.get=function(){return H.NaN},is.X.get=function(){return 0},is.Y.get=function(){return 1},is.Z.get=function(){return 2},Object.defineProperties(E,is);var Wi=function(t){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new xt("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}};Wi.prototype.compare=function(t,e){var n=t,r=e,s=Wi.compare(n.x,r.x);if(s!==0)return s;var o=Wi.compare(n.y,r.y);if(o!==0)return o;if(this._dimensionsToTest<=2)return 0;var a=Wi.compare(n.z,r.z);return a},Wi.prototype.interfaces_=function(){return[Us]},Wi.prototype.getClass=function(){return Wi},Wi.compare=function(t,e){return t<e?-1:t>e?1:H.isNaN(t)?H.isNaN(e)?0:-1:H.isNaN(e)?1:0};var Ws=function(){};Ws.prototype.create=function(){},Ws.prototype.interfaces_=function(){return[]},Ws.prototype.getClass=function(){return Ws};var x=function(){},Jo={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};x.prototype.interfaces_=function(){return[]},x.prototype.getClass=function(){return x},x.toLocationSymbol=function(t){switch(t){case x.EXTERIOR:return"e";case x.BOUNDARY:return"b";case x.INTERIOR:return"i";case x.NONE:return"-"}throw new xt("Unknown location value: "+t)},Jo.INTERIOR.get=function(){return 0},Jo.BOUNDARY.get=function(){return 1},Jo.EXTERIOR.get=function(){return 2},Jo.NONE.get=function(){return-1},Object.defineProperties(x,Jo);var q=function(i,t){return i.interfaces_&&i.interfaces_().indexOf(t)>-1},We=function(){},kf={LOG_10:{configurable:!0}};We.prototype.interfaces_=function(){return[]},We.prototype.getClass=function(){return We},We.log10=function(t){var e=Math.log(t);return H.isInfinite(e)||H.isNaN(e)?e:e/We.LOG_10},We.min=function(t,e,n,r){var s=t;return e<s&&(s=e),n<s&&(s=n),r<s&&(s=r),s},We.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],s=arguments[1],o=arguments[2];return r<s?s:r>o?o:r}},We.wrap=function(t,e){return t<0?e- -t%e:t%e},We.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2],r=t;return e>r&&(r=e),n>r&&(r=n),r}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],l=s;return o>l&&(l=o),a>l&&(l=a),u>l&&(l=u),l}},We.average=function(t,e){return(t+e)/2},kf.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(We,kf);var bn=function(t){this.str=t};bn.prototype.append=function(t){this.str+=t},bn.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},bn.prototype.toString=function(t){return this.str};var Tn=function(t){this.value=t};Tn.prototype.intValue=function(){return this.value},Tn.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},Tn.isNaN=function(t){return Number.isNaN(t)};var Qo=function(){};Qo.isWhitespace=function(t){return t<=32&&t>=0||t===127},Qo.toUpperCase=function(t){return t.toUpperCase()};var S=function i(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof i){var e=arguments[0];this.init(e)}else if(typeof arguments[0]=="string"){var n=arguments[0];i.call(this,i.parse(n))}}else if(arguments.length===2){var r=arguments[0],s=arguments[1];this.init(r,s)}},pn={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};S.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},S.prototype.extractSignificantDigits=function(t,e){var n=this.abs(),r=S.magnitude(n._hi),s=S.TEN.pow(r);n=n.divide(s),n.gt(S.TEN)?(n=n.divide(S.TEN),r+=1):n.lt(S.ONE)&&(n=n.multiply(S.TEN),r-=1);for(var o=r+1,a=new bn,u=S.MAX_PRINT_DIGITS-1,l=0;l<=u;l++){t&&l===o&&a.append(".");var c=Math.trunc(n._hi);if(c<0)break;var h=!1,f=0;c>9?(h=!0,f="9"):f="0"+c,a.append(f),n=n.subtract(S.valueOf(c)).multiply(S.TEN),h&&n.selfAdd(S.TEN);var g=!0,d=S.magnitude(n._hi);if(d<0&&Math.abs(d)>=u-l&&(g=!1),!g)break}return e[0]=r,a.toString()},S.prototype.sqr=function(){return this.multiply(this)},S.prototype.doubleValue=function(){return this._hi+this._lo},S.prototype.subtract=function(){if(arguments[0]instanceof S){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}},S.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},S.prototype.isZero=function(){return this._hi===0&&this._lo===0},S.prototype.selfSubtract=function(){if(arguments[0]instanceof S){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},S.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},S.prototype.min=function(t){return this.le(t)?this:t},S.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof S){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],s=null,o=null,a=null,u=null,l=null,c=null,h=null,f=null;return l=this._hi/n,c=S.SPLIT*l,s=c-l,f=S.SPLIT*n,s=c-s,o=l-s,a=f-n,h=l*n,a=f-a,u=n-a,f=s*a-h+s*u+o*a+o*u,c=(this._hi-h-f+this._lo-l*r)/n,f=l+c,this._hi=f,this._lo=l-f+c,this}},S.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},S.prototype.divide=function(){if(arguments[0]instanceof S){var t=arguments[0],e=null,n=null,r=null,s=null,o=null,a=null,u=null,l=null;o=this._hi/t._hi,a=S.SPLIT*o,e=a-o,l=S.SPLIT*t._hi,e=a-e,n=o-e,r=l-t._hi,u=o*t._hi,r=l-r,s=t._hi-r,l=e*r-u+e*s+n*r+n*s,a=(this._hi-u-l+this._lo-o*t._lo)/t._hi,l=o+a;var c=l,h=o-l+a;return new S(c,h)}else if(typeof arguments[0]=="number"){var f=arguments[0];return H.isNaN(f)?S.createNaN():S.copy(this).selfDivide(f,0)}},S.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},S.prototype.pow=function(t){if(t===0)return S.valueOf(1);var e=new S(this),n=S.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2===1&&n.selfMultiply(e),r/=2,r>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},S.prototype.ceil=function(){if(this.isNaN())return S.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new S(t,e)},S.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},S.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()},S.prototype.setValue=function(){if(arguments[0]instanceof S){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}},S.prototype.max=function(t){return this.ge(t)?this:t},S.prototype.sqrt=function(){if(this.isZero())return S.valueOf(0);if(this.isNegative())return S.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=S.valueOf(e),r=this.subtract(n.sqr()),s=r._hi*(t*.5);return n.add(s)},S.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof S){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],n=null,r=null,s=null,o=null,a=null,u=null;return s=this._hi+e,a=s-this._hi,o=s-a,o=e-a+(this._hi-o),u=o+this._lo,n=s+u,r=u+(s-n),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(arguments.length===2){var l=arguments[0],c=arguments[1],h=null,f=null,g=null,d=null,p=null,_=null,m=null,y=null;p=this._hi+l,g=this._lo+c,m=p-this._hi,y=g-this._lo,_=p-m,d=g-y,_=l-m+(this._hi-_),d=c-y+(this._lo-d),m=_+g,h=p+m,f=m+(p-h),m=d+f;var v=h+m,I=m+(h-v);return this._hi=v,this._lo=I,this}},S.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof S){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],s=null,o=null,a=null,u=null,l=null,c=null;l=S.SPLIT*this._hi,s=l-this._hi,c=S.SPLIT*n,s=l-s,o=this._hi-s,a=c-n,l=this._hi*n,a=c-a,u=n-a,c=s*a-l+s*u+o*a+o*u+(this._hi*r+this._lo*n);var h=l+c;s=l-h;var f=c+s;return this._hi=h,this._lo=f,this}},S.prototype.selfSqr=function(){return this.selfMultiply(this)},S.prototype.floor=function(){if(this.isNaN())return S.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new S(t,e)},S.prototype.negate=function(){return this.isNaN()?this:new S(-this._hi,-this._lo)},S.prototype.clone=function(){},S.prototype.multiply=function(){if(arguments[0]instanceof S){var t=arguments[0];return t.isNaN()?S.createNaN():S.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return H.isNaN(e)?S.createNaN():S.copy(this).selfMultiply(e,0)}},S.prototype.isNaN=function(){return H.isNaN(this._hi)},S.prototype.intValue=function(){return Math.trunc(this._hi)},S.prototype.toString=function(){var t=S.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},S.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,s=n;if(n.charAt(0)===".")s="0"+n;else if(r<0)s="0."+S.stringOfChar("0",-r)+n;else if(n.indexOf(".")===-1){var o=r-n.length,a=S.stringOfChar("0",o);s=n+a+".0"}return this.isNegative()?"-"+s:s},S.prototype.reciprocal=function(){var t=null,e=null,n=null,r=null,s=null,o=null,a=null,u=null;s=1/this._hi,o=S.SPLIT*s,t=o-s,u=S.SPLIT*this._hi,t=o-t,e=s-t,n=u-this._hi,a=s*this._hi,n=u-n,r=this._hi-n,u=t*n-a+t*r+e*n+e*r,o=(1-a-u-s*this._lo)/this._hi;var l=s+o,c=s-l+o;return new S(l,c)},S.prototype.toSciNotation=function(){if(this.isZero())return S.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=S.SCI_NOT_EXPONENT_CHAR+e[0];if(n.charAt(0)==="0")throw new Error("Found leading zero: "+n);var s="";n.length>1&&(s=n.substring(1));var o=n.charAt(0)+"."+s;return this.isNegative()?"-"+o+r:o+r},S.prototype.abs=function(){return this.isNaN()?S.NaN:this.isNegative()?this.negate():new S(this)},S.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},S.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},S.prototype.add=function(){if(arguments[0]instanceof S){var t=arguments[0];return S.copy(this).selfAdd(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return S.copy(this).selfAdd(e)}},S.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof S){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this._hi=n,this._lo=r}},S.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},S.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},S.prototype.trunc=function(){return this.isNaN()?S.NaN:this.isPositive()?this.floor():this.ceil()},S.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},S.prototype.interfaces_=function(){return[sn,rn,ou]},S.prototype.getClass=function(){return S},S.sqr=function(t){return S.valueOf(t).selfMultiply(t)},S.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return S.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new S(e)}},S.sqrt=function(t){return S.valueOf(t).sqrt()},S.parse=function(t){for(var e=0,n=t.length;Qo.isWhitespace(t.charAt(e));)e++;var r=!1;if(e<n){var s=t.charAt(e);(s==="-"||s==="+")&&(e++,s==="-"&&(r=!0))}for(var o=new S,a=0,u=0,l=0;!(e>=n);){var c=t.charAt(e);if(e++,Qo.isDigit(c)){var h=c-"0";o.selfMultiply(S.TEN),o.selfAdd(h),a++;continue}if(c==="."){u=a;continue}if(c==="e"||c==="E"){var f=t.substring(e);try{l=Tn.parseInt(f)}catch(m){throw m instanceof Error?new Error("Invalid exponent "+f+" in string "+t):m}finally{}break}throw new Error("Unexpected character '"+c+"' at position "+e+" in string "+t)}var g=o,d=a-u-l;if(d===0)g=o;else if(d>0){var p=S.TEN.pow(d);g=o.divide(p)}else if(d<0){var _=S.TEN.pow(-d);g=o.multiply(_)}return r?g.negate():g},S.createNaN=function(){return new S(H.NaN,H.NaN)},S.copy=function(t){return new S(t)},S.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n)),s=Math.pow(10,r);return s*10<=e&&(r+=1),r},S.stringOfChar=function(t,e){for(var n=new bn,r=0;r<e;r++)n.append(t);return n.toString()},pn.PI.get=function(){return new S(3.141592653589793,12246467991473532e-32)},pn.TWO_PI.get=function(){return new S(6.283185307179586,24492935982947064e-32)},pn.PI_2.get=function(){return new S(1.5707963267948966,6123233995736766e-32)},pn.E.get=function(){return new S(2.718281828459045,14456468917292502e-32)},pn.NaN.get=function(){return new S(H.NaN,H.NaN)},pn.EPS.get=function(){return 123259516440783e-46},pn.SPLIT.get=function(){return 134217729},pn.MAX_PRINT_DIGITS.get=function(){return 32},pn.TEN.get=function(){return S.valueOf(10)},pn.ONE.get=function(){return S.valueOf(1)},pn.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},pn.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(S,pn);var Re=function(){},Gf={DP_SAFE_EPSILON:{configurable:!0}};Re.prototype.interfaces_=function(){return[]},Re.prototype.getClass=function(){return Re},Re.orientationIndex=function(t,e,n){var r=Re.orientationIndexFilter(t,e,n);if(r<=1)return r;var s=S.valueOf(e.x).selfAdd(-t.x),o=S.valueOf(e.y).selfAdd(-t.y),a=S.valueOf(n.x).selfAdd(-e.x),u=S.valueOf(n.y).selfAdd(-e.y);return s.selfMultiply(u).selfSubtract(o.selfMultiply(a)).signum()},Re.signOfDet2x2=function(t,e,n,r){var s=t.multiply(r).selfSubtract(e.multiply(n));return s.signum()},Re.intersection=function(t,e,n,r){var s=S.valueOf(r.y).selfSubtract(n.y).selfMultiply(S.valueOf(e.x).selfSubtract(t.x)),o=S.valueOf(r.x).selfSubtract(n.x).selfMultiply(S.valueOf(e.y).selfSubtract(t.y)),a=s.subtract(o),u=S.valueOf(r.x).selfSubtract(n.x).selfMultiply(S.valueOf(t.y).selfSubtract(n.y)),l=S.valueOf(r.y).selfSubtract(n.y).selfMultiply(S.valueOf(t.x).selfSubtract(n.x)),c=u.subtract(l),h=c.selfDivide(a).doubleValue(),f=S.valueOf(t.x).selfAdd(S.valueOf(e.x).selfSubtract(t.x).selfMultiply(h)).doubleValue(),g=S.valueOf(e.x).selfSubtract(t.x).selfMultiply(S.valueOf(t.y).selfSubtract(n.y)),d=S.valueOf(e.y).selfSubtract(t.y).selfMultiply(S.valueOf(t.x).selfSubtract(n.x)),p=g.subtract(d),_=p.selfDivide(a).doubleValue(),m=S.valueOf(n.y).selfAdd(S.valueOf(r.y).selfSubtract(n.y).selfMultiply(_)).doubleValue();return new E(f,m)},Re.orientationIndexFilter=function(t,e,n){var r=null,s=(t.x-n.x)*(e.y-n.y),o=(t.y-n.y)*(e.x-n.x),a=s-o;if(s>0){if(o<=0)return Re.signum(a);r=s+o}else if(s<0){if(o>=0)return Re.signum(a);r=-s-o}else return Re.signum(a);var u=Re.DP_SAFE_EPSILON*r;return a>=u||-a>=u?Re.signum(a):2},Re.signum=function(t){return t>0?1:t<0?-1:0},Gf.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(Re,Gf);var et=function(){},$o={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};$o.X.get=function(){return 0},$o.Y.get=function(){return 1},$o.Z.get=function(){return 2},$o.M.get=function(){return 3},et.prototype.setOrdinate=function(t,e,n){},et.prototype.size=function(){},et.prototype.getOrdinate=function(t,e){},et.prototype.getCoordinate=function(){},et.prototype.getCoordinateCopy=function(t){},et.prototype.getDimension=function(){},et.prototype.getX=function(t){},et.prototype.clone=function(){},et.prototype.expandEnvelope=function(t){},et.prototype.copy=function(){},et.prototype.getY=function(t){},et.prototype.toCoordinateArray=function(){},et.prototype.interfaces_=function(){return[ou]},et.prototype.getClass=function(){return et},Object.defineProperties(et,$o);var Bf=function(){},qs=function(i){function t(){i.call(this,"Projective point not representable on the Cartesian plane.")}return i&&(t.__proto__=i),t.prototype=Object.create(i&&i.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Bf),te=function(){};te.arraycopy=function(t,e,n,r,s){for(var o=0,a=e;a<e+s;a++)n[r+o]=t[a],o++},te.getProperty=function(t){return{"line.separator":`
|