@geops/rvf-mobility-web-component 0.1.126 → 0.1.127

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.
Files changed (52) hide show
  1. package/.lintstagedrc.js +1 -1
  2. package/.vscode/settings.json +2 -0
  3. package/CHANGELOG.md +2 -10
  4. package/dist/ExportMenu-HGGM7Z53.js +229 -0
  5. package/dist/chunk-5TBO732O.js +1 -0
  6. package/dist/chunk-7SZT7G2L.js +3 -0
  7. package/dist/chunk-AOWOBR67.js +37 -0
  8. package/dist/chunk-CZ6RUAVW.js +3 -0
  9. package/dist/chunk-FK6H3RFT.js +1 -0
  10. package/dist/chunk-L5TSFF6Q.js +6 -0
  11. package/dist/chunk-W5KNTEOZ.js +1 -0
  12. package/dist/deflate-7Y7TJOU7.js +1 -0
  13. package/dist/html2canvas-HSPYX66M.js +28 -0
  14. package/dist/index.es-LIBYYWEU.js +23 -0
  15. package/dist/indexDoc.js +1 -0
  16. package/dist/jpeg-IRWWL5ZF.js +1 -0
  17. package/dist/lerc-NVL4MKRG.js +6 -0
  18. package/dist/lzw-EHQHNZB6.js +1 -0
  19. package/dist/packbits-PQSBS4GQ.js +1 -0
  20. package/dist/purify.es-4R37HRTQ.js +7 -0
  21. package/dist/raw-OK63VTT6.js +1 -0
  22. package/dist/webimage-DLGKDXZD.js +1 -0
  23. package/dist/zstd-JFJYRN7P.js +1 -0
  24. package/doc/public/ExportMenu-HGGM7Z53.js +229 -0
  25. package/doc/public/README.md +1 -1
  26. package/doc/public/chunk-5TBO732O.js +1 -0
  27. package/doc/public/chunk-7SZT7G2L.js +3 -0
  28. package/doc/public/chunk-AOWOBR67.js +37 -0
  29. package/doc/public/chunk-CZ6RUAVW.js +3 -0
  30. package/doc/public/chunk-FK6H3RFT.js +1 -0
  31. package/doc/public/chunk-L5TSFF6Q.js +6 -0
  32. package/doc/public/chunk-W5KNTEOZ.js +1 -0
  33. package/doc/public/deflate-7Y7TJOU7.js +1 -0
  34. package/doc/public/html2canvas-HSPYX66M.js +28 -0
  35. package/doc/public/index.es-LIBYYWEU.js +23 -0
  36. package/doc/public/jpeg-IRWWL5ZF.js +1 -0
  37. package/doc/public/lerc-NVL4MKRG.js +6 -0
  38. package/doc/public/lzw-EHQHNZB6.js +1 -0
  39. package/doc/public/packbits-PQSBS4GQ.js +1 -0
  40. package/doc/public/purify.es-4R37HRTQ.js +7 -0
  41. package/doc/public/raw-OK63VTT6.js +1 -0
  42. package/doc/public/webimage-DLGKDXZD.js +1 -0
  43. package/doc/public/zstd-JFJYRN7P.js +1 -0
  44. package/doc/src/app/layout.tsx +2 -2
  45. package/index.html +2 -2
  46. package/index.js +4343 -0
  47. package/package.json +3 -3
  48. package/scripts/build.mjs +1 -3
  49. package/scripts/dev.mjs +1 -4
  50. package/src/OverlayContent/OverlayContent.tsx +4 -17
  51. package/src/icons/Loading/Loading.tsx +0 -24
  52. package/src/icons/Loading/index.ts +0 -1
@@ -0,0 +1,3 @@
1
+ import{$ as qs,A as lt,B as Bn,C as wt,D as zs,E as Vs,H as Ie,I as Hn,J as Gs,K as j,L as Us,M as Be,O as jn,P as $t,Q as Ks,R as Bs,S as Hs,T as Jt,U as Ct,V as js,W as Ws,Y as Ys,Z as Xs,_ as Zs,aa as Qt,c as Ms,ca as Wn,d as Gn,g as Ps,ga as $s,ha as Br,i as Un,k as Kn,ka as Js,l as ks,la as en,m as Os,ma as Ee,n as Kr,na as Qs,oa as tn,q as Ns,r as Ds,u as at,v as qt,w as Ke,x as Fs}from"./chunk-CZ6RUAVW.js";var rn,A,ra,nu,He,ea,ia,oa,sa,Xr,Hr,jr,aa,Xn={},Zn=[],ru=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,on=Array.isArray;function Ae(n,e){for(var t in e)n[t]=e[t];return n}function Zr(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function be(n,e,t){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?rn.call(arguments,2):t),typeof n=="function"&&n.defaultProps!=null)for(o in n.defaultProps)s[o]===void 0&&(s[o]=n.defaultProps[o]);return nn(n,s,r,i,null)}function nn(n,e,t,r,i){var o={type:n,props:e,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++ra,__i:-1,__u:0};return i==null&&A.vnode!=null&&A.vnode(o),o}function qr(){return{current:null}}function ue(n){return n.children}function me(n,e){this.props=n,this.context=e}function Rt(n,e){if(e==null)return n.__?Rt(n.__,n.__i+1):null;for(var t;e<n.__k.length;e++)if((t=n.__k[e])!=null&&t.__e!=null)return t.__e;return typeof n.type=="function"?Rt(n):null}function iu(n){if(n.__P&&n.__d){var e=n.__v,t=e.__e,r=[],i=[],o=Ae({},e);o.__v=e.__v+1,A.vnode&&A.vnode(o),$r(n.__P,o,e,n.__n,n.__P.namespaceURI,32&e.__u?[t]:null,r,t??Rt(e),!!(32&e.__u),i),o.__v=e.__v,o.__.__k[o.__i]=o,ha(r,o,i),e.__e=e.__=null,o.__e!=t&&la(o)}}function la(n){if((n=n.__)!=null&&n.__c!=null)return n.__e=n.__c.base=null,n.__k.some(function(e){if(e!=null&&e.__e!=null)return n.__e=n.__c.base=e.__e}),la(n)}function Wr(n){(!n.__d&&(n.__d=!0)&&He.push(n)&&!qn.__r++||ea!=A.debounceRendering)&&((ea=A.debounceRendering)||ia)(qn)}function qn(){try{for(var n,e=1;He.length;)He.length>e&&He.sort(oa),n=He.shift(),e=He.length,iu(n)}finally{He.length=qn.__r=0}}function ca(n,e,t,r,i,o,s,a,l,c,u){var h,d,f,g,y,p,v,x=r&&r.__k||Zn,P=e.length;for(l=ou(t,e,x,l,P),h=0;h<P;h++)(f=t.__k[h])!=null&&(d=f.__i!=-1&&x[f.__i]||Xn,f.__i=h,p=$r(n,f,d,i,o,s,a,l,c,u),g=f.__e,f.ref&&d.ref!=f.ref&&(d.ref&&Jr(d.ref,null,f),u.push(f.ref,f.__c||g,f)),y==null&&g!=null&&(y=g),(v=!!(4&f.__u))||d.__k===f.__k?l=ua(f,l,n,v):typeof f.type=="function"&&p!==void 0?l=p:g&&(l=g.nextSibling),f.__u&=-7);return t.__e=y,l}function ou(n,e,t,r,i){var o,s,a,l,c,u=t.length,h=u,d=0;for(n.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=n.__k[o]=nn(null,s,null,null,null):on(s)?s=n.__k[o]=nn(ue,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=n.__k[o]=nn(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):n.__k[o]=s,l=o+d,s.__=n,s.__b=n.__b+1,a=null,(c=s.__i=su(s,t,l,h))!=-1&&(h--,(a=t[c])&&(a.__u|=2)),a==null||a.__v==null?(c==-1&&(i>u?d--:i<u&&d++),typeof s.type!="function"&&(s.__u|=4)):c!=l&&(c==l-1?d--:c==l+1?d++:(c>l?d--:d++,s.__u|=4))):n.__k[o]=null;if(h)for(o=0;o<u;o++)(a=t[o])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=Rt(a)),fa(a,a));return r}function ua(n,e,t,r){var i,o;if(typeof n.type=="function"){for(i=n.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=n,e=ua(i[o],e,t,r));return e}n.__e!=e&&(r&&(e&&n.type&&!e.parentNode&&(e=Rt(n)),t.insertBefore(n.__e,e||null)),e=n.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Se(n,e){return e=e||[],n==null||typeof n=="boolean"||(on(n)?n.some(function(t){Se(t,e)}):e.push(n)),e}function su(n,e,t,r){var i,o,s,a=n.key,l=n.type,c=e[t],u=c!=null&&(2&c.__u)==0;if(c===null&&a==null||u&&a==c.key&&l==c.type)return t;if(r>(u?1:0)){for(i=t-1,o=t+1;i>=0||o<e.length;)if((c=e[s=i>=0?i--:o++])!=null&&(2&c.__u)==0&&a==c.key&&l==c.type)return s}return-1}function ta(n,e,t){e[0]=="-"?n.setProperty(e,t??""):n[e]=t==null?"":typeof t!="number"||ru.test(e)?t:t+"px"}function Yn(n,e,t,r,i){var o,s;e:if(e=="style")if(typeof t=="string")n.style.cssText=t;else{if(typeof r=="string"&&(n.style.cssText=r=""),r)for(e in r)t&&e in t||ta(n.style,e,"");if(t)for(e in t)r&&t[e]==r[e]||ta(n.style,e,t[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(sa,"$1")),s=e.toLowerCase(),e=s in n||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),n.l||(n.l={}),n.l[e+o]=t,t?r?t.u=r.u:(t.u=Xr,n.addEventListener(e,o?jr:Hr,o)):n.removeEventListener(e,o?jr:Hr,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in n)try{n[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!="-"?n.removeAttribute(e):n.setAttribute(e,e=="popover"&&t==1?"":t))}}function na(n){return function(e){if(this.l){var t=this.l[e.type+n];if(e.t==null)e.t=Xr++;else if(e.t<t.u)return;return t(A.event?A.event(e):e)}}}function $r(n,e,t,r,i,o,s,a,l,c){var u,h,d,f,g,y,p,v,x,P,C,D,B,Z,_,w=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(l=!!(32&t.__u),o=[a=e.__e=t.__e]),(u=A.__b)&&u(e);e:if(typeof w=="function")try{if(v=e.props,x=w.prototype&&w.prototype.render,P=(u=w.contextType)&&r[u.__c],C=u?P?P.props.value:u.__:r,t.__c?p=(h=e.__c=t.__c).__=h.__E:(x?e.__c=h=new w(v,C):(e.__c=h=new me(v,C),h.constructor=w,h.render=lu),P&&P.sub(h),h.state||(h.state={}),h.__n=r,d=h.__d=!0,h.__h=[],h._sb=[]),x&&h.__s==null&&(h.__s=h.state),x&&w.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=Ae({},h.__s)),Ae(h.__s,w.getDerivedStateFromProps(v,h.__s))),f=h.props,g=h.state,h.__v=e,d)x&&w.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),x&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(x&&w.getDerivedStateFromProps==null&&v!==f&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(v,C),e.__v==t.__v||!h.__e&&h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(v,h.__s,C)===!1){e.__v!=t.__v&&(h.props=v,h.state=h.__s,h.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.some(function(L){L&&(L.__=e)}),Zn.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&s.push(h);break e}h.componentWillUpdate!=null&&h.componentWillUpdate(v,h.__s,C),x&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(f,g,y)})}if(h.context=C,h.props=v,h.__P=n,h.__e=!1,D=A.__r,B=0,x)h.state=h.__s,h.__d=!1,D&&D(e),u=h.render(h.props,h.state,h.context),Zn.push.apply(h.__h,h._sb),h._sb=[];else do h.__d=!1,D&&D(e),u=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++B<25);h.state=h.__s,h.getChildContext!=null&&(r=Ae(Ae({},r),h.getChildContext())),x&&!d&&h.getSnapshotBeforeUpdate!=null&&(y=h.getSnapshotBeforeUpdate(f,g)),Z=u!=null&&u.type===ue&&u.key==null?da(u.props.children):u,a=ca(n,on(Z)?Z:[Z],e,t,r,i,o,s,a,l,c),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),p&&(h.__E=h.__=null)}catch(L){if(e.__v=null,l||o!=null)if(L.then){for(e.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else{for(_=o.length;_--;)Zr(o[_]);Yr(e)}else e.__e=t.__e,e.__k=t.__k,L.then||Yr(e);A.__e(L,e,t)}else o==null&&e.__v==t.__v?(e.__k=t.__k,e.__e=t.__e):a=e.__e=au(t.__e,e,t,r,i,o,s,l,c);return(u=A.diffed)&&u(e),128&e.__u?void 0:a}function Yr(n){n&&(n.__c&&(n.__c.__e=!0),n.__k&&n.__k.some(Yr))}function ha(n,e,t){for(var r=0;r<t.length;r++)Jr(t[r],t[++r],t[++r]);A.__c&&A.__c(e,n),n.some(function(i){try{n=i.__h,i.__h=[],n.some(function(o){o.call(i)})}catch(o){A.__e(o,i.__v)}})}function da(n){return typeof n!="object"||n==null||n.__b>0?n:on(n)?n.map(da):Ae({},n)}function au(n,e,t,r,i,o,s,a,l){var c,u,h,d,f,g,y,p=t.props||Xn,v=e.props,x=e.type;if(x=="svg"?i="http://www.w3.org/2000/svg":x=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(c=0;c<o.length;c++)if((f=o[c])&&"setAttribute"in f==!!x&&(x?f.localName==x:f.nodeType==3)){n=f,o[c]=null;break}}if(n==null){if(x==null)return document.createTextNode(v);n=document.createElementNS(i,x,v.is&&v),a&&(A.__m&&A.__m(e,o),a=!1),o=null}if(x==null)p===v||a&&n.data==v||(n.data=v);else{if(o=o&&rn.call(n.childNodes),!a&&o!=null)for(p={},c=0;c<n.attributes.length;c++)p[(f=n.attributes[c]).name]=f.value;for(c in p)f=p[c],c=="dangerouslySetInnerHTML"?h=f:c=="children"||c in v||c=="value"&&"defaultValue"in v||c=="checked"&&"defaultChecked"in v||Yn(n,c,null,f,i);for(c in v)f=v[c],c=="children"?d=f:c=="dangerouslySetInnerHTML"?u=f:c=="value"?g=f:c=="checked"?y=f:a&&typeof f!="function"||p[c]===f||Yn(n,c,f,p[c],i);if(u)a||h&&(u.__html==h.__html||u.__html==n.innerHTML)||(n.innerHTML=u.__html),e.__k=[];else if(h&&(n.innerHTML=""),ca(e.type=="template"?n.content:n,on(d)?d:[d],e,t,r,x=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:t.__k&&Rt(t,0),a,l),o!=null)for(c=o.length;c--;)Zr(o[c]);a||(c="value",x=="progress"&&g==null?n.removeAttribute("value"):g!=null&&(g!==n[c]||x=="progress"&&!g||x=="option"&&g!=p[c])&&Yn(n,c,g,p[c],i),c="checked",y!=null&&y!=n[c]&&Yn(n,c,y,p[c],i))}return n}function Jr(n,e,t){try{if(typeof n=="function"){var r=typeof n.__u=="function";r&&n.__u(),r&&e==null||(n.__u=n(e))}else n.current=e}catch(i){A.__e(i,t)}}function fa(n,e,t){var r,i;if(A.unmount&&A.unmount(n),(r=n.ref)&&(r.current&&r.current!=n.__e||Jr(r,null,e)),(r=n.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){A.__e(o,e)}r.base=r.__P=null}if(r=n.__k)for(i=0;i<r.length;i++)r[i]&&fa(r[i],e,t||typeof n.type!="function");t||Zr(n.__e),n.__c=n.__=n.__e=void 0}function lu(n,e,t){return this.constructor(n,t)}function It(n,e,t){var r,i,o,s;e==document&&(e=document.documentElement),A.__&&A.__(n,e),i=(r=typeof t=="function")?null:t&&t.__k||e.__k,o=[],s=[],$r(e,n=(!r&&t||e).__k=be(ue,null,[n]),i||Xn,Xn,e.namespaceURI,!r&&t?[t]:i?null:e.firstChild?rn.call(e.childNodes):null,o,!r&&t?t:i?i.__e:e.firstChild,r,s),ha(o,n,s)}function Qr(n,e){It(n,e,Qr)}function ma(n,e,t){var r,i,o,s,a=Ae({},n.props);for(o in n.type&&n.type.defaultProps&&(s=n.type.defaultProps),e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o]===void 0&&s!=null?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?rn.call(arguments,2):t),nn(n.type,a,r||n.key,i||n.ref,null)}function ct(n){function e(t){var r,i;return this.getChildContext||(r=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(s){s.__e=!0,Wr(s)})},this.sub=function(o){r.add(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),s&&s.call(o)}}),t.children}return e.__c="__cC"+aa++,e.__=n,e.Provider=e.__l=(e.Consumer=function(t,r){return t.children(r)}).contextType=e,e}rn=Zn.slice,A={__e:function(n,e,t,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(n)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(n,r||{}),s=i.__d),s)return i.__E=i}catch(a){n=a}throw n}},ra=0,nu=function(n){return n!=null&&n.constructor===void 0},me.prototype.setState=function(n,e){var t;t=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Ae({},this.state),typeof n=="function"&&(n=n(Ae({},t),this.props)),n&&Ae(t,n),n!=null&&this.__v&&(e&&this._sb.push(e),Wr(this))},me.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),Wr(this))},me.prototype.render=ue,He=[],ia=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,oa=function(n,e){return n.__v.__b-e.__v.__b},qn.__r=0,sa=/(PointerCapture)$|Capture$/i,Xr=0,Hr=na(!1),jr=na(!0),aa=0;var je,H,ei,ga,At=0,wa=[],W=A,pa=W.__b,_a=W.__r,ya=W.diffed,va=W.__c,xa=W.unmount,Ea=W.__;function St(n,e){W.__h&&W.__h(H,n,At||e),At=0;var t=H.__H||(H.__H={__:[],__h:[]});return n>=t.__.length&&t.__.push({}),t.__[n]}function Jn(n){return At=1,Qn(Ca,n)}function Qn(n,e,t){var r=St(je++,2);if(r.t=n,!r.__c&&(r.__=[t?t(e):Ca(void 0,e),function(a){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,a);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=H,!H.__f)){var i=function(a,l,c){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(d){return d.__c});if(u.every(function(d){return!d.__N}))return!o||o.call(this,a,l,c);var h=r.__c.props!==a;return u.some(function(d){if(d.__N){var f=d.__[0];d.__=d.__N,d.__N=void 0,f!==d.__[0]&&(h=!0)}}),o&&o.call(this,a,l,c)||h};H.__f=!0;var o=H.shouldComponentUpdate,s=H.componentWillUpdate;H.componentWillUpdate=function(a,l,c){if(this.__e){var u=o;o=void 0,i(a,l,c),o=u}s&&s.call(this,a,l,c)},H.shouldComponentUpdate=i}return r.__N||r.__}function er(n,e){var t=St(je++,3);!W.__s&&ai(t.__H,e)&&(t.__=n,t.u=e,H.__H.__h.push(t))}function Lt(n,e){var t=St(je++,4);!W.__s&&ai(t.__H,e)&&(t.__=n,t.u=e,H.__h.push(t))}function ni(n){return At=5,ut(function(){return{current:n}},[])}function ri(n,e,t){At=6,Lt(function(){if(typeof n=="function"){var r=n(e());return function(){n(null),r&&typeof r=="function"&&r()}}if(n)return n.current=e(),function(){return n.current=null}},t==null?t:t.concat(n))}function ut(n,e){var t=St(je++,7);return ai(t.__H,e)&&(t.__=n(),t.__H=e,t.__h=n),t.__}function ii(n,e){return At=8,ut(function(){return n},e)}function ht(n){var e=H.context[n.__c],t=St(je++,9);return t.c=n,e?(t.__==null&&(t.__=!0,e.sub(H)),e.props.value):n.__}function oi(n,e){W.useDebugValue&&W.useDebugValue(e?e(n):n)}function si(){var n=St(je++,11);if(!n.__){for(var e=H.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var t=e.__m||(e.__m=[0,0]);n.__="P"+t[0]+"-"+t[1]++}return n.__}function cu(){for(var n;n=wa.shift();){var e=n.__H;if(n.__P&&e)try{e.__h.some($n),e.__h.some(ti),e.__h=[]}catch(t){e.__h=[],W.__e(t,n.__v)}}}W.__b=function(n){H=null,pa&&pa(n)},W.__=function(n,e){n&&e.__k&&e.__k.__m&&(n.__m=e.__k.__m),Ea&&Ea(n,e)},W.__r=function(n){_a&&_a(n),je=0;var e=(H=n.__c).__H;e&&(ei===H?(e.__h=[],H.__h=[],e.__.some(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.some($n),e.__h.some(ti),e.__h=[],je=0)),ei=H},W.diffed=function(n){ya&&ya(n);var e=n.__c;e&&e.__H&&(e.__H.__h.length&&(wa.push(e)!==1&&ga===W.requestAnimationFrame||((ga=W.requestAnimationFrame)||uu)(cu)),e.__H.__.some(function(t){t.u&&(t.__H=t.u),t.u=void 0})),ei=H=null},W.__c=function(n,e){e.some(function(t){try{t.__h.some($n),t.__h=t.__h.filter(function(r){return!r.__||ti(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],W.__e(r,t.__v)}}),va&&va(n,e)},W.unmount=function(n){xa&&xa(n);var e,t=n.__c;t&&t.__H&&(t.__H.__.some(function(r){try{$n(r)}catch(i){e=i}}),t.__H=void 0,e&&W.__e(e,t.__v))};var ba=typeof requestAnimationFrame=="function";function uu(n){var e,t=function(){clearTimeout(r),ba&&cancelAnimationFrame(e),setTimeout(n)},r=setTimeout(t,35);ba&&(e=requestAnimationFrame(t))}function $n(n){var e=H,t=n.__c;typeof t=="function"&&(n.__c=void 0,t()),H=e}function ti(n){var e=H;n.__c=n.__(),H=e}function ai(n,e){return!n||n.length!==e.length||e.some(function(t,r){return t!==n[r]})}function Ca(n,e){return typeof e=="function"?e(n):e}function ka(n,e){for(var t in e)n[t]=e[t];return n}function ci(n,e){for(var t in n)if(t!=="__source"&&!(t in e))return!0;for(var r in e)if(r!=="__source"&&n[r]!==e[r])return!0;return!1}function Oa(n,e){var t=e(),r=Jn({t:{__:t,u:e}}),i=r[0].t,o=r[1];return Lt(function(){i.__=t,i.u=e,li(i)&&o({t:i})},[n,t,e]),er(function(){return li(i)&&o({t:i}),n(function(){li(i)&&o({t:i})})},[n]),t}function li(n){try{return!((e=n.__)===(t=n.u())&&(e!==0||1/e==1/t)||e!=e&&t!=t)}catch{return!0}var e,t}function Na(n){n()}function Da(n){return n}function Fa(){return[!1,Na]}var za=Lt;function ui(n,e){this.props=n,this.context=e}function an(n,e){function t(i){var o=this.props.ref;return o!=i.ref&&o&&(typeof o=="function"?o(null):o.current=null),e?!e(this.props,i)||o!=i.ref:ci(this.props,i)}function r(i){return this.shouldComponentUpdate=t,be(n,i)}return r.displayName="Memo("+(n.displayName||n.name)+")",r.__f=r.prototype.isReactComponent=!0,r.type=n,r}(ui.prototype=new me).isPureReactComponent=!0,ui.prototype.shouldComponentUpdate=function(n,e){return ci(this.props,n)||ci(this.state,e)};var Ra=A.__b;A.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),Ra&&Ra(n)};var hu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function du(n){function e(t){var r=ka({},t);return delete r.ref,n(r,t.ref||null)}return e.$$typeof=hu,e.render=n,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(n.displayName||n.name)+")",e}var Ia=function(n,e){return n==null?null:Se(Se(n).map(e))},fu={map:Ia,forEach:Ia,count:function(n){return n?Se(n).length:0},only:function(n){var e=Se(n);if(e.length!==1)throw"Children.only";return e[0]},toArray:Se},mu=A.__e;A.__e=function(n,e,t,r){if(n.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=t.__e,e.__k=t.__k),i.__c(n,e)}mu(n,e,t,r)};var Aa=A.unmount;function Va(n,e,t){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),n.__c.__H=null),(n=ka({},n)).__c!=null&&(n.__c.__P===t&&(n.__c.__P=e),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(r){return Va(r,e,t)})),n}function Ga(n,e,t){return n&&t&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(r){return Ga(r,e,t)}),n.__c&&n.__c.__P===e&&(n.__e&&t.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=t)),n}function tr(){this.__u=0,this.o=null,this.__b=null}function Ua(n){var e=n.__&&n.__.__c;return e&&e.__a&&e.__a(n)}function gu(n){var e,t,r,i=null;function o(s){if(e||(e=n()).then(function(a){a&&(i=a.default||a),r=!0},function(a){t=a,r=!0}),t)throw t;if(!r)throw e;return i?be(i,s):null}return o.displayName="Lazy",o.__f=!0,o}function sn(){this.i=null,this.l=null}A.unmount=function(n){var e=n.__c;e&&(e.__z=!0),e&&e.__R&&e.__R(),e&&32&n.__u&&(n.type=null),Aa&&Aa(n)},(tr.prototype=new me).__c=function(n,e){var t=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(t);var i=Ua(r.__v),o=!1,s=function(){o||r.__z||(o=!0,t.__R=null,i?i(l):l())};t.__R=s;var a=t.__P;t.__P=null;var l=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=Ga(c,c.__c.__P,c.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.o.pop();)u.__P=a,u.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(s,s)},tr.prototype.componentWillUnmount=function(){this.o=[]},tr.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Va(this.__b,t,r.__O=r.__P)}this.__b=null}var i=e.__a&&be(ue,null,n.fallback);return i&&(i.__u&=-33),[be(ue,null,e.__a?null:n.children),i]};var Sa=function(n,e,t){if(++t[1]===t[0]&&n.l.delete(e),n.props.revealOrder&&(n.props.revealOrder[0]!=="t"||!n.l.size))for(t=n.i;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;n.i=t=t[2]}};function pu(n){return this.getChildContext=function(){return n.context},n.children}function _u(n){var e=this,t=n.h;if(e.componentWillUnmount=function(){It(null,e.v),e.v=null,e.h=null},e.h&&e.h!==t&&e.componentWillUnmount(),!e.v){for(var r=e.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;e.h=t,e.v={nodeType:1,parentNode:t,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:t.namespaceURI,insertBefore:function(i,o){this.childNodes.push(i),e.h.insertBefore(i,o)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),e.h.removeChild(i)}}}It(be(pu,{context:e.context},n.__v),e.v)}function yu(n,e){var t=be(_u,{__v:n,h:e});return t.containerInfo=e,t}(sn.prototype=new me).__a=function(n){var e=this,t=Ua(e.__v),r=e.l.get(n);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),Sa(e,n,r)):i()};t?t(o):o()}},sn.prototype.render=function(n){this.i=null,this.l=new Map;var e=Se(n.children);n.revealOrder&&n.revealOrder[0]==="b"&&e.reverse();for(var t=e.length;t--;)this.l.set(e[t],this.i=[1,0,this.i]);return n.children},sn.prototype.componentDidUpdate=sn.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(e,t){Sa(n,t,e)})};var Ka=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,vu=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,xu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Eu=/[A-Z0-9]/g,bu=typeof document<"u",wu=function(n){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(n)};function Cu(n,e,t){return e.__k==null&&(e.textContent=""),It(n,e),typeof t=="function"&&t(),n?n.__c:null}function Ru(n,e,t){return Qr(n,e),typeof t=="function"&&t(),n?n.__c:null}me.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(me.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(e){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:e})}})});var La=A.event;A.event=function(n){return La&&(n=La(n)),n.persist=function(){},n.isPropagationStopped=function(){return this.cancelBubble},n.isDefaultPrevented=function(){return this.defaultPrevented},n.nativeEvent=n};var hi,Iu={configurable:!0,get:function(){return this.class}},Ta=A.vnode;A.vnode=function(n){typeof n.type=="string"&&(function(e){var t=e.props,r=e.type,i={},o=r.indexOf("-")==-1;for(var s in t){var a=t[s];if(!(s==="value"&&"defaultValue"in t&&a==null||bu&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in t&&t.value==null?s="value":s==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?s="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||wu(t.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":xu.test(s)&&(s=l):l=s="oninput":o&&vu.test(s)?s=s.replace(Eu,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&i[s=l]&&(s="oninputCapture"),i[s]=a}}r=="select"&&(i.multiple&&Array.isArray(i.value)&&(i.value=Se(t.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),i.defaultValue!=null&&(i.value=Se(t.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value}))),t.class&&!t.className?(i.class=t.class,Object.defineProperty(i,"className",Iu)):t.className&&(i.class=i.className=t.className),e.props=i})(n),n.$$typeof=Ka,Ta&&Ta(n)};var Ma=A.__r;A.__r=function(n){Ma&&Ma(n),hi=n.__c};var Pa=A.diffed;A.diffed=function(n){Pa&&Pa(n);var e=n.props,t=n.__e;t!=null&&n.type==="textarea"&&"value"in e&&e.value!==t.value&&(t.value=e.value==null?"":e.value),hi=null};var Au={ReactCurrentDispatcher:{current:{readContext:function(n){return hi.__n[n.__c].props.value},useCallback:ii,useContext:ht,useDebugValue:oi,useDeferredValue:Da,useEffect:er,useId:si,useImperativeHandle:ri,useInsertionEffect:za,useLayoutEffect:Lt,useMemo:ut,useReducer:Qn,useRef:ni,useState:Jn,useSyncExternalStore:Oa,useTransition:Fa}}};function Su(n){return be.bind(null,n)}function nr(n){return!!n&&n.$$typeof===Ka}function Lu(n){return nr(n)&&n.type===ue}function Tu(n){return!!n&&typeof n.displayName=="string"&&n.displayName.indexOf("Memo(")==0}function Mu(n){return nr(n)?ma.apply(null,arguments):n}function Pu(n){return!!n.__k&&(It(null,n),!0)}function ku(n){return n&&(n.base||n.nodeType===1&&n)||null}var Ou=function(n,e){return n(e)},Nu=function(n,e){var t=A.debounceRendering;A.debounceRendering=function(i){return i()};var r=n(e);return A.debounceRendering=t,r},Du=nr,vf={useState:Jn,useId:si,useReducer:Qn,useEffect:er,useLayoutEffect:Lt,useInsertionEffect:za,useTransition:Fa,useDeferredValue:Da,useSyncExternalStore:Oa,startTransition:Na,useRef:ni,useImperativeHandle:ri,useMemo:ut,useCallback:ii,useContext:ht,useDebugValue:oi,version:"18.3.1",Children:fu,render:Cu,hydrate:Ru,unmountComponentAtNode:Pu,createPortal:yu,createElement:be,createContext:ct,createFactory:Su,cloneElement:Mu,createRef:qr,Fragment:ue,isValidElement:nr,isElement:Du,isFragment:Lu,isMemo:Tu,findDOMNode:ku,Component:me,PureComponent:ui,memo:an,forwardRef:du,flushSync:Nu,unstable_batchedUpdates:Ou,StrictMode:ue,Suspense:tr,SuspenseList:sn,lazy:gu,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Au};var Fu=ct({hasDetails:!1,hasGeolocation:!1,hasLayerTree:!1,hasLnp:!1,hasMapset:!1,hasNotification:!1,hasPermalink:!1,hasPrint:!1,hasRealtime:!1,hasSearch:!1,hasShare:!1,hasStations:!1,hasToolbar:!0,isEmbed:!1,isExportMenuOpen:!1,isFollowing:!1,isLayerTreeOpen:!1,isOverlayOpen:!1,isSearchOpen:!1,isShareMenuOpen:!1,isTracking:!1,notificationSupportedLanguages:[],selectedFeatures:[],setBaseLayer:n=>{},setIsFollowing:n=>{},setIsTracking:n=>{},setLinesIds:n=>{},setLinesNetworkPlanLayer:n=>{},setMap:n=>{},setMapsetLayer:n=>{},setNotificationId:n=>{},setNotificationsLayer:n=>{},setNotificationSupportedLanguages:n=>{},setPermalinkUrlSearchParams:n=>{},setPreviewNotifications:n=>{},setRealtimeLayer:n=>{},setSelectedFeature:n=>{},setSelectedFeatures:n=>{},setStation:n=>{},setStationId:n=>{},setStationsLayer:n=>{},setTrainId:n=>{}}),zu=()=>{let n=ht(Fu);if(!n)throw new Error("useMapContext must be used within a ContextProvider");return n},Rf=zu;var Vu=ct({t:(n,e)=>`${n} ${JSON.stringify(e)}`}),Gu=()=>{let n=ht(Vu);if(!n)throw new Error("useI18n must be used within a ContextProvider");return n},Lf=Gu;var Uu=0;function We(n,e,t,r,i,o){e||(e={});var s,a,l=e;if("ref"in l)for(a in l={},e)a=="ref"?s=e[a]:l[a]=e[a];var c={type:n,props:l,key:t,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Uu,__i:-1,__u:0,__source:i,__self:o};if(typeof n=="function"&&(s=n.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return A.vnode&&A.vnode(c),c}var Ku=(n,e)=>{let t=new Array(n.length+e.length);for(let r=0;r<n.length;r++)t[r]=n[r];for(let r=0;r<e.length;r++)t[n.length+r]=e[r];return t},Bu=(n,e)=>({classGroupId:n,validator:e}),Xa=(n=new Map,e=null,t)=>({nextPart:n,validators:e,classGroupId:t});var Ba=[],Hu="arbitrary..",ju=n=>{let e=Yu(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Wu(s);let a=s.split("-"),l=a[0]===""&&a.length>1?1:0;return Za(a,l,e)},getConflictingClassGroupIds:(s,a)=>{if(a){let l=r[s],c=t[s];return l?c?Ku(c,l):l:c||Ba}return t[s]||Ba}}},Za=(n,e,t)=>{if(n.length-e===0)return t.classGroupId;let i=n[e],o=t.nextPart.get(i);if(o){let c=Za(n,e+1,o);if(c)return c}let s=t.validators;if(s===null)return;let a=e===0?n.join("-"):n.slice(e).join("-"),l=s.length;for(let c=0;c<l;c++){let u=s[c];if(u.validator(a))return u.classGroupId}},Wu=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let e=n.slice(1,-1),t=e.indexOf(":"),r=e.slice(0,t);return r?Hu+r:void 0})(),Yu=n=>{let{theme:e,classGroups:t}=n;return Xu(t,e)},Xu=(n,e)=>{let t=Xa();for(let r in n){let i=n[r];fi(i,t,r,e)}return t},fi=(n,e,t,r)=>{let i=n.length;for(let o=0;o<i;o++){let s=n[o];Zu(s,e,t,r)}},Zu=(n,e,t,r)=>{if(typeof n=="string"){qu(n,e,t);return}if(typeof n=="function"){$u(n,e,t,r);return}Ju(n,e,t,r)},qu=(n,e,t)=>{let r=n===""?e:qa(e,n);r.classGroupId=t},$u=(n,e,t,r)=>{if(Qu(n)){fi(n(r),e,t,r);return}e.validators===null&&(e.validators=[]),e.validators.push(Bu(t,n))},Ju=(n,e,t,r)=>{let i=Object.entries(n),o=i.length;for(let s=0;s<o;s++){let[a,l]=i[s];fi(l,qa(e,a),t,r)}},qa=(n,e)=>{let t=n,r=e.split("-"),i=r.length;for(let o=0;o<i;o++){let s=r[o],a=t.nextPart.get(s);a||(a=Xa(),t.nextPart.set(s,a)),t=a}return t},Qu=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,eh=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=Object.create(null),r=Object.create(null),i=(o,s)=>{t[o]=s,e++,e>n&&(e=0,r=t,t=Object.create(null))};return{get(o){let s=t[o];if(s!==void 0)return s;if((s=r[o])!==void 0)return i(o,s),s},set(o,s){o in t?t[o]=s:i(o,s)}}};var th=[],Ha=(n,e,t,r,i)=>({modifiers:n,hasImportantModifier:e,baseClassName:t,maybePostfixModifierPosition:r,isExternal:i}),nh=n=>{let{prefix:e,experimentalParseClassName:t}=n,r=i=>{let o=[],s=0,a=0,l=0,c,u=i.length;for(let y=0;y<u;y++){let p=i[y];if(s===0&&a===0){if(p===":"){o.push(i.slice(l,y)),l=y+1;continue}if(p==="/"){c=y;continue}}p==="["?s++:p==="]"?s--:p==="("?a++:p===")"&&a--}let h=o.length===0?i:i.slice(l),d=h,f=!1;h.endsWith("!")?(d=h.slice(0,-1),f=!0):h.startsWith("!")&&(d=h.slice(1),f=!0);let g=c&&c>l?c-l:void 0;return Ha(o,f,d,g)};if(e){let i=e+":",o=r;r=s=>s.startsWith(i)?o(s.slice(i.length)):Ha(th,!1,s,void 0,!0)}if(t){let i=r;r=o=>t({className:o,parseClassName:i})}return r},rh=n=>{let e=new Map;return n.orderSensitiveModifiers.forEach((t,r)=>{e.set(t,1e6+r)}),t=>{let r=[],i=[];for(let o=0;o<t.length;o++){let s=t[o],a=s[0]==="[",l=e.has(s);a||l?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(s)):i.push(s)}return i.length>0&&(i.sort(),r.push(...i)),r}},ih=n=>({cache:eh(n.cacheSize),parseClassName:nh(n),sortModifiers:rh(n),...ju(n)}),oh=/\s+/,sh=(n,e)=>{let{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=e,s=[],a=n.trim().split(oh),l="";for(let c=a.length-1;c>=0;c-=1){let u=a[c],{isExternal:h,modifiers:d,hasImportantModifier:f,baseClassName:g,maybePostfixModifierPosition:y}=t(u);if(h){l=u+(l.length>0?" "+l:l);continue}let p=!!y,v=r(p?g.substring(0,y):g);if(!v){if(!p){l=u+(l.length>0?" "+l:l);continue}if(v=r(g),!v){l=u+(l.length>0?" "+l:l);continue}p=!1}let x=d.length===0?"":d.length===1?d[0]:o(d).join(":"),P=f?x+"!":x,C=P+v;if(s.indexOf(C)>-1)continue;s.push(C);let D=i(v,p);for(let B=0;B<D.length;++B){let Z=D[B];s.push(P+Z)}l=u+(l.length>0?" "+l:l)}return l},ah=(...n)=>{let e=0,t,r,i="";for(;e<n.length;)(t=n[e++])&&(r=$a(t))&&(i&&(i+=" "),i+=r);return i},$a=n=>{if(typeof n=="string")return n;let e,t="";for(let r=0;r<n.length;r++)n[r]&&(e=$a(n[r]))&&(t&&(t+=" "),t+=e);return t},lh=(n,...e)=>{let t,r,i,o,s=l=>{let c=e.reduce((u,h)=>h(u),n());return t=ih(c),r=t.cache.get,i=t.cache.set,o=a,a(l)},a=l=>{let c=r(l);if(c)return c;let u=sh(l,t);return i(l,u),u};return o=s,(...l)=>o(ah(...l))},ch=[],$=n=>{let e=t=>t[n]||ch;return e.isThemeGetter=!0,e},Ja=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qa=/^\((?:(\w[\w-]*):)?(.+)\)$/i,uh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,hh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ye=n=>uh.test(n),M=n=>!!n&&!Number.isNaN(Number(n)),Xe=n=>!!n&&Number.isInteger(Number(n)),di=n=>n.endsWith("%")&&M(n.slice(0,-1)),Oe=n=>hh.test(n),el=()=>!0,ph=n=>dh.test(n)&&!fh.test(n),mi=()=>!1,_h=n=>mh.test(n),yh=n=>gh.test(n),vh=n=>!E(n)&&!b(n),xh=n=>Ze(n,rl,mi),E=n=>Ja.test(n),dt=n=>Ze(n,il,ph),ja=n=>Ze(n,Sh,M),Eh=n=>Ze(n,sl,el),bh=n=>Ze(n,ol,mi),Wa=n=>Ze(n,tl,mi),wh=n=>Ze(n,nl,yh),rr=n=>Ze(n,al,_h),b=n=>Qa.test(n),ln=n=>ft(n,il),Ch=n=>ft(n,ol),Ya=n=>ft(n,tl),Rh=n=>ft(n,rl),Ih=n=>ft(n,nl),ir=n=>ft(n,al,!0),Ah=n=>ft(n,sl,!0),Ze=(n,e,t)=>{let r=Ja.exec(n);return r?r[1]?e(r[1]):t(r[2]):!1},ft=(n,e,t=!1)=>{let r=Qa.exec(n);return r?r[1]?e(r[1]):t:!1},tl=n=>n==="position"||n==="percentage",nl=n=>n==="image"||n==="url",rl=n=>n==="length"||n==="size"||n==="bg-size",il=n=>n==="length",Sh=n=>n==="number",ol=n=>n==="family-name",sl=n=>n==="number"||n==="weight",al=n=>n==="shadow";var Lh=()=>{let n=$("color"),e=$("font"),t=$("text"),r=$("font-weight"),i=$("tracking"),o=$("leading"),s=$("breakpoint"),a=$("container"),l=$("spacing"),c=$("radius"),u=$("shadow"),h=$("inset-shadow"),d=$("text-shadow"),f=$("drop-shadow"),g=$("blur"),y=$("perspective"),p=$("aspect"),v=$("ease"),x=$("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...C(),b,E],B=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto","contain","none"],_=()=>[b,E,l],w=()=>[Ye,"full","auto",..._()],L=()=>[Xe,"none","subgrid",b,E],ot=()=>["auto",{span:["full",Xe,b,E]},Xe,b,E],Nn=()=>[Xe,"auto",b,E],Rs=()=>["auto","min","max","fr",b,E],Fr=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],bt=()=>["start","end","center","stretch","center-safe","end-safe"],xe=()=>["auto",..._()],st=()=>[Ye,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],zr=()=>[Ye,"screen","full","dvw","lvw","svw","min","max","fit",..._()],Vr=()=>[Ye,"screen","full","lh","dvh","lvh","svh","min","max","fit",..._()],I=()=>[n,b,E],Is=()=>[...C(),Ya,Wa,{position:[b,E]}],As=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ss=()=>["auto","cover","contain",Rh,xh,{size:[b,E]}],Gr=()=>[di,ln,dt],oe=()=>["","none","full",c,b,E],se=()=>["",M,ln,dt],Dn=()=>["solid","dashed","dotted","double"],Ls=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[M,di,Ya,Wa],Ts=()=>["","none",g,b,E],Fn=()=>["none",M,b,E],zn=()=>["none",M,b,E],Ur=()=>[M,b,E],Vn=()=>[Ye,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Oe],breakpoint:[Oe],color:[el],container:[Oe],"drop-shadow":[Oe],ease:["in","out","in-out"],font:[vh],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Oe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Oe],shadow:[Oe],spacing:["px",M],text:[Oe],"text-shadow":[Oe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ye,E,b,p]}],container:["container"],columns:[{columns:[M,E,b,a]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:D()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[Xe,"auto",b,E]}],basis:[{basis:[Ye,"full","auto",a,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[M,Ye,"auto","initial","none",E]}],grow:[{grow:["",M,b,E]}],shrink:[{shrink:["",M,b,E]}],order:[{order:[Xe,"first","last","none",b,E]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:ot()}],"col-start":[{"col-start":Nn()}],"col-end":[{"col-end":Nn()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:ot()}],"row-start":[{"row-start":Nn()}],"row-end":[{"row-end":Nn()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Rs()}],"auto-rows":[{"auto-rows":Rs()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...Fr(),"normal"]}],"justify-items":[{"justify-items":[...bt(),"normal"]}],"justify-self":[{"justify-self":["auto",...bt()]}],"align-content":[{content:["normal",...Fr()]}],"align-items":[{items:[...bt(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...bt(),{baseline:["","last"]}]}],"place-content":[{"place-content":Fr()}],"place-items":[{"place-items":[...bt(),"baseline"]}],"place-self":[{"place-self":["auto",...bt()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pbs:[{pbs:_()}],pbe:[{pbe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:xe()}],mx:[{mx:xe()}],my:[{my:xe()}],ms:[{ms:xe()}],me:[{me:xe()}],mbs:[{mbs:xe()}],mbe:[{mbe:xe()}],mt:[{mt:xe()}],mr:[{mr:xe()}],mb:[{mb:xe()}],ml:[{ml:xe()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:st()}],"inline-size":[{inline:["auto",...zr()]}],"min-inline-size":[{"min-inline":["auto",...zr()]}],"max-inline-size":[{"max-inline":["none",...zr()]}],"block-size":[{block:["auto",...Vr()]}],"min-block-size":[{"min-block":["auto",...Vr()]}],"max-block-size":[{"max-block":["none",...Vr()]}],w:[{w:[a,"screen",...st()]}],"min-w":[{"min-w":[a,"screen","none",...st()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...st()]}],h:[{h:["screen","lh",...st()]}],"min-h":[{"min-h":["screen","lh","none",...st()]}],"max-h":[{"max-h":["screen","lh",...st()]}],"font-size":[{text:["base",t,ln,dt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Ah,Eh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",di,E]}],"font-family":[{font:[Ch,bh,e]}],"font-features":[{"font-features":[E]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,b,E]}],"line-clamp":[{"line-clamp":[M,"none",b,ja]}],leading:[{leading:[o,..._()]}],"list-image":[{"list-image":["none",b,E]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",b,E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Dn(),"wavy"]}],"text-decoration-thickness":[{decoration:[M,"from-font","auto",b,dt]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[M,"auto",b,E]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",b,E]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",b,E]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Is()}],"bg-repeat":[{bg:As()}],"bg-size":[{bg:Ss()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Xe,b,E],radial:["",b,E],conic:[Xe,b,E]},Ih,wh]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:Gr()}],"gradient-via-pos":[{via:Gr()}],"gradient-to-pos":[{to:Gr()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Dn(),"hidden","none"]}],"divide-style":[{divide:[...Dn(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...Dn(),"none","hidden"]}],"outline-offset":[{"outline-offset":[M,b,E]}],"outline-w":[{outline:["",M,ln,dt]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",u,ir,rr]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",h,ir,rr]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[M,dt]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",d,ir,rr]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[M,b,E]}],"mix-blend":[{"mix-blend":[...Ls(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ls()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[M]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[b,E]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[M]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Is()}],"mask-repeat":[{mask:As()}],"mask-size":[{mask:Ss()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",b,E]}],filter:[{filter:["","none",b,E]}],blur:[{blur:Ts()}],brightness:[{brightness:[M,b,E]}],contrast:[{contrast:[M,b,E]}],"drop-shadow":[{"drop-shadow":["","none",f,ir,rr]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",M,b,E]}],"hue-rotate":[{"hue-rotate":[M,b,E]}],invert:[{invert:["",M,b,E]}],saturate:[{saturate:[M,b,E]}],sepia:[{sepia:["",M,b,E]}],"backdrop-filter":[{"backdrop-filter":["","none",b,E]}],"backdrop-blur":[{"backdrop-blur":Ts()}],"backdrop-brightness":[{"backdrop-brightness":[M,b,E]}],"backdrop-contrast":[{"backdrop-contrast":[M,b,E]}],"backdrop-grayscale":[{"backdrop-grayscale":["",M,b,E]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[M,b,E]}],"backdrop-invert":[{"backdrop-invert":["",M,b,E]}],"backdrop-opacity":[{"backdrop-opacity":[M,b,E]}],"backdrop-saturate":[{"backdrop-saturate":[M,b,E]}],"backdrop-sepia":[{"backdrop-sepia":["",M,b,E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",b,E]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[M,"initial",b,E]}],ease:[{ease:["linear","initial",v,b,E]}],delay:[{delay:[M,b,E]}],animate:[{animate:["none",x,b,E]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,b,E]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:Fn()}],"rotate-x":[{"rotate-x":Fn()}],"rotate-y":[{"rotate-y":Fn()}],"rotate-z":[{"rotate-z":Fn()}],scale:[{scale:zn()}],"scale-x":[{"scale-x":zn()}],"scale-y":[{"scale-y":zn()}],"scale-z":[{"scale-z":zn()}],"scale-3d":["scale-3d"],skew:[{skew:Ur()}],"skew-x":[{"skew-x":Ur()}],"skew-y":[{"skew-y":Ur()}],transform:[{transform:[b,E,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Vn()}],"translate-x":[{"translate-x":Vn()}],"translate-y":[{"translate-y":Vn()}],"translate-z":[{"translate-z":Vn()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",b,E]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mbs":[{"scroll-mbs":_()}],"scroll-mbe":[{"scroll-mbe":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pbs":[{"scroll-pbs":_()}],"scroll-pbe":[{"scroll-pbe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",b,E]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[M,ln,dt,ja]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var or=lh(Lh);var Th="flex gap-2 text-[14px] @sm:text-[16px] @md:text-[18px] h-[32px] @sm:h-[36px] @md:h-[40px] px-[22px] @sm:px-[22.5px] @md:px-[27.5px] pt-[7px] pb-[5px] @sm:pt-[8px] @sm:pb-[6px] @md:pt-[8.5px] @md:pb-[6.5px] items-center justify-left rounded-full border font-semibold text-button cursor-pointer disabled:cursor-default",ll={primary:{classes:"border-red bg-red text-white disabled:bg-lightgrey disabled:border-lightgrey hover:bg-darkred hover:border-darkred active:bg-lightred active:border-lightred ",selectedClasses:"bg-darkred border-darkred"},secondary:{classes:"border border-current bg-white text-grey hover:text-red disabled:text-lightgrey active:text-lightred",selectedClasses:"text-red"}};function Mh({children:n,className:e,href:t,selected:r=!1,theme:i="secondary",...o}){let s=ut(()=>or(`${Th} ${ll[i].classes} ${r?ll[i].selectedClasses:""} ${e||""}`),[e,r,i]);return t?We("a",{className:s,href:t,...o,children:n}):We("button",{className:s,...o,children:n})}var cl=an(Mh);var ul='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><title>iconfont/ok</title><path fill="%237c7c7c" stroke="%237c7c7c" d="m8.998 17.999-.036-.003a1 1 0 0 1-.612-.284L2.796 12.21a1 1 0 0 1 1.408-1.42l4.84 4.793L19.241 5.246a1 1 0 0 1 1.424 1.405l-10.9 11.051A1 1 0 0 1 9 18Z"/></svg>';function kh({className:n,...e}){let t=e.checkedIconUrl||ul;return We("input",{className:or(`border-grey text-grey disabled:border-lightgrey box-border size-[20px] flex-none cursor-pointer appearance-none rounded border-2 bg-white bg-contain bg-center disabled:cursor-default ${n}`),style:{backgroundImage:e.checked&&!e.disabled?`url('${t}')`:""},...e,type:"checkbox"})}var hl=an(kh);var Ne={PROPERTYCHANGE:"propertychange"};var R={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};var gi=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}},Tt=gi;function nm(n,e,t){let r,i;t=t||cn;let o=0,s=n.length,a=!1;for(;o<s;)r=o+(s-o>>1),i=+t(n[r],e),i<0?o=r+1:(s=r,a=!i);return a?o:~o}function cn(n,e){return n>e?1:n<e?-1:0}function rm(n,e){return n<e?1:n>e?-1:0}function sr(n,e,t){if(n[0]<=e)return 0;let r=n.length;if(e<=n[r-1])return r-1;if(typeof t=="function"){for(let i=1;i<r;++i){let o=n[i];if(o===e)return i;if(o<e)return t(e,n[i-1],o)>0?i-1:i}return r-1}if(t>0){for(let i=1;i<r;++i)if(n[i]<e)return i-1;return r-1}if(t<0){for(let i=1;i<r;++i)if(n[i]<=e)return i;return r-1}for(let i=1;i<r;++i){if(n[i]==e)return i;if(n[i]<e)return n[i-1]-e<e-n[i]?i-1:i}return r-1}function im(n,e,t){for(;e<t;){let r=n[e];n[e]=n[t],n[t]=r,++e,--t}}function pi(n,e){let t=Array.isArray(e)?e:[e],r=t.length;for(let i=0;i<r;i++)n[n.length]=t[i]}function Mt(n,e){let t=n.length;if(t!==e.length)return!1;for(let r=0;r<t;r++)if(n[r]!==e[r])return!1;return!0}function mt(){return!0}function De(){return!1}function gt(){}function dl(n){let e,t,r;return function(){let i=Array.prototype.slice.call(arguments);return(!t||this!==r||!Mt(i,t))&&(r=this,t=i,e=n.apply(this,arguments)),e}}function fl(n){function e(){let t;try{t=n()}catch(r){return Promise.reject(r)}return t instanceof Promise?t:Promise.resolve(t)}return e()}var _i=class{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}};var ne=_i;var yi=class extends Tt{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,t){if(!e||!t)return;let r=this.listeners_||(this.listeners_={}),i=r[e]||(r[e]=[]);i.includes(t)||i.push(t)}dispatchEvent(e){let t=typeof e=="string",r=t?e:e.type,i=this.listeners_&&this.listeners_[r];if(!i)return;let o=t?new ne(e):e;o.target||(o.target=this.eventTarget_||this);let s=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});r in s||(s[r]=0,a[r]=0),++s[r];let l;for(let c=0,u=i.length;c<u;++c)if("handleEvent"in i[c]?l=i[c].handleEvent(o):l=i[c].call(this,o),l===!1||o.propagationStopped){l=!1;break}if(--s[r]===0){let c=a[r];for(delete a[r];c--;)this.removeEventListener(r,gt);delete s[r]}return l}disposeInternal(){this.listeners_&&Ie(this.listeners_)}getListeners(e){return this.listeners_&&this.listeners_[e]||void 0}hasListener(e){return this.listeners_?e?e in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(e,t){if(!this.listeners_)return;let r=this.listeners_[e];if(!r)return;let i=r.indexOf(t);i!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(r[i]=gt,++this.pendingRemovals_[e]):(r.splice(i,1),r.length===0&&delete this.listeners_[e]))}},Pt=yi;function k(n,e,t,r,i){if(i){let s=t;t=function(a){return n.removeEventListener(e,t),s.call(r??this,a)}}else r&&r!==n&&(t=t.bind(r));let o={target:n,type:e,listener:t};return n.addEventListener(e,t),o}function vi(n,e,t,r){return k(n,e,t,r,!0)}function U(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),Ie(n))}var kt=class extends Pt{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(R.CHANGE)}getRevision(){return this.revision_}onInternal(e,t){if(Array.isArray(e)){let r=e.length,i=new Array(r);for(let o=0;o<r;++o)i[o]=k(this,e[o],t);return i}return k(this,e,t)}onceInternal(e,t){let r;if(Array.isArray(e)){let i=e.length;r=new Array(i);for(let o=0;o<i;++o)r[o]=vi(this,e[o],t)}else r=vi(this,e,t);return t.ol_key=r,r}unInternal(e,t){let r=t.ol_key;if(r)Oh(r);else if(Array.isArray(e))for(let i=0,o=e.length;i<o;++i)this.removeEventListener(e[i],t);else this.removeEventListener(e,t)}};kt.prototype.on;kt.prototype.once;kt.prototype.un;function Oh(n){if(Array.isArray(n))for(let e=0,t=n.length;e<t;++e)U(n[e]);else U(n)}var ml=kt;function F(){throw new Error("Unimplemented abstract method.")}var Nh=0;function ge(n){return n.ol_uid||(n.ol_uid=String(++Nh))}var ar=class extends ne{constructor(e,t,r){super(e),this.key=t,this.oldValue=r}},xi=class extends ml{constructor(e){super(),this.on,this.once,this.un,ge(this),this.values_=null,e!==void 0&&this.setProperties(e)}get(e){let t;return this.values_&&this.values_.hasOwnProperty(e)&&(t=this.values_[e]),t}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(e,t){let r;r=`change:${e}`,this.hasListener(r)&&this.dispatchEvent(new ar(r,e,t)),r=Ne.PROPERTYCHANGE,this.hasListener(r)&&this.dispatchEvent(new ar(r,e,t))}addChangeListener(e,t){this.addEventListener(`change:${e}`,t)}removeChangeListener(e,t){this.removeEventListener(`change:${e}`,t)}set(e,t,r){let i=this.values_||(this.values_={});if(r)i[e]=t;else{let o=i[e];i[e]=t,o!==t&&this.notify(e,o)}}setProperties(e,t){for(let r in e)this.set(r,e[r],t)}applyProperties(e){e.values_&&Object.assign(this.values_||(this.values_={}),e.values_)}unset(e,t){if(this.values_&&e in this.values_){let r=this.values_[e];delete this.values_[e],Hn(this.values_)&&(this.values_=null),t||this.notify(e,r)}}},q=xi;var he={ANIMATING:0,INTERACTING:1};var pe={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};function G(n,e){if(!n)throw new Error(e)}function Ei(n,e,t){return(function(r,i,o,s,a){if(!r)return;if(!i&&!e)return r;let l=e?0:o[0]*i,c=e?0:o[1]*i,u=a?a[0]:0,h=a?a[1]:0,d=n[0]+l/2+u,f=n[2]-l/2+u,g=n[1]+c/2+h,y=n[3]-c/2+h;d>f&&(d=(f+d)/2,f=d),g>y&&(g=(y+g)/2,y=g);let p=j(r[0],d,f),v=j(r[1],g,y);if(s&&t&&i){let x=30*i;p+=-x*Math.log(1+Math.max(0,d-r[0])/x)+x*Math.log(1+Math.max(0,r[0]-f)/x),v+=-x*Math.log(1+Math.max(0,g-r[1])/x)+x*Math.log(1+Math.max(0,r[1]-y)/x)}return[p,v]})}function gl(n){return n}function Dh(n){return Math.pow(n,3)}function _e(n){return 1-Dh(1-n)}function pl(n){return 3*n*n-2*n*n*n}function _l(n){return n}var Om=new Array(6);function Ot(){return[1,0,0,1,0,0]}function Nm(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n}function bi(n,e){let t=e[0],r=e[1];return e[0]=n[0]*t+n[2]*r+n[4],e[1]=n[1]*t+n[3]*r+n[5],e}function un(n,e,t,r,i,o,s,a){let l=Math.sin(o),c=Math.cos(o);return n[0]=r*c,n[1]=i*l,n[2]=-r*l,n[3]=i*c,n[4]=s*r*c-a*r*l+e,n[5]=s*i*l+a*i*c+t,n}function Dm(n,e,t,r,i,o,s){return Vh(un(Ot(),n,e,t,r,i,o,s))}function yl(n,e){let t=Fh(e);G(t!==0,"Transformation matrix cannot be inverted");let r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5];return n[0]=s/t,n[1]=-i/t,n[2]=-o/t,n[3]=r/t,n[4]=(o*l-s*a)/t,n[5]=-(r*l-i*a)/t,n}function Fh(n){return n[0]*n[3]-n[1]*n[2]}var zh=[1e5,1e5,1e5,1e5,2,2];function Vh(n){return"matrix("+n.join(", ")+")"}function lr(n){return n.substring(7,n.length-1).split(",").map(parseFloat)}function Fm(n,e){let t=lr(n),r=lr(e);for(let i=0;i<6;++i)if(Math.round((t[i]-r[i])*zh[i])!==0)return!1;return!0}function cr(n,e,t,r,i,o,s){o=o||[],s=s||2;let a=0;for(let l=e;l<t;l+=r){let c=n[l],u=n[l+1];o[a++]=i[0]*c+i[2]*u+i[4],o[a++]=i[1]*c+i[3]*u+i[5];for(let h=2;h<s;h++)o[a++]=n[l+h]}return o&&o.length!=a&&(o.length=a),o}function vl(n,e,t,r,i,o,s){s=s||[];let a=Math.cos(i),l=Math.sin(i),c=o[0],u=o[1],h=0;for(let d=e;d<t;d+=r){let f=n[d]-c,g=n[d+1]-u;s[h++]=c+f*a-g*l,s[h++]=u+f*l+g*a;for(let y=d+2;y<d+r;++y)s[h++]=n[y]}return s&&s.length!=h&&(s.length=h),s}function xl(n,e,t,r,i,o,s,a){a=a||[];let l=s[0],c=s[1],u=0;for(let h=e;h<t;h+=r){let d=n[h]-l,f=n[h+1]-c;a[u++]=l+i*d,a[u++]=c+o*f;for(let g=h+2;g<h+r;++g)a[u++]=n[g]}return a&&a.length!=u&&(a.length=u),a}function El(n,e,t,r,i,o,s){s=s||[];let a=0;for(let l=e;l<t;l+=r){s[a++]=n[l]+i,s[a++]=n[l+1]+o;for(let c=l+2;c<l+r;++c)s[a++]=n[c]}return s&&s.length!=a&&(s.length=a),s}var bl=Ot(),Gh=[NaN,NaN],wi=class extends q{constructor(){super(),this.extent_=Un(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=dl((e,t,r)=>{if(!r)return this.getSimplifiedGeometry(t);let i=this.clone();return i.applyTransform(r),i.getSimplifiedGeometry(t)})}simplifyTransformed(e,t){return this.simplifyTransformedInternal(this.getRevision(),e,t)}clone(){return F()}closestPointXY(e,t,r,i){return F()}containsXY(e,t){return this.closestPointXY(e,t,Gh,Number.MIN_VALUE)===0}getClosestPoint(e,t){return t=t||[NaN,NaN],this.closestPointXY(e[0],e[1],t,1/0),t}intersectsCoordinate(e){return this.containsXY(e[0],e[1])}computeExtent(e){return F()}getExtent(e){if(this.extentRevision_!=this.getRevision()){let t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&Kn(t),this.extentRevision_=this.getRevision()}return zs(this.extent_,e)}rotate(e,t){F()}scale(e,t,r){F()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return F()}getType(){return F()}applyTransform(e){F()}intersectsExtent(e){return F()}translate(e,t){F()}transform(e,t){let r=Qt(e),i=r.getUnits()=="tile-pixels"?function(o,s,a){let l=r.getExtent(),c=r.getWorldExtent(),u=Ke(c)/Ke(l);un(bl,c[0],c[3],u,-u,0,0,0);let h=cr(o,0,o.length,a,bl,s),d=Br(r,t);return d?d(h,h,a):h}:Br(r,t);return this.applyTransform(i),this}},wl=wi;var Ci=class extends wl{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(e){return Os(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return F()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;let t=this.getSimplifiedGeometryInternal(e);return t.getFlatCoordinates().length<this.flatCoordinates.length?t:(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)}getSimplifiedGeometryInternal(e){return this}getStride(){return this.stride}setFlatCoordinates(e,t){this.stride=Cl(e),this.layout=e,this.flatCoordinates=t}setCoordinates(e,t){F()}setLayout(e,t,r){let i;if(e)i=Cl(e);else{for(let o=0;o<r;++o){if(t.length===0){this.layout="XY",this.stride=2;return}t=t[0]}i=t.length,e=Uh(i)}this.layout=e,this.stride=i}applyTransform(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(e,t){let r=this.getFlatCoordinates();if(r){let i=this.getStride();vl(r,0,r.length,i,e,t,r),this.changed()}}scale(e,t,r){t===void 0&&(t=e),r||(r=at(this.getExtent()));let i=this.getFlatCoordinates();if(i){let o=this.getStride();xl(i,0,i.length,o,e,t,r,i),this.changed()}}translate(e,t){let r=this.getFlatCoordinates();if(r){let i=this.getStride();El(r,0,r.length,i,e,t,r),this.changed()}}};function Uh(n){let e;return n==2?e="XY":n==3?e="XYZ":n==4&&(e="XYZM"),e}function Cl(n){let e;return n=="XY"?e=2:n=="XYZ"||n=="XYM"?e=3:n=="XYZM"&&(e=4),e}function Jm(n,e,t){let r=n.getFlatCoordinates();if(!r)return null;let i=n.getStride();return cr(r,0,r.length,i,e,t)}var Nt=Ci;function Ri(n,e,t,r){let i=0,o=n[t-r],s=n[t-r+1],a=0,l=0;for(;e<t;e+=r){let c=n[e]-o,u=n[e+1]-s;i+=l*c-a*u,a=c,l=u}return i/2}function Ii(n,e,t,r){let i=0;for(let o=0,s=t.length;o<s;++o){let a=t[o];i+=Ri(n,e,a,r),e=a}return i}function eg(n,e,t,r){let i=0;for(let o=0,s=t.length;o<s;++o){let a=t[o];i+=Ii(n,e,a,r),e=a[a.length-1]}return i}function Rl(n,e,t,r,i,o,s){let a=n[e],l=n[e+1],c=n[t]-a,u=n[t+1]-l,h;if(c===0&&u===0)h=e;else{let d=((i-a)*c+(o-l)*u)/(c*c+u*u);if(d>1)h=t;else if(d>0){for(let f=0;f<r;++f)s[f]=Ks(n[e+f],n[t+f],d);s.length=r;return}else h=e}for(let d=0;d<r;++d)s[d]=n[h+d];s.length=r}function Ai(n,e,t,r,i){let o=n[e],s=n[e+1];for(e+=r;e<t;e+=r){let a=n[e],l=n[e+1],c=Be(o,s,a,l);c>i&&(i=c),o=a,s=l}return i}function Si(n,e,t,r,i){for(let o=0,s=t.length;o<s;++o){let a=t[o];i=Ai(n,e,a,r,i),e=a}return i}function rg(n,e,t,r,i){for(let o=0,s=t.length;o<s;++o){let a=t[o];i=Si(n,e,a,r,i),e=a[a.length-1]}return i}function Li(n,e,t,r,i,o,s,a,l,c,u){if(e==t)return c;let h,d;if(i===0){if(d=Be(s,a,n[e],n[e+1]),d<c){for(h=0;h<r;++h)l[h]=n[e+h];return l.length=r,d}return c}u=u||[NaN,NaN];let f=e+r;for(;f<t;)if(Rl(n,f-r,f,r,s,a,u),d=Be(s,a,u[0],u[1]),d<c){for(c=d,h=0;h<r;++h)l[h]=u[h];l.length=r,f+=r}else f+=r*Math.max((Math.sqrt(d)-Math.sqrt(c))/i|0,1);if(o&&(Rl(n,t-r,e,r,s,a,u),d=Be(s,a,u[0],u[1]),d<c)){for(c=d,h=0;h<r;++h)l[h]=u[h];l.length=r}return c}function Ti(n,e,t,r,i,o,s,a,l,c,u){u=u||[NaN,NaN];for(let h=0,d=t.length;h<d;++h){let f=t[h];c=Li(n,e,f,r,i,o,s,a,l,c,u),e=f}return c}function ig(n,e,t,r,i,o,s,a,l,c,u){u=u||[NaN,NaN];for(let h=0,d=t.length;h<d;++h){let f=t[h];c=Ti(n,e,f,r,i,o,s,a,l,c,u),e=f[f.length-1]}return c}function Il(n,e,t,r){for(let i=0,o=t.length;i<o;++i)n[e++]=t[i];return e}function Mi(n,e,t,r){for(let i=0,o=t.length;i<o;++i){let s=t[i];for(let a=0;a<r;++a)n[e++]=s[a]}return e}function Pi(n,e,t,r,i){i=i||[];let o=0;for(let s=0,a=t.length;s<a;++s){let l=Mi(n,e,t[s],r);i[o++]=l,e=l}return i.length=o,i}function sg(n,e,t,r,i){i=i||[];let o=0;for(let s=0,a=t.length;s<a;++s){let l=Pi(n,e,t[s],r,i[o]);l.length===0&&(l[0]=e),i[o++]=l,e=l[l.length-1]}return i.length=o,i}function ki(n,e,t,r,i){i=i!==void 0?i:[];let o=0;for(let s=e;s<t;s+=r)i[o++]=n.slice(s,s+r);return i.length=o,i}function Oi(n,e,t,r,i){i=i!==void 0?i:[];let o=0;for(let s=0,a=t.length;s<a;++s){let l=t[s];i[o++]=ki(n,e,l,r,i[o]),e=l}return i.length=o,i}function lg(n,e,t,r,i){i=i!==void 0?i:[];let o=0;for(let s=0,a=t.length;s<a;++s){let l=t[s];i[o++]=l.length===1&&l[0]===e?[]:Oi(n,e,l,r,i[o]),e=l[l.length-1]}return i.length=o,i}function Ni(n,e,t,r,i,o,s){let a=(t-e)/r;if(a<3){for(;e<t;e+=r)o[s++]=n[e],o[s++]=n[e+1];return s}let l=new Array(a);l[0]=1,l[a-1]=1;let c=[e,t-r],u=0;for(;c.length>0;){let h=c.pop(),d=c.pop(),f=0,g=n[d],y=n[d+1],p=n[h],v=n[h+1];for(let x=d+r;x<h;x+=r){let P=n[x],C=n[x+1],D=Us(P,C,g,y,p,v);D>f&&(u=x,f=D)}f>i&&(l[(u-e)/r]=1,d+r<u&&c.push(d,u),u+r<h&&c.push(u,h))}for(let h=0;h<a;++h)l[h]&&(o[s++]=n[e+h*r],o[s++]=n[e+h*r+1]);return s}function hg(n,e,t,r,i,o,s,a){for(let l=0,c=t.length;l<c;++l){let u=t[l];s=Ni(n,e,u,r,i,o,s),a.push(s),e=u}return s}function Dt(n,e){return e*Math.round(n/e)}function Kh(n,e,t,r,i,o,s){if(e==t)return s;let a=Dt(n[e],i),l=Dt(n[e+1],i);e+=r,o[s++]=a,o[s++]=l;let c,u;do if(c=Dt(n[e],i),u=Dt(n[e+1],i),e+=r,e==t)return o[s++]=c,o[s++]=u,s;while(c==a&&u==l);for(;e<t;){let h=Dt(n[e],i),d=Dt(n[e+1],i);if(e+=r,h==c&&d==u)continue;let f=c-a,g=u-l,y=h-a,p=d-l;if(f*p==g*y&&(f<0&&y<f||f==y||f>0&&y>f)&&(g<0&&p<g||g==p||g>0&&p>g)){c=h,u=d;continue}o[s++]=c,o[s++]=u,a=c,l=u,c=h,u=d}return o[s++]=c,o[s++]=u,s}function Di(n,e,t,r,i,o,s,a){for(let l=0,c=t.length;l<c;++l){let u=t[l];s=Kh(n,e,u,r,i,o,s),a.push(s),e=u}return s}function dg(n,e,t,r,i,o,s,a){for(let l=0,c=t.length;l<c;++l){let u=t[l],h=[];s=Di(n,e,u,r,i,o,s,h),a.push(h),e=u[u.length-1]}return s}var Fi=class n extends Nt{constructor(e,t){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,t!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}clone(){return new n(this.flatCoordinates.slice(),this.layout)}closestPointXY(e,t,r,i){return i<Gn(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ai(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Li(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,e,t,r,i))}getArea(){return Ri(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return ki(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(e){let t=[];return t.length=Ni(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new n(t,"XY")}getType(){return"LinearRing"}intersectsExtent(e){return!1}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Mi(this.flatCoordinates,0,e,this.stride),this.changed()}},zi=Fi;var Vi=class n extends Nt{constructor(e,t){super(),this.setCoordinates(e,t)}clone(){let e=new n(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,r,i){let o=this.flatCoordinates,s=Be(e,t,o[0],o[1]);if(s<i){let a=this.stride;for(let l=0;l<a;++l)r[l]=o[l];return r.length=a,s}return i}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(e){return ks(this.flatCoordinates,e)}getType(){return"Point"}intersectsExtent(e){return Ps(e,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(e,t){this.setLayout(t,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Il(this.flatCoordinates,0,e,this.stride),this.changed()}},Al=Vi;function Sl(n,e,t,r,i){return!Ds(i,function(s){return!qe(n,e,t,r,s[0],s[1])})}function qe(n,e,t,r,i,o){let s=0,a=n[t-r],l=n[t-r+1];for(;e<t;e+=r){let c=n[e],u=n[e+1];l<=o?u>o&&(c-a)*(o-l)-(i-a)*(u-l)>0&&s++:u<=o&&(c-a)*(o-l)-(i-a)*(u-l)<0&&s--,a=c,l=u}return s!==0}function hn(n,e,t,r,i,o){if(t.length===0||!qe(n,e,t[0],r,i,o))return!1;for(let s=1,a=t.length;s<a;++s)if(qe(n,t[s-1],t[s],r,i,o))return!1;return!0}function Sg(n,e,t,r,i,o){if(t.length===0)return!1;for(let s=0,a=t.length;s<a;++s){let l=t[s];if(hn(n,e,l,r,i,o))return!0;e=l[l.length-1]}return!1}function Gi(n,e,t,r,i,o,s){let a,l,c,u,h,d,f,g=i[o+1],y=[];for(let x=0,P=t.length;x<P;++x){let C=t[x];for(u=n[C-r],d=n[C-r+1],a=e;a<C;a+=r)h=n[a],f=n[a+1],(g<=d&&f<=g||d<=g&&g<=f)&&(c=(g-d)/(f-d)*(h-u)+u,y.push(c)),u=h,d=f}let p=NaN,v=-1/0;for(y.sort(cn),u=y[0],a=1,l=y.length;a<l;++a){h=y[a];let x=Math.abs(h-u);x>v&&(c=(u+h)/2,hn(n,e,t,r,c,g)&&(p=c,v=x)),u=h}return isNaN(p)&&(p=i[o]),s?(s.push(p,g,v),s):[p,g,v]}function Pg(n,e,t,r,i){let o=[];for(let s=0,a=t.length;s<a;++s){let l=t[s];o=Gi(n,e,l,r,i,2*s,o),e=l[l.length-1]}return o}function Ll(n,e,t,r,i){let o;for(e+=r;e<t;e+=r)if(o=i(n.slice(e-r,e),n.slice(e,e+r)),o)return o;return!1}function Ui(n,e,t,r,i,o){return o=o??Ns(Un(),n,e,t,r),Bn(i,o)?o[0]>=i[0]&&o[2]<=i[2]||o[1]>=i[1]&&o[3]<=i[3]?!0:Ll(n,e,t,r,function(s,a){return Vs(i,s,a)}):!1}function zg(n,e,t,r,i){for(let o=0,s=t.length;o<s;++o){if(Ui(n,e,t[o],r,i))return!0;e=t[o]}return!1}function Bh(n,e,t,r,i){return!!(Ui(n,e,t,r,i)||qe(n,e,t,r,i[0],i[1])||qe(n,e,t,r,i[0],i[3])||qe(n,e,t,r,i[2],i[1])||qe(n,e,t,r,i[2],i[3]))}function Ki(n,e,t,r,i){if(!Bh(n,e,t[0],r,i))return!1;if(t.length===1)return!0;for(let o=1,s=t.length;o<s;++o)if(Sl(n,t[o-1],t[o],r,i)&&!Ui(n,t[o-1],t[o],r,i))return!1;return!0}function Vg(n,e,t,r,i){for(let o=0,s=t.length;o<s;++o){let a=t[o];if(Ki(n,e,a,r,i))return!0;e=a[a.length-1]}return!1}function Tl(n,e,t,r){for(;e<t-r;){for(let i=0;i<r;++i){let o=n[e+i];n[e+i]=n[t-r+i],n[t-r+i]=o}e+=r,t-=r}}function Bi(n,e,t,r){let i=0,o=n[t-r],s=n[t-r+1];for(;e<t;e+=r){let a=n[e],l=n[e+1];i+=(a-o)*(l+s),o=a,s=l}return i===0?void 0:i>0}function Hi(n,e,t,r,i){i=i!==void 0?i:!1;for(let o=0,s=t.length;o<s;++o){let a=t[o],l=Bi(n,e,a,r);if(o===0){if(i&&l||!i&&!l)return!1}else if(i&&!l||!i&&l)return!1;e=a}return!0}function Bg(n,e,t,r,i){for(let o=0,s=t.length;o<s;++o){let a=t[o];if(!Hi(n,e,a,r,i))return!1;a.length&&(e=a[a.length-1])}return!0}function ur(n,e,t,r,i){i=i!==void 0?i:!1;for(let o=0,s=t.length;o<s;++o){let a=t[o],l=Bi(n,e,a,r);(o===0?i&&l||!i&&!l:i&&!l||!i&&l)&&Tl(n,e,a,r),e=a}return e}function Hg(n,e,t,r,i){for(let o=0,s=t.length;o<s;++o)e=ur(n,e,t[o],r,i);return e}function jg(n,e){let t=[],r=0,i=0,o;for(let s=0,a=e.length;s<a;++s){let l=e[s],c=Bi(n,r,l,2);if(o===void 0&&(o=c),c===o)t.push(e.slice(i,s+1));else{if(t.length===0)continue;t[t.length-1].push(e[i])}i=s+1,r=l}return t}var Ft=class n extends Nt{constructor(e,t,r){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,t!==void 0&&r?(this.setFlatCoordinates(t,e),this.ends_=r):this.setCoordinates(e,t)}appendLinearRing(e){this.flatCoordinates?pi(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){let e=new n(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,r,i){return i<Gn(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Si(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Ti(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,t,r,i))}containsXY(e,t){return hn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,t)}getArea(){return Ii(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(e){let t;return e!==void 0?(t=this.getOrientedFlatCoordinates().slice(),ur(t,0,this.ends_,this.stride,e)):t=this.flatCoordinates,Oi(t,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){let e=at(this.getExtent());this.flatInteriorPoint_=Gi(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Al(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(e){return e<0||this.ends_.length<=e?null:new zi(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLinearRings(){let e=this.layout,t=this.flatCoordinates,r=this.ends_,i=[],o=0;for(let s=0,a=r.length;s<a;++s){let l=r[s],c=new zi(t.slice(o,l),e);i.push(c),o=l}return i}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){let e=this.flatCoordinates;Hi(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=ur(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){let t=[],r=[];return t.length=Di(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),t,0,r),new n(t,"XY",r)}getType(){return"Polygon"}intersectsExtent(e){return Ki(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);let r=Pi(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=r.length===0?0:r[r.length-1],this.changed()}},Ml=Ft;function Pl(n,e,t,r){t=t||32;let i=[];for(let o=0;o<t;++o)pi(i,Xs(n,e,2*Math.PI*o/t,r));return i.push(i[0],i[1]),new Ft(i,"XY",[i.length])}function ji(n){if(wt(n))throw new Error("Cannot create polygon from empty extent");let e=n[0],t=n[1],r=n[2],i=n[3],o=[e,t,e,i,r,i,r,t,e,t];return new Ft(o,"XY",[o.length])}function cp(n,e,t){e=e||32;let r=n.getStride(),i=n.getLayout(),o=n.getCenter(),s=r*(e+1),a=new Array(s);for(let u=0;u<s;u+=r){a[u]=0,a[u+1]=0;for(let h=2;h<r;h++)a[u+h]=o[h]}let l=[a.length],c=new Ft(a,i,l);return Hh(c,o,n.getRadius(),t),c}function Hh(n,e,t,r){let i=n.getFlatCoordinates(),o=n.getStride(),s=i.length/o-1,a=r||0;for(let l=0;l<=s;++l){let c=l*o,u=a+$t(l,s)*2*Math.PI/s;i[c]=e[0]+t*Math.cos(u),i[c+1]=e[1]+t*Math.sin(u)}n.changed()}function Wi(n,e,t,r){let i=lt(e)/t[0],o=Ke(e)/t[1];return r?Math.min(n,Math.max(i,o)):Math.min(n,Math.min(i,o))}function Yi(n,e,t){let r=Math.min(n,e),i=50;return r*=Math.log(1+i*Math.max(0,n/e-1))/i+1,t&&(r=Math.max(r,t),r/=Math.log(1+i*Math.max(0,t/n-1))/i+1),j(r,t/2,e*2)}function kl(n,e,t,r){return e=e!==void 0?e:!0,(function(i,o,s,a){if(i!==void 0){let l=n[0],c=n[n.length-1],u=t?Wi(l,t,s,r):l;if(a)return e?Yi(i,u,c):j(i,c,u);let h=Math.min(u,i),d=Math.floor(sr(n,h,o));return n[d]>u&&d<n.length-1?n[d+1]:n[d]}})}function Ol(n,e,t,r,i,o){return r=r!==void 0?r:!0,t=t!==void 0?t:0,(function(s,a,l,c){if(s!==void 0){let u=i?Wi(e,i,l,o):e;if(c)return r?Yi(s,u,t):j(s,t,u);let h=1e-9,d=Math.ceil(Math.log(e/u)/Math.log(n)-h),f=-a*(.5-h)+.5,g=Math.min(u,s),y=Math.floor(Math.log(e/g)/Math.log(n)+f),p=Math.max(d,y),v=e/Math.pow(n,p);return j(v,t,u)}})}function Xi(n,e,t,r,i){return t=t!==void 0?t:!0,(function(o,s,a,l){if(o!==void 0){let c=r?Wi(n,r,a,i):n;return!t||!l?j(o,e,c):Yi(o,c,e)}})}function zt(n){if(n!==void 0)return 0}function Zi(n){if(n!==void 0)return n}function Nl(n){let e=2*Math.PI/n;return(function(t,r){if(r)return t;if(t!==void 0)return t=Math.floor(t/e+.5)*e,t})}function Dl(n){let e=n===void 0?jn(5):n;return(function(t,r){return r||t===void 0?t:Math.abs(t)<=e?0:t})}var qi=0,Ji=class extends q{constructor(e){super(),this.on,this.once,this.un,e=Object.assign({},e),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Wn(e.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,e.projection&&Zs(),e.center&&(e.center=Ee(e.center,this.projection_)),e.extent&&(e.extent=tn(e.extent,this.projection_)),this.applyOptions_(e)}applyOptions_(e){let t=Object.assign({},e);for(let a in pe)delete t[a];this.setProperties(t,!0);let r=Wh(e);this.maxResolution_=r.maxResolution,this.minResolution_=r.minResolution,this.zoomFactor_=r.zoomFactor,this.resolutions_=e.resolutions,this.padding_=e.padding,this.minZoom_=r.minZoom;let i=jh(e),o=r.constraint,s=Yh(e);this.constraints_={center:i,resolution:o,rotation:s},this.setRotation(e.rotation!==void 0?e.rotation:0),this.setCenterInternal(e.center!==void 0?e.center:null),e.resolution!==void 0?this.setResolution(e.resolution):e.zoom!==void 0&&this.setZoom(e.zoom)}get padding(){return this.padding_}set padding(e){let t=this.padding_;this.padding_=e;let r=this.getCenterInternal();if(r){let i=e||[0,0,0,0];t=t||[0,0,0,0];let o=this.getResolution(),s=o/2*(i[3]-t[3]+t[1]-i[1]),a=o/2*(i[0]-t[0]+t[2]-i[2]);this.setCenterInternal([r[0]+s,r[1]-a])}}getUpdatedOptions_(e){let t=this.getProperties();return t.resolution!==void 0?t.resolution=this.getResolution():t.zoom=this.getZoom(),t.center=this.getCenterInternal(),t.rotation=this.getRotation(),Object.assign({},t,e)}animate(e){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);let t=new Array(arguments.length);for(let r=0;r<t.length;++r){let i=arguments[r];i.center&&(i=Object.assign({},i),i.center=Ee(i.center,this.getProjection())),i.anchor&&(i=Object.assign({},i),i.anchor=Ee(i.anchor,this.getProjection())),t[r]=i}this.animateInternal.apply(this,t)}animateInternal(e){let t=arguments.length,r;t>1&&typeof arguments[t-1]=="function"&&(r=arguments[t-1],--t);let i=0;for(;i<t&&!this.isDef();++i){let u=arguments[i];u.center&&this.setCenterInternal(u.center),u.zoom!==void 0?this.setZoom(u.zoom):u.resolution&&this.setResolution(u.resolution),u.rotation!==void 0&&this.setRotation(u.rotation)}if(i===t){r&&hr(r,!0);return}let o=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_,c=[];for(;i<t;++i){let u=arguments[i],h={start:o,complete:!1,anchor:u.anchor,duration:u.duration!==void 0?u.duration:1e3,easing:u.easing||pl,callback:r};if(u.center&&(h.sourceCenter=s,h.targetCenter=u.center.slice(),s=h.targetCenter),u.zoom!==void 0?(h.sourceResolution=a,h.targetResolution=this.getResolutionForZoom(u.zoom),a=h.targetResolution):u.resolution&&(h.sourceResolution=a,h.targetResolution=u.resolution,a=h.targetResolution),u.rotation!==void 0){h.sourceRotation=l;let d=$t(u.rotation-l+Math.PI,2*Math.PI)-Math.PI;h.targetRotation=l+d,l=h.targetRotation}Xh(h)?h.complete=!0:o+=h.duration,c.push(h)}this.animations_.push(c),this.setHint(he.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[he.ANIMATING]>0}getInteracting(){return this.hints_[he.INTERACTING]>0}cancelAnimations(){this.setHint(he.ANIMATING,-this.hints_[he.ANIMATING]);let e;for(let t=0,r=this.animations_.length;t<r;++t){let i=this.animations_[t];if(i[0].callback&&hr(i[0].callback,!1),!e)for(let o=0,s=i.length;o<s;++o){let a=i[o];if(!a.complete){e=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=e,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;let e=Date.now(),t=!1;for(let r=this.animations_.length-1;r>=0;--r){let i=this.animations_[r],o=!0;for(let s=0,a=i.length;s<a;++s){let l=i[s];if(l.complete)continue;let c=e-l.start,u=l.duration>0?c/l.duration:1;u>=1?(l.complete=!0,u=1):o=!1;let h=l.easing(u);if(l.sourceCenter){let d=l.sourceCenter[0],f=l.sourceCenter[1],g=l.targetCenter[0],y=l.targetCenter[1];this.nextCenter_=l.targetCenter;let p=d+h*(g-d),v=f+h*(y-f);this.targetCenter_=[p,v]}if(l.sourceResolution&&l.targetResolution){let d=h===1?l.targetResolution:l.sourceResolution+h*(l.targetResolution-l.sourceResolution);if(l.anchor){let f=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(d,0,f,!0);this.targetCenter_=this.calculateCenterZoom(g,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=d,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){let d=h===1?$t(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+h*(l.targetRotation-l.sourceRotation);if(l.anchor){let f=this.constraints_.rotation(d,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=d}if(this.applyTargetState_(!0),t=!0,!l.complete)break}if(o){this.animations_[r]=null,this.setHint(he.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;let s=i[0].callback;s&&hr(s,!0)}}this.animations_=this.animations_.filter(Boolean),t&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(e,t){let r,i=this.getCenterInternal();return i!==void 0&&(r=[i[0]-t[0],i[1]-t[1]],Ct(r,e-this.getRotation()),Hs(r,t)),r}calculateCenterZoom(e,t){let r,i=this.getCenterInternal(),o=this.getResolution();if(i!==void 0&&o!==void 0){let s=t[0]-e*(t[0]-i[0])/o,a=t[1]-e*(t[1]-i[1])/o;r=[s,a]}return r}getViewportSize_(e){let t=this.viewportSize_;if(e){let r=t[0],i=t[1];return[Math.abs(r*Math.cos(e))+Math.abs(i*Math.sin(e)),Math.abs(r*Math.sin(e))+Math.abs(i*Math.cos(e))]}return t}setViewportSize(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){let e=this.getCenterInternal();return e&&en(e,this.getProjection())}getCenterInternal(){return this.get(pe.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(e){return e!==void 0?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()}calculateExtent(e){let t=this.calculateExtentInternal(e);return Qs(t,this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();let t=this.getCenterInternal();G(t,"The view center is not defined");let r=this.getResolution();G(r!==void 0,"The view resolution is not defined");let i=this.getRotation();return G(i!==void 0,"The view rotation is not defined"),qt(t,r,i,e)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))}setConstrainResolution(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))}getProjection(){return this.projection_}getResolution(){return this.get(pe.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(e,t){return this.getResolutionForExtentInternal(tn(e,this.getProjection()),t)}getResolutionForExtentInternal(e,t){t=t||this.getViewportSizeMinusPadding_();let r=lt(e)/t[0],i=Ke(e)/t[1];return Math.max(r,i)}getResolutionForValueFunction(e){e=e||2;let t=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,i=Math.log(t/r)/Math.log(e);return(function(o){return t/Math.pow(e,o*i)})}getRotation(){return this.get(pe.ROTATION)}getValueForResolutionFunction(e){let t=Math.log(e||2),r=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,o=Math.log(r/i)/t;return(function(s){return Math.log(r/s)/t/o})}getViewportSizeMinusPadding_(e){let t=this.getViewportSize_(e),r=this.padding_;return r&&(t=[t[0]-r[1]-r[3],t[1]-r[0]-r[2]]),t}getState(){let e=this.getProjection(),t=this.getResolution(),r=this.getRotation(),i=this.getCenterInternal(),o=this.padding_;if(o){let s=this.getViewportSizeMinusPadding_();i=$i(i,this.getViewportSize_(),[s[0]/2+o[3],s[1]/2+o[0]],t,r)}return{center:i.slice(0),projection:e!==void 0?e:null,resolution:t,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:r,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let e,t=this.getResolution();return t!==void 0&&(e=this.getZoomForResolution(t)),e}getZoomForResolution(e){let t=this.minZoom_||0,r,i;if(this.resolutions_){let o=sr(this.resolutions_,e,1);t=o,r=this.resolutions_[o],o==this.resolutions_.length-1?i=2:i=r/this.resolutions_[o+1]}else r=this.maxResolution_,i=this.zoomFactor_;return t+Math.log(r/e)/Math.log(i)}getResolutionForZoom(e){if(this.resolutions_?.length){if(this.resolutions_.length===1)return this.resolutions_[0];let t=j(Math.floor(e),0,this.resolutions_.length-2),r=this.resolutions_[t]/this.resolutions_[t+1];return this.resolutions_[t]/Math.pow(r,j(e-t,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}fit(e,t){let r;if(G(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(e)){G(!wt(e),"Cannot fit empty extent provided as `geometry`");let i=tn(e,this.getProjection());r=ji(i)}else if(e.getType()==="Circle"){let i=tn(e.getExtent(),this.getProjection());r=ji(i),r.rotate(this.getRotation(),at(i))}else{let i=Js();i?r=e.clone().transform(i,this.getProjection()):r=e}this.fitInternal(r,t)}rotatedExtentForGeometry(e){let t=this.getRotation(),r=Math.cos(t),i=Math.sin(-t),o=e.getFlatCoordinates(),s=e.getStride(),a=1/0,l=1/0,c=-1/0,u=-1/0;for(let h=0,d=o.length;h<d;h+=s){let f=o[h]*r-o[h+1]*i,g=o[h]*i+o[h+1]*r;a=Math.min(a,f),l=Math.min(l,g),c=Math.max(c,f),u=Math.max(u,g)}return[a,l,c,u]}fitInternal(e,t){t=t||{};let r=t.size;r||(r=this.getViewportSizeMinusPadding_());let i=t.padding!==void 0?t.padding:[0,0,0,0],o=t.nearest!==void 0?t.nearest:!1,s;t.minResolution!==void 0?s=t.minResolution:t.maxZoom!==void 0?s=this.getResolutionForZoom(t.maxZoom):s=0;let a=this.rotatedExtentForGeometry(e),l=this.getResolutionForExtentInternal(a,[r[0]-i[1]-i[3],r[1]-i[0]-i[2]]);l=isNaN(l)?s:Math.max(l,s),l=this.getConstrainedResolution(l,o?0:1);let c=this.getRotation(),u=Math.sin(c),h=Math.cos(c),d=at(a);d[0]+=(i[1]-i[3])/2*l,d[1]+=(i[0]-i[2])/2*l;let f=d[0]*h-d[1]*u,g=d[1]*h+d[0]*u,y=this.getConstrainedCenter([f,g],l),p=t.callback?t.callback:gt;t.duration!==void 0?this.animateInternal({resolution:l,center:y,duration:t.duration,easing:t.easing},p):(this.targetResolution_=l,this.targetCenter_=y,this.applyTargetState_(!1,!0),hr(p,!0))}centerOn(e,t,r){this.centerOnInternal(Ee(e,this.getProjection()),t,r)}centerOnInternal(e,t,r){this.setCenterInternal($i(e,t,r,this.getResolution(),this.getRotation()))}calculateCenterShift(e,t,r,i){let o,s=this.padding_;if(s&&e){let a=this.getViewportSizeMinusPadding_(-r),l=$i(e,i,[a[0]/2+s[3],a[1]/2+s[0]],t,r);o=[e[0]-l[0],e[1]-l[1]]}return o}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(e){let t=en(this.targetCenter_,this.getProjection());this.setCenter([t[0]+e[0],t[1]+e[1]])}adjustCenterInternal(e){let t=this.targetCenter_;this.setCenterInternal([t[0]+e[0],t[1]+e[1]])}adjustResolution(e,t){t=t&&Ee(t,this.getProjection()),this.adjustResolutionInternal(e,t)}adjustResolutionInternal(e,t){let r=this.getAnimating()||this.getInteracting(),i=this.getViewportSize_(this.getRotation()),o=this.constraints_.resolution(this.targetResolution_*e,0,i,r);t&&(this.targetCenter_=this.calculateCenterZoom(o,t)),this.targetResolution_*=e,this.applyTargetState_()}adjustZoom(e,t){this.adjustResolution(Math.pow(this.zoomFactor_,-e),t)}adjustRotation(e,t){t&&(t=Ee(t,this.getProjection())),this.adjustRotationInternal(e,t)}adjustRotationInternal(e,t){let r=this.getAnimating()||this.getInteracting(),i=this.constraints_.rotation(this.targetRotation_+e,r);t&&(this.targetCenter_=this.calculateCenterRotate(i,t)),this.targetRotation_+=e,this.applyTargetState_()}setCenter(e){this.setCenterInternal(e&&Ee(e,this.getProjection()))}setCenterInternal(e){this.targetCenter_=e,this.applyTargetState_()}setHint(e,t){return this.hints_[e]+=t,this.changed(),this.hints_[e]}setResolution(e){this.targetResolution_=e,this.applyTargetState_()}setRotation(e){this.targetRotation_=e,this.applyTargetState_()}setZoom(e){this.setResolution(this.getResolutionForZoom(e))}applyTargetState_(e,t){let r=this.getAnimating()||this.getInteracting()||t,i=this.constraints_.rotation(this.targetRotation_,r),o=this.getViewportSize_(i),s=this.constraints_.resolution(this.targetResolution_,0,o,r),a=this.constraints_.center(this.targetCenter_,s,o,r,this.calculateCenterShift(this.targetCenter_,s,i,o));this.get(pe.ROTATION)!==i&&this.set(pe.ROTATION,i),this.get(pe.RESOLUTION)!==s&&(this.set(pe.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),(!a||!this.get(pe.CENTER)||!Jt(this.get(pe.CENTER),a))&&this.set(pe.CENTER,a),this.getAnimating()&&!e&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(e,t,r){e=e!==void 0?e:200;let i=t||0,o=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,i,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,o,s));if(e===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=l,this.applyTargetState_();return}r=r||(e===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==o||!this.getCenterInternal()||!Jt(this.getCenterInternal(),l))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:a,duration:e,easing:_e,anchor:r}))}beginInteraction(){this.resolveConstraints(0),this.setHint(he.INTERACTING,1)}endInteraction(e,t,r){r=r&&Ee(r,this.getProjection()),this.endInteractionInternal(e,t,r)}endInteractionInternal(e,t,r){this.getInteracting()&&(this.setHint(he.INTERACTING,-1),this.resolveConstraints(e,t,r))}getConstrainedCenter(e,t){let r=this.getViewportSize_(this.getRotation());return this.constraints_.center(e,t||this.getResolution(),r)}getConstrainedZoom(e,t){let r=this.getResolutionForZoom(e);return this.getZoomForResolution(this.getConstrainedResolution(r,t))}getConstrainedResolution(e,t){t=t||0;let r=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(e,t,r)}};function hr(n,e){setTimeout(function(){n(e)},0)}function jh(n){if(n.extent!==void 0){let t=n.smoothExtentConstraint!==void 0?n.smoothExtentConstraint:!0;return Ei(n.extent,n.constrainOnlyCenter,t)}let e=Wn(n.projection,"EPSG:3857");if(n.multiWorld!==!0&&e.isGlobal()){let t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,Ei(t,!1,!1)}return gl}function Wh(n){let e,t,r,s=n.minZoom!==void 0?n.minZoom:qi,a=n.maxZoom!==void 0?n.maxZoom:28,l=n.zoomFactor!==void 0?n.zoomFactor:2,c=n.multiWorld!==void 0?n.multiWorld:!1,u=n.smoothResolutionConstraint!==void 0?n.smoothResolutionConstraint:!0,h=n.showFullExtent!==void 0?n.showFullExtent:!1,d=Wn(n.projection,"EPSG:3857"),f=d.getExtent(),g=n.constrainOnlyCenter,y=n.extent;if(!c&&!y&&d.isGlobal()&&(g=!1,y=f),n.resolutions!==void 0){let p=n.resolutions;t=p[s],r=p[a]!==void 0?p[a]:p[p.length-1],n.constrainResolution?e=kl(p,u,!g&&y,h):e=Xi(t,r,u,!g&&y,h)}else{let v=(f?Math.max(lt(f),Ke(f)):360*Ys.degrees/d.getMetersPerUnit())/256/Math.pow(2,qi),x=v/Math.pow(2,28-qi);t=n.maxResolution,t!==void 0?s=0:t=v/Math.pow(l,s),r=n.minResolution,r===void 0&&(n.maxZoom!==void 0?n.maxResolution!==void 0?r=t/Math.pow(l,a):r=v/Math.pow(l,a):r=x),a=s+Math.floor(Math.log(t/r)/Math.log(l)),r=t/Math.pow(l,a-s),n.constrainResolution?e=Ol(l,t,r,u,!g&&y,h):e=Xi(t,r,u,!g&&y,h)}return{constraint:e,maxResolution:t,minResolution:r,minZoom:s,zoomFactor:l}}function Yh(n){if(n.enableRotation!==void 0?n.enableRotation:!0){let t=n.constrainRotation;return t===void 0||t===!0?Dl():t===!1?Zi:typeof t=="number"?Nl(t):Zi}return zt}function Xh(n){return!(n.sourceCenter&&n.targetCenter&&!Jt(n.sourceCenter,n.targetCenter)||n.sourceResolution!==n.targetResolution||n.sourceRotation!==n.targetRotation)}function $i(n,e,t,r,i){let o=Math.cos(-i),s=Math.sin(-i),a=n[0]*o-n[1]*s,l=n[1]*o+n[0]*s;a+=(e[0]/2-t[0])*r,l+=(t[1]-e[1]/2)*r,s=-s;let c=a*o-l*s,u=l*o+a*s;return[c,u]}var ye=Ji;var Le={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"};var Qi=class extends q{constructor(e){super();let t=e.element;t&&!e.target&&!t.style.pointerEvents&&(t.style.pointerEvents="auto"),this.element=t||null,this.target_=null,this.map_=null,this.listenerKeys=[],e.render&&(this.render=e.render),e.target&&this.setTarget(e.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(e){this.map_&&this.element?.remove();for(let t=0,r=this.listenerKeys.length;t<r;++t)U(this.listenerKeys[t]);if(this.listenerKeys.length=0,this.map_=e,e){let t=this.target_??e.getOverlayContainerStopEvent();this.element&&t.appendChild(this.element),this.render!==gt&&this.listenerKeys.push(k(e,Le.POSTRENDER,this.render,this)),e.render()}}render(e){}setTarget(e){this.target_=typeof e=="string"?document.getElementById(e):e}},$e=Qi;var Fe={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};var z={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};var eo=class extends q{constructor(e){super(),this.on,this.once,this.un,this.background_=e.background;let t=Object.assign({},e);typeof e.properties=="object"&&(delete t.properties,Object.assign(t,e.properties)),t[z.OPACITY]=e.opacity!==void 0?e.opacity:1,G(typeof t[z.OPACITY]=="number","Layer opacity must be a number"),t[z.VISIBLE]=e.visible!==void 0?e.visible:!0,t[z.Z_INDEX]=e.zIndex,t[z.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,t[z.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,t[z.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,t[z.MAX_ZOOM]=e.maxZoom!==void 0?e.maxZoom:1/0,this.className_=t.className!==void 0?t.className:"ol-layer",delete t.className,this.setProperties(t),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(e){let t=this.state_||{layer:this,managed:e===void 0?!0:e},r=this.getZIndex();return t.opacity=j(Math.round(this.getOpacity()*100)/100,0,1),t.visible=this.getVisible(),t.extent=this.getExtent(),t.zIndex=r===void 0&&!t.managed?1/0:r,t.maxResolution=this.getMaxResolution(),t.minResolution=Math.max(this.getMinResolution(),0),t.minZoom=this.getMinZoom(),t.maxZoom=this.getMaxZoom(),this.state_=t,t}getLayersArray(e){return F()}getLayerStatesArray(e){return F()}getExtent(){return this.get(z.EXTENT)}getMaxResolution(){return this.get(z.MAX_RESOLUTION)}getMinResolution(){return this.get(z.MIN_RESOLUTION)}getMinZoom(){return this.get(z.MIN_ZOOM)}getMaxZoom(){return this.get(z.MAX_ZOOM)}getOpacity(){return this.get(z.OPACITY)}getSourceState(){return F()}getVisible(){return this.get(z.VISIBLE)}getZIndex(){return this.get(z.Z_INDEX)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(z.EXTENT,e)}setMaxResolution(e){this.set(z.MAX_RESOLUTION,e)}setMinResolution(e){this.set(z.MIN_RESOLUTION,e)}setMaxZoom(e){this.set(z.MAX_ZOOM,e)}setMinZoom(e){this.set(z.MIN_ZOOM,e)}setOpacity(e){G(typeof e=="number","Layer opacity must be a number"),this.set(z.OPACITY,e)}setVisible(e){this.set(z.VISIBLE,e)}setZIndex(e){this.set(z.Z_INDEX,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},dr=eo;var to=class extends dr{constructor(e){let t=Object.assign({},e);delete t.source,super(t),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,e.render&&(this.render=e.render),e.map&&this.setMap(e.map),this.addChangeListener(z.SOURCE,this.handleSourcePropertyChange_);let r=e.source?e.source:null;this.setSource(r)}getLayersArray(e){return e=e||[],e.push(this),e}getLayerStatesArray(e){return e=e||[],e.push(this.getLayerState()),e}getSource(){return this.get(z.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){let e=this.getSource();return e?e.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.getSource().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(U(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;let e=this.getSource();e&&(this.sourceChangeKey_=k(e,R.CHANGE,this.handleSourceChange_,this),e.getState()==="ready"&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(e){return this.renderer_?this.renderer_.getFeatures(e):Promise.resolve([])}getData(e){return!this.renderer_||!this.rendered?null:this.renderer_.getData(e)}isVisible(e){let t,r=this.getMapInternal();!e&&r&&(e=r.getView()),e instanceof ye?t={viewState:e.getState(),extent:e.calculateExtent()}:t=e,!t.layerStatesArray&&r&&(t.layerStatesArray=r.getLayerGroup().getLayerStatesArray());let i;if(t.layerStatesArray){if(i=t.layerStatesArray.find(s=>s.layer===this),!i)return!1}else i=this.getLayerState();let o=this.getExtent();return pt(i,t.viewState)&&(!o||Bn(o,t.extent))}getAttributions(e){if(!this.isVisible(e))return[];let t=this.getSource()?.getAttributions();if(!t)return[];let r=e instanceof ye?e.getViewStateAndExtent():e,i=t(r);return Array.isArray(i)||(i=[i]),i}render(e,t){let r=this.getRenderer();return r.prepareFrame(e)?(this.rendered=!0,r.renderFrame(e,t)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(e,t){}renderDeferred(e){let t=this.getRenderer();t&&t.renderDeferred(e)}setMapInternal(e){e||this.unrender(),this.set(z.MAP,e)}getMapInternal(){return this.get(z.MAP)}setMap(e){this.mapPrecomposeKey_&&(U(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(U(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=k(e,Fe.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=k(this,R.CHANGE,e.render,e),this.changed())}handlePrecompose_(e){let t=e.frameState.layerStatesArray,r=this.getLayerState(!1);G(!t.some(i=>i.layer===r.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),t.push(r)}setSource(e){this.set(z.SOURCE,e)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}};function pt(n,e){if(!n.visible)return!1;let t=e.resolution;if(t<n.minResolution||t>=n.maxResolution)return!1;let r=e.zoom;return r>n.minZoom&&r<=n.maxZoom}var dn=to;var Zh=()=>{let n=document.createElement("div");return Object.assign(n.style,{bottom:0,fontSize:".8rem",padding:"0 10px",position:"absolute",right:0}),n},Fl=Zh;function qh(n){let e=n.filter(o=>{var s;return(s=o?.trim)===null||s===void 0?void 0:s.call(o)}),t=e.map(o=>o.toLowerCase());return[...new Set(t)].map(o=>e.find(s=>s.toLowerCase()===o))}var zl=qh;var no=class extends $e{constructor(e={}){let t=Fl();t.className=e.className||"mbt-copyright",super(Object.assign({element:t},e)),this.format=e.format||(r=>r?.join(" | "))}render({frameState:e}){if(!e){this.element.innerHTML="";return}let t=[];e?.layerStatesArray.forEach(i=>{var o;let{layer:s}=i;if(e&&pt(i,e.viewState)){let a=(o=s?.getSource())===null||o===void 0?void 0:o.getAttributions();if(a&&(t=t.concat(a(e))),s?.get("copyrights")){let l=s.get("copyrights");l=Array.isArray(l)?l:[l],l?.length&&t.push(...l)}}});let r=zl(t)||[];this.element.innerHTML=this.format(r)}},$h=no;var ae={ADD:"add",REMOVE:"remove"};var Vl={LENGTH:"length"},Vt=class extends ne{constructor(e,t,r){super(e),this.element=t,this.index=r}},ro=class extends q{constructor(e,t){if(super(),this.on,this.once,this.un,t=t||{},this.unique_=!!t.unique,this.array_=e??[],this.unique_)for(let r=1,i=this.array_.length;r<i;++r)this.assertUnique_(this.array_[r],r);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(e){for(let t=0,r=e.length;t<r;++t)this.push(e[t]);return this}forEach(e){let t=this.array_;for(let r=0,i=t.length;r<i;++r)e(t[r],r,t)}getArray(){return this.array_}item(e){return this.array_[e]}getLength(){return this.get(Vl.LENGTH)}insertAt(e,t){if(e<0||e>this.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t),this.array_.splice(e,0,t),this.updateLength_(),this.dispatchEvent(new Vt(ae.ADD,t,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){let t=this.getLength();return this.insertAt(t,e),this.getLength()}remove(e){let t=this.array_;for(let r=0,i=t.length;r<i;++r)if(t[r]===e)return this.removeAt(r)}removeAt(e){if(e<0||e>=this.getLength())return;let t=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new Vt(ae.REMOVE,t,e)),t}setAt(e,t){let r=this.getLength();if(e>=r){this.insertAt(e,t);return}if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t,e);let i=this.array_[e];this.array_[e]=t,this.dispatchEvent(new Vt(ae.REMOVE,i,e)),this.dispatchEvent(new Vt(ae.ADD,t,e))}updateLength_(){this.set(Vl.LENGTH,this.array_.length)}assertUnique_(e,t){let r=this.array_;for(let i=0,o=r.length;i<o;++i)if(r[i]===e&&i!==t)throw new Error("Duplicate item added to a unique collection")}},le=ro;var Je={ADDLAYER:"addlayer",REMOVELAYER:"removelayer"},we=class extends ne{constructor(e,t){super(e),this.layer=t}},io={LAYERS:"layers"},oo=class n extends dr{constructor(e){e=e||{};let t=Object.assign({},e);delete t.layers;let r=e.layers;super(t),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(io.LAYERS,this.handleLayersChanged_),r?Array.isArray(r)?r=new le(r.slice(),{unique:!0}):G(typeof r.getArray=="function","Expected `layers` to be an array or a `Collection`"):r=new le(void 0,{unique:!0}),this.setLayers(r)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(U),this.layersListenerKeys_.length=0;let e=this.getLayers();this.layersListenerKeys_.push(k(e,ae.ADD,this.handleLayersAdd_,this),k(e,ae.REMOVE,this.handleLayersRemove_,this));for(let r in this.listenerKeys_)this.listenerKeys_[r].forEach(U);Ie(this.listenerKeys_);let t=e.getArray();for(let r=0,i=t.length;r<i;r++){let o=t[r];this.registerLayerListeners_(o),this.dispatchEvent(new we(Je.ADDLAYER,o))}this.changed()}registerLayerListeners_(e){let t=[k(e,Ne.PROPERTYCHANGE,this.handleLayerChange_,this),k(e,R.CHANGE,this.handleLayerChange_,this)];e instanceof n&&t.push(k(e,Je.ADDLAYER,this.handleLayerGroupAdd_,this),k(e,Je.REMOVELAYER,this.handleLayerGroupRemove_,this)),this.listenerKeys_[ge(e)]=t}handleLayerGroupAdd_(e){this.dispatchEvent(new we(Je.ADDLAYER,e.layer))}handleLayerGroupRemove_(e){this.dispatchEvent(new we(Je.REMOVELAYER,e.layer))}handleLayersAdd_(e){let t=e.element;this.registerLayerListeners_(t),this.dispatchEvent(new we(Je.ADDLAYER,t)),this.changed()}handleLayersRemove_(e){let t=e.element,r=ge(t);this.listenerKeys_[r].forEach(U),delete this.listenerKeys_[r],this.dispatchEvent(new we(Je.REMOVELAYER,t)),this.changed()}getLayers(){return this.get(io.LAYERS)}setLayers(e){let t=this.getLayers();if(t){let r=t.getArray();for(let i=0,o=r.length;i<o;++i)this.dispatchEvent(new we(Je.REMOVELAYER,r[i]))}this.set(io.LAYERS,e)}getLayersArray(e){return e=e!==void 0?e:[],this.getLayers().forEach(function(t){t.getLayersArray(e)}),e}getLayerStatesArray(e){let t=e!==void 0?e:[],r=t.length;this.getLayers().forEach(function(s){s.getLayerStatesArray(t)});let i=this.getLayerState(),o=i.zIndex;!e&&i.zIndex===void 0&&(o=0);for(let s=r,a=t.length;s<a;s++){let l=t[s];l.opacity*=i.opacity,l.visible=l.visible&&i.visible,l.maxResolution=Math.min(l.maxResolution,i.maxResolution),l.minResolution=Math.max(l.minResolution,i.minResolution),l.minZoom=Math.max(l.minZoom,i.minZoom),l.maxZoom=Math.min(l.maxZoom,i.maxZoom),i.extent!==void 0&&(l.extent!==void 0?l.extent=Fs(l.extent,i.extent):l.extent=i.extent),l.zIndex===void 0&&(l.zIndex=o)}return t}getSourceState(){return"ready"}},fn=oo;var so=class extends ne{constructor(e,t,r){super(e),this.map=t,this.frameState=r!==void 0?r:null}},Qe=so;var ao=class extends Qe{constructor(e,t,r,i,o,s){super(e,t,o),this.originalEvent=r,this.pixel_=null,this.coordinate_=null,this.dragging=i!==void 0?i:!1,this.activePointers=s}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(e){this.pixel_=e}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(e){this.coordinate_=e}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}},Te=ao;var K={SINGLECLICK:"singleclick",CLICK:R.CLICK,DBLCLICK:R.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};var _t=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",Jh=_t.includes("safari")&&!_t.includes("chrom"),k_=Jh&&(_t.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(_t)),Gl=_t.includes("webkit")&&!_t.includes("edge"),lo=_t.includes("macintosh"),Ul=typeof devicePixelRatio<"u"?devicePixelRatio:1,ve=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,Kl=typeof Image<"u"&&Image.prototype.decode;var fr=(function(){let n=!1;try{let e=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return n})();var mn={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};var co=class extends Pt{constructor(e,t){super(e),this.map_=e,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=t===void 0?1:t,this.down_=null;let r=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=r,this.pointerdownListenerKey_=k(r,mn.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=k(r,mn.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(R.TOUCHMOVE,this.boundHandleTouchMove_,fr?{passive:!1}:!1)}emulateClick_(e){let t=new Te(K.CLICK,this.map_,e);this.dispatchEvent(t),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,t=new Te(K.DBLCLICK,this.map_,e),this.dispatchEvent(t)):this.clickTimeoutId_=setTimeout(()=>{this.clickTimeoutId_=void 0;let r=new Te(K.SINGLECLICK,this.map_,e);this.dispatchEvent(r)},250)}updateActivePointers_(e){let t=e,r=t.pointerId;if(t.type==K.POINTERUP||t.type==K.POINTERCANCEL){delete this.trackedTouches_[r];for(let i in this.trackedTouches_)if(this.trackedTouches_[i].target!==t.target){delete this.trackedTouches_[i];break}}else(t.type==K.POINTERDOWN||t.type==K.POINTERMOVE)&&(this.trackedTouches_[r]=t);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(e){this.updateActivePointers_(e);let t=new Te(K.POINTERUP,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(t),this.emulateClicks_&&!t.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(U),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(e){return e.button===0}handlePointerDown_(e){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(e);let t=new Te(K.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);if(this.dispatchEvent(t),this.down_=new PointerEvent(e.type,e),Object.defineProperty(this.down_,"target",{writable:!1,value:e.target}),this.dragListenerKeys_.length===0){let r=this.map_.getOwnerDocument();this.dragListenerKeys_.push(k(r,K.POINTERMOVE,this.handlePointerMove_,this),k(r,K.POINTERUP,this.handlePointerUp_,this),k(this.element_,K.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==r&&this.dragListenerKeys_.push(k(this.element_.getRootNode(),K.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;let t=new Te(K.POINTERDRAG,this.map_,e,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(t)}}relayMoveEvent_(e){this.originalPointerMoveEvent_=e;let t=!!(this.down_&&this.isMoving_(e));this.dispatchEvent(new Te(K.POINTERMOVE,this.map_,e,t))}handleTouchMove_(e){let t=this.originalPointerMoveEvent_;(!t||t.defaultPrevented)&&(typeof e.cancelable!="boolean"||e.cancelable===!0)&&e.preventDefault()}isMoving_(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(U(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(R.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(U(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(U),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}},Bl=co;var ee={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"};var Gt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};var gn=1/0,uo=class{constructor(e,t){this.priorityFunction_=e,this.keyFunction_=t,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Ie(this.queuedElements_)}dequeue(){let e=this.elements_,t=this.priorities_,r=e[0];e.length==1?(e.length=0,t.length=0):(e[0]=e.pop(),t[0]=t.pop(),this.siftUp_(0));let i=this.keyFunction_(r);return delete this.queuedElements_[i],r}enqueue(e){G(!(this.keyFunction_(e)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");let t=this.priorityFunction_(e);return t!=gn?(this.elements_.push(e),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(e){return e*2+1}getRightChildIndex_(e){return e*2+2}getParentIndex_(e){return e-1>>1}heapify_(){let e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)}isEmpty(){return this.elements_.length===0}isKeyQueued(e){return e in this.queuedElements_}isQueued(e){return this.isKeyQueued(this.keyFunction_(e))}siftUp_(e){let t=this.elements_,r=this.priorities_,i=t.length,o=t[e],s=r[e],a=e;for(;e<i>>1;){let l=this.getLeftChildIndex_(e),c=this.getRightChildIndex_(e),u=c<i&&r[c]<r[l]?c:l;t[e]=t[u],r[e]=r[u],e=u}t[e]=o,r[e]=s,this.siftDown_(a,e)}siftDown_(e,t){let r=this.elements_,i=this.priorities_,o=r[t],s=i[t];for(;t>e;){let a=this.getParentIndex_(t);if(i[a]>s)r[t]=r[a],i[t]=i[a],t=a;else break}r[t]=o,i[t]=s}reprioritize(){let e=this.priorityFunction_,t=this.elements_,r=this.priorities_,i=0,o=t.length,s,a,l;for(a=0;a<o;++a)s=t[a],l=e(s),l==gn?delete this.queuedElements_[this.keyFunction_(s)]:(r[i]=l,t[i++]=s);t.length=i,r.length=i,this.heapify_()}},Hl=uo;var ho=class extends Hl{constructor(e,t){super(r=>e.apply(null,r),r=>r[0].getKey()),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=t,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(e){let t=super.enqueue(e);return t&&e[0].addEventListener(R.CHANGE,this.boundHandleTileChange_),t}getTilesLoading(){return this.tilesLoading_}handleTileChange(e){let t=e.target,r=t.getState();if(r===Gt.LOADED||r===Gt.ERROR||r===Gt.EMPTY){r!==Gt.ERROR&&t.removeEventListener(R.CHANGE,this.boundHandleTileChange_);let i=t.getKey();i in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[i],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(e,t){let r=0;for(;this.tilesLoading_<e&&r<t&&this.getCount()>0;){let i=this.dequeue()[0],o=i.getKey();i.getState()===Gt.IDLE&&!(o in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[o]=!0,++this.tilesLoading_,++r,i.load())}}},jl=ho;function Wl(n,e,t,r,i){if(!n||!(t in n.wantedTiles))return gn;if(!n.wantedTiles[t][e.getKey()])return gn;let o=n.viewState.center,s=r[0]-o[0],a=r[1]-o[1];return 65536*Math.log(i)+Math.sqrt(s*s+a*a)/i}var pn="ol-hidden";var et="ol-unselectable";var Ut="ol-control",fo="ol-collapsed",Qh=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z0-9]+?)\\s*$`].join(""),"i"),Yl=["style","variant","weight","size","lineHeight","family"],mr={normal:400,bold:700},gr=function(n){let e=n.match(Qh);if(!e)return null;let t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"400",variant:"normal"};for(let r=0,i=Yl.length;r<i;++r){let o=e[r+1];o!==void 0&&(t[Yl[r]]=typeof o=="string"?o.trim():o)}return isNaN(Number(t.weight))&&t.weight in mr&&(t.weight=mr[t.weight]),t.families=t.family.split(/,\s?/).map(r=>r.trim().replace(/^['"]|['"]$/g,"")),t};function de(n,e,t,r){let i;return t&&t.length?i=t.shift():ve?i=new class extends OffscreenCanvas{style={}}(n??300,e??150):i=document.createElement("canvas"),n&&(i.width=n),e&&(i.height=e),i.getContext("2d",r)}var mo;function go(){return mo||(mo=de(1,1)),mo}function ty(n){let e=n.canvas;e.width=1,e.height=1,n.clearRect(0,0,1,1)}function po(n,e){let t=e.parentNode;t&&t.replaceChild(n,e)}function Xl(n){for(;n.lastChild;)n.lastChild.remove()}function Zl(n,e){let t=n.childNodes;for(let r=0;;++r){let i=t[r],o=e[r];if(!i&&!o)break;if(i!==o){if(!i){n.appendChild(o);continue}if(!o){n.removeChild(i),--r;continue}n.insertBefore(o,i)}}}function ql(){return new Proxy({childNodes:[],appendChild:function(e){return this.childNodes.push(e),e},remove:function(){},removeChild:function(e){let t=this.childNodes.indexOf(e);if(t===-1)throw new Error("Node to remove was not found");return this.childNodes.splice(t,1),e},insertBefore:function(e,t){let r=this.childNodes.indexOf(t);if(r===-1)throw new Error("Reference node not found");return this.childNodes.splice(r,0,e),e},style:{}},{get(e,t,r){return t==="firstElementChild"?e.childNodes.length>0?e.childNodes[0]:null:Reflect.get(e,t,r)}})}function ze(n){return typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas}var _o=class extends $e{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=e.collapsed!==void 0?e.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=e.collapsible!==void 0,this.collapsible_=e.collapsible!==void 0?e.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.attributions_=e.attributions;let t=e.className!==void 0?e.className:"ol-attribution",r=e.tipLabel!==void 0?e.tipLabel:"Attributions",i=e.expandClassName!==void 0?e.expandClassName:t+"-expand",o=e.collapseLabel!==void 0?e.collapseLabel:"\u203A",s=e.collapseClassName!==void 0?e.collapseClassName:t+"-collapse";typeof o=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=o,this.collapseLabel_.className=s):this.collapseLabel_=o;let a=e.label!==void 0?e.label:"i";typeof a=="string"?(this.label_=document.createElement("span"),this.label_.textContent=a,this.label_.className=i):this.label_=a;let l=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=r,this.toggleButton_.appendChild(l),this.toggleButton_.addEventListener(R.CLICK,this.handleClick_.bind(this),!1);let c=t+" "+et+" "+Ut+(this.collapsed_&&this.collapsible_?" "+fo:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=c,u.appendChild(this.toggleButton_),u.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(e){let t=this.getMap().getAllLayers(),r=new Set(t.flatMap(i=>i.getAttributions(e)));if(this.attributions_!==void 0&&(Array.isArray(this.attributions_)?this.attributions_.forEach(i=>r.add(i)):r.add(this.attributions_)),!this.overrideCollapsible_){let i=!t.some(o=>o.getSource()?.getAttributionsCollapsible()===!1);this.setCollapsible(i)}return Array.from(r)}async updateElement_(e){if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}let t=await Promise.all(this.collectSourceAttributions_(e).map(i=>fl(()=>i))),r=t.length>0;if(this.renderedVisible_!=r&&(this.element.style.display=r?"":"none",this.renderedVisible_=r),!Mt(t,this.renderedAttributions_)){Xl(this.ulElement_);for(let i=0,o=t.length;i<o;++i){let s=document.createElement("li");s.innerHTML=t[i],this.ulElement_.appendChild(s)}this.renderedAttributions_=t}}handleClick_(e){e.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(fo),this.collapsed_?po(this.collapseLabel_,this.label_):po(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(e){this.userCollapsed_=e,!(!this.collapsible_||this.collapsed_===e)&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(e){this.updateElement_(e.frameState)}},$l=_o;var yo=class extends $e{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target});let t=e.className!==void 0?e.className:"ol-rotate",r=e.label!==void 0?e.label:"\u21E7",i=e.compassClassName!==void 0?e.compassClassName:"ol-compass";this.label_=null,typeof r=="string"?(this.label_=document.createElement("span"),this.label_.className=i,this.label_.textContent=r):(this.label_=r,this.label_.classList.add(i));let o=e.tipLabel?e.tipLabel:"Reset rotation",s=document.createElement("button");s.className=t+"-reset",s.setAttribute("type","button"),s.title=o,s.appendChild(this.label_),s.addEventListener(R.CLICK,this.handleClick_.bind(this),!1);let a=t+" "+et+" "+Ut,l=this.element;l.className=a,l.appendChild(s),this.callResetNorth_=e.resetNorth?e.resetNorth:void 0,this.duration_=e.duration!==void 0?e.duration:250,this.autoHide_=e.autoHide!==void 0?e.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(pn)}handleClick_(e){e.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){let t=this.getMap().getView();if(!t)return;let r=t.getRotation();r!==void 0&&(this.duration_>0&&r%(2*Math.PI)!==0?t.animate({rotation:0,duration:this.duration_,easing:_e}):t.setRotation(0))}render(e){let t=e.frameState;if(!t)return;let r=t.viewState.rotation;if(r!=this.rotation_){let i="rotate("+r+"rad)";if(this.autoHide_){let o=this.element.classList.contains(pn);!o&&r===0?this.element.classList.add(pn):o&&r!==0&&this.element.classList.remove(pn)}this.label_.style.transform=i}this.rotation_=r}},Jl=yo;var vo=class extends $e{constructor(e){e=e||{},super({element:document.createElement("div"),target:e.target});let t=e.className!==void 0?e.className:"ol-zoom",r=e.delta!==void 0?e.delta:1,i=e.zoomInClassName!==void 0?e.zoomInClassName:t+"-in",o=e.zoomOutClassName!==void 0?e.zoomOutClassName:t+"-out",s=e.zoomInLabel!==void 0?e.zoomInLabel:"+",a=e.zoomOutLabel!==void 0?e.zoomOutLabel:"\u2013",l=e.zoomInTipLabel!==void 0?e.zoomInTipLabel:"Zoom in",c=e.zoomOutTipLabel!==void 0?e.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=i,u.setAttribute("type","button"),u.title=l,u.appendChild(typeof s=="string"?document.createTextNode(s):s),u.addEventListener(R.CLICK,this.handleClick_.bind(this,r),!1);let h=document.createElement("button");h.className=o,h.setAttribute("type","button"),h.title=c,h.appendChild(typeof a=="string"?document.createTextNode(a):a),h.addEventListener(R.CLICK,this.handleClick_.bind(this,-r),!1);let d=t+" "+et+" "+Ut,f=this.element;f.className=d,f.appendChild(u),f.appendChild(h),this.duration_=e.duration!==void 0?e.duration:250}handleClick_(e,t){t.preventDefault(),this.zoomByDelta_(e)}zoomByDelta_(e){let r=this.getMap().getView();if(!r)return;let i=r.getZoom();if(i!==void 0){let o=r.getConstrainedZoom(i+e);this.duration_>0?(r.getAnimating()&&r.cancelAnimations(),r.animate({zoom:o,duration:this.duration_,easing:_e})):r.setZoom(o)}}},Ql=vo;function ec(n){n=n||{};let e=new le;return(n.zoom===void 0||n.zoom)&&e.push(new Ql(n.zoomOptions)),(n.rotate===void 0||n.rotate)&&e.push(new Jl(n.rotateOptions)),(n.attribution===void 0||n.attribution)&&e.push(new $l(n.attributionOptions)),e}var xo=class{constructor(e,t,r){this.decay_=e,this.minVelocity_=t,this.delay_=r,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(e,t){this.points_.push(e,t,Date.now())}end(){if(this.points_.length<6)return!1;let e=Date.now()-this.delay_,t=this.points_.length-3;if(this.points_[t+2]<e)return!1;let r=t-3;for(;r>0&&this.points_[r+2]>e;)r-=3;let i=this.points_[t+2]-this.points_[r+2];if(i<1e3/60)return!1;let o=this.points_[t]-this.points_[r],s=this.points_[t+1]-this.points_[r+1];return this.angle_=Math.atan2(s,o),this.initialVelocity_=Math.sqrt(o*o+s*s)/i,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}},tc=xo;var Eo={ACTIVE:"active"};var bo=class extends q{constructor(e){super(),this.on,this.once,this.un,e&&e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(Eo.ACTIVE)}getMap(){return this.map_}handleEvent(e){return!0}setActive(e){this.set(Eo.ACTIVE,e)}setMap(e){this.map_=e}};function nc(n,e,t){let r=n.getCenterInternal();if(r){let i=[r[0]+e[0],r[1]+e[1]];n.animateInternal({duration:t!==void 0?t:250,easing:_l,center:n.getConstrainedCenter(i)})}}function Kt(n,e,t,r){let i=n.getZoom();if(i===void 0)return;let o=n.getConstrainedZoom(i+e),s=n.getResolutionForZoom(o);n.getAnimating()&&n.cancelAnimations(),n.animate({resolution:s,anchor:t,duration:r!==void 0?r:250,easing:_e})}var Me=bo;var wo=class extends Me{constructor(e){super(),e=e||{},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:250}handleEvent(e){let t=!1;if(e.type==K.DBLCLICK){let r=e.originalEvent,i=e.map,o=e.coordinate,s=r.shiftKey?-this.delta_:this.delta_,a=i.getView();Kt(a,s,o,this.duration_),r.preventDefault(),t=!0}return!t}},rc=wo;function _n(n){let e=arguments;return function(t){let r=!0;for(let i=0,o=e.length;i<o&&(r=r&&e[i](t),!!r);++i);return r}}var ic=function(n){let e=n.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},ed=function(n){let e=n.map.getTargetElement(),t=e.getRootNode(),r=n.map.getOwnerDocument().activeElement;return t instanceof ShadowRoot?t.host.contains(r):e.contains(r)},pr=function(n){let e=n.map.getTargetElement(),t=e.getRootNode();return(t instanceof ShadowRoot?t.host:e).hasAttribute("tabindex")?ed(n):!0},oc=mt;var _r=function(n){let e=n.originalEvent;return"pointerId"in e&&e.button==0&&!(Gl&&lo&&e.ctrlKey)};var yr=function(n){let e=n.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey};var sc=function(n){let e=n.originalEvent;return lo?e.metaKey:e.ctrlKey},ac=function(n){let e=n.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},vr=function(n){let e=n.originalEvent,t=e.target.tagName;return t!=="INPUT"&&t!=="SELECT"&&t!=="TEXTAREA"&&!e.target.isContentEditable},xr=function(n){let e=n.originalEvent;return"pointerId"in e&&e.pointerType=="mouse"};var lc=function(n){let e=n.originalEvent;return"pointerId"in e&&e.isPrimary&&e.button===0};var Co=class extends Me{constructor(e){e=e||{},super(e),e.handleDownEvent&&(this.handleDownEvent=e.handleDownEvent),e.handleDragEvent&&(this.handleDragEvent=e.handleDragEvent),e.handleMoveEvent&&(this.handleMoveEvent=e.handleMoveEvent),e.handleUpEvent&&(this.handleUpEvent=e.handleUpEvent),e.stopDown&&(this.stopDown=e.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(e){return!1}handleDragEvent(e){}handleEvent(e){if(!e.originalEvent)return!0;let t=!1;if(this.updateTrackedPointers_(e),this.handlingDownUpSequence){if(e.type==K.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==K.POINTERUP){let r=this.handleUpEvent(e);this.handlingDownUpSequence=r&&this.targetPointers.length>0}}else if(e.type==K.POINTERDOWN){let r=this.handleDownEvent(e);this.handlingDownUpSequence=r,t=this.stopDown(r)}else e.type==K.POINTERMOVE&&this.handleMoveEvent(e);return!t}handleMoveEvent(e){}handleUpEvent(e){return!1}stopDown(e){return e}updateTrackedPointers_(e){e.activePointers&&(this.targetPointers=e.activePointers)}};function Bt(n){let e=n.length,t=0,r=0;for(let i=0;i<e;i++)t+=n[i].clientX,r+=n[i].clientY;return{clientX:t/e,clientY:r/e}}var Pe=Co;var Ro=class extends Pe{constructor(e){super({stopDown:De}),e=e||{},this.kinetic_=e.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;let t=e.condition?e.condition:_n(yr,lc);this.condition_=e.onFocusOnly?_n(pr,t):t,this.noKinetic_=!1}handleDragEvent(e){let t=e.map;this.panning_||(this.panning_=!0,t.getView().beginInteraction());let r=this.targetPointers,i=t.getEventPixel(Bt(r));if(r.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){let o=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],a=e.map.getView();js(o,a.getResolution()),Ct(o,a.getRotation()),a.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=r.length,e.originalEvent.preventDefault()}handleUpEvent(e){let t=e.map,r=t.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){let i=this.kinetic_.getDistance(),o=this.kinetic_.getAngle(),s=r.getCenterInternal(),a=t.getPixelFromCoordinateInternal(s),l=t.getCoordinateFromPixelInternal([a[0]-i*Math.cos(o),a[1]-i*Math.sin(o)]);r.animateInternal({center:r.getConstrainedCenter(l),duration:500,easing:_e})}return this.panning_&&(this.panning_=!1,r.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(e){if(this.targetPointers.length>0&&this.condition_(e)){let r=e.map.getView();return this.lastCentroid=null,r.getAnimating()&&r.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}},cc=Ro;var Io=class extends Pe{constructor(e){e=e||{},super({stopDown:De}),this.condition_=e.condition?e.condition:ic,this.lastAngle_=void 0,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){if(!xr(e))return;let t=e.map,r=t.getView();if(r.getConstraints().rotation===zt)return;let i=t.getSize(),o=e.pixel,s=Math.atan2(i[1]/2-o[1],o[0]-i[0]/2);if(this.lastAngle_!==void 0){let a=s-this.lastAngle_;r.adjustRotationInternal(-a)}this.lastAngle_=s}handleUpEvent(e){return xr(e)?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){return xr(e)&&_r(e)&&this.condition_(e)?(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}},uc=Io;var Ao=class extends Tt{constructor(e){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){let e=this.startPixel_,t=this.endPixel_,r="px",i=this.element_.style;i.left=Math.min(e[0],t[0])+r,i.top=Math.min(e[1],t[1])+r,i.width=Math.abs(t[0]-e[0])+r,i.height=Math.abs(t[1]-e[1])+r}setMap(e){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);let t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=e,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(e,t){this.startPixel_=e,this.endPixel_=t,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;let e=this.startPixel_,t=this.endPixel_,i=[e,[e[0],t[1]],t,[t[0],e[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new Ml([i])}getGeometry(){return this.geometry_}},hc=Ao;var Ht={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},yt=class extends ne{constructor(e,t,r){super(e),this.coordinate=t,this.mapBrowserEvent=r}},So=class extends Pe{constructor(e){super(),this.on,this.once,this.un,e=e??{},this.box_=new hc(e.className||"ol-dragbox"),this.minArea_=e.minArea??64,e.onBoxEnd&&(this.onBoxEnd=e.onBoxEnd),this.startPixel_=null,this.condition_=e.condition??_r,this.boxEndCondition_=e.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(e,t,r){let i=r[0]-t[0],o=r[1]-t[1];return i*i+o*o>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(e){this.startPixel_&&(this.box_.setPixels(this.startPixel_,e.pixel),this.dispatchEvent(new yt(Ht.BOXDRAG,e.coordinate,e)))}handleUpEvent(e){if(!this.startPixel_)return!1;let t=this.boxEndCondition_(e,this.startPixel_,e.pixel);return t&&this.onBoxEnd(e),this.dispatchEvent(new yt(t?Ht.BOXEND:Ht.BOXCANCEL,e.coordinate,e)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(e){return this.condition_(e)?(this.startPixel_=e.pixel,this.box_.setMap(e.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new yt(Ht.BOXSTART,e.coordinate,e)),!0):!1}onBoxEnd(e){}setActive(e){e||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new yt(Ht.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(e)}setMap(e){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new yt(Ht.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(e)}},dc=So;var Lo=class extends dc{constructor(e){e=e||{};let t=e.condition?e.condition:ac;super({condition:t,className:e.className||"ol-dragzoom",minArea:e.minArea}),this.duration_=e.duration!==void 0?e.duration:200,this.out_=e.out!==void 0?e.out:!1}onBoxEnd(e){let r=this.getMap().getView(),i=this.getGeometry();if(this.out_){let o=r.rotatedExtentForGeometry(i),s=r.getResolutionForExtentInternal(o),a=r.getResolution()/s;i=i.clone(),i.scale(a*a)}r.fitInternal(i,{duration:this.duration_,easing:_e})}},fc=Lo;var tt={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};var To=class extends Me{constructor(e){super(),e=e||{},this.defaultCondition_=function(t){return yr(t)&&vr(t)},this.condition_=e.condition!==void 0?e.condition:this.defaultCondition_,this.duration_=e.duration!==void 0?e.duration:100,this.pixelDelta_=e.pixelDelta!==void 0?e.pixelDelta:128}handleEvent(e){let t=!1;if(e.type==R.KEYDOWN){let r=e.originalEvent,i=r.key;if(this.condition_(e)&&(i==tt.DOWN||i==tt.LEFT||i==tt.RIGHT||i==tt.UP)){let s=e.map.getView(),a=s.getResolution()*this.pixelDelta_,l=0,c=0;i==tt.DOWN?c=-a:i==tt.LEFT?l=-a:i==tt.RIGHT?l=a:c=a;let u=[l,c];Ct(u,s.getRotation()),nc(s,u,this.duration_),r.preventDefault(),t=!0}}return!t}},mc=To;var Mo=class extends Me{constructor(e){super(),e=e||{},this.condition_=e.condition?e.condition:function(t){return!sc(t)&&vr(t)},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:100}handleEvent(e){let t=!1;if(e.type==R.KEYDOWN||e.type==R.KEYPRESS){let r=e.originalEvent,i=r.key;if(this.condition_(e)&&(i==="+"||i==="-")){let o=e.map,s=i==="+"?this.delta_:-this.delta_,a=o.getView();Kt(a,s,void 0,this.duration_),r.preventDefault(),t=!0}}return!t}},gc=Mo;var td=40,nd=300,Po=class extends Me{constructor(e){e=e||{},super(e),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=e.maxDelta!==void 0?e.maxDelta:1,this.duration_=e.duration!==void 0?e.duration:250,this.timeout_=e.timeout!==void 0?e.timeout:80,this.useAnchor_=e.useAnchor!==void 0?e.useAnchor:!0,this.constrainResolution_=e.constrainResolution!==void 0?e.constrainResolution:!1;let t=e.condition?e.condition:oc;this.condition_=e.onFocusOnly?_n(pr,t):t,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;let e=this.getMap();if(!e)return;e.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null)}handleEvent(e){if(!this.condition_(e)||e.type!==R.WHEEL)return!0;let r=e.map,i=e.originalEvent;i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.pixel);let o=i.deltaY;switch(i.deltaMode){case WheelEvent.DOM_DELTA_LINE:o*=td;break;case WheelEvent.DOM_DELTA_PAGE:o*=nd;break;default:}if(o===0)return!1;this.lastDelta_=o;let s=Date.now();this.startTime_===void 0&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(o)<4?"trackpad":"wheel");let a=r.getView();if(this.mode_==="trackpad"&&!(a.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-o/this.deltaPerZoom_,this.lastAnchor_?r.getCoordinateFromPixel(this.lastAnchor_):null),this.startTime_=s,!1;this.totalDelta_+=o;let l=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,r),l),!1}handleWheelZoom_(e){let t=e.getView();t.getAnimating()&&t.cancelAnimations();let r=-j(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(t.getConstrainResolution()||this.constrainResolution_)&&(r=r?r>0?1:-1:0),Kt(t,r,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(e){this.useAnchor_=e,e||(this.lastAnchor_=null)}},pc=Po;var ko=class extends Pe{constructor(e){e=e||{};let t=e;t.stopDown||(t.stopDown=De),super(t),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=e.threshold!==void 0?e.threshold:.3,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){let t=0,r=this.targetPointers[0],i=this.targetPointers[1],o=Math.atan2(i.clientY-r.clientY,i.clientX-r.clientX);if(this.lastAngle_!==void 0){let l=o-this.lastAngle_;this.rotationDelta_+=l,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),t=l}this.lastAngle_=o;let s=e.map,a=s.getView();a.getConstraints().rotation!==zt&&(this.anchor_=s.getCoordinateFromPixelInternal(s.getEventPixel(Bt(this.targetPointers))),this.rotating_&&(s.render(),a.adjustRotationInternal(t,this.anchor_)))}handleUpEvent(e){return this.targetPointers.length<2?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){if(this.targetPointers.length>=2){let t=e.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}},_c=ko;var Oo=class extends Pe{constructor(e){e=e||{};let t=e;t.stopDown||(t.stopDown=De),super(t),this.anchor_=null,this.duration_=e.duration!==void 0?e.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(e){let t=1,r=this.targetPointers[0],i=this.targetPointers[1],o=r.clientX-i.clientX,s=r.clientY-i.clientY,a=Math.sqrt(o*o+s*s);this.lastDistance_!==void 0&&(t=this.lastDistance_/a),this.lastDistance_=a;let l=e.map,c=l.getView();t!=1&&(this.lastScaleDelta_=t),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel(Bt(this.targetPointers))),l.render(),c.adjustResolutionInternal(t,this.anchor_)}handleUpEvent(e){if(this.targetPointers.length<2){let r=e.map.getView(),i=this.lastScaleDelta_>1?1:-1;return r.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(e){if(this.targetPointers.length>=2){let t=e.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}},yc=Oo;function vc(n){n=n||{};let e=new le,t=new tc(-.005,.05,100);return(n.altShiftDragRotate===void 0||n.altShiftDragRotate)&&e.push(new uc),(n.doubleClickZoom===void 0||n.doubleClickZoom)&&e.push(new rc({delta:n.zoomDelta,duration:n.zoomDuration})),(n.dragPan===void 0||n.dragPan)&&e.push(new cc({onFocusOnly:n.onFocusOnly,kinetic:t})),(n.pinchRotate===void 0||n.pinchRotate)&&e.push(new _c),(n.pinchZoom===void 0||n.pinchZoom)&&e.push(new yc({duration:n.zoomDuration})),(n.keyboard===void 0||n.keyboard)&&(e.push(new mc),e.push(new gc({delta:n.zoomDelta,duration:n.zoomDuration}))),(n.mouseWheelZoom===void 0||n.mouseWheelZoom)&&e.push(new pc({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(n.shiftDragZoom===void 0||n.shiftDragZoom)&&e.push(new fc({duration:n.zoomDuration})),e}function Er(n,e,t=0,r=n.length-1,i=rd){for(;r>t;){if(r-t>600){let l=r-t+1,c=e-t+1,u=Math.log(l),h=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*h*(l-h)/l)*(c-l/2<0?-1:1),f=Math.max(t,Math.floor(e-c*h/l+d)),g=Math.min(r,Math.floor(e+(l-c)*h/l+d));Er(n,e,f,g,i)}let o=n[e],s=t,a=r;for(yn(n,t,e),i(n[r],o)>0&&yn(n,t,r);s<a;){for(yn(n,s,a),s++,a--;i(n[s],o)<0;)s++;for(;i(n[a],o)>0;)a--}i(n[t],o)===0?yn(n,t,a):(a++,yn(n,a,r)),a<=e&&(t=a+1),e<=a&&(r=a-1)}}function yn(n,e,t){let r=n[e];n[e]=n[t],n[t]=r}function rd(n,e){return n<e?-1:n>e?1:0}var En=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data,r=[];if(!wr(e,t))return r;let i=this.toBBox,o=[];for(;t;){for(let s=0;s<t.children.length;s++){let a=t.children[s],l=t.leaf?i(a):a;wr(e,l)&&(t.leaf?r.push(a):Do(e,l)?this._all(a,r):o.push(a))}t=o.pop()}return r}collides(e){let t=this.data;if(!wr(e,t))return!1;let r=[];for(;t;){for(let i=0;i<t.children.length;i++){let o=t.children[i],s=t.leaf?this.toBBox(o):o;if(wr(e,s)){if(t.leaf||Do(e,s))return!0;r.push(o)}}t=r.pop()}return!1}load(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(let r=0;r<e.length;r++)this.insert(e[r]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=t;else if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){let r=this.data;this.data=t,t=r}this._insert(t,this.data.height-t.height-1,!0)}return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=Wt([]),this}remove(e,t){if(!e)return this;let r=this.data,i=this.toBBox(e),o=[],s=[],a,l,c;for(;r||o.length;){if(r||(r=o.pop(),l=o[o.length-1],a=s.pop(),c=!0),r.leaf){let u=id(e,r.children,t);if(u!==-1)return r.children.splice(u,1),o.push(r),this._condense(o),this}!c&&!r.leaf&&Do(r,i)?(o.push(r),s.push(a),a=0,l=r,r=r.children[0]):l?(a++,r=l.children[a],c=!1):r=null}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){let r=[];for(;e;)e.leaf?t.push(...e.children):r.push(...e.children),e=r.pop();return t}_build(e,t,r,i){let o=r-t+1,s=this._maxEntries,a;if(o<=s)return a=Wt(e.slice(t,r+1)),jt(a,this.toBBox),a;i||(i=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,i-1))),a=Wt([]),a.leaf=!1,a.height=i;let l=Math.ceil(o/s),c=l*Math.ceil(Math.sqrt(s));xc(e,t,r,c,this.compareMinX);for(let u=t;u<=r;u+=c){let h=Math.min(u+c-1,r);xc(e,u,h,l,this.compareMinY);for(let d=u;d<=h;d+=l){let f=Math.min(d+l-1,h);a.children.push(this._build(e,d,f,i-1))}}return jt(a,this.toBBox),a}_chooseSubtree(e,t,r,i){for(;i.push(t),!(t.leaf||i.length-1===r);){let o=1/0,s=1/0,a;for(let l=0;l<t.children.length;l++){let c=t.children[l],u=No(c),h=ad(e,c)-u;h<s?(s=h,o=u<o?u:o,a=c):h===s&&u<o&&(o=u,a=c)}t=a||t.children[0]}return t}_insert(e,t,r){let i=r?e:this.toBBox(e),o=[],s=this._chooseSubtree(i,this.data,t,o);for(s.children.push(e),xn(s,i);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(i,o,t)}_split(e,t){let r=e[t],i=r.children.length,o=this._minEntries;this._chooseSplitAxis(r,o,i);let s=this._chooseSplitIndex(r,o,i),a=Wt(r.children.splice(s,r.children.length-s));a.height=r.height,a.leaf=r.leaf,jt(r,this.toBBox),jt(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this.data=Wt([e,t]),this.data.height=e.height+1,this.data.leaf=!1,jt(this.data,this.toBBox)}_chooseSplitIndex(e,t,r){let i,o=1/0,s=1/0;for(let a=t;a<=r-t;a++){let l=vn(e,0,a,this.toBBox),c=vn(e,a,r,this.toBBox),u=ld(l,c),h=No(l)+No(c);u<o?(o=u,i=a,s=h<s?h:s):u===o&&h<s&&(s=h,i=a)}return i||r-t}_chooseSplitAxis(e,t,r){let i=e.leaf?this.compareMinX:od,o=e.leaf?this.compareMinY:sd,s=this._allDistMargin(e,t,r,i),a=this._allDistMargin(e,t,r,o);s<a&&e.children.sort(i)}_allDistMargin(e,t,r,i){e.children.sort(i);let o=this.toBBox,s=vn(e,0,t,o),a=vn(e,r-t,r,o),l=br(s)+br(a);for(let c=t;c<r-t;c++){let u=e.children[c];xn(s,e.leaf?o(u):u),l+=br(s)}for(let c=r-t-1;c>=t;c--){let u=e.children[c];xn(a,e.leaf?o(u):u),l+=br(a)}return l}_adjustParentBBoxes(e,t,r){for(let i=r;i>=0;i--)xn(t[i],e)}_condense(e){for(let t=e.length-1,r;t>=0;t--)e[t].children.length===0?t>0?(r=e[t-1].children,r.splice(r.indexOf(e[t]),1)):this.clear():jt(e[t],this.toBBox)}};function id(n,e,t){if(!t)return e.indexOf(n);for(let r=0;r<e.length;r++)if(t(n,e[r]))return r;return-1}function jt(n,e){vn(n,0,n.children.length,e,n)}function vn(n,e,t,r,i){i||(i=Wt(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o=e;o<t;o++){let s=n.children[o];xn(i,n.leaf?r(s):s)}return i}function xn(n,e){return n.minX=Math.min(n.minX,e.minX),n.minY=Math.min(n.minY,e.minY),n.maxX=Math.max(n.maxX,e.maxX),n.maxY=Math.max(n.maxY,e.maxY),n}function od(n,e){return n.minX-e.minX}function sd(n,e){return n.minY-e.minY}function No(n){return(n.maxX-n.minX)*(n.maxY-n.minY)}function br(n){return n.maxX-n.minX+(n.maxY-n.minY)}function ad(n,e){return(Math.max(e.maxX,n.maxX)-Math.min(e.minX,n.minX))*(Math.max(e.maxY,n.maxY)-Math.min(e.minY,n.minY))}function ld(n,e){let t=Math.max(n.minX,e.minX),r=Math.max(n.minY,e.minY),i=Math.min(n.maxX,e.maxX),o=Math.min(n.maxY,e.maxY);return Math.max(0,i-t)*Math.max(0,o-r)}function Do(n,e){return n.minX<=e.minX&&n.minY<=e.minY&&e.maxX<=n.maxX&&e.maxY<=n.maxY}function wr(n,e){return e.minX<=n.maxX&&e.minY<=n.maxY&&e.maxX>=n.minX&&e.maxY>=n.minY}function Wt(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function xc(n,e,t,r,i){let o=[e,t];for(;o.length;){if(t=o.pop(),e=o.pop(),t-e<=r)continue;let s=e+Math.ceil((t-e)/r/2)*r;Er(n,s,e,t,i),o.push(e,s,s,t)}}var Rr=[NaN,NaN,NaN,0],Fo;function cd(){return Fo||(Fo=de(1,1,void 0,{willReadFrequently:!0,desynchronized:!0})),Fo}var ud=/^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,hd=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,dd=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,fd=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function Cr(n,e){return n.endsWith("%")?Number(n.substring(0,n.length-1))/e:Number(n)}function wn(n){throw new Error('failed to parse "'+n+'" as color')}function Ec(n){if(n.toLowerCase().startsWith("rgb")){let o=n.match(hd)||n.match(ud)||n.match(dd);if(o){let s=o[4],a=100/255;return[j(Cr(o[1],a)+.5|0,0,255),j(Cr(o[2],a)+.5|0,0,255),j(Cr(o[3],a)+.5|0,0,255),s!==void 0?j(Cr(s,100),0,1):1]}wn(n)}if(n.startsWith("#")){if(fd.test(n)){let o=n.substring(1),s=o.length<=4?1:2,a=[0,0,0,255];for(let l=0,c=o.length;l<c;l+=s){let u=parseInt(o.substring(l,l+s),16);s===1&&(u+=u<<4),a[l/s]=u}return a[3]=a[3]/255,a}wn(n)}let e=cd();e.fillStyle="#abcdef";let t=e.fillStyle;e.fillStyle=n,e.fillStyle===t&&(e.fillStyle="#fedcba",t=e.fillStyle,e.fillStyle=n,e.fillStyle===t&&wn(n));let r=e.fillStyle;if(r.startsWith("#")||r.startsWith("rgba"))return Ec(r);e.clearRect(0,0,1,1),e.fillRect(0,0,1,1);let i=Array.from(e.getImageData(0,0,1,1).data);return i[3]=Bs(i[3]/255,3),i}function bc(n){return typeof n=="string"?n:Rn(n)}var md=1024,bn={},zo=0;function wc(n){if(n.length===4)return n;let e=n.slice();return e[3]=1,e}function Vo(n){return n>.0031308?Math.pow(n,1/2.4)*269.025-14.025:n*3294.6}function Go(n){return n>.2068965?Math.pow(n,3):(n-4/29)*(108/841)}function Uo(n){return n>10.314724?Math.pow((n+14.025)/269.025,2.4):n/3294.6}function Ko(n){return n>.0088564?Math.pow(n,1/3):n/(108/841)+4/29}function Bo(n){let e=Uo(n[0]),t=Uo(n[1]),r=Uo(n[2]),i=Ko(e*.222488403+t*.716873169+r*.06060791),o=500*(Ko(e*.452247074+t*.399439023+r*.148375274)-i),s=200*(i-Ko(e*.016863605+t*.117638439+r*.865350722)),a=Math.atan2(s,o)*(180/Math.PI);return[116*i-16,Math.sqrt(o*o+s*s),a<0?a+360:a,n[3]]}function Cc(n){let e=(n[0]+16)/116,t=n[1],r=n[2]*Math.PI/180,i=Go(e),o=Go(e+t/500*Math.cos(r)),s=Go(e-t/200*Math.sin(r)),a=Vo(o*3.021973625-i*1.617392459-s*.404875592),l=Vo(o*-.943766287+i*1.916279586+s*.027607165),c=Vo(o*.069407491-i*.22898585+s*1.159737864);return[j(a+.5|0,0,255),j(l+.5|0,0,255),j(c+.5|0,0,255),n[3]]}function Cn(n){if(n==="none")return Rr;if(bn.hasOwnProperty(n))return bn[n];if(zo>=md){let t=0;for(let r in bn)(t++&3)===0&&(delete bn[r],--zo)}let e=Ec(n);e.length!==4&&wn(n);for(let t of e)isNaN(t)&&wn(n);return bn[n]=e,++zo,e}function Ve(n){return Array.isArray(n)?n:Cn(n)}function Rn(n){let e=n[0];e!=(e|0)&&(e=e+.5|0);let t=n[1];t!=(t|0)&&(t=t+.5|0);let r=n[2];r!=(r|0)&&(r=r+.5|0);let i=n[3]===void 0?1:Math.round(n[3]*1e3)/1e3;return"rgba("+e+","+t+","+r+","+i+")"}function Ho(n){return n[0]>0&&n[1]>0}function ke(n,e){return Array.isArray(n)?n:(e===void 0?e=[n,n]:(e[0]=n,e[1]=n),e)}var vt=0;var re=1<<vt++,O=1<<vt++,ce=1<<vt++,fe=1<<vt++,rt=1<<vt++,In=1<<vt++,Ir=Math.pow(2,vt)-1,Yo={[re]:"boolean",[O]:"number",[ce]:"string",[fe]:"color",[rt]:"number[]",[In]:"size"},gd=Object.keys(Yo).map(Number).sort(cn);function pd(n){return n in Yo}function An(n){let e=[];for(let t of gd)Sn(n,t)&&e.push(Yo[t]);return e.length===0?"untyped":e.length<3?e.join(" or "):e.slice(0,-1).join(", ")+", or "+e[e.length-1]}function Sn(n,e){return(n&e)===e}function nt(n,e){return n===e}var X=class{constructor(e,t){if(!pd(e))throw new Error(`literal expressions must have a specific type, got ${An(e)}`);this.type=e,this.value=t}},Wo=class{constructor(e,t,...r){this.type=e,this.operator=t,this.args=r}};function Xo(){return{variables:new Set,properties:new Set,featureId:!1,geometryType:!1,mapState:!1}}function Q(n,e,t){switch(typeof n){case"boolean":{if(nt(e,ce))return new X(ce,n?"true":"false");if(!Sn(e,re))throw new Error(`got a boolean, but expected ${An(e)}`);return new X(re,n)}case"number":{if(nt(e,In))return new X(In,ke(n));if(nt(e,re))return new X(re,!!n);if(nt(e,ce))return new X(ce,n.toString());if(!Sn(e,O))throw new Error(`got a number, but expected ${An(e)}`);return new X(O,n)}case"string":{if(nt(e,fe))return new X(fe,Cn(n));if(nt(e,re))return new X(re,!!n);if(!Sn(e,ce))throw new Error(`got a string, but expected ${An(e)}`);return new X(ce,n)}default:}if(!Array.isArray(n))throw new Error("expression must be an array or a primitive value");if(n.length===0)throw new Error("empty expression");if(typeof n[0]=="string")return Ad(n,e,t);for(let r of n)if(typeof r!="number")throw new Error("expected an array of numbers");if(nt(e,In)){if(n.length!==2)throw new Error(`expected an array of two values for a size, got ${n.length}`);return new X(In,n)}if(nt(e,fe)){if(n.length===3)return new X(fe,[...n,1]);if(n.length===4)return new X(fe,n);throw new Error(`expected an array of 3 or 4 values for a color, got ${n.length}`)}if(!Sn(e,rt))throw new Error(`got an array of numbers, but expected ${An(e)}`);return new X(rt,n)}var m={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",LineMetric:"line-metric",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string",Has:"has"},_d={[m.Get]:S(T(1,1/0),Rc),[m.Var]:S(T(1,1),yd),[m.Has]:S(T(1,1/0),Rc),[m.Id]:S(vd,Yt),[m.Concat]:S(T(2,1/0),V(ce)),[m.GeometryType]:S(xd,Yt),[m.LineMetric]:S(Yt),[m.Resolution]:S(jo,Yt),[m.Zoom]:S(jo,Yt),[m.Time]:S(jo,Yt),[m.Any]:S(T(2,1/0),V(re)),[m.All]:S(T(2,1/0),V(re)),[m.Not]:S(T(1,1),V(re)),[m.Equal]:S(T(2,2),V(Ir)),[m.NotEqual]:S(T(2,2),V(Ir)),[m.GreaterThan]:S(T(2,2),V(O)),[m.GreaterThanOrEqualTo]:S(T(2,2),V(O)),[m.LessThan]:S(T(2,2),V(O)),[m.LessThanOrEqualTo]:S(T(2,2),V(O)),[m.Multiply]:S(T(2,1/0),Ic),[m.Coalesce]:S(T(2,1/0),Ic),[m.Divide]:S(T(2,2),V(O)),[m.Add]:S(T(2,1/0),V(O)),[m.Subtract]:S(T(2,2),V(O)),[m.Clamp]:S(T(3,3),V(O)),[m.Mod]:S(T(2,2),V(O)),[m.Pow]:S(T(2,2),V(O)),[m.Abs]:S(T(1,1),V(O)),[m.Floor]:S(T(1,1),V(O)),[m.Ceil]:S(T(1,1),V(O)),[m.Round]:S(T(1,1),V(O)),[m.Sin]:S(T(1,1),V(O)),[m.Cos]:S(T(1,1),V(O)),[m.Atan]:S(T(1,2),V(O)),[m.Sqrt]:S(T(1,1),V(O)),[m.Match]:S(T(4,1/0),Ac,bd),[m.Between]:S(T(3,3),V(O)),[m.Interpolate]:S(T(6,1/0),Ac,wd),[m.Case]:S(T(3,1/0),Ed,Cd),[m.In]:S(T(2,2),Rd),[m.Number]:S(T(1,1/0),V(Ir)),[m.String]:S(T(1,1/0),V(Ir)),[m.Array]:S(T(1,1/0),V(O)),[m.Color]:S(T(1,4),V(O)),[m.Band]:S(T(1,3),V(O)),[m.Palette]:S(T(2,2),Id),[m.ToString]:S(T(1,1),V(re|O|ce|fe))};function Rc(n,e,t){let r=n.length-1,i=new Array(r);for(let o=0;o<r;++o){let s=n[o+1];switch(typeof s){case"number":{i[o]=new X(O,s);break}case"string":{i[o]=new X(ce,s);break}default:throw new Error(`expected a string key or numeric array index for a get operation, got ${s}`)}o===0&&t.properties.add(String(s))}return i}function yd(n,e,t){let r=n[1];if(typeof r!="string")throw new Error("expected a string argument for var operation");return t.variables.add(r),[new X(ce,r)]}function vd(n,e,t){t.featureId=!0}function xd(n,e,t){t.geometryType=!0}function jo(n,e,t){t.mapState=!0}function Yt(n,e,t){let r=n[0];if(n.length!==1)throw new Error(`expected no arguments for ${r} operation`);return[]}function T(n,e){return function(t,r,i){let o=t[0],s=t.length-1;if(n===e){if(s!==n){let a=n===1?"":"s";throw new Error(`expected ${n} argument${a} for ${o}, got ${s}`)}}else if(s<n||s>e){let a=e===1/0?`${n} or more`:`${n} to ${e}`;throw new Error(`expected ${a} arguments for ${o}, got ${s}`)}}}function Ic(n,e,t){let r=n.length-1,i=new Array(r);for(let o=0;o<r;++o){let s=Q(n[o+1],e,t);i[o]=s}return i}function V(n){return function(e,t,r){let i=e.length-1,o=new Array(i);for(let s=0;s<i;++s){let a=Q(e[s+1],n,r);o[s]=a}return o}}function Ed(n,e,t){let r=n[0],i=n.length-1;if(i%2===0)throw new Error(`expected an odd number of arguments for ${r}, got ${i} instead`)}function Ac(n,e,t){let r=n[0],i=n.length-1;if(i%2===1)throw new Error(`expected an even number of arguments for operation ${r}, got ${i} instead`)}function bd(n,e,t){let r=n.length-1,i=ce|O|re,o=Q(n[1],i,t),s=Q(n[n.length-1],e,t),a=new Array(r-2);for(let l=0;l<r-2;l+=2){try{let c=Q(n[l+2],o.type,t);a[l]=c}catch(c){throw new Error(`failed to parse argument ${l+1} of match expression: ${c.message}`)}try{let c=Q(n[l+3],s.type,t);a[l+1]=c}catch(c){throw new Error(`failed to parse argument ${l+2} of match expression: ${c.message}`)}}return[o,...a,s]}function wd(n,e,t){let r=n[1],i;switch(r[0]){case"linear":i=1;break;case"exponential":let l=r[1];if(typeof l!="number"||l<=0)throw new Error(`expected a number base for exponential interpolation, got ${JSON.stringify(l)} instead`);i=l;break;default:throw new Error(`invalid interpolation type: ${JSON.stringify(r)}`)}let o=new X(O,i),s;try{s=Q(n[2],O,t)}catch(l){throw new Error(`failed to parse argument 1 in interpolate expression: ${l.message}`)}let a=new Array(n.length-3);for(let l=0;l<a.length;l+=2){try{let c=Q(n[l+3],O,t);a[l]=c}catch(c){throw new Error(`failed to parse argument ${l+2} for interpolate expression: ${c.message}`)}try{let c=Q(n[l+4],e,t);a[l+1]=c}catch(c){throw new Error(`failed to parse argument ${l+3} for interpolate expression: ${c.message}`)}}return[o,s,...a]}function Cd(n,e,t){let r=Q(n[n.length-1],e,t),i=new Array(n.length-1);for(let o=0;o<i.length-1;o+=2){try{let s=Q(n[o+1],re,t);i[o]=s}catch(s){throw new Error(`failed to parse argument ${o} of case expression: ${s.message}`)}try{let s=Q(n[o+2],r.type,t);i[o+1]=s}catch(s){throw new Error(`failed to parse argument ${o+1} of case expression: ${s.message}`)}}return i[i.length-1]=r,i}function Rd(n,e,t){let r=n[2];if(!Array.isArray(r))throw new Error('the second argument for the "in" operator must be an array');let i;if(typeof r[0]=="string"){if(r[0]!=="literal")throw new Error('for the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions');if(!Array.isArray(r[1]))throw new Error('failed to parse "in" expression: the literal operator must be followed by an array');r=r[1],i=ce}else i=O;let o=new Array(r.length);for(let a=0;a<o.length;a++)try{let l=Q(r[a],i,t);o[a]=l}catch(l){throw new Error(`failed to parse haystack item ${a} for "in" expression: ${l.message}`)}return[Q(n[1],i,t),...o]}function Id(n,e,t){let r;try{r=Q(n[1],O,t)}catch(s){throw new Error(`failed to parse first argument in palette expression: ${s.message}`)}let i=n[2];if(!Array.isArray(i))throw new Error("the second argument of palette must be an array");let o=new Array(i.length);for(let s=0;s<o.length;s++){let a;try{a=Q(i[s],fe,t)}catch(l){throw new Error(`failed to parse color at index ${s} in palette expression: ${l.message}`)}if(!(a instanceof X))throw new Error(`the palette color at index ${s} must be a literal value`);o[s]=a}return[r,...o]}function S(...n){return function(e,t,r){let i=e[0],o;for(let s=0;s<n.length;s++){let a=n[s](e,t,r);if(s==n.length-1){if(!a)throw new Error("expected last argument validator to return the parsed args");o=a}}return new Wo(t,i,...o)}}function Ad(n,e,t){let r=n[0],i=_d[r];if(!i)throw new Error(`unknown operator: ${r}`);return i(n,e,t)}function Zo(n){if(!n)return"";let e=n.getType();switch(e){case"Point":case"LineString":case"Polygon":return e;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return e.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return Zo(n.getGeometries()[0]);default:return""}}function qo(){return{variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""}}function Re(n,e,t){let r=Q(n,e,t);return Ce(r,t)}function Ce(n,e){if(n instanceof X){if(n.type===fe&&typeof n.value=="string"){let r=Cn(n.value);return function(){return r}}return function(){return n.value}}let t=n.operator;switch(t){case m.Number:case m.String:case m.Coalesce:return Sd(n,e);case m.Get:case m.Var:case m.Has:return Ld(n,e);case m.Id:return r=>r.featureId;case m.GeometryType:return r=>r.geometryType;case m.Concat:{let r=n.args.map(i=>Ce(i,e));return i=>"".concat(...r.map(o=>o(i).toString()))}case m.Resolution:return r=>r.resolution;case m.Any:case m.All:case m.Between:case m.In:case m.Not:return Md(n,e);case m.Equal:case m.NotEqual:case m.LessThan:case m.LessThanOrEqualTo:case m.GreaterThan:case m.GreaterThanOrEqualTo:return Td(n,e);case m.Multiply:case m.Divide:case m.Add:case m.Subtract:case m.Clamp:case m.Mod:case m.Pow:case m.Abs:case m.Floor:case m.Ceil:case m.Round:case m.Sin:case m.Cos:case m.Atan:case m.Sqrt:return Pd(n,e);case m.Case:return kd(n,e);case m.Match:return Od(n,e);case m.Interpolate:return Nd(n,e);case m.ToString:return Dd(n,e);default:throw new Error(`Unsupported operator ${t}`)}}function Sd(n,e){let t=n.operator,r=n.args.length,i=new Array(r);for(let o=0;o<r;++o)i[o]=Ce(n.args[o],e);switch(t){case m.Coalesce:return o=>{for(let s=0;s<r;++s){let a=i[s](o);if(typeof a<"u"&&a!==null)return a}throw new Error("Expected one of the values to be non-null")};case m.Number:case m.String:return o=>{for(let s=0;s<r;++s){let a=i[s](o);if(typeof a===t)return a}throw new Error(`Expected one of the values to be a ${t}`)};default:throw new Error(`Unsupported assertion operator ${t}`)}}function Ld(n,e){let r=n.args[0].value;switch(n.operator){case m.Get:return i=>{let o=n.args,s=i.properties[r];for(let a=1,l=o.length;a<l;++a){let u=o[a].value;s=s[u]}return s};case m.Var:return i=>i.variables[r];case m.Has:return i=>{let o=n.args;if(!(r in i.properties))return!1;let s=i.properties[r];for(let a=1,l=o.length;a<l;++a){let u=o[a].value;if(!s||!Object.hasOwn(s,u))return!1;s=s[u]}return!0};default:throw new Error(`Unsupported accessor operator ${n.operator}`)}}function Td(n,e){let t=n.operator,r=Ce(n.args[0],e),i=Ce(n.args[1],e);switch(t){case m.Equal:return o=>r(o)===i(o);case m.NotEqual:return o=>r(o)!==i(o);case m.LessThan:return o=>r(o)<i(o);case m.LessThanOrEqualTo:return o=>r(o)<=i(o);case m.GreaterThan:return o=>r(o)>i(o);case m.GreaterThanOrEqualTo:return o=>r(o)>=i(o);default:throw new Error(`Unsupported comparison operator ${t}`)}}function Md(n,e){let t=n.operator,r=n.args.length,i=new Array(r);for(let o=0;o<r;++o)i[o]=Ce(n.args[o],e);switch(t){case m.Any:return o=>{for(let s=0;s<r;++s)if(i[s](o))return!0;return!1};case m.All:return o=>{for(let s=0;s<r;++s)if(!i[s](o))return!1;return!0};case m.Between:return o=>{let s=i[0](o),a=i[1](o),l=i[2](o);return s>=a&&s<=l};case m.In:return o=>{let s=i[0](o);for(let a=1;a<r;++a)if(s===i[a](o))return!0;return!1};case m.Not:return o=>!i[0](o);default:throw new Error(`Unsupported logical operator ${t}`)}}function Pd(n,e){let t=n.operator,r=n.args.length,i=new Array(r);for(let o=0;o<r;++o)i[o]=Ce(n.args[o],e);switch(t){case m.Multiply:return o=>{let s=1;for(let a=0;a<r;++a)s*=i[a](o);return s};case m.Divide:return o=>i[0](o)/i[1](o);case m.Add:return o=>{let s=0;for(let a=0;a<r;++a)s+=i[a](o);return s};case m.Subtract:return o=>i[0](o)-i[1](o);case m.Clamp:return o=>{let s=i[0](o),a=i[1](o);if(s<a)return a;let l=i[2](o);return s>l?l:s};case m.Mod:return o=>i[0](o)%i[1](o);case m.Pow:return o=>Math.pow(i[0](o),i[1](o));case m.Abs:return o=>Math.abs(i[0](o));case m.Floor:return o=>Math.floor(i[0](o));case m.Ceil:return o=>Math.ceil(i[0](o));case m.Round:return o=>Math.round(i[0](o));case m.Sin:return o=>Math.sin(i[0](o));case m.Cos:return o=>Math.cos(i[0](o));case m.Atan:return r===2?o=>Math.atan2(i[0](o),i[1](o)):o=>Math.atan(i[0](o));case m.Sqrt:return o=>Math.sqrt(i[0](o));default:throw new Error(`Unsupported numeric operator ${t}`)}}function kd(n,e){let t=n.args.length,r=new Array(t);for(let i=0;i<t;++i)r[i]=Ce(n.args[i],e);return i=>{for(let o=0;o<t-1;o+=2)if(r[o](i))return r[o+1](i);return r[t-1](i)}}function Od(n,e){let t=n.args.length,r=new Array(t);for(let i=0;i<t;++i)r[i]=Ce(n.args[i],e);return i=>{let o=r[0](i);for(let s=1;s<t-1;s+=2)if(o===r[s](i))return r[s+1](i);return r[t-1](i)}}function Nd(n,e){let t=n.args.length,r=new Array(t);for(let i=0;i<t;++i)r[i]=Ce(n.args[i],e);return i=>{let o=r[0](i),s=r[1](i),a,l;for(let c=2;c<t;c+=2){let u=r[c](i),h=r[c+1](i),d=Array.isArray(h);if(d&&(h=wc(h)),u>=s)return c===2?h:d?Fd(o,s,a,l,u,h):Ln(o,s,a,l,u,h);a=u,l=h}return l}}function Dd(n,e){let t=n.operator,r=n.args.length,i=new Array(r);for(let o=0;o<r;++o)i[o]=Ce(n.args[o],e);if(t===m.ToString)return o=>{let s=i[0](o);return n.args[0].type===fe?Rn(s):s.toString()};throw new Error(`Unsupported convert operator ${t}`)}function Ln(n,e,t,r,i,o){let s=i-t;if(s===0)return r;let a=e-t,l=n===1?a/s:(Math.pow(n,a)-1)/(Math.pow(n,s)-1);return r+l*(o-r)}function Fd(n,e,t,r,i,o){if(i-t===0)return r;let a=Bo(r),l=Bo(o),c=l[2]-a[2];c>180?c-=360:c<-180&&(c+=360);let u=[Ln(n,e,t,a[0],i,l[0]),Ln(n,e,t,a[1],i,l[1]),a[2]+Ln(n,e,t,0,i,c),Ln(n,e,t,r[3],i,o[3])];return Cc(u)}var N={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function zd(n,e){return new Promise((t,r)=>{function i(){s(),t(n)}function o(){s(),r(new Error("Image load error"))}function s(){n.removeEventListener("load",i),n.removeEventListener("error",o)}n.addEventListener("load",i),n.addEventListener("error",o),e&&(n.src=e)})}function Sc(n,e){return e&&(n.src=e),n.src&&Kl?new Promise((t,r)=>n.decode().then(()=>t(n)).catch(i=>n.complete&&n.width?t(n):r(i))):zd(n)}var Jo=class{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(let t in this.cache_){let r=this.cache_[t];(e++&3)===0&&!r.hasListener()&&(delete this.cache_[t],delete this.patternCache_[t],--this.cacheSize_)}}}get(e,t){let r=$o(e,t);return r in this.cache_?this.cache_[r]:null}getPattern(e,t){let r=$o(e,t);return r in this.patternCache_?this.patternCache_[r]:null}set(e,t,r,i){let o=$o(e,t),s=o in this.cache_;this.cache_[o]=r,i&&(r.getImageState()===N.IDLE&&r.load(),r.getImageState()===N.LOADING?r.ready().then(()=>{this.patternCache_[o]=go().createPattern(r.getImage(1),"repeat")}):this.patternCache_[o]=go().createPattern(r.getImage(1),"repeat")),s||++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}};function $o(n,e){let t=e?Ve(e):"null";return n+":"+t}var ie=new Jo;var Tn=null,Ar=class extends Pt{constructor(e,t,r,i,o){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=r?.crossOrigin,this.referrerPolicy_=r?.referrerPolicy,this.canvas_={},this.color_=o,this.imageState_=i===void 0?N.IDLE:i,this.size_=e&&e.width&&e.height?[e.width,e.height]:null,this.src_=t,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_),this.referrerPolicy_!==void 0&&(this.image_.referrerPolicy=this.referrerPolicy_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===N.LOADED){Tn||(Tn=de(1,1,void 0,{willReadFrequently:!0})),Tn.drawImage(this.image_,0,0);try{Tn.getImageData(0,0,1,1),this.tainted_=!1}catch{Tn=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(R.CHANGE)}handleImageError_(){this.imageState_=N.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=N.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}setImage(e){this.image_=e}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){let e=this.size_[0],t=this.size_[1],r=de(e,t);r.fillRect(0,0,e,t),this.hitDetectionImage_=r.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===N.IDLE){this.image_||this.initializeImage_(),this.imageState_=N.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&Sc(this.image_,this.src_).then(e=>{this.image_=e,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==N.LOADED)return;let t=this.image_,r=de(Math.ceil(t.width*e),Math.ceil(t.height*e)),i=r.canvas;r.scale(e,e),r.drawImage(t,0,0),r.globalCompositeOperation="multiply",r.fillStyle=bc(this.color_),r.fillRect(0,0,i.width/e,i.height/e),r.globalCompositeOperation="destination-in",r.drawImage(t,0,0),this.canvas_[e]=i}ready(){return this.ready_||(this.ready_=new Promise(e=>{if(this.imageState_===N.LOADED||this.imageState_===N.ERROR)e();else{let t=()=>{(this.imageState_===N.LOADED||this.imageState_===N.ERROR)&&(this.removeEventListener(R.CHANGE,t),e())};this.addEventListener(R.CHANGE,t)}})),this.ready_}};function it(n,e,t,r,i,o){let s=e===void 0?void 0:ie.get(e,i);return s||(s=new Ar(n,n&&"src"in n?n.src||void 0:e,t,r,i),ie.set(e,i,s,o)),o&&s&&!ie.getPattern(e,i)&&ie.set(e,i,s,o),s}var Lc=Ar;function Qo(n){return n?Array.isArray(n)?Rn(n):typeof n=="object"&&"src"in n?Vd(n):n:null}function Vd(n){if(!n.offset||!n.size)return ie.getPattern(n.src,n.color);let e=n.src+":"+n.offset,t=ie.getPattern(e,n.color);if(t)return t;let r=ie.get(n.src,null);if(r.getImageState()!==N.LOADED)return null;let i=de(n.size[0],n.size[1]);return i.drawImage(r.getImage(1),n.offset[0],n.offset[1],n.size[0],n.size[1],0,0,n.size[0],n.size[1]),it(i.canvas,e,void 0,N.LOADED,n.color,!0),ie.getPattern(e,n.color)}var P0="10px sans-serif",ts="#000",ns="round",k0=[],O0=0,rs="round",Mc=10,N0=0,Pc="#000",D0="center",F0="middle",z0=[0,0,0,0],kc=1,xt=new q,Mn=null,Tc,es={},Gd=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function Ud(n,e,t){return`${n} ${e} 16px "${t}"`}var V0=(function(){let e,t;async function r(o){await t.ready;let s=await t.load(o);if(s.length===0)return!1;let a=gr(o),l=a.families[0].toLowerCase(),c=a.weight;return s.some(u=>{let h=u.family.replace(/^['"]|['"]$/g,"").toLowerCase(),d=mr[u.weight]||u.weight;return h===l&&u.style===a.style&&d==c})}async function i(){await t.ready;let o=!0,s=xt.getProperties(),a=Object.keys(s).filter(l=>s[l]<100);for(let l=a.length-1;l>=0;--l){let c=a[l],u=s[c];u<100&&(await r(c)?(Ie(es),xt.set(c,100)):(u+=10,xt.set(c,u,!0),u<100&&(o=!1)))}e=void 0,o||(e=setTimeout(i,100))}return async function(o){t||(t=ve?self.fonts:document.fonts);let s=gr(o);if(!s)return;let a=s.families,l=!1;for(let c of a){if(Gd.has(c))continue;let u=Ud(s.style,s.weight,c);xt.get(u)===void 0&&(xt.set(u,0,!0),l=!0)}l&&(clearTimeout(e),e=setTimeout(i,100))}})(),Kd=(function(){let n;return function(e){let t=es[e];if(t==null){if(ve){let r=gr(e),i=Oc(e,"\u017Dg");t=(isNaN(Number(r.lineHeight))?1.2:Number(r.lineHeight))*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else n||(n=document.createElement("div"),n.innerHTML="M",n.style.minHeight="0",n.style.maxHeight="none",n.style.height="auto",n.style.padding="0",n.style.border="none",n.style.position="absolute",n.style.display="block",n.style.left="-99999px"),n.style.font=e,document.body.appendChild(n),t=n.offsetHeight,document.body.removeChild(n);es[e]=t}return t}})();function Oc(n,e){return Mn||(Mn=de(1,1)),n!=Tc&&(Mn.font=n,Tc=Mn.font),Mn.measureText(e)}function Nc(n,e){return Oc(n,e).width}function G0(n,e,t){if(e in t)return t[e];let r=e.split(`
2
+ `).reduce((i,o)=>Math.max(i,Nc(n,o)),0);return t[e]=r,r}function U0(n,e){let t=[],r=[],i=[],o=0,s=0,a=0,l=0;for(let c=0,u=e.length;c<=u;c+=2){let h=e[c];if(h===`
3
+ `||c===u){o=Math.max(o,s),i.push(s),s=0,a+=l,l=0;continue}let d=e[c+1]||n.font,f=Nc(d,h);t.push(f),s+=f;let g=Kd(d);r.push(g),l=Math.max(l,g)}return{width:o,height:a,widths:t,heights:r,lineWidths:i}}function K0(n,e,t,r,i,o,s,a,l,c,u){n.save(),t!==1&&(n.globalAlpha===void 0?n.globalAlpha=h=>h.globalAlpha*=t:n.globalAlpha*=t),e&&n.transform.apply(n,e),r.contextInstructions?(n.translate(l,c),n.scale(u[0],u[1]),Bd(r,n)):u[0]<0||u[1]<0?(n.translate(l,c),n.scale(u[0],u[1]),n.drawImage(r,i,o,s,a,0,0,s,a)):n.drawImage(r,i,o,s,a,l,c,s*u[0],a*u[1]),n.restore()}function Bd(n,e){let t=n.contextInstructions;for(let r=0,i=t.length;r<i;r+=2)Array.isArray(t[r+1])?e[t[r]].apply(e,t[r+1]):e[t[r]]=t[r+1]}var is=class n{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=ke(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){let e=this.getScale();return new n({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,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 F()}getImage(e){return F()}getHitDetectionImage(){return F()}getPixelRatio(e){return 1}getImageState(){return F()}getImageSize(){return F()}getOrigin(){return F()}getSize(){return F()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=ke(e)}listenImageChange(e){F()}load(){F()}unlistenImageChange(e){F()}ready(){return Promise.resolve()}},Sr=is;var os=class n extends Sr{constructor(e){super({opacity:1,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,rotation:e.rotation!==void 0?e.rotation:0,scale:e.scale!==void 0?e.scale:1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode}),this.hitDetectionCanvas_=null,this.fill_=e.fill!==void 0?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius=e.radius,this.radius2_=e.radius2,this.angle_=e.angle!==void 0?e.angle:0,this.stroke_=e.stroke!==void 0?e.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?N.LOADING:N.LOADED,this.imageState_===N.LOADING&&this.ready().then(()=>this.imageState_=N.LOADED),this.render()}clone(){let e=this.getScale(),t=new n({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(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}getAnchor(){let e=this.size_,t=this.getDisplacement(),r=this.getScaleArray();return[e[0]/2-t[0]/r[0],e[1]/2+t[1]/r[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(e){this.fill_=e,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(e){let t=this.fill_?.getKey(),r=`${e},${this.angle_},${this.radius},${this.radius2_},${this.points_},${t}`+Object.values(this.renderOptions_).join(","),i=ie.get(r,null)?.getImage(1);if(!i){let o=this.renderOptions_,s=Math.ceil(o.size*e),a=de(s,s);this.draw_(o,a,e),i=a.canvas;let l=new Lc(i,void 0,null,N.LOADED,null);ie.set(r,null,l),createImageBitmap(i).then(c=>{l.setImage(c)})}return i}getPixelRatio(e){return e}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}setRadius(e){this.radius!==e&&(this.radius=e,this.render())}getRadius2(){return this.radius2_}setRadius2(e){this.radius2_!==e&&(this.radius2_=e,this.render())}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e,this.render()}listenImageChange(e){}load(){}unlistenImageChange(e){}calculateLineJoinSize_(e,t,r){if(t===0||this.points_===1/0||e!=="bevel"&&e!=="miter")return t;let i=this.radius,o=this.radius2_===void 0?i:this.radius2_;if(i<o){let B=i;i=o,o=B}let s=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/s,l=o*Math.sin(a),c=Math.sqrt(o*o-l*l),u=i-c,h=Math.sqrt(l*l+u*u),d=h/l;if(e==="miter"&&d<=r)return d*t;let f=t/2/d,g=t/2*(u/h),p=Math.sqrt((i+f)*(i+f)+g*g)-i;if(this.radius2_===void 0||e==="bevel")return p*2;let v=i*Math.sin(a),x=Math.sqrt(i*i-v*v),P=o-x,D=Math.sqrt(v*v+P*P)/v;if(D<=r){let B=D*t/2-o-i;return 2*Math.max(p,B)}return p*2}createRenderOptions(){let e=ns,t=rs,r=0,i=null,o=0,s,a=0;this.stroke_&&(s=Qo(this.stroke_.getColor()??Pc),a=this.stroke_.getWidth()??kc,i=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset()??0,t=this.stroke_.getLineJoin()??rs,e=this.stroke_.getLineCap()??ns,r=this.stroke_.getMiterLimit()??Mc);let l=this.calculateLineJoinSize_(t,a,r),c=Math.max(this.radius,this.radius2_||0),u=Math.ceil(2*c+l);return{strokeStyle:s,strokeWidth:a,size:u,lineCap:e,lineDash:i,lineDashOffset:o,lineJoin:t,miterLimit:r}}render(){this.renderOptions_=this.createRenderOptions();let e=this.renderOptions_.size;this.hitDetectionCanvas_=null,this.size_=[e,e]}draw_(e,t,r){if(t.scale(r,r),t.translate(e.size/2,e.size/2),this.createPath_(t),this.fill_){let i=this.fill_.getColor();i===null&&(i=ts),t.fillStyle=Qo(i),t.fill()}e.strokeStyle&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}createHitDetectionCanvas_(e){let t;if(this.fill_){let r=this.fill_.getColor(),i=0;typeof r=="string"&&(r=Ve(r)),r===null?i=1:Array.isArray(r)&&(i=r.length===4?r[3]:1),i===0&&(t=de(e.size,e.size),this.drawHitDetectionCanvas_(e,t))}return t?t.canvas:this.getImage(1)}createPath_(e){let t=this.points_,r=this.radius;if(t===1/0)e.arc(0,0,r,0,2*Math.PI);else{let i=this.radius2_===void 0?r:this.radius2_;this.radius2_!==void 0&&(t*=2);let o=this.angle_-Math.PI/2,s=2*Math.PI/t;for(let a=0;a<t;a++){let l=o+a*s,c=a%2===0?r:i;e.lineTo(c*Math.cos(l),c*Math.sin(l))}e.closePath()}}drawHitDetectionCanvas_(e,t){t.translate(e.size/2,e.size/2),this.createPath_(t),t.fillStyle=ts,t.fill(),e.strokeStyle&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}},Lr=os;var ss=class n extends Lr{constructor(e){e=e||{radius:5},super({points:1/0,fill:e.fill,radius:e.radius,stroke:e.stroke,scale:e.scale!==void 0?e.scale:1,rotation:e.rotation!==void 0?e.rotation:0,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode})}clone(){let e=this.getScale(),t=new n({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}},Tr=ss;var as=class n{constructor(e){e=e||{},this.patternImage_=null,this.color_=null,e.color!==void 0&&this.setColor(e.color)}clone(){let e=this.getColor();return new n({color:Array.isArray(e)?e.slice():e||void 0})}getColor(){return this.color_}setColor(e){if(e!==null&&typeof e=="object"&&"src"in e){let t=it(null,e.src,{crossOrigin:"anonymous"},void 0,e.offset?null:e.color?e.color:null,!(e.offset&&e.size));t.ready().then(()=>{this.patternImage_=null}),t.getImageState()===N.IDLE&&t.load(),t.getImageState()===N.LOADING&&(this.patternImage_=t)}this.color_=e}getKey(){let e=this.getColor();return e?e instanceof CanvasPattern||e instanceof CanvasGradient?ge(e):typeof e=="object"&&"src"in e?e.src+":"+e.offset:Ve(e).toString():""}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}},Et=as;function Dc(n,e,t,r){return t!==void 0&&r!==void 0?[t/n,r/e]:t!==void 0?t/n:r!==void 0?r/e:1}var ls=class n extends Sr{constructor(e){e=e||{};let t=e.opacity!==void 0?e.opacity:1,r=e.rotation!==void 0?e.rotation:0,i=e.scale!==void 0?e.scale:1,o=e.rotateWithView!==void 0?e.rotateWithView:!1;super({opacity:t,rotation:r,scale:i,displacement:e.displacement!==void 0?e.displacement:[0,0],rotateWithView:o,declutterMode:e.declutterMode}),this.anchor_=e.anchor!==void 0?e.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=e.anchorOrigin!==void 0?e.anchorOrigin:"top-left",this.anchorXUnits_=e.anchorXUnits!==void 0?e.anchorXUnits:"fraction",this.anchorYUnits_=e.anchorYUnits!==void 0?e.anchorYUnits:"fraction",this.crossOrigin_=e.crossOrigin!==void 0?e.crossOrigin:null,this.referrerPolicy_=e.referrerPolicy;let s=e.img!==void 0?e.img:null,a=e.src;G(!(a!==void 0&&s),"`image` and `src` cannot be provided at the same time"),(a===void 0||a.length===0)&&s&&(a=s.src||ge(s)),G(a!==void 0&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),G(!((e.width!==void 0||e.height!==void 0)&&e.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let l;if(e.src!==void 0?l=N.IDLE:s!==void 0&&("complete"in s?s.complete?l=s.src?N.LOADED:N.IDLE:l=N.LOADING:l=N.LOADED),this.color_=e.color!==void 0?Ve(e.color):null,this.iconImage_=it(s,a,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},l,this.color_),this.offset_=e.offset!==void 0?e.offset:[0,0],this.offsetOrigin_=e.offsetOrigin!==void 0?e.offsetOrigin:"top-left",this.origin_=null,this.size_=e.size!==void 0?e.size:null,this.initialOptions_,e.width!==void 0||e.height!==void 0){let c,u;if(e.size)[c,u]=e.size;else{let h=this.getImage(1);if(h.width&&h.height)c=h.width,u=h.height;else if(h instanceof HTMLImageElement){this.initialOptions_=e;let d=()=>{if(this.unlistenImageChange(d),!this.initialOptions_)return;let f=this.iconImage_.getSize();this.setScale(Dc(f[0],f[1],e.width,e.height))};this.listenImageChange(d);return}}c!==void 0&&this.setScale(Dc(c,u,e.width,e.height))}}clone(){let e,t,r;return this.initialOptions_?(t=this.initialOptions_.width,r=this.initialOptions_.height):(e=this.getScale(),e=Array.isArray(e)?e.slice():e),new n({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:e,width:t,height:r,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let e=this.normalizedAnchor_;if(!e){e=this.anchor_;let i=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!i)return null;e=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(e[0]*=i[0]),this.anchorYUnits_=="fraction"&&(e[1]*=i[1])}if(this.anchorOrigin_!="top-left"){if(!i)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(e[0]=-e[0]+i[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(e[1]=-e[1]+i[1])}this.normalizedAnchor_=e}let t=this.getDisplacement(),r=this.getScaleArray();return[e[0]-t[0]/r[0],e[1]+t[1]/r[1]]}setAnchor(e){this.anchor_=e,this.normalizedAnchor_=null}getColor(){return this.color_}setColor(e){let t=e?Ve(e):null;if(this.color_===t||this.color_&&t&&this.color_.length===t.length&&this.color_.every((s,a)=>s===t[a]))return;this.color_=t;let r=this.getSrc(),i=r!==void 0?null:this.getHitDetectionImage(),o=r!==void 0?N.IDLE:this.iconImage_.getImageState();this.iconImage_=it(i,r,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},o,this.color_)}getImage(e){return this.iconImage_.getImage(e)}getPixelRatio(e){return this.iconImage_.getPixelRatio(e)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let e=this.offset_;if(this.offsetOrigin_!="top-left"){let t=this.getSize(),r=this.iconImage_.getSize();if(!t||!r)return null;e=e.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(e[0]=r[0]-t[0]-e[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(e[1]=r[1]-t[1]-e[1])}return this.origin_=e,this.origin_}getSrc(){return this.iconImage_.getSrc()}setSrc(e){this.iconImage_=it(null,e,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},N.IDLE,this.color_)}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){let e=this.getScaleArray();if(this.size_)return this.size_[0]*e[0];if(this.iconImage_.getImageState()==N.LOADED)return this.iconImage_.getSize()[0]*e[0]}getHeight(){let e=this.getScaleArray();if(this.size_)return this.size_[1]*e[1];if(this.iconImage_.getImageState()==N.LOADED)return this.iconImage_.getSize()[1]*e[1]}setScale(e){delete this.initialOptions_,super.setScale(e)}listenImageChange(e){this.iconImage_.addEventListener(R.CHANGE,e)}load(){this.iconImage_.load()}unlistenImageChange(e){this.iconImage_.removeEventListener(R.CHANGE,e)}ready(){return this.iconImage_.ready()}},Fc=ls;var cs=class n{constructor(e){e=e||{},this.color_=e.color!==void 0?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=e.lineDash!==void 0?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.offset_=e.offset,this.width_=e.width}clone(){let e=this.getColor();return new n({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),offset:this.getOffset(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getOffset(){return this.offset_}getWidth(){return this.width_}setColor(e){this.color_=e}setLineCap(e){this.lineCap_=e}setLineDash(e){this.lineDash_=e}setLineDashOffset(e){this.lineDashOffset_=e}setLineJoin(e){this.lineJoin_=e}setMiterLimit(e){this.miterLimit_=e}setOffset(e){this.offset_=e}setWidth(e){this.width_=e}},Mr=cs;var Pr=class n{constructor(e){e=e||{},this.geometry_=null,this.geometryFunction_=zc,e.geometry!==void 0&&this.setGeometry(e.geometry),this.fill_=e.fill!==void 0?e.fill:null,this.image_=e.image!==void 0?e.image:null,this.renderer_=e.renderer!==void 0?e.renderer:null,this.hitDetectionRenderer_=e.hitDetectionRenderer!==void 0?e.hitDetectionRenderer:null,this.stroke_=e.stroke!==void 0?e.stroke:null,this.text_=e.text!==void 0?e.text:null,this.zIndex_=e.zIndex}clone(){let e=this.getGeometry();return e&&typeof e=="object"&&(e=e.clone()),new n({geometry:e??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(e){this.renderer_=e}setHitDetectionRenderer(e){this.hitDetectionRenderer_=e}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(e){this.fill_=e}getImage(){return this.image_}setImage(e){this.image_=e}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e}getText(){return this.text_}setText(e){this.text_=e}getZIndex(){return this.zIndex_}setGeometry(e){typeof e=="function"?this.geometryFunction_=e:typeof e=="string"?this.geometryFunction_=function(t){return t.get(e)}:e?e!==void 0&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=zc,this.geometry_=e}setZIndex(e){this.zIndex_=e}};function Vc(n){let e;if(typeof n=="function")e=n;else{let t;Array.isArray(n)?t=n:(G(typeof n.getZIndex=="function","Expected an `Style` or an array of `Style`"),t=[n]),e=function(){return t}}return e}var us=null;function hs(n,e){if(!us){let t=new Et({color:"rgba(255,255,255,0.4)"}),r=new Mr({color:"#3399CC",width:1.25});us=[new Pr({image:new Tr({fill:t,stroke:r,radius:5}),fill:t,stroke:r})]}return us}function zc(n){return n.getGeometry()}var Xt=Pr;var Hd="#333",ds=class n{constructor(e){e=e||{},this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.keepUpright_=e.keepUpright,this.scale_=e.scale,this.scaleArray_=ke(e.scale!==void 0?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.justify_=e.justify,this.repeat_=e.repeat,this.textBaseline_=e.textBaseline,this.fill_=e.fill!==void 0?e.fill:new Et({color:Hd}),this.maxAngle_=e.maxAngle!==void 0?e.maxAngle:Math.PI/4,this.placement_=e.placement!==void 0?e.placement:"point",this.overflow_=!!e.overflow,this.stroke_=e.stroke!==void 0?e.stroke:null,this.offsetX_=e.offsetX!==void 0?e.offsetX:0,this.offsetY_=e.offsetY!==void 0?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=e.padding===void 0?null:e.padding,this.declutterMode_=e.declutterMode}clone(){let e=this.getScale();return new n({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),keepUpright:this.getKeepUpright(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()instanceof Et?this.getFill().clone():this.getFill(),stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getKeepUpright(){return this.keepUpright_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(e){this.overflow_=e}setFont(e){this.font_=e}setMaxAngle(e){this.maxAngle_=e}setOffsetX(e){this.offsetX_=e}setOffsetY(e){this.offsetY_=e}setPlacement(e){this.placement_=e}setRepeat(e){this.repeat_=e}setRotateWithView(e){this.rotateWithView_=e}setKeepUpright(e){this.keepUpright_=e}setFill(e){this.fill_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=ke(e!==void 0?e:1)}setStroke(e){this.stroke_=e}setText(e){this.text_=e}setTextAlign(e){this.textAlign_=e}setJustify(e){this.justify_=e}setTextBaseline(e){this.textBaseline_=e}setBackgroundFill(e){this.backgroundFill_=e}setBackgroundStroke(e){this.backgroundStroke_=e}setPadding(e){this.padding_=e}},Gc=ds;function jd(n){return!0}function Hc(n){let e=Xo(),t=Wd(n,e),r=qo();return function(i,o){if(r.properties=i.getPropertiesInternal(),r.resolution=o,e.featureId){let s=i.getId();s!==void 0?r.featureId=s:r.featureId=null}return e.geometryType&&(r.geometryType=Zo(i.getGeometry())),t(r)}}function gs(n){let e=Xo(),t=n.length,r=new Array(t);for(let s=0;s<t;++s)r[s]=fs(n[s],e);let i=qo(),o=new Array(t);return function(s,a){if(i.properties=s.getPropertiesInternal(),i.resolution=a,e.featureId){let c=s.getId();c!==void 0?i.featureId=c:i.featureId=null}let l=0;for(let c=0;c<t;++c){let u=r[c](i);u&&(o[l]=u,l+=1)}return o.length=l,o}}function Wd(n,e){let t=n.length,r=new Array(t);for(let i=0;i<t;++i){let o=n[i],s="filter"in o?Re(o.filter,re,e):jd,a;if(Array.isArray(o.style)){let l=o.style.length;a=new Array(l);for(let c=0;c<l;++c)a[c]=fs(o.style[c],e)}else a=[fs(o.style,e)];r[i]={filter:s,styles:a}}return function(i){let o=[],s=!1;for(let a=0;a<t;++a){let l=r[a].filter;if(l(i)&&!(n[a].else&&s)){s=!0;for(let c of r[a].styles){let u=c(i);u&&o.push(u)}}}return o}}function fs(n,e){let t=Pn(n,"",e),r=kn(n,"",e),i=Yd(n,e),o=Xd(n,e),s=te(n,"z-index",e);if(!t&&!r&&!i&&!o&&!Hn(n))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(n));let a=new Xt;return function(l){let c=!0;if(t){let u=t(l);u&&(c=!1),a.setFill(u)}if(r){let u=r(l);u&&(c=!1),a.setStroke(u)}if(i){let u=i(l);u&&(c=!1),a.setText(u)}if(o){let u=o(l);u&&(c=!1),a.setImage(u)}return s&&a.setZIndex(s(l)),c?null:a}}function Pn(n,e,t){let r;if(e+"fill-pattern-src"in n)r=Jd(n,e+"fill-",t);else{if(n[e+"fill-color"]==="none")return o=>null;r=Or(n,e+"fill-color",t)}if(!r)return null;let i=new Et;return function(o){let s=r(o);return s===Rr?null:(i.setColor(s),i)}}function kn(n,e,t){let r=te(n,e+"stroke-width",t),i=Or(n,e+"stroke-color",t);if(!r&&!i)return null;let o=Ge(n,e+"stroke-line-cap",t),s=Ge(n,e+"stroke-line-join",t),a=jc(n,e+"stroke-line-dash",t),l=te(n,e+"stroke-line-dash-offset",t),c=te(n,e+"stroke-miter-limit",t),u=te(n,e+"stroke-offset",t),h=new Mr;return function(d){if(i){let f=i(d);if(f===Rr)return null;h.setColor(f)}if(r&&h.setWidth(r(d)),o){let f=o(d);if(f!=="butt"&&f!=="round"&&f!=="square")throw new Error("Expected butt, round, or square line cap");h.setLineCap(f)}if(s){let f=s(d);if(f!=="bevel"&&f!=="round"&&f!=="miter")throw new Error("Expected bevel, round, or miter line join");h.setLineJoin(f)}return a&&h.setLineDash(a(d)),l&&h.setLineDashOffset(l(d)),c&&h.setMiterLimit(c(d)),u&&h.setOffset(u(d)),h}}function Yd(n,e){let t="text-",r=Ge(n,t+"value",e);if(!r)return null;let i=Pn(n,t,e),o=Pn(n,t+"background-",e),s=kn(n,t,e),a=kn(n,t+"background-",e),l=Ge(n,t+"font",e),c=te(n,t+"max-angle",e),u=te(n,t+"offset-x",e),h=te(n,t+"offset-y",e),d=Zt(n,t+"overflow",e),f=Ge(n,t+"placement",e),g=te(n,t+"repeat",e),y=Nr(n,t+"scale",e),p=Zt(n,t+"rotate-with-view",e),v=te(n,t+"rotation",e),x=Ge(n,t+"align",e),P=Ge(n,t+"justify",e),C=Ge(n,t+"baseline",e),D=Zt(n,t+"keep-upright",e),B=jc(n,t+"padding",e),Z=Dr(n,t+"declutter-mode"),_=new Gc({declutterMode:Z});return function(w){if(_.setText(r(w)),i&&_.setFill(i(w)),o&&_.setBackgroundFill(o(w)),s&&_.setStroke(s(w)),a&&_.setBackgroundStroke(a(w)),l&&_.setFont(l(w)),c&&_.setMaxAngle(c(w)),u&&_.setOffsetX(u(w)),h&&_.setOffsetY(h(w)),d&&_.setOverflow(d(w)),f){let L=f(w);if(L!=="point"&&L!=="line")throw new Error("Expected point or line for text-placement");_.setPlacement(L)}if(g&&_.setRepeat(g(w)),y&&_.setScale(y(w)),p&&_.setRotateWithView(p(w)),v&&_.setRotation(v(w)),x){let L=x(w);if(L!=="left"&&L!=="center"&&L!=="right"&&L!=="end"&&L!=="start")throw new Error("Expected left, right, center, start, or end for text-align");_.setTextAlign(L)}if(P){let L=P(w);if(L!=="left"&&L!=="right"&&L!=="center")throw new Error("Expected left, right, or center for text-justify");_.setJustify(L)}if(C){let L=C(w);if(L!=="bottom"&&L!=="top"&&L!=="middle"&&L!=="alphabetic"&&L!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");_.setTextBaseline(L)}return B&&_.setPadding(B(w)),D&&_.setKeepUpright(D(w)),_}}function Xd(n,e){return"icon-src"in n?Zd(n,e):"shape-points"in n?qd(n,e):"circle-radius"in n?$d(n,e):null}function Zd(n,e){let t="icon-",r=t+"src",i=Wc(n[r],r),o=kr(n,t+"anchor",e),s=Nr(n,t+"scale",e),a=te(n,t+"opacity",e),l=kr(n,t+"displacement",e),c=te(n,t+"rotation",e),u=Zt(n,t+"rotate-with-view",e),h=Kc(n,t+"anchor-origin"),d=Bc(n,t+"anchor-x-units"),f=Bc(n,t+"anchor-y-units"),g=Ue(n,t+"color"),y,p=null;g!==void 0&&(Array.isArray(g)&&g.length>0&&typeof g[0]=="string"?p=Or(n,t+"color",e):y=Yc(g,t+"color"));let v=ef(n,t+"cross-origin"),x=tf(n,t+"offset"),P=Kc(n,t+"offset-origin"),C=ms(n,t+"width"),D=ms(n,t+"height"),B=Qd(n,t+"size"),Z=Dr(n,t+"declutter-mode"),_={src:i,anchorOrigin:h,anchorXUnits:d,anchorYUnits:f,crossOrigin:v,offset:x,offsetOrigin:P,height:D,width:C,size:B,declutterMode:Z},w=null;return function(L){if(w)p&&w.setColor(p(L));else{let ot=p?p(L):y;w=new Fc(ot!==void 0?Object.assign({},_,{color:ot}):Object.assign({},_))}return a&&w.setOpacity(a(L)),l&&w.setDisplacement(l(L)),c&&w.setRotation(c(L)),u&&w.setRotateWithView(u(L)),s&&w.setScale(s(L)),o&&w.setAnchor(o(L)),w}}function qd(n,e){let t="shape-",r=t+"points",i=t+"radius",o=ps(n[r],r);if(!(i in n))throw new Error(`Expected a number for ${i}`);let s=te(n,i,e),a=typeof n[i]=="number"?n[i]:5,l=t+"radius2",c=te(n,l,e),u=typeof n[l]=="number"?n[l]:void 0,h=Pn(n,t,e),d=kn(n,t,e),f=Nr(n,t+"scale",e),g=kr(n,t+"displacement",e),y=te(n,t+"rotation",e),p=Zt(n,t+"rotate-with-view",e),v=ms(n,t+"angle"),x=Dr(n,t+"declutter-mode"),P=new Lr({points:o,radius:a,radius2:u,angle:v,declutterMode:x});return function(C){return s&&P.setRadius(s(C)),c&&P.setRadius2(c(C)),h&&P.setFill(h(C)),d&&P.setStroke(d(C)),g&&P.setDisplacement(g(C)),y&&P.setRotation(y(C)),p&&P.setRotateWithView(p(C)),f&&P.setScale(f(C)),P}}function $d(n,e){let t="circle-",r=Pn(n,t,e),i=kn(n,t,e),o=te(n,t+"radius",e),s=Nr(n,t+"scale",e),a=kr(n,t+"displacement",e),l=te(n,t+"rotation",e),c=Zt(n,t+"rotate-with-view",e),u=Dr(n,t+"declutter-mode"),h=new Tr({radius:5,declutterMode:u});return function(d){return o&&h.setRadius(o(d)),r&&h.setFill(r(d)),i&&h.setStroke(i(d)),a&&h.setDisplacement(a(d)),l&&h.setRotation(l(d)),c&&h.setRotateWithView(c(d)),s&&h.setScale(s(d)),h}}function Ue(n,e){if(!(e in n))return;let t=n[e];return t===void 0?void 0:t}function te(n,e,t){let r=Ue(n,e);if(r===void 0)return;let i=Re(r,O,t);return function(o){return ps(i(o),e)}}function Ge(n,e,t){let r=Ue(n,e);if(r===void 0)return null;let i=Re(r,ce,t);return function(o){return Wc(i(o),e)}}function Jd(n,e,t){let r=Ge(n,e+"pattern-src",t),i=Uc(n,e+"pattern-offset",t),o=Uc(n,e+"pattern-size",t),s=Or(n,e+"color",t);return function(a){return{src:r(a),offset:i&&i(a),size:o&&o(a),color:s&&s(a)}}}function Zt(n,e,t){let r=Ue(n,e);if(r===void 0)return null;let i=Re(r,re,t);return function(o){let s=i(o);if(typeof s!="boolean")throw new Error(`Expected a boolean for ${e}`);return s}}function Or(n,e,t){let r=Ue(n,e);if(r===void 0)return null;let i=Re(r,fe,t);return function(o){return Yc(i(o),e)}}function jc(n,e,t){let r=Ue(n,e);if(r===void 0)return null;if(Array.isArray(r)&&(r.length===0||typeof r[0]!="string")){let o=r.map((s,a)=>{if(typeof s=="number")return()=>s;let l=Re(s,O,t);return function(c){return ps(l(c),`${e}[${a}]`)}});return function(s){let a=new Array(o.length);for(let l=0;l<o.length;++l)a[l]=o[l](s);return a}}let i=Re(r,rt,t);return function(o){return On(i(o),e)}}function kr(n,e,t){let r=Ue(n,e);if(r===void 0)return null;let i=Re(r,rt,t);return function(o){let s=On(i(o),e);if(s.length!==2)throw new Error(`Expected two numbers for ${e}`);return s}}function Uc(n,e,t){let r=Ue(n,e);if(r===void 0)return null;let i=Re(r,rt,t);return function(o){return Xc(i(o),e)}}function Nr(n,e,t){let r=Ue(n,e);if(r===void 0)return null;let i=Re(r,rt|O,t);return function(o){return nf(i(o),e)}}function ms(n,e){let t=n[e];if(t!==void 0){if(typeof t!="number")throw new Error(`Expected a number for ${e}`);return t}}function Qd(n,e){let t=n[e];if(t!==void 0){if(typeof t=="number")return ke(t);if(!Array.isArray(t))throw new Error(`Expected a number or size array for ${e}`);if(t.length!==2||typeof t[0]!="number"||typeof t[1]!="number")throw new Error(`Expected a number or size array for ${e}`);return t}}function ef(n,e){let t=n[e];if(t!==void 0){if(typeof t!="string")throw new Error(`Expected a string for ${e}`);return t}}function Kc(n,e){let t=n[e];if(t!==void 0){if(t!=="bottom-left"&&t!=="bottom-right"&&t!=="top-left"&&t!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${e}`);return t}}function Bc(n,e){let t=n[e];if(t!==void 0){if(t!=="pixels"&&t!=="fraction")throw new Error(`Expected pixels or fraction for ${e}`);return t}}function tf(n,e){let t=n[e];if(t!==void 0)return On(t,e)}function Dr(n,e){let t=n[e];if(t!==void 0){if(typeof t!="string")throw new Error(`Expected a string for ${e}`);if(t!=="declutter"&&t!=="obstacle"&&t!=="none")throw new Error(`Expected declutter, obstacle, or none for ${e}`);return t}}function On(n,e){if(!Array.isArray(n))throw new Error(`Expected an array for ${e}`);let t=n.length;for(let r=0;r<t;++r)if(typeof n[r]!="number")throw new Error(`Expected an array of numbers for ${e}`);return n}function Wc(n,e){if(typeof n!="string")throw new Error(`Expected a string for ${e}`);return n}function ps(n,e){if(typeof n!="number")throw new Error(`Expected a number for ${e}`);return n}function Yc(n,e){if(typeof n=="string")return n;let t=On(n,e),r=t.length;if(r<3||r>4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return t}function Xc(n,e){let t=On(n,e);if(t.length!==2)throw new Error(`Expected an array of two numbers for ${e}`);return t}function nf(n,e){return typeof n=="number"?n:Xc(n,e)}var Zc={RENDER_ORDER:"renderOrder"},_s=class extends dn{constructor(e){e=e||{};let t=Object.assign({},e);delete t.style,delete t.renderBuffer,delete t.updateWhileAnimating,delete t.updateWhileInteracting,super(t),this.declutter_=e.declutter?String(e.declutter):void 0,this.renderBuffer_=e.renderBuffer!==void 0?e.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(e.style),this.updateWhileAnimating_=e.updateWhileAnimating!==void 0?e.updateWhileAnimating:!1,this.updateWhileInteracting_=e.updateWhileInteracting!==void 0?e.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(e){return super.getFeatures(e)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Zc.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(e,t){let r=this.getDeclutter();r in e.declutter||(e.declutter[r]=new En(9)),this.getRenderer().renderDeclutter(e,t)}setRenderOrder(e){this.set(Zc.RENDER_ORDER,e)}setStyle(e){this.style_=e===void 0?hs:e;let t=rf(e);this.styleFunction_=e===null?void 0:Vc(t),this.changed()}setDeclutter(e){this.declutter_=e?String(e):void 0,this.changed()}};function rf(n){if(n===void 0)return hs;if(!n)return null;if(typeof n=="function"||n instanceof Xt)return n;if(!Array.isArray(n))return gs([n]);if(n.length===0)return[];let e=n.length,t=n[0];if(t instanceof Xt){let i=new Array(e);for(let o=0;o<e;++o){let s=n[o];if(!(s instanceof Xt))throw new Error("Expected a list of style instances");i[o]=s}return i}if("style"in t){let i=new Array(e);for(let o=0;o<e;++o){let s=n[o];if(!("style"in s))throw new Error("Expected a list of rules with a style property");i[o]=s}return Hc(i)}return gs(n)}var qc=_s;var ys=class extends ne{constructor(e,t,r,i){super(e),this.inversePixelTransform=t,this.frameState=r,this.context=i}},$c=ys;var vs=class extends Tt{constructor(e){super(),this.map_=e}dispatchRenderEvent(e,t){F()}calculateMatrices2D(e){let t=e.viewState,r=e.coordinateToPixelTransform,i=e.pixelToCoordinateTransform;un(r,e.size[0]/2,e.size[1]/2,1/t.resolution,-1/t.resolution,-t.rotation,-t.center[0],-t.center[1]),yl(i,r)}forEachFeatureAtCoordinate(e,t,r,i,o,s,a,l){let c,u=t.viewState;function h(C,D,B,Z){return o.call(s,D,C?B:null,Z)}let d=u.projection,f=Ws(e.slice(),d),g=[[0,0]];if(d.canWrapX()&&i){let C=d.getExtent(),D=lt(C);g.push([-D,0],[D,0])}let y=t.layerStatesArray,p=y.length,v=[],x=[];for(let C=0;C<g.length;C++)for(let D=p-1;D>=0;--D){let B=y[D],Z=B.layer;if(Z.hasRenderer()&&pt(B,u)&&a.call(l,Z)){let _=Z.getRenderer(),w=Z.getSource();if(_&&w){let L=w.getWrapX()?f:e,ot=h.bind(null,B.managed);x[0]=L[0]+g[C][0],x[1]=L[1]+g[C][1],c=_.forEachFeatureAtCoordinate(x,t,r,ot,v)}if(c)return c}}if(v.length===0)return;let P=1/v.length;return v.forEach((C,D)=>C.distanceSq+=D*P),v.sort((C,D)=>C.distanceSq-D.distanceSq),v.some(C=>c=C.callback(C.feature,C.layer,C.geometry)),c}hasFeatureAtCoordinate(e,t,r,i,o,s){return this.forEachFeatureAtCoordinate(e,t,r,i,mt,this,o,s)!==void 0}getMap(){return this.map_}renderFrame(e){F()}scheduleExpireIconCache(e){ie.canExpireCache()&&e.postRenderFunctions.push(of)}};function of(n,e){ie.expire()}var Jc=vs;var xs=class extends Jc{constructor(e){super(e),this.fontChangeListenerKey_=k(xt,Ne.PROPERTYCHANGE,e.redrawText,e),this.element_=ve?ql():document.createElement("div");let t=this.element_.style;t.position="absolute",t.width="100%",t.height="100%",t.zIndex="0",this.element_.className=et+" ol-layers";let r=e.getViewport();r&&r.insertBefore(this.element_,r.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(e,t){let r=this.getMap();if(r.hasListener(e)){let i=new $c(e,void 0,t);r.dispatchEvent(i)}}disposeInternal(){U(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(e){if(!e){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(e),this.dispatchRenderEvent(Fe.PRECOMPOSE,e);let t=e.layerStatesArray.sort((c,u)=>c.zIndex-u.zIndex);t.some(c=>c.layer instanceof qc&&c.layer.getDeclutter())&&(e.declutter={});let i=e.viewState;this.children_.length=0;let o=[],s=null;for(let c=0,u=t.length;c<u;++c){let h=t[c];e.layerIndex=c;let d=h.layer,f=d.getSourceState();if(!pt(h,i)||f!="ready"&&f!="undefined"){d.unrender();continue}let g=d.render(e,s);g&&(g!==s&&(this.children_.push(g),s=g),o.push(h))}this.declutter(e,o),Zl(this.element_,this.children_);let l=this.getMap().getTargetElement();if(ze(l)){let c=l.getContext("2d");for(let u of this.children_){let h=u.firstElementChild||u,d=u.style.backgroundColor;if(d&&(!ze(h)||h.width>0)&&(c.fillStyle=d,c.fillRect(0,0,l.width,l.height)),ze(h)&&h.width>0){c.save();let f=u.style.opacity||h.style.opacity;c.globalAlpha=f===""?1:Number(f);let g=h.style.transform;if(g)c.transform(...lr(g));else{let y=parseFloat(h.style.width)/h.width,p=parseFloat(h.style.height)/h.height;c.transform(y,0,0,p,0,0)}c.drawImage(h,0,0),c.restore()}}}this.dispatchRenderEvent(Fe.POSTCOMPOSE,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}declutter(e,t){if(e.declutter){for(let r=t.length-1;r>=0;--r){let i=t[r],o=i.layer;o.getDeclutter()&&o.renderDeclutter(e,i)}t.forEach(r=>r.layer.renderDeferred(e))}}},Qc=xs;function eu(n){if(n instanceof dn){n.setMapInternal(null);return}n instanceof fn&&n.getLayers().forEach(eu)}function tu(n,e){if(n instanceof dn){n.setMapInternal(e);return}if(n instanceof fn){let t=n.getLayers().getArray();for(let r=0,i=t.length;r<i;++r)tu(t[r],e)}}var Es=class extends q{constructor(e){super(),e=e||{},this.on,this.once,this.un;let t=sf(e);this.renderComplete_=!1,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=e.maxTilesLoading!==void 0?e.maxTilesLoading:16,this.pixelRatio_=e.pixelRatio!==void 0?e.pixelRatio:Ul,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=Ot(),this.pixelToCoordinateTransform_=Ot(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,ve||(this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_)),this.mapBrowserEventHandler_=null,this.moveTolerance_=e.moveTolerance,this.keyboardEventTarget_=t.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,ve||(this.resizeObserver_=new ResizeObserver(()=>this.updateSize())),this.controls=t.controls||(ve?new le:ec()),this.interactions=t.interactions||(ve?new le:vc({onFocusOnly:!0})),this.overlays_=t.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new jl(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(ee.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(ee.VIEW,this.handleViewChanged_),this.addChangeListener(ee.SIZE,this.handleSizeChanged_),this.addChangeListener(ee.TARGET,this.handleTargetChanged_),this.setProperties(t.values);let r=this;e.view&&!(e.view instanceof ye)&&e.view.then(function(i){r.setView(new ye(i))}),this.controls.addEventListener(ae.ADD,i=>{i.element.setMap(this)}),this.controls.addEventListener(ae.REMOVE,i=>{i.element.setMap(null)}),this.interactions.addEventListener(ae.ADD,i=>{i.element.setMap(this)}),this.interactions.addEventListener(ae.REMOVE,i=>{i.element.setMap(null)}),this.overlays_.addEventListener(ae.ADD,i=>{this.addOverlayInternal_(i.element)}),this.overlays_.addEventListener(ae.REMOVE,i=>{let o=i.element.getId();o!==void 0&&delete this.overlayIdIndex_[o.toString()],i.element.setMap(null)}),this.controls.forEach(i=>{i.setMap(this)}),this.interactions.forEach(i=>{i.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(e){this.getControls().push(e)}addInteraction(e){this.getInteractions().push(e)}addLayer(e){this.getLayerGroup().getLayers().push(e)}handleLayerAdd_(e){tu(e.layer,this)}addOverlay(e){this.getOverlays().push(e)}addOverlayInternal_(e){let t=e.getId();t!==void 0&&(this.overlayIdIndex_[t.toString()]=e),e.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_?.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(e,t,r){if(!this.frameState_||!this.renderer_)return;let i=this.getCoordinateFromPixelInternal(e);r=r!==void 0?r:{};let o=r.hitTolerance!==void 0?r.hitTolerance:0,s=r.layerFilter!==void 0?r.layerFilter:mt,a=r.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(i,this.frameState_,o,a,t,null,s,null)}getFeaturesAtPixel(e,t){let r=[];return this.forEachFeatureAtPixel(e,function(i){r.push(i)},t),r}getAllLayers(){let e=[];function t(r){r.forEach(function(i){i instanceof fn?t(i.getLayers()):e.push(i)})}return t(this.getLayers()),e}hasFeatureAtPixel(e,t){if(!this.frameState_||!this.renderer_)return!1;let r=this.getCoordinateFromPixelInternal(e);t=t!==void 0?t:{};let i=t.layerFilter!==void 0?t.layerFilter:mt,o=t.hitTolerance!==void 0?t.hitTolerance:0,s=t.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(r,this.frameState_,o,s,i,null)}getEventCoordinate(e){return this.getCoordinateFromPixel(this.getEventPixel(e))}getEventCoordinateInternal(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))}getEventPixel(e){let r=this.viewport_.getBoundingClientRect(),i=this.getSize(),o=r.width/i[0],s=r.height/i[1],a="changedTouches"in e?e.changedTouches[0]:e;return[(a.clientX-r.left)/o,(a.clientY-r.top)/s]}getTarget(){return this.get(ee.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(e){return en(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}getCoordinateFromPixelInternal(e){let t=this.frameState_;return t?bi(t.pixelToCoordinateTransform,e.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(e){let t=this.overlayIdIndex_[e.toString()];return t!==void 0?t:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(ee.LAYERGROUP)}setLayers(e){let t=this.getLayerGroup();if(e instanceof le){t.setLayers(e);return}let r=t.getLayers();r.clear(),r.extend(e)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){let e=this.getLayerGroup().getLayerStatesArray();for(let t=0,r=e.length;t<r;++t){let i=e[t];if(!i.visible)continue;let o=i.layer.getRenderer();if(o&&!o.ready)return!0;let s=i.layer.getSource();if(s&&s.loading)return!0}return!1}getPixelFromCoordinate(e){let t=Ee(e,this.getView().getProjection());return this.getPixelFromCoordinateInternal(t)}getPixelFromCoordinateInternal(e){let t=this.frameState_;return t?bi(t.coordinateToPixelTransform,e.slice(0,2)):null}getPixelRatio(){return this.pixelRatio_}setPixelRatio(e){this.pixelRatio_!==e&&(this.pixelRatio_=e,this.render())}getRenderer(){return this.renderer_}getSize(){return this.get(ee.SIZE)}getView(){return this.get(ee.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){let e=this.getTargetElement();return e?e.ownerDocument:document}getTilePriority(e,t,r,i){return Wl(this.frameState_,e,t,r,i)}handleBrowserEvent(e,t){t=t||e.type;let r=new Te(t,this,e);this.handleMapBrowserEvent(r)}handleMapBrowserEvent(e){if(!this.frameState_)return;let t=e.originalEvent,r=t.type;if(r===mn.POINTERDOWN||r===R.WHEEL||r===R.KEYDOWN){let i=this.getOwnerDocument(),o=this.viewport_.getRootNode?this.viewport_.getRootNode():i,s=t.target,a=o instanceof ShadowRoot?o.host===s?o.host.ownerDocument:o:o===i?i.documentElement:o;if(this.overlayContainerStopEvent_.contains(s)||!a.contains(s))return}if(e.frameState=this.frameState_,this.dispatchEvent(e)!==!1){let i=this.getInteractions().getArray().slice();for(let o=i.length-1;o>=0;o--){let s=i[o];if(s.getMap()!==this||!s.getActive()||!this.getTargetElement())continue;if(!s.handleEvent(e)||e.propagationStopped)break}}}handlePostRender(){let e=this.frameState_,t=this.tileQueue_;if(!t.isEmpty()){let i=this.maxTilesLoading_,o=i;if(e){let s=e.viewHints;if(s[he.ANIMATING]||s[he.INTERACTING]){let a=Date.now()-e.time>8;i=a?0:8,o=a?0:2}}t.getTilesLoading()<i&&(t.reprioritize(),t.loadMoreTiles(i,o))}e&&this.renderer_&&!e.animate&&(this.renderComplete_?(this.hasListener(Fe.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(Fe.RENDERCOMPLETE,e),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new Qe(Le.LOADEND,this,e)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new Qe(Le.LOADSTART,this,e))));let r=this.postRenderFunctions_;if(e)for(let i=0,o=r.length;i<o;++i)r[i](this,e);r.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let r=0,i=this.targetChangeHandlerKeys_.length;r<i;++r)U(this.targetChangeHandlerKeys_[r]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(R.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(R.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,this.viewport_.remove()}if(this.targetElement_&&!ze(this.targetElement_)){this.resizeObserver_?.unobserve(this.targetElement_);let r=this.targetElement_.getRootNode();r instanceof ShadowRoot&&this.resizeObserver_.unobserve(r.host),this.setSize(void 0)}let e=this.getTarget(),t=typeof e=="string"?document.getElementById(e):e;if(this.targetElement_=t,!t)this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);else{if(ze(t)||t.appendChild(this.viewport_),this.renderer_||(this.renderer_=new Qc(this)),!ze(t)){this.mapBrowserEventHandler_=new Bl(this,this.moveTolerance_);for(let i in K)this.mapBrowserEventHandler_.addEventListener(K[i],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(R.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(R.WHEEL,this.boundHandleBrowserEvent_,fr?{passive:!1}:!1);let r;if(this.keyboardEventTarget_)r=this.keyboardEventTarget_;else{let i=t.getRootNode();r=i instanceof ShadowRoot?i.host:t}if(this.targetChangeHandlerKeys_=[k(r,R.KEYDOWN,this.handleBrowserEvent,this),k(r,R.KEYPRESS,this.handleBrowserEvent,this)],t instanceof HTMLElement){let i=t.getRootNode();i instanceof ShadowRoot&&this.resizeObserver_.observe(i.host),this.resizeObserver_?.observe(t)}}this.updateSize()}}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(U(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(U(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);let e=this.getView();e&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=k(e,Ne.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=k(e,R.CHANGE,this.handleViewPropertyChanged_,this),e.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(U),this.layerGroupPropertyListenerKeys_=null);let e=this.getLayerGroup();e&&(this.handleLayerAdd_(new we("addlayer",e)),this.layerGroupPropertyListenerKeys_=[k(e,Ne.PROPERTYCHANGE,this.render,this),k(e,R.CHANGE,this.render,this),k(e,"addlayer",this.handleLayerAdd_,this),k(e,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){if(!this.frameState_)return;let e=this.frameState_.layerStatesArray;for(let t=0,r=e.length;t<r;++t){let i=e[t].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(e){return this.getControls().remove(e)}removeInteraction(e){return this.getInteractions().remove(e)}removeLayer(e){return this.getLayerGroup().getLayers().remove(e)}handleLayerRemove_(e){eu(e.layer)}removeOverlay(e){return this.getOverlays().remove(e)}renderFrame_(e){let t=this.getSize(),r=this.getView(),i=this.frameState_,o=null;if(t!==void 0&&Ho(t)&&r&&r.isDef()){let s=r.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=r.getState();if(o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutter:null,extent:qt(a.center,a.resolution,a.rotation,t),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:t,tileQueue:this.tileQueue_,time:e,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{},mapId:ge(this),renderTargets:{}},a.nextCenter&&a.nextResolution){let l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;o.nextExtent=qt(a.nextCenter,a.nextResolution,l,t)}}this.frameState_=o,this.renderer_.renderFrame(o),o&&(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),i&&(!this.previousExtent_||!wt(this.previousExtent_)&&!Kr(o.extent,this.previousExtent_))&&(this.dispatchEvent(new Qe(Le.MOVESTART,this,i)),this.previousExtent_=Kn(this.previousExtent_)),this.previousExtent_&&!o.viewHints[he.ANIMATING]&&!o.viewHints[he.INTERACTING]&&!Kr(o.extent,this.previousExtent_)&&(this.dispatchEvent(new Qe(Le.MOVEEND,this,o)),Ms(o.extent,this.previousExtent_))),this.dispatchEvent(new Qe(Le.POSTRENDER,this,o)),this.renderComplete_=(this.hasListener(Le.LOADSTART)||this.hasListener(Le.LOADEND)||this.hasListener(Fe.RENDERCOMPLETE))&&!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady(),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(e){let t=this.getLayerGroup();t&&this.handleLayerRemove_(new we("removelayer",t)),this.set(ee.LAYERGROUP,e)}setSize(e){this.set(ee.SIZE,e)}setTarget(e){this.set(ee.TARGET,e)}setView(e){if(!e||e instanceof ye){this.set(ee.VIEW,e);return}this.set(ee.VIEW,new ye);let t=this;e.then(function(r){t.setView(new ye(r))})}updateSize(){let e=this.getTargetElement(),t;if(e){let i,o;if(ze(e)){let s=e.getContext("2d").getTransform();i=e.width/s.a,o=e.height/s.d}else{let s=getComputedStyle(e);i=e.offsetWidth-parseFloat(s.borderLeftWidth)-parseFloat(s.paddingLeft)-parseFloat(s.paddingRight)-parseFloat(s.borderRightWidth),o=e.offsetHeight-parseFloat(s.borderTopWidth)-parseFloat(s.paddingTop)-parseFloat(s.paddingBottom)-parseFloat(s.borderBottomWidth)}!isNaN(i)&&!isNaN(o)&&(t=[Math.max(0,i),Math.max(0,o)],!Ho(t)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&Gs("No map visible because the map container's width or height are 0."))}let r=this.getSize();t&&(!r||!Mt(t,r))&&(this.setSize(t),this.updateViewportSize_(t))}updateViewportSize_(e){let t=this.getView();t&&t.setViewportSize(e)}};function sf(n){let e=null;n.keyboardEventTarget!==void 0&&(e=typeof n.keyboardEventTarget=="string"?document.getElementById(n.keyboardEventTarget):n.keyboardEventTarget);let t={},r=n.layers&&typeof n.layers.getLayers=="function"?n.layers:new fn({layers:n.layers});t[ee.LAYERGROUP]=r,t[ee.TARGET]=n.target,t[ee.VIEW]=n.view instanceof ye?n.view:new ye;let i;n.controls!==void 0&&(Array.isArray(n.controls)?i=new le(n.controls.slice()):(G(typeof n.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),i=n.controls));let o;n.interactions!==void 0&&(Array.isArray(n.interactions)?o=new le(n.interactions.slice()):(G(typeof n.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),o=n.interactions));let s;return n.overlays!==void 0?Array.isArray(n.overlays)?s=new le(n.overlays.slice()):(G(typeof n.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),s=n.overlays):s=new le,{controls:i,interactions:o,keyboardEventTarget:e,overlays:s,values:t}}var af=Es;var bs=class n extends q{constructor(e){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_),e)if(typeof e.getSimplifiedGeometry=="function"){let t=e;this.setGeometry(t)}else{let t=e;this.setProperties(t)}}clone(){let e=new n(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());let t=this.getGeometry();t&&e.setGeometry(t.clone());let r=this.getStyle();return r&&e.setStyle(r),e}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_&&(U(this.geometryChangeKey_),this.geometryChangeKey_=null);let e=this.getGeometry();e&&(this.geometryChangeKey_=k(e,R.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(e){this.set(this.geometryName_,e)}setStyle(e){this.style_=e,this.styleFunction_=e?lf(e):void 0,this.changed()}setId(e){this.id_=e,this.changed()}setGeometryName(e){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}};function lf(n){if(typeof n=="function")return n;let e;return Array.isArray(n)?e=n:(G(typeof n.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[n]),function(){return e}}var cf=bs;var Y={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},uf={ERROR:"error"},ws=class extends ne{constructor(e){super(uf.ERROR),this.code=e.code,this.message=e.message}},Cs=class extends q{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.position_=null,this.transform_=qs,this.watchId_=void 0,this.addChangeListener(Y.PROJECTION,this.handleProjectionChanged_),this.addChangeListener(Y.TRACKING,this.handleTrackingChanged_),e.projection!==void 0&&this.setProjection(e.projection),e.trackingOptions!==void 0&&this.setTrackingOptions(e.trackingOptions),this.setTracking(e.tracking!==void 0?e.tracking:!1)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){let e=this.getProjection();e&&(this.transform_=$s(Qt("EPSG:4326"),e),this.position_&&this.set(Y.POSITION,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){let e=this.getTracking();e&&this.watchId_===void 0?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):!e&&this.watchId_!==void 0&&(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(e){let t=e.coords;this.set(Y.ACCURACY,t.accuracy),this.set(Y.ALTITUDE,t.altitude===null?void 0:t.altitude),this.set(Y.ALTITUDE_ACCURACY,t.altitudeAccuracy===null?void 0:t.altitudeAccuracy),this.set(Y.HEADING,t.heading===null?void 0:jn(t.heading)),this.position_?(this.position_[0]=t.longitude,this.position_[1]=t.latitude):this.position_=[t.longitude,t.latitude];let r=this.transform_(this.position_);this.set(Y.POSITION,r.slice()),this.set(Y.SPEED,t.speed===null?void 0:t.speed);let i=Pl(this.position_,t.accuracy);i.applyTransform(this.transform_),this.set(Y.ACCURACY_GEOMETRY,i),this.changed()}positionError_(e){this.dispatchEvent(new ws(e))}getAccuracy(){return this.get(Y.ACCURACY)}getAccuracyGeometry(){return this.get(Y.ACCURACY_GEOMETRY)||null}getAltitude(){return this.get(Y.ALTITUDE)}getAltitudeAccuracy(){return this.get(Y.ALTITUDE_ACCURACY)}getHeading(){return this.get(Y.HEADING)}getPosition(){return this.get(Y.POSITION)}getProjection(){return this.get(Y.PROJECTION)}getSpeed(){return this.get(Y.SPEED)}getTracking(){return this.get(Y.TRACKING)}getTrackingOptions(){return this.get(Y.TRACKING_OPTIONS)}setProjection(e){this.set(Y.PROJECTION,Qt(e))}setTracking(e){this.set(Y.TRACKING,e)}setTrackingOptions(e){this.set(Y.TRACKING_OPTIONS,e)}},hf=Cs;function df(n){return We("svg",{fill:"currentColor",height:"24px",version:"1.1",viewBox:"0 0 24 24",width:"24px",xmlns:"http://www.w3.org/2000/svg",...n,children:We("path",{d:"M15.7389427,5.27697525 C16.129467,5.66749954 16.129467,6.30066452 15.7389427,6.69118881 L10.414,12.015082 L15.7389427,17.3406471 C16.0994267,17.7011311 16.1271562,18.2683621 15.8221313,18.6606533 L15.7389427,18.7548607 C15.3484184,19.145385 14.7152534,19.145385 14.3247292,18.7548607 L8.29289322,12.7230247 C7.90236893,12.3325005 7.90236893,11.6993355 8.29289322,11.3088112 L14.3247292,5.27697525 C14.7152534,4.88645096 15.3484184,4.88645096 15.7389427,5.27697525 Z",transform:"translate(12.0159, 12.0159) rotate(270) translate(-12.0159, -12.0159)"})})}var ff=df;export{be as a,ue as b,Se as c,It as d,Qr as e,ma as f,ct as g,Jn as h,Qn as i,er as j,Lt as k,ni as l,ut as m,ii as n,ht as o,si as p,an as q,du as r,tr as s,gu as t,vf as u,F as v,ge as w,Ne as x,R as y,nm as z,cn as A,rm as B,im as C,pi as D,Mt as E,mt as F,gt as G,dl as H,ne as I,k as J,U as K,Oh as L,ml as M,q as N,G as O,Ot as P,Nm as Q,bi as R,un as S,Dm as T,yl as U,Vh as V,Fm as W,cr as X,vl as Y,wl as Z,Uh as _,Jm as $,Nt as aa,Il as ba,Mi as ca,Pi as da,sg as ea,eg as fa,Ai as ga,Si as ha,rg as ia,Li as ja,Ti as ka,ig as la,ki as ma,Oi as na,lg as oa,Ni as pa,hg as qa,Dt as ra,Di as sa,dg as ta,Sg as ua,Ll as va,Ui as wa,zg as xa,Vg as ya,Al as za,Gi as Aa,Pg as Ba,Hi as Ca,Bg as Da,ur as Ea,Hg as Fa,jg as Ga,Ml as Ha,ji as Ia,cp as Ja,cf as Ka,$e as La,he as Ma,_l as Na,ye as Oa,Fe as Pa,dn as Qa,$h as Ra,ae as Sa,le as Ta,hf as Ua,Ul as Va,ve as Wa,N as Xa,de as Ya,go as Za,ty as _a,ql as $a,ze as ab,bc as bb,Ve as cb,Qo as db,et as eb,P0 as fb,ts as gb,ns as hb,k0 as ib,O0 as jb,rs as kb,Mc as lb,N0 as mb,Pc as nb,D0 as ob,F0 as pb,z0 as qb,kc as rb,V0 as sb,G0 as tb,U0 as ub,K0 as vb,En as wb,Et as xb,Mr as yb,Tr as zb,Xt as Ab,Gc as Bb,Fc as Cb,$c as Db,qc as Eb,cc as Fb,pc as Gb,fn as Hb,af as Ib,Fu as Jb,Rf as Kb,Vu as Lb,Lf as Mb,We as Nb,or as Ob,ll as Pb,cl as Qb,ff as Rb,hl as Sb};