From 18b01e7fa2b080bebf003bcb8c0ca925cb772589 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Wed, 6 Nov 2024 16:12:46 +0000
Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20open-pio?=
=?UTF-8?q?neer/trails-starter@3d663c26627ee1db09ba55c5cac7abc57d70a343=20?=
=?UTF-8?q?=F0=9F=9A=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
starter/assets/{CN15WY9Csywr.js => BTgQpibn4Iow.js} | 2 +-
starter/docs/functions/SimpleUiComponent.html | 2 +-
starter/docs/interfaces/Greeter.html | 4 ++--
starter/docs/interfaces/SimpleUiComponentProps.html | 4 ++--
starter/samples/map-sample/index.html | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
rename starter/assets/{CN15WY9Csywr.js => BTgQpibn4Iow.js} (99%)
diff --git a/starter/assets/CN15WY9Csywr.js b/starter/assets/BTgQpibn4Iow.js
similarity index 99%
rename from starter/assets/CN15WY9Csywr.js
rename to starter/assets/BTgQpibn4Iow.js
index 7c09ffa98..13c1d81d7 100644
--- a/starter/assets/CN15WY9Csywr.js
+++ b/starter/assets/BTgQpibn4Iow.js
@@ -15,7 +15,7 @@ Use ViewOptions instead of a View instance.`)};n.projection!=null&&a("projection
Try to configure 'initialView' explicity.`)}(t.zoom==null||t.resolution==null)&&(t.zoom=0)}initializeProjection(t){if(t==null)return Gt("EPSG:3857");const e=Gt(t);if(!e)throw new Error(`Failed to retrieve projection for code '${t}'.`);return e}}const uh=ii("map:MapRegistry");var pa,_a,ln,hn,va,Un,il,xm;class oS{constructor({references:t}){H(this,il);H(this,pa);H(this,_a,new Map);H(this,ln,new Map);H(this,hn,new Map);H(this,va,new WeakMap);H(this,Un,!1);Q(this,pa,t.httpService);const e=t.providers;for(const n of e)R(this,_a).set(n.mapId,n)}destroy(){R(this,Un)||(uh.info("Destroy map registry and all maps"),Q(this,Un,!0),R(this,ln).forEach(t=>{t.kind==="model"&&t.model.destroy()}),R(this,ln).clear(),R(this,hn).clear())}async getMapModel(t){if(R(this,Un))throw new Error("MapRegistry has already been destroyed.");const e=R(this,hn).get(t);if(e)return dh(await e);const n=R(this,ln).get(t);if(n)return dh(n);const s=R(this,_a).get(t);if(!s){uh.debug(`Failed to find a config provider for map id '${t}'.`);return}const r=ot(this,il,xm).call(this,t,s).catch(a=>{const l={kind:"error",error:new Error(`Failed to construct map '${t}'`,{cause:a})};return R(this,hn).delete(t),R(this,ln).set(t,l),l});return R(this,hn).set(t,r),dh(await r)}async expectMapModel(t){const e=await this.getMapModel(t);if(!e)throw new Error(`No configuration available for map with id '${t}'.`);return e}getMapModelByRawInstance(t){return R(this,va).get(t)}}pa=new WeakMap,_a=new WeakMap,ln=new WeakMap,hn=new WeakMap,va=new WeakMap,Un=new WeakMap,il=new WeakSet,xm=async function(t,e){uh.info(`Creating map with id '${t}'`);const n=await e.getMapConfig(),s=await rS(t,n,R(this,pa));if(R(this,Un))throw s.destroy(),new Error("MapRegistry has been destroyed.");const r={kind:"model",model:s};return R(this,ln).set(t,r),R(this,hn).delete(t),R(this,va).set(s.olMap,s),r};function dh(i){if(i.kind==="error")throw i.error;return i.model}const fh=ii("notifier:NotificationService");var gi,js,ya,nr,hc,hS;class lS{constructor(){H(this,nr);H(this,gi);H(this,js);H(this,ya)}destroy(){clearTimeout(R(this,ya)),Q(this,ya,void 0)}notify(t){ot(this,nr,hc).call(this,"showNotification",{title:t.title??void 0,message:t.message??void 0,level:t.level??"info",displayDuration:t.displayDuration})}closeAll(){ot(this,nr,hc).call(this,"closeAll")}registerHandler(t){if(R(this,gi))return fh.warn(`A notification handler has already been registered; this new handler will be ignored.
The component has likely been used twice in your application.`),{destroy(){}};Q(this,gi,t);const e=R(this,js);if(Q(this,js,void 0),e)for(const[s,...r]of e)t[s](...r);let n=!1;return{destroy:()=>{n||(n=!0,R(this,gi)===t&&Q(this,gi,void 0))}}}}gi=new WeakMap,js=new WeakMap,ya=new WeakMap,nr=new WeakSet,hc=function(t,...e){if(R(this,gi))R(this,gi)[t](...e);else{const n=R(this,js)??Q(this,js,[]);if(n.length>=1024){fh.error(`Internal notification buffer overflow: this event will be dropped to prevent a memory leak.
Make sure that the UI is configured to display notifications (use ).`,{method:t,args:e});return}n.push([t,...e])}},hS=function(){R(this,gi)||fh.warn(`No notification handler has been registered: notifications will not be visible.
-Make sure that your app contains the component.`)};var xa,nl,bm;class cS{constructor(t){H(this,nl);H(this,xa);Q(this,xa,t.references.interceptors.map((e,n)=>[t.referencesMeta.interceptors[n].serviceId,e]))}async fetch(t,e){const n=e?.signal??void 0,s=Object.assign({},e?.context),r=dS(e);gh(n);let a=uS(t);{const l={target:a,signal:n??new AbortController().signal,context:s,options:r};gh(n),await ot(this,nl,bm).call(this,l),a=l.target}const o=new Request(a,{...r,signal:n});return await window.fetch(o)}}xa=new WeakMap,nl=new WeakSet,bm=async function(t){const{signal:e}=t;for(const[n,s]of R(this,xa))if(gh(e),s.beforeRequest)try{await s.beforeRequest(t)}catch(r){throw Xp(r),new Error(`Interceptor '${n}' failed with an error`,{cause:r})}};function uS(i){return typeof i=="string"?new URL(i,window.location.href):i}function dS(i){const t=i?.method??"GET",e=new Headers(i?.headers??{}),n={...i,method:t,headers:e};for(const s in n)fS[s]&&delete n[s];return n}const fS={context:1,signal:1};function gh(i){i?.aborted&&qp()}const gS={"ol-app":{name:"ol-app",services:{MainMapProvider:{name:"MainMapProvider",clazz:Q2,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:oS,provides:[{name:"map.MapRegistry",qualifier:"map.MapRegistry"}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:lS,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/overview-map":{name:"@open-pioneer/overview-map",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-viewer":{name:"@open-pioneer/scale-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-bar":{name:"@open-pioneer/scale-bar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/geolocation":{name:"@open-pioneer/geolocation",services:{},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:cS,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}}},mS='.sidebar{height:100%;position:absolute;top:0;background-color:#ffffffb3;transition:width .3s ease-out 0s}.right-bottom{position:absolute;right:0;bottom:0;background:#fff}.zoom-controls{position:absolute;z-index:1000;bottom:2rem;right:1rem}.ol-control.ol-zoom{left:unset;right:.5em}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.overview-map .ol-overviewmap{position:relative;height:100%;width:100%}.overview-map .ol-overviewmap:not(.ol-collapsed){border:1px solid black}.overview-map .ol-overviewmap .ol-overviewmap-map{border:none;width:100%;height:100%}.overview-map .ol-overviewmap .ol-overviewmap-box{border:2px solid red}.scale-bar .ol-scale-bar{margin-bottom:8px;margin-right:8px}.scale-bar .ol-scale-bar,.scale-bar .ol-scale-line{position:relative;bottom:0;left:0;background:none}.scale-bar .ol-scale-bar .ol-scale-bar-inner,.scale-bar .ol-scale-bar .ol-scale-line-inner,.scale-bar .ol-scale-line .ol-scale-bar-inner,.scale-bar .ol-scale-line .ol-scale-line-inner{color:var(--chakra-white);border-color:var(--chakra-white)}.measurement-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.measurement-active-tooltip{background:#000000e6;border-radius:4px;border-color:#000000e6;opacity:.9;color:#fff}.measurement-finished-tooltip{background-color:#4cb3ffe6;color:#000;border:1px solid white}.measurement-active-tooltip:before,.measurement-finished-tooltip:before{border-top:6px solid rgba(0,0,0,.9);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.measurement-finished-tooltip:before{border-top-color:#4cb3ff}',pS=["en","de"];function _S(i){switch(i){case"en":return Hu(()=>import("./CGbLuQbJLnhG.js"),[],import.meta.url).then(t=>t.default);case"de":return Hu(()=>import("./BMJspEKb-95r.js"),[],import.meta.url).then(t=>t.default)}throw new Error(`Unsupported locale: '${i}'`)}const vS=Yp(mS),yS=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:_S,locales:pS,packages:gS,styles:vS},Symbol.toStringTag,{value:"Module"})),mh=.75,oo=.1;let xS=class extends Ta{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=t.collapsed!==void 0?t.collapsed:!0,this.collapsible_=t.collapsible!==void 0?t.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=t.rotateWithView!==void 0?t.rotateWithView:!1,this.viewExtent_=void 0;const e=t.className!==void 0?t.className:"ol-overviewmap",n=t.tipLabel!==void 0?t.tipLabel:"Overview map",s=t.collapseLabel!==void 0?t.collapseLabel:"‹";typeof s=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s):this.collapseLabel_=s;const r=t.label!==void 0?t.label:"›";typeof r=="string"?(this.label_=document.createElement("span"),this.label_.textContent=r):this.label_=r;const a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,o=document.createElement("button");o.setAttribute("type","button"),o.title=n,o.appendChild(a),o.addEventListener(et.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=t.view;const l=new j0({view:t.view,controls:new We,interactions:new We});this.ovmap_=l,t.layers&&t.layers.forEach(function(v){l.addLayer(v)});const h=document.createElement("div");h.className="ol-overviewmap-box",h.style.boxSizing="border-box",this.boxOverlay_=new cu({position:[0,0],positioning:"center-center",element:h}),this.ovmap_.addOverlay(this.boxOverlay_);const c=e+" "+or+" "+xl+(this.collapsed_&&this.collapsible_?" "+Po:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=c,u.appendChild(this.ovmapDiv_),u.appendChild(o);const d=this,f=this.boxOverlay_,g=this.boxOverlay_.getElement(),m=function(v){return{clientX:v.clientX,clientY:v.clientY}},p=function(v){const y=m(v),x=l.getEventCoordinateInternal(y);f.setPosition(x)},_=function(v){const y=l.getEventCoordinateInternal(v);d.getMap().getView().setCenterInternal(y),window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",_)};g.addEventListener("mousedown",function(){window.addEventListener("mousemove",p),window.addEventListener("mouseup",_)})}setMap(t){const e=this.getMap();if(t!==e){if(e){const n=e.getView();n&&this.unbindView_(n),this.ovmap_.setTarget(null)}if(super.setMap(t),t){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(ht(t,Zn.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const n=t.getView();n&&(this.bindView_(n),n.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(t){if(t.key===zt.VIEW){const e=t.oldValue;e&&this.unbindView_(e);const n=this.getMap().getView();this.bindView_(n)}else!this.ovmap_.isRendered()&&(t.key===zt.TARGET||t.key===zt.SIZE)&&this.ovmap_.updateSize()}bindView_(t){if(!this.view_){const e=new me({projection:t.getProjection()});this.ovmap_.setView(e)}t.addChangeListener(Ee.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()}unbindView_(t){t.removeChangeListener(Ee.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const n=t.getSize(),r=t.getView().calculateExtentInternal(n);if(this.viewExtent_&&Zs(r,this.viewExtent_))return;this.viewExtent_=r;const a=e.getSize(),l=e.getView().calculateExtentInternal(a),h=e.getPixelFromCoordinateInternal(xn(r)),c=e.getPixelFromCoordinateInternal(Sa(r)),u=Math.abs(h[0]-c[0]),d=Math.abs(h[1]-c[1]),f=a[0],g=a[1];uf*mh||d>g*mh?this.resetExtent_():cn(l,r)||this.recenter_()}resetExtent_(){const t=this.getMap(),e=this.ovmap_,n=t.getSize(),r=t.getView().calculateExtentInternal(n),a=e.getView(),o=Math.log(mh/oo)/Math.LN2,l=1/(Math.pow(2,o/2)*oo);ov(r,l),a.fitInternal(Vh(r))}recenter_(){const t=this.getMap(),e=this.ovmap_,n=t.getView();e.getView().setCenterInternal(n.getCenterInternal())}updateBox_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const n=t.getSize(),s=t.getView(),r=e.getView(),a=this.rotateWithView_?0:-s.getRotation(),o=this.boxOverlay_,l=this.boxOverlay_.getElement(),h=s.getCenterInternal(),c=s.getResolution(),u=r.getResolution(),d=n[0]*c/u,f=n[1]*c/u;if(o.setPosition(h),l){l.style.width=d+"px",l.style.height=f+"px";const g="rotate("+a+"rad)";l.style.transform=g}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=jr(this.ovmap_,di.POSTRENDER,function(t){delete this.ovmapPostrenderKey_,this.updateBox_()},this))}handleClick_(t){t.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(Po),this.collapsed_?Io(this.collapseLabel_,this.label_):Io(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const t=this.ovmap_;if(!this.collapsed_){if(t.isRendered()){this.viewExtent_=void 0,t.render();return}t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())}setCollapsed(t){!this.collapsible_||this.collapsed_===t||this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,this.getMap().getView().getRotation()!==0&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(t){this.validateExtent_(),this.updateBox_()}};const ph="units",bS=[1,2,5],Mr=25.4/.28;class MS extends Ta{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const n=t.className!==void 0?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=n+"-inner",this.element.className=n+" "+or,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=t.minWidth!==void 0?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(ph,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(ph)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(ph,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=t.center,n=t.projection,s=this.getUnits(),r=s=="degrees"?"degrees":"m";let a=Br(n,t.resolution,e,r);const o=this.minWidth_*(this.dpi_||Mr)/Mr,l=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||Mr)/Mr:void 0;let h=o*a,c="";if(s=="degrees"){const y=Xs.degrees;h*=y,h=l){d=m,f=p,g=_;break}else if(f>=o)break;m=d,p=f,_=g,++u}const v=this.scaleBar_?this.createScaleBar(f,d,c):d.toFixed(g<0?-g:0)+" "+c;this.renderedHTML_!=v&&(this.innerElement_.innerHTML=v,this.renderedHTML_=v),this.renderedWidth_!=f&&(this.innerElement_.style.width=f+"px",this.renderedWidth_=f),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,n){const s=this.getScaleForResolution(),r=s<1?Math.round(1/s).toLocaleString()+" : 1":"1 : "+Math.round(s).toLocaleString(),a=this.scaleBarSteps_,o=t/a,l=[this.createMarker("absolute")];for(let c=0;c`+this.createMarker("relative")+(c%2===0||a===2?this.createStepText(c,t,!1,e,n):"")+"")}return l.push(this.createStepText(a,t,!0,e,n)),(this.scaleBarText_?``+r+"
":"")+l.join("")}createMarker(t){return``}createStepText(t,e,n,s,r){const o=(t===0?0:Math.round(s/this.scaleBarSteps_*t*100)/100)+(t===0?"":" "+r),l=t===0?-3:e/this.scaleBarSteps_*-1,h=t===0?0:e/this.scaleBarSteps_*2;return``+o+"
"}getScaleForResolution(){const t=Br(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),e=this.dpi_||Mr,n=1e3/25.4;return t*n*e}render(t){const e=t.frameState;e?this.viewState_=e.viewState:this.viewState_=null,this.updateElement_()}}const CS=i=>{const{displayMode:t="line"}=i,{containerProps:e}=Ae("scale-bar",i),{map:n}=si(i),s=b.useRef(null);return b.useEffect(()=>{if(s.current&&n){const r=n.olMap,a=new MS({units:"metric",target:s.current,bar:t==="bar"});return r.addControl(a),()=>{r.removeControl(a)}}},[t,n]),S.jsx(Mt,{...e,ref:s})},Fa=b.forwardRef(function(t,e){const{label:n,icon:s,onClick:r,isLoading:a,isDisabled:o,isActive:l,tooltipProps:h,buttonProps:c}=t,{containerProps:{className:u,...d}}=Ae("tool-button",t),f=yc(u,{"tool-button--active":l,"tool-button--loading":a,"tool-button--disabled":o}),g=typeof l=="boolean"?l?"true":"false":void 0,[m,p]=b.useState(!1),_=v=>{p(!1),r?.(v)};return S.jsx(Kf,{label:n,placement:"auto",openDelay:500,...h,isOpen:m,onOpen:()=>p(!0),onClose:()=>p(!1),children:S.jsx(wS,{className:f,ref:e,"aria-label":n,leftIcon:s,iconSpacing:0,padding:0,isDisabled:o,isLoading:a,isActive:l,"aria-pressed":g,...d,...c,onClick:_})})}),wS=b.forwardRef(function(t,e){const{"aria-labelledby":n,"aria-describedby":s,...r}=t;return S.jsx(eg,{ref:e,...r})}),ES="@open-pioneer/map-navigation",Cu=ts.bind(void 0,ES);var Mm={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},gf=Xn.createContext&&Xn.createContext(Mm),SS=["attr","size","title"];function IS(i,t){if(i==null)return{};var e=RS(i,t),n,s;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(e[n]=i[n])}return e}function RS(i,t){if(i==null)return{};var e={};for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){if(t.indexOf(n)>=0)continue;e[n]=i[n]}return e}function Uo(){return Uo=Object.assign?Object.assign.bind():function(i){for(var t=1;tXn.createElement(t.tag,$o({key:e},t.attr),Cm(t.child)))}function Cn(i){return t=>Xn.createElement(LS,Uo({attr:$o({},i.attr)},t),Cm(i.child))}function LS(i){var t=e=>{var{attr:n,size:s,title:r}=i,a=IS(i,SS),o=s||e.size||"1em",l;return e.className&&(l=e.className),i.className&&(l=(l?l+" ":"")+i.className),Xn.createElement("svg",Uo({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,n,a,{className:l,style:$o($o({color:i.color||e.color},e.style),i.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),r&&Xn.createElement("title",null,r),i.children)};return gf!==void 0?Xn.createElement(gf.Consumer,null,e=>t(e)):t(Mm)}function AS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"},child:[]},{tag:"line",attr:{x1:"12",y1:"9",x2:"12",y2:"13"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(i)}function DS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 14 4 9 9 4"},child:[]},{tag:"path",attr:{d:"M20 20v-7a4 4 0 0 0-4-4H4"},child:[]}]})(i)}function kS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 14 20 9 15 4"},child:[]},{tag:"path",attr:{d:"M4 20v-7a4 4 0 0 1 4-4h12"},child:[]}]})(i)}function FS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},child:[]},{tag:"polyline",attr:{points:"9 22 9 12 15 12 15 22"},child:[]}]})(i)}function NS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(i)}function GS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(i)}const VS=b.forwardRef(function(t,e){const{containerProps:n}=Ae("initial-extent",t),{map:s}=si(t),r=Cu();function a(){const o=s?.initialExtent,l=s?.olMap;if(o&&l){const h=[o.xMin,o.yMin,o.xMax,o.yMax];l.getView().fit(h,{duration:200})}}return S.jsx(Fa,{ref:e,label:r.formatMessage({id:"initial-extent.title"}),icon:S.jsx(FS,{}),onClick:a,...n})}),zS=b.forwardRef(function(t,e){return S.jsx(wm,{zoomDirection:"in",ref:e,...t})}),jS=b.forwardRef(function(t,e){return S.jsx(wm,{zoomDirection:"out",ref:e,...t})}),wm=b.forwardRef(function(t,e){const{zoomDirection:n}=t,{map:s}=si(t),r=Cu(),[a,o]=b.useState(!1),{defaultClassName:l,buttonLabel:h,buttonIcon:c}=BS(r,n),{containerProps:u}=Ae(yc("zoom",l),t);function d(){if(a)return;o(!0);const f=s?.olMap.getView();let g=f?.getZoom();const m=f?.getMaxZoom()||Number.MAX_SAFE_INTEGER,p=f?.getMinZoom()||0;f&&g!==void 0&&(n==="in"&&gp&&--g,f.animate({zoom:g,duration:200},()=>o(!1)))}return S.jsx(Fa,{ref:e,label:h,icon:c,onClick:d,...u})});function BS(i,t){switch(t){case"in":return{defaultClassName:"zoom-in",buttonLabel:i.formatMessage({id:"zoom-in.title"}),buttonIcon:S.jsx(GS,{})};case"out":return{defaultClassName:"zoom-out",buttonLabel:i.formatMessage({id:"zoom-out.title"}),buttonIcon:S.jsx(NS,{})}}}var WS=Symbol.for("preact-signals");function wu(){if(Ds>1)Ds--;else{for(var i,t=!1;Vr!==void 0;){var e=Vr;for(Vr=void 0,cc++;e!==void 0;){var n=e.o;if(e.o=void 0,e.f&=-3,!(8&e.f)&&Sm(e))try{e.c()}catch(s){t||(i=s,t=!0)}e=n}}if(cc=0,Ds--,t)throw i}}var yt=void 0;function Eu(i){var t=yt;yt=void 0;try{return i()}finally{yt=t}}var Vr=void 0,Ds=0,cc=0,Ho=0;function Em(i){if(yt!==void 0){var t=i.n;if(t===void 0||t.t!==yt)return t={i:0,S:i,p:yt.s,n:void 0,t:yt,e:void 0,x:void 0,r:t},yt.s!==void 0&&(yt.s.n=t),yt.s=t,i.n=t,32&yt.f&&i.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=yt.s,t.n=void 0,yt.s.n=t,yt.s=t),t}}function he(i){this.v=i,this.i=0,this.n=void 0,this.t=void 0}he.prototype.brand=WS;he.prototype.h=function(){return!0};he.prototype.S=function(i){this.t!==i&&i.e===void 0&&(i.x=this.t,this.t!==void 0&&(this.t.e=i),this.t=i)};he.prototype.U=function(i){if(this.t!==void 0){var t=i.e,e=i.x;t!==void 0&&(t.x=e,i.e=void 0),e!==void 0&&(e.e=t,i.x=void 0),i===this.t&&(this.t=e)}};he.prototype.subscribe=function(i){var t=this;return Om(function(){var e=t.value,n=yt;yt=void 0;try{i(e)}finally{yt=n}})};he.prototype.valueOf=function(){return this.value};he.prototype.toString=function(){return this.value+""};he.prototype.toJSON=function(){return this.value};he.prototype.peek=function(){var i=yt;yt=void 0;try{return this.value}finally{yt=i}};Object.defineProperty(he.prototype,"value",{get:function(){var i=Em(this);return i!==void 0&&(i.i=this.i),this.v},set:function(i){if(i!==this.v){if(cc>100)throw new Error("Cycle detected");this.v=i,this.i++,Ho++,Ds++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{wu()}}}});function US(i){return new he(i)}function Sm(i){for(var t=i.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Im(i){for(var t=i.s;t!==void 0;t=t.n){var e=t.S.n;if(e!==void 0&&(t.r=e),t.S.n=t,t.i=-1,t.n===void 0){i.s=t;break}}}function Rm(i){for(var t=i.s,e=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):e=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}i.s=e}function dr(i){he.call(this,void 0),this.x=i,this.s=void 0,this.g=Ho-1,this.f=4}(dr.prototype=new he).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ho))return!0;if(this.g=Ho,this.f|=1,this.i>0&&!Sm(this))return this.f&=-2,!0;var i=yt;try{Im(this),yt=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return yt=i,Rm(this),this.f&=-2,!0};dr.prototype.S=function(i){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}he.prototype.S.call(this,i)};dr.prototype.U=function(i){if(this.t!==void 0&&(he.prototype.U.call(this,i),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};dr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;i!==void 0;i=i.x)i.t.N()}};Object.defineProperty(dr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var i=Em(this);if(this.h(),i!==void 0&&(i.i=this.i),16&this.f)throw this.v;return this.v}});function Tm(i){return new dr(i)}function Pm(i){var t=i.u;if(i.u=void 0,typeof t=="function"){Ds++;var e=yt;yt=void 0;try{t()}catch(n){throw i.f&=-2,i.f|=8,Su(i),n}finally{yt=e,wu()}}}function Su(i){for(var t=i.s;t!==void 0;t=t.n)t.S.U(t);i.x=void 0,i.s=void 0,Pm(i)}function $S(i){if(yt!==this)throw new Error("Out-of-order effect");Rm(this),yt=i,this.f&=-2,8&this.f&&Su(this),wu()}function Na(i){this.x=i,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Na.prototype.c=function(){var i=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{i()}};Na.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Pm(this),Im(this),Ds++;var i=yt;return yt=this,$S.bind(this,i)};Na.prototype.N=function(){2&this.f||(this.f|=2,this.o=Vr,Vr=this)};Na.prototype.d=function(){this.f|=8,1&this.f||Su(this)};function Om(i){var t=new Na(i);try{t.c()}catch(e){throw t.d(),e}return t.d.bind(t)}function HS(i){let t;return{destroy:Om(function(){this[XS]=i.bind(void 0),t=this[qS].bind(this)}),start:t}}var XS="N",qS="S";function ks(i,t){return new KS(i,t?.equal)}function YS(i,t){return new ZS(i,t?.equal)}function Lm(i){return Eu(i)}var vs=Symbol("signal"),zr=Symbol("equals"),Am=class{[vs];constructor(i){this[vs]=i}get value(){return this[vs].value}set value(i){throw new Error("Cannot update a readonly reactive object.")}trigger(){throw new Error("Cannot trigger this reactive object.")}peek(){return this[vs].peek()}toJSON(){return this.value}toString(){return`Reactive[value=${QS(this[vs].value)}]`}},ZS=class extends Am{[zr];constructor(i,t){const e=Tm(t?JS(i,t):i);super(e),this[zr]=t}},KS=class extends Am{[zr];constructor(i,t){super(US(i)),this[zr]=t}get value(){return super.value}set value(i){Eu(()=>this[zr]?.(this.value,i))||(this[vs].value=i)}};function JS(i,t){let e=!0,n;return function(){const r=i();return Eu(()=>((e||!t(n,r))&&(n=r,e=!1),n))}}function QS(i){return typeof i=="string"?JSON.stringify(i):String(i)}function tI(i,t){return i===t?!0:i.length===t.length&&i.every((e,n)=>e===t[n])}function eI(i,t,e,n){const s=Tm(t),r=n?.immediate??!1,a=n?.equal??iI;let o=!0,l,h;function c(){const f=h;h=void 0;try{f?.()}catch(g){throw d.destroy(),g}}const u=i(()=>{const f=s.value;Lm(()=>{const g=l,m=o&&r||!o&&!a(g,f);(m||o)&&(l=f,o=!1),m&&(c(),h=e(f,g))})}),d={destroy(){try{c()}finally{u.destroy()}}};return d}function iI(i,t){return i===t}function Dm(i){Promise.reject(new Error("Error in effect or watch callback",{cause:i}))}var nI=class{queue=[];channel=new MessageChannel;constructor(){this.channel.port2.start()}enqueue(i){const t={fn:i,destroyed:!1};return this.queue.push(t),this.queue.length===1&&this.scheduleIteration(),{destroy(){t.destroyed||(t.destroyed=!0)}}}messageHandler=()=>this.runIteration();scheduleIteration(){const i=this.channel;i.port2.addEventListener("message",this.messageHandler),i.port1.postMessage("")}runIteration(){this.channel.port2.removeEventListener("message",this.messageHandler);const i=this.queue;this.queue=[];for(const t of i)if(!t.destroyed)try{t.fn()}catch(e){Dm(e)}}};function sI(i){const t=new rI(i);return{destroy:t.destroy.bind(t)}}var rI=class{callback;cleanup;watcher;scheduledExecution;isDestroyed=!1;initialExecution=!0;isExecuting=!1;constructor(i){this.callback=i,this.watcher=HS(this.scheduleExecution),this.execute(),this.initialExecution=!1}destroy(){if(!this.isDestroyed){this.isDestroyed=!0;try{this.triggerCleanup()}finally{this.watcher?.destroy(),this.watcher=void 0,this.scheduledExecution?.destroy(),this.scheduledExecution=void 0}}}execute(){const i=this.watcher;if(!i)return;this.isExecuting=!0;const t=i.start();try{if(this.initialExecution)try{this.triggerCallback()}catch(e){throw this.destroy(),e}else try{this.triggerCallback()}catch(e){Dm(e)}}finally{t(),this.isExecuting=!1}this.isDestroyed&&this.triggerCleanup()}triggerCallback(){if(!this.isDestroyed){this.triggerCleanup();const i=this.callback();typeof i=="function"&&(this.cleanup=i)}}triggerCleanup(){const i=this.cleanup;this.cleanup=void 0;try{i&&Lm(i)}catch(t){throw this.destroy(),t}}scheduleExecution=()=>{if(!this.isDestroyed){if(this.isExecuting)throw new Error("Cycle detected");this.scheduledExecution||(this.scheduledExecution=lI(()=>{try{this.execute()}finally{this.scheduledExecution=void 0}}))}}};function aI(i,t,e){return eI(sI,i,t,{equal:tI,...e})}var oI=new nI;function lI(i){return oI.enqueue(i)}function hI(i){return new cI(i)}var ee,Bs,$t,tn,_o,km,Fm,Hf,cI=(Hf=class{constructor(i){H(this,$t);H(this,ee,new Map);H(this,Bs,ks(!1));if(i)for(const[t,e]of i)R(this,ee).set(t,ks(e))}get size(){return ot(this,$t,tn).call(this),R(this,ee).size}forEach(i){ot(this,$t,tn).call(this);const t=R(this,ee).entries();for(const[e,n]of t)i(n.value,e)}entries(){return ot(this,$t,tn).call(this),ot(this,$t,km).call(this)}keys(){return ot(this,$t,tn).call(this),R(this,ee).keys()}values(){return ot(this,$t,tn).call(this),ot(this,$t,Fm).call(this)}[Symbol.iterator](){return this.entries()}clear(){const i=!!R(this,ee).size;R(this,ee).clear(),i&&ot(this,$t,_o).call(this)}delete(i){const t=R(this,ee).delete(i);return t&&ot(this,$t,_o).call(this),t}get(i){return ot(this,$t,tn).call(this),R(this,ee).get(i)?.value}has(i){return ot(this,$t,tn).call(this),R(this,ee).has(i)}set(i,t){const e=R(this,ee).get(i);return e?e.value=t:(R(this,ee).set(i,ks(t)),ot(this,$t,_o).call(this)),this}},ee=new WeakMap,Bs=new WeakMap,$t=new WeakSet,tn=function(){R(this,Bs).value},_o=function(){R(this,Bs).value=!R(this,Bs).peek()},km=function*(){const i=R(this,ee).entries();for(const[t,e]of i)yield[t,e.value]},Fm=function*(){const i=R(this,ee).values();for(const t of i)yield t.value},Hf);function uI(i,t){const e=b.useRef(i);e.current=i;const n=fI(t);return b.useMemo(()=>YS(()=>e.current()),[n])}function dI(i){const t=b.useCallback(()=>i.peek(),[i]),e=b.useCallback(s=>{const r=aI(()=>[i.value],s);return()=>r.destroy()},[i]),n=b.useSyncExternalStore(e,t);return b.useDebugValue(n),n}function Nm(i,t){const e=uI(i,t),n=dI(e);return b.useDebugValue(n),n}function fI(i){const t=b.useRef();return(t.current==null||!gI(t.current,i))&&(t.current=i??[]),t.current}function gI(i,t){return i===t?!0:i.length===(t?.length??0)&&i.every((e,n)=>e===t[n])}const mI=200;var Qe,uc,vo,Gm;class pI{constructor(t){H(this,Qe);Rt(this,"olMap");Rt(this,"handle");Rt(this,"_mapViews",hI());Rt(this,"_activeViewId",ks(0));Rt(this,"backward",()=>{if(this.canBackward)ot(this,Qe,vo).call(this,this.activeViewId-1),ot(this,Qe,uc).call(this,this.activeViewId);else throw new Error("Backward is not possible at the moment")});Rt(this,"forward",()=>{if(this.canForward)ot(this,Qe,vo).call(this,this.activeViewId+1),ot(this,Qe,uc).call(this,this.activeViewId);else throw new Error("Forward is not possible at the moment")});this.olMap=t.olMap,this.handle=ot(this,Qe,Gm).call(this)}destroy(){this.handle&&Pe(this.handle),this.handle=void 0}get activeViewId(){return this._activeViewId.value}get mapViews(){return this._mapViews}get canBackward(){return this.mapViews.get(this.activeViewId-1)!=null}get canForward(){return this.mapViews.get(this.activeViewId+1)!=null}}Qe=new WeakSet,uc=function(t){const e=this.olMap.getView();this.olMap.setView(new me({center:this.mapViews.get(t).center,resolution:this.mapViews.get(t).resolution,projection:e.getProjection()}))},vo=function(t){this._activeViewId.value=t},Gm=function(){const t=this.olMap.on("moveend",()=>{e()}),e=()=>{const n=this.olMap,s=this.mapViews,r=n.getView(),a=r.getResolution(),o=r.getCenter();if(a!=null&&o!=null&&(o!==s.get(this.activeViewId)?.center||a!==s.get(this.activeViewId)?.resolution)){const l={resolution:a,center:o},h=this.activeViewId+1;for(const c of s.keys())c>h&&s.delete(c);for(const c of s.keys()){if(s.size{if(!i)return;let n=_h.get(i);return n==null?(n={vm:new pI(i),useCount:1},_h.set(i,n)):n.useCount++,e(n.vm),()=>{e(void 0),n.useCount--,n.useCount===0&&(n.vm.destroy(),_h.delete(i))}},[i]),t}b.forwardRef(function(t,e){return S.jsx(Vm,{viewDirection:"forward",ref:e,...t})});b.forwardRef(function(t,e){return S.jsx(Vm,{viewDirection:"backward",ref:e,...t})});const Vm=b.forwardRef(function(t,e){const n=Cu(),{viewDirection:s}=t,{map:r}=si(t),a=_I(r),{defaultClassName:o,buttonLabel:l,buttonIcon:h}=vI(n,s),{containerProps:c}=Ae(yc("view",o),t),u=Nm(()=>a?s==="forward"?a.canForward:a.canBackward:!1,[a,s]),d=()=>{a&&(s==="forward"?a.forward():a.backward())};return a&&S.jsx(Fa,{ref:e,...c,label:l,icon:h,onClick:d,isDisabled:!u})});function vI(i,t){switch(t){case"forward":return{defaultClassName:"view-forward",buttonLabel:i.formatMessage({id:"view-forward.title"}),buttonIcon:S.jsx(kS,{})};case"backward":return{defaultClassName:"view-backward",buttonLabel:i.formatMessage({id:"view-backward.title"}),buttonIcon:S.jsx(DS,{})}}}const yI="ol-app",xI=ts.bind(void 0,yI),bI="@open-pioneer/coordinate-viewer",MI=ts.bind(void 0,bI),CI=4,wI="decimal",EI=i=>{const{precision:t,displayProjectionCode:e,format:n}=i,{containerProps:s}=Ae("coordinate-viewer",i),{map:r}=si(i),a=r?.olMap,o=hm(a)?.getCode()??"";let{coordinates:l}=II(a);l=l&&e?TI(l,o,e):l;const h=SI(l,t,n),c=e||o,u=h?h+" "+c:"";return S.jsx(Mt,{...s,children:S.jsx(al,{className:"coordinate-viewer-text",children:u})})};function SI(i,t,e){const n=MI();return i?RI(i,t,n,e):""}function II(i){const[t,e]=b.useState();return b.useEffect(()=>{if(!i)return;const n=i.on("pointermove",s=>{e(s.coordinate)});return()=>Pe(n)},[i]),{coordinates:t}}function RI(i,t,e,n){if(i[0]==null||i[1]==null)return"";const s=t??CI,r=n??wI,[a,o]=i;let l;if(r==="degree"&&isFinite(a)&&isFinite(o)){const[h,c,u]=pf(a,e,s),[d,f,g]=pf(o,e,s),m=`${Math.abs(h)}°${c}'${u}"${0<=h?"(E)":"(W)"}`,p=`${Math.abs(d)}°${f}'${g}"${0<=d?"(N)":"(S)"}`;l=m+" "+p}else{const h=e.formatNumber(a,{maximumFractionDigits:s,minimumFractionDigits:s}),c=e.formatNumber(o,{maximumFractionDigits:s,minimumFractionDigits:s});l=h+" "+c}return l}function pf(i,t,e){const n=Math.floor(i),s=i-n,r=Math.floor(60*s),o=60*(60*s-r),l=t.formatNumber(o,{maximumFractionDigits:e,minimumFractionDigits:e});return[n,r,l]}function TI(i,t,e){return Pg(i,t,e)}const PI="@open-pioneer/scale-viewer",OI=ts.bind(void 0,PI),LI=i=>{const{containerProps:t}=Ae("scale-viewer",i),{map:e}=si(i),n=OI(),s=m2(e?.olMap),r=s?n.formatNumber(s):void 0;return S.jsx(Mt,{...t,children:r&&S.jsxs(al,{children:["1:",r]})})},zm="@open-pioneer/geolocation",AI=vc.bind(void 0,zm),jm=ts.bind(void 0,zm);function DI(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"},child:[]}]})(i)}const _f=ii("geolocation:GeolocationController"),vf=17;var $n,Hn;class kI{constructor(t,e,n){Rt(this,"supported",!!navigator.geolocation);Rt(this,"olMap");Rt(this,"positionHighlightLayer");Rt(this,"geolocation");Rt(this,"onError");Rt(this,"maxZoom",vf);Rt(this,"accuracyFeature");Rt(this,"positionFeature");Rt(this,"changeHandlers",[]);Rt(this,"setMapToPosition",!0);Rt(this,"trackingOptions",{});Rt(this,"isInitialZoom",!0);H(this,$n,ks(!1));H(this,Hn,ks(!1));this.olMap=t,this.onError=e,this.isInitialZoom=!0,this.accuracyFeature=new Ye,this.accuracyFeature.setStyle(xf()),this.positionFeature=new Ye,this.positionFeature.setStyle(yf()),this.positionHighlightLayer=new El({source:new Rl({features:[this.accuracyFeature,this.positionFeature]})}),this.positionHighlightLayer.setZIndex(bu);const s=n||FI();this.geolocation=new t1({tracking:!1,trackingOptions:s,projection:t.getView()?.getProjection()}),this.trackingOptions=s,this.geolocation.on("error",r=>this.handleGeolocationError(r))}destroy(){this.stopGeolocation(),this.geolocation?.setTracking(!1),this.geolocation.dispose(),this.accuracyFeature=void 0,this.positionFeature=void 0,this.positionHighlightLayer.dispose()}startGeolocation(){if(R(this,Hn).value)return;const t=this.olMap;new Promise(n=>{R(this,Hn).value=!0,R(this,$n).value=!0,this.geolocation?.setProjection(t.getView()?.getProjection()),this.geolocation?.setTracking(!0);const s=this.geolocation.on("change:accuracyGeometry",()=>{const l=this.geolocation.getAccuracyGeometry()||void 0;if(this.accuracyFeature?.setGeometry(l),this.accuracyFeature?.getGeometry()!==void 0&&n(),this.isInitialZoom){const h=this?.accuracyFeature?.getGeometry()?.getExtent();if(h){const c=Y2(h);if(!c)return;t.getView().fit(c,{maxZoom:this.maxZoom}),this.isInitialZoom=!1}}}),r=this.geolocation.on("change:position",()=>{const l=this.geolocation.getPosition();l&&(l[0]||l[1])!==void 0&&(this.positionFeature?.setGeometry(new qn(l)),this.setMapToPosition&&t.getView().setCenter(l),this.positionFeature?.getGeometry()!==void 0&&n())}),a=t.getView().on("change:resolution",()=>{this.setMapToPosition=this.isInitialZoom}),o=t.on("pointermove",l=>{l.dragging&&(this.setMapToPosition=!1)});this.changeHandlers.push(s,r,a,o),t.addLayer(this.positionHighlightLayer)}).then(()=>{R(this,$n).value=!1}).catch(n=>{_f.error("Failed to determine location",n)})}stopGeolocation(){this.geolocation?.setTracking(!1),R(this,Hn).value=!1,R(this,$n).value=!1,this.trackingOptions={},this.setMapToPosition=!0,this.isInitialZoom=!0,this.changeHandlers.forEach(t=>{Pe(t)}),this.changeHandlers=[],this.accuracyFeature?.setGeometry(void 0),this.positionFeature?.setGeometry(void 0),this.olMap.removeLayer(this.positionHighlightLayer)}get active(){return R(this,Hn).value}get loading(){return R(this,$n).value}setPositionFeatureStyle(t){this.positionFeature?.setStyle(t??yf())}setAccuracyFeatureStyle(t){this.accuracyFeature?.setStyle(t??xf())}setMaxZoom(t){this.maxZoom=t??vf}getMaxZoom(){return this.maxZoom}getPositionFeature(){return this.positionFeature}getAccuracyFeature(){return this.accuracyFeature}getTrackingOptions(){return this.trackingOptions}getGeolocation(){return this.geolocation}handleGeolocationError(t){_f.error("Error from geolocation API:",t.message),this.stopGeolocation();const e=(()=>{switch(t.code){case 1:return"permission-denied";case 2:return"position-unavailable";case 3:return"timeout";default:return"unknown"}})();this.onError(e)}}$n=new WeakMap,Hn=new WeakMap;const yf=()=>new Et({image:new is({radius:6,fill:new xe({color:"#3399CC"}),stroke:new kt({color:"#fff",width:2})})}),xf=()=>new Et({stroke:new kt({color:"#3399CC",width:3}),fill:new xe({color:"rgba(0, 0, 255, 0.05)"})}),FI=()=>({enableHighAccuracy:!0,timeout:6e4,maximumAge:6e5}),NI=b.forwardRef(function(t,e){const{maxZoom:n,positionFeatureStyle:s,accuracyFeatureStyle:r,trackingOptions:a}=t,{map:o}=si(t),l=VI(o,n,a,s,r);return l&&S.jsx(GI,{...t,controller:l,ref:e})}),GI=b.forwardRef(function(t,e){const{controller:n}=t,{containerProps:s}=Ae("geolocation",t),{isLoading:r,isActive:a}=Nm(()=>({isLoading:n.loading,isActive:n.active}),[n]),o=jm(),l=n.supported?a?o.formatMessage({id:"locateMeEnd"}):o.formatMessage({id:"locateMeStart"}):o.formatMessage({id:"locateNotSupported"}),h=()=>{n.active?n.stopGeolocation():n.startGeolocation()};return S.jsx(Fa,{ref:e,label:l,icon:S.jsx(DI,{}),onClick:()=>h(),isActive:a,isLoading:r,isDisabled:!n.supported,...s})});function VI(i,t,e,n,s){const r=jm(),a=AI("notifier.NotificationService"),[o,l]=b.useState();return b.useEffect(()=>{if(!i)return;const h=u=>{const d=r.formatMessage({id:"error"}),f=(()=>{switch(u){case"permission-denied":return r.formatMessage({id:"permissionDenied"});case"position-unavailable":return r.formatMessage({id:"positionUnavailable"});case"timeout":return r.formatMessage({id:"timeout"});case"unknown":return r.formatMessage({id:"unknownError"})}})();a.notify({level:"error",title:d,message:f})},c=new kI(i.olMap,h,e);return l(c),()=>{c.destroy(),l(void 0)}},[i,e,r,a]),b.useEffect(()=>{o?.setPositionFeatureStyle(n)},[o,n]),b.useEffect(()=>{o?.setAccuracyFeatureStyle(s)},[o,s]),b.useEffect(()=>{o?.setMaxZoom(t)},[o,t]),o}const zI="@open-pioneer/notifier",jI=vc.bind(void 0,zI),BI=r_({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"}),WI=!1;function UI(i){const{position:t="top-right"}=i,e=a_(),n=jI("notifier.NotificationService"),[s,r]=b.useState(!WI),a=Ih(l=>{const h=l.level==="error"?S.jsx(BI,{h:"100%",w:"100%"}):void 0;e({position:t,title:l.title,description:l.message||null,status:l.level,isClosable:!0,duration:l.displayDuration??null,icon:h})}),o=Ih(()=>{e.closeAll()});return b.useEffect(()=>{const l=n.registerHandler({showNotification:a,closeAll:o});return()=>l.destroy()},[s,n,a,o]),S.jsx(S.Fragment,{})}const $I="200px",HI="300px",XI=i=>{const{olLayer:t,height:e=$I,width:n=HI}=i,{containerProps:s}=Ae("overview-map",i),r=b.useRef(null),{map:a}=si(i);return b.useEffect(()=>{if(r.current&&a&&t){const o=a.olMap,l=new xS({className:"ol-overviewmap",layers:[t],collapsible:!1,collapsed:!1,target:r.current});return o.addControl(l),()=>{o.removeControl(l)}}},[a,t]),S.jsx(Mt,{height:e,width:n,ref:r,...s})},qI="@open-pioneer/measurement",YI=ts.bind(void 0,qI);class ZI{olMap;messages;activeFeatureStyle;layer;source;draw=void 0;activeMeasurement;predefinedMeasurements=new Map;finishedMeasurements=new Set;helpTooltip;resources=[];measurementChangedHandler;constructor(t,e){this.olMap=t,this.messages=e;const n=this.source=new Rl;this.layer=new El({source:n,zIndex:bu,properties:{name:"measurement-layer"}}),t.addLayer(this.layer);const s=t.on("pointermove",this.handlePointerMove.bind(this));this.resources.push({destroy(){Pe(s)}});const r=()=>{this.helpTooltip.element.classList.add("hidden")};t.getViewport().addEventListener("mouseout",r),this.resources.push({destroy(){t.getViewport().removeEventListener("mouseout",r)}}),this.helpTooltip=JI(this.olMap)}destroy(){this.stopMeasurement();for(const t of this.resources)t.destroy();this.resources=[],this.activeMeasurement=Xu(this.activeMeasurement);for(const t of this.finishedMeasurements)t.destroy();this.finishedMeasurements.clear(),this.helpTooltip.destroy(),this.olMap.removeLayer(this.layer),this.layer.dispose(),this.source.dispose(),this.measurementChangedHandler=void 0,this.predefinedMeasurements.clear()}getVectorLayer(){return this.layer}setFinishedFeatureStyle(t){this.layer.setStyle(t)}setMeasurementSourceChangedHandler(t){this.measurementChangedHandler=t}setPredefinedMeasurements(t){this.updatePredefinedMeasurements(t)}setActiveFeatureStyle(t){const e=su(t);this.activeFeatureStyle=(n,...s)=>{const r=n?.getGeometry()?.getType();if(r==="Polygon"||r==="LineString"||r==="Point")return e(n,...s)},this.draw?.getOverlay().setStyle(this.activeFeatureStyle)}clearMeasurements(){const t=this.source.getFeatures();this.source.clear(),t.forEach(e=>{this.raiseMeasurementsChangeEvent("remove-measurement",e)}),this.predefinedMeasurements.clear();for(const e of this.finishedMeasurements)e.destroy();this.finishedMeasurements.clear()}startMeasurement(t){if(this.draw)throw new Error("Internal error: another measurement interaction is still active.");const e=t==="area"?"Polygon":"LineString",n=this.draw=new iS({source:this.source,type:e,style:this.activeFeatureStyle});this.olMap.addInteraction(n);let s,r;n.on("drawstart",a=>{const o=a.feature;o&&(s=this.activeMeasurement=new bf("active",o,this),r=o.getGeometry()?.on("change",()=>{s?.updateTooltipContent(),s?.updateTooltipPosition()}))}),n.on("drawend",()=>{if(s&&s===this.activeMeasurement){const a=s;a.updateState("finished"),this.finishedMeasurements.add(a),this.raiseMeasurementsChangeEvent("add-measurement",a.feature),this.activeMeasurement=s=void 0}s=void 0,r&&Pe(r)}),n.on("drawabort",()=>{s&&(s.destroy(),s===this.activeMeasurement&&(this.activeMeasurement=void 0),s=void 0),r&&Pe(r)})}stopMeasurement(){this.draw&&(this.olMap.removeInteraction(this.draw),this.draw.abortDrawing(),this.draw.dispose(),this.draw=void 0),this.activeMeasurement=Xu(this.activeMeasurement)}handlePointerMove(t){if(t.dragging)return;const e=this.helpTooltip,n=tR(this.messages,this.activeMeasurement);e.setText(n),e.overlay.setPosition(t.coordinate),e.element.classList.remove("hidden")}updatePredefinedMeasurements(t){const e=t.filter(s=>!this.predefinedMeasurements.has(s)),n=[];for(const s of this.predefinedMeasurements.keys())t.includes(s)||n.push(s);e.forEach(s=>{const r=new Ye(s);this.source.addFeature(r);const a=new bf("finished",r,this);this.finishedMeasurements.add(a),this.predefinedMeasurements.set(s,a),this.raiseMeasurementsChangeEvent("add-measurement",r)}),n.forEach(s=>{const r=this.predefinedMeasurements.get(s);r&&(this.source.removeFeature(r.feature),this.finishedMeasurements.delete(r),r.destroy(),this.raiseMeasurementsChangeEvent("remove-measurement",r.feature)),this.predefinedMeasurements.delete(s)})}raiseMeasurementsChangeEvent(t,e){const n=e.getGeometry();this.measurementChangedHandler&&n&&this.measurementChangedHandler({kind:t,geometry:(n instanceof ye,n)})}}class bf{controller;feature;_state;tooltip;constructor(t,e,n){this.controller=n,this._state=t,this.feature=e,this.tooltip=QI(this.olMap),this.updateTooltipContent(),this.updateTooltipPosition(),this.tooltip.setActive(t==="active")}destroy(){this.tooltip.destroy()}get state(){return this._state}updateState(t){this._state!==t&&(this._state=t,this.tooltip.setActive(t==="active"))}updateTooltipContent(){const t=this.feature.getGeometry();if(!t)return;const e=this.olMap.getView().getProjection();let n;t instanceof ye?n=eR(t,e,this.messages):t instanceof Ue&&(n=iR(t,e,this.messages)),n&&this.tooltip.setHtml(n)}updateTooltipPosition(){const t=this.feature.getGeometry();if(!t)return;let e;if(t instanceof ye)e=t.getInteriorPoint().getCoordinates()||null;else if(t instanceof Ue)e=t.getLastCoordinate()||null;else return;this.tooltip.overlay.setPosition(e)}get olMap(){return this.controller.olMap}get messages(){return this.controller.messages}}const Mf=[0,-15],KI=[0,-7];function JI(i){const t=document.createElement("div");t.className="measurement-tooltip printing-hide hidden",t.role="tooltip";const e=document.createElement("span");t.appendChild(e);const n=new cu({element:t,offset:[15,0],positioning:"center-left"});return i.addOverlay(n),{overlay:n,element:t,destroy(){i.removeOverlay(n)},setText(s){e.textContent=s},setHtml(s){e.innerHTML=s}}}function QI(i){const t=document.createElement("div");t.role="tooltip",t.className="measurement-tooltip measurement-active-tooltip printing-hide";const e=document.createElement("span");t.appendChild(e);const n=new cu({element:t,offset:Mf,positioning:"bottom-center",stopEvent:!1,insertFirst:!1});return i.addOverlay(n),{overlay:n,element:t,destroy(){i.removeOverlay(n)},setActive(s){s?(t.className="measurement-tooltip measurement-active-tooltip printing-hide",n.setOffset(Mf)):(t.className="measurement-tooltip measurement-finished-tooltip",n.setOffset(KI))},setText(s){e.textContent=s},setHtml(s){e.innerHTML=s}}}function tR(i,t){if(t){const e=t.feature.getGeometry();if(e instanceof ye||e instanceof Ue)return i.getContinueMessage()}return i.getHelpMessage()}function eR(i,t,e){const n=Ig(i,{projection:t});let s;return n>=1e6?s=`${e.formatNumber(n/1e6)} km2`:s=`${e.formatNumber(n)} m2`,s}function iR(i,t,e){const n=Sg(i,{projection:t});let s;return n>=1e3?s=`${e.formatNumber(n/1e3)} km`:s=`${e.formatNumber(n)} m`,s}const nR=i=>{const t=YI(),{containerProps:e}=Ae("measurement",i),[n,s]=b.useState("distance"),r=c=>t.formatMessage({id:c}),a=si(i),o=sR(a.map,i,t);b.useEffect(()=>{if(o)return o.startMeasurement(n),()=>{o.stopMeasurement()}},[o,n]);function l(c){if(c==="distance"||c==="area")s(c);else throw new Error(`Unexpected measurement type: '${c}'.`)}function h(){o?.clearMeasurements()}return S.jsxs(Mt,{...e,children:[S.jsx(al,{mb:3,children:t.formatMessage({id:"measurementInfoText"})}),S.jsx(ig,{mb:4,alignItems:"center",children:S.jsxs(n_,{mb:2,children:[S.jsx(bc,{mb:1,children:r("measurementLabel")}),S.jsxs(dg,{value:n,onChange:c=>l(c.target.value),className:"measurement-select",children:[S.jsx("option",{value:"distance",children:r("distance")}),S.jsx("option",{value:"area",children:r("area")})]})]})}),S.jsx(eg,{padding:2,className:"measurement-delete-button",onClick:h,width:"100%",children:r("deleteMeasurementLabel")})]})};function sR(i,t,e){const{activeFeatureStyle:n,finishedFeatureStyle:s,onMeasurementsChange:r,predefinedMeasurements:a}=t,[o,l]=b.useState(void 0);return b.useEffect(()=>{if(!i)return;const h=new ZI(i.olMap,{getContinueMessage(){return e.formatMessage({id:"tooltips.continue"})},getHelpMessage(){return e.formatMessage({id:"tooltips.help"})},formatNumber(c){return e.formatNumber(c,{maximumFractionDigits:2})}});return l(h),()=>{h.destroy(),l(void 0)}},[i,e]),b.useEffect(()=>{o?.setActiveFeatureStyle(n??rR())},[o,n]),b.useEffect(()=>{o?.setFinishedFeatureStyle(s??aR())},[o,s]),b.useEffect(()=>{o?.setMeasurementSourceChangedHandler(r)},[o,r]),b.useEffect(()=>{o?.setPredefinedMeasurements(a??[])},[o,a]),o}function rR(){return[new Et({stroke:new kt({color:"#fff",lineDash:[10,10],width:5})}),new Et({fill:new xe({color:"rgba(0,0,0,0.15)"}),stroke:new kt({color:"rgba(0, 0, 0, 0.7)",lineDash:[10,10],width:3}),image:new is({radius:5,stroke:new kt({color:"rgba(0, 0, 0, 0.7)",width:2}),fill:new xe({color:"rgba(255, 255, 255, 0.2)"})})})]}function aR(){return[new Et({stroke:new kt({color:"#fff",width:5})}),new Et({stroke:new kt({color:"#0b96fc",width:3}),fill:new xe({color:"rgba(11,150,252,0.15)"})})]}function oR(i){return Cn({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M233.91,74.79,181.22,22.1a14,14,0,0,0-19.8,0L22.09,161.41a14,14,0,0,0,0,19.8L74.78,233.9a14,14,0,0,0,19.8,0L233.91,94.59A14,14,0,0,0,233.91,74.79ZM225.42,86.1,86.1,225.41h0a2,2,0,0,1-2.83,0L30.58,172.73a2,2,0,0,1,0-2.83L64,136.48l27.76,27.76a6,6,0,1,0,8.48-8.48L72.48,128,96,104.48l27.76,27.76a6,6,0,0,0,8.48-8.48L104.48,96,128,72.49l27.76,27.75a6,6,0,0,0,8.48-8.48L136.49,64,169.9,30.59a2,2,0,0,1,2.83,0l52.69,52.68A2,2,0,0,1,225.42,86.1Z"},child:[]}]})(i)}const lR="@open-pioneer/basemap-switcher",Iu=ts.bind(void 0,lR);function Cf(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),e.push.apply(e,n)}return e}function W(i){for(var t=1;ti.length)&&(t=i.length);for(var e=0,n=Array(t);e component.`)};var xa,nl,bm;class cS{constructor(t){H(this,nl);H(this,xa);Q(this,xa,t.references.interceptors.map((e,n)=>[t.referencesMeta.interceptors[n].serviceId,e]))}async fetch(t,e){const n=e?.signal??void 0,s=Object.assign({},e?.context),r=dS(e);gh(n);let a=uS(t);{const l={target:a,signal:n??new AbortController().signal,context:s,options:r};gh(n),await ot(this,nl,bm).call(this,l),a=l.target}const o=new Request(a,{...r,signal:n});return await window.fetch(o)}}xa=new WeakMap,nl=new WeakSet,bm=async function(t){const{signal:e}=t;for(const[n,s]of R(this,xa))if(gh(e),s.beforeRequest)try{await s.beforeRequest(t)}catch(r){throw Xp(r),new Error(`Interceptor '${n}' failed with an error`,{cause:r})}};function uS(i){return typeof i=="string"?new URL(i,window.location.href):i}function dS(i){const t=i?.method??"GET",e=new Headers(i?.headers??{}),n={...i,method:t,headers:e};for(const s in n)fS[s]&&delete n[s];return n}const fS={context:1,signal:1};function gh(i){i?.aborted&&qp()}const gS={"ol-app":{name:"ol-app",services:{MainMapProvider:{name:"MainMapProvider",clazz:Q2,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:oS,provides:[{name:"map.MapRegistry",qualifier:"map.MapRegistry"}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:lS,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/overview-map":{name:"@open-pioneer/overview-map",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-bar":{name:"@open-pioneer/scale-bar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-viewer":{name:"@open-pioneer/scale-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/geolocation":{name:"@open-pioneer/geolocation",services:{},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:cS,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}}},mS='.sidebar{height:100%;position:absolute;top:0;background-color:#ffffffb3;transition:width .3s ease-out 0s}.right-bottom{position:absolute;right:0;bottom:0;background:#fff}.zoom-controls{position:absolute;z-index:1000;bottom:2rem;right:1rem}.ol-control.ol-zoom{left:unset;right:.5em}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.overview-map .ol-overviewmap{position:relative;height:100%;width:100%}.overview-map .ol-overviewmap:not(.ol-collapsed){border:1px solid black}.overview-map .ol-overviewmap .ol-overviewmap-map{border:none;width:100%;height:100%}.overview-map .ol-overviewmap .ol-overviewmap-box{border:2px solid red}.scale-bar .ol-scale-bar{margin-bottom:8px;margin-right:8px}.scale-bar .ol-scale-bar,.scale-bar .ol-scale-line{position:relative;bottom:0;left:0;background:none}.scale-bar .ol-scale-bar .ol-scale-bar-inner,.scale-bar .ol-scale-bar .ol-scale-line-inner,.scale-bar .ol-scale-line .ol-scale-bar-inner,.scale-bar .ol-scale-line .ol-scale-line-inner{color:var(--chakra-white);border-color:var(--chakra-white)}.measurement-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.measurement-active-tooltip{background:#000000e6;border-radius:4px;border-color:#000000e6;opacity:.9;color:#fff}.measurement-finished-tooltip{background-color:#4cb3ffe6;color:#000;border:1px solid white}.measurement-active-tooltip:before,.measurement-finished-tooltip:before{border-top:6px solid rgba(0,0,0,.9);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.measurement-finished-tooltip:before{border-top-color:#4cb3ff}',pS=["en","de"];function _S(i){switch(i){case"en":return Hu(()=>import("./CGbLuQbJLnhG.js"),[],import.meta.url).then(t=>t.default);case"de":return Hu(()=>import("./BMJspEKb-95r.js"),[],import.meta.url).then(t=>t.default)}throw new Error(`Unsupported locale: '${i}'`)}const vS=Yp(mS),yS=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:_S,locales:pS,packages:gS,styles:vS},Symbol.toStringTag,{value:"Module"})),mh=.75,oo=.1;let xS=class extends Ta{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=t.collapsed!==void 0?t.collapsed:!0,this.collapsible_=t.collapsible!==void 0?t.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=t.rotateWithView!==void 0?t.rotateWithView:!1,this.viewExtent_=void 0;const e=t.className!==void 0?t.className:"ol-overviewmap",n=t.tipLabel!==void 0?t.tipLabel:"Overview map",s=t.collapseLabel!==void 0?t.collapseLabel:"‹";typeof s=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s):this.collapseLabel_=s;const r=t.label!==void 0?t.label:"›";typeof r=="string"?(this.label_=document.createElement("span"),this.label_.textContent=r):this.label_=r;const a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,o=document.createElement("button");o.setAttribute("type","button"),o.title=n,o.appendChild(a),o.addEventListener(et.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=t.view;const l=new j0({view:t.view,controls:new We,interactions:new We});this.ovmap_=l,t.layers&&t.layers.forEach(function(v){l.addLayer(v)});const h=document.createElement("div");h.className="ol-overviewmap-box",h.style.boxSizing="border-box",this.boxOverlay_=new cu({position:[0,0],positioning:"center-center",element:h}),this.ovmap_.addOverlay(this.boxOverlay_);const c=e+" "+or+" "+xl+(this.collapsed_&&this.collapsible_?" "+Po:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=c,u.appendChild(this.ovmapDiv_),u.appendChild(o);const d=this,f=this.boxOverlay_,g=this.boxOverlay_.getElement(),m=function(v){return{clientX:v.clientX,clientY:v.clientY}},p=function(v){const y=m(v),x=l.getEventCoordinateInternal(y);f.setPosition(x)},_=function(v){const y=l.getEventCoordinateInternal(v);d.getMap().getView().setCenterInternal(y),window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",_)};g.addEventListener("mousedown",function(){window.addEventListener("mousemove",p),window.addEventListener("mouseup",_)})}setMap(t){const e=this.getMap();if(t!==e){if(e){const n=e.getView();n&&this.unbindView_(n),this.ovmap_.setTarget(null)}if(super.setMap(t),t){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(ht(t,Zn.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const n=t.getView();n&&(this.bindView_(n),n.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(t){if(t.key===zt.VIEW){const e=t.oldValue;e&&this.unbindView_(e);const n=this.getMap().getView();this.bindView_(n)}else!this.ovmap_.isRendered()&&(t.key===zt.TARGET||t.key===zt.SIZE)&&this.ovmap_.updateSize()}bindView_(t){if(!this.view_){const e=new me({projection:t.getProjection()});this.ovmap_.setView(e)}t.addChangeListener(Ee.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()}unbindView_(t){t.removeChangeListener(Ee.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const n=t.getSize(),r=t.getView().calculateExtentInternal(n);if(this.viewExtent_&&Zs(r,this.viewExtent_))return;this.viewExtent_=r;const a=e.getSize(),l=e.getView().calculateExtentInternal(a),h=e.getPixelFromCoordinateInternal(xn(r)),c=e.getPixelFromCoordinateInternal(Sa(r)),u=Math.abs(h[0]-c[0]),d=Math.abs(h[1]-c[1]),f=a[0],g=a[1];uf*mh||d>g*mh?this.resetExtent_():cn(l,r)||this.recenter_()}resetExtent_(){const t=this.getMap(),e=this.ovmap_,n=t.getSize(),r=t.getView().calculateExtentInternal(n),a=e.getView(),o=Math.log(mh/oo)/Math.LN2,l=1/(Math.pow(2,o/2)*oo);ov(r,l),a.fitInternal(Vh(r))}recenter_(){const t=this.getMap(),e=this.ovmap_,n=t.getView();e.getView().setCenterInternal(n.getCenterInternal())}updateBox_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const n=t.getSize(),s=t.getView(),r=e.getView(),a=this.rotateWithView_?0:-s.getRotation(),o=this.boxOverlay_,l=this.boxOverlay_.getElement(),h=s.getCenterInternal(),c=s.getResolution(),u=r.getResolution(),d=n[0]*c/u,f=n[1]*c/u;if(o.setPosition(h),l){l.style.width=d+"px",l.style.height=f+"px";const g="rotate("+a+"rad)";l.style.transform=g}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=jr(this.ovmap_,di.POSTRENDER,function(t){delete this.ovmapPostrenderKey_,this.updateBox_()},this))}handleClick_(t){t.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(Po),this.collapsed_?Io(this.collapseLabel_,this.label_):Io(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const t=this.ovmap_;if(!this.collapsed_){if(t.isRendered()){this.viewExtent_=void 0,t.render();return}t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())}setCollapsed(t){!this.collapsible_||this.collapsed_===t||this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,this.getMap().getView().getRotation()!==0&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(t){this.validateExtent_(),this.updateBox_()}};const ph="units",bS=[1,2,5],Mr=25.4/.28;class MS extends Ta{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const n=t.className!==void 0?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=n+"-inner",this.element.className=n+" "+or,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=t.minWidth!==void 0?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(ph,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(ph)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(ph,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=t.center,n=t.projection,s=this.getUnits(),r=s=="degrees"?"degrees":"m";let a=Br(n,t.resolution,e,r);const o=this.minWidth_*(this.dpi_||Mr)/Mr,l=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||Mr)/Mr:void 0;let h=o*a,c="";if(s=="degrees"){const y=Xs.degrees;h*=y,h=l){d=m,f=p,g=_;break}else if(f>=o)break;m=d,p=f,_=g,++u}const v=this.scaleBar_?this.createScaleBar(f,d,c):d.toFixed(g<0?-g:0)+" "+c;this.renderedHTML_!=v&&(this.innerElement_.innerHTML=v,this.renderedHTML_=v),this.renderedWidth_!=f&&(this.innerElement_.style.width=f+"px",this.renderedWidth_=f),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,n){const s=this.getScaleForResolution(),r=s<1?Math.round(1/s).toLocaleString()+" : 1":"1 : "+Math.round(s).toLocaleString(),a=this.scaleBarSteps_,o=t/a,l=[this.createMarker("absolute")];for(let c=0;c`+this.createMarker("relative")+(c%2===0||a===2?this.createStepText(c,t,!1,e,n):"")+"")}return l.push(this.createStepText(a,t,!0,e,n)),(this.scaleBarText_?``+r+"
":"")+l.join("")}createMarker(t){return``}createStepText(t,e,n,s,r){const o=(t===0?0:Math.round(s/this.scaleBarSteps_*t*100)/100)+(t===0?"":" "+r),l=t===0?-3:e/this.scaleBarSteps_*-1,h=t===0?0:e/this.scaleBarSteps_*2;return``+o+"
"}getScaleForResolution(){const t=Br(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),e=this.dpi_||Mr,n=1e3/25.4;return t*n*e}render(t){const e=t.frameState;e?this.viewState_=e.viewState:this.viewState_=null,this.updateElement_()}}const CS=i=>{const{displayMode:t="line"}=i,{containerProps:e}=Ae("scale-bar",i),{map:n}=si(i),s=b.useRef(null);return b.useEffect(()=>{if(s.current&&n){const r=n.olMap,a=new MS({units:"metric",target:s.current,bar:t==="bar"});return r.addControl(a),()=>{r.removeControl(a)}}},[t,n]),S.jsx(Mt,{...e,ref:s})},Fa=b.forwardRef(function(t,e){const{label:n,icon:s,onClick:r,isLoading:a,isDisabled:o,isActive:l,tooltipProps:h,buttonProps:c}=t,{containerProps:{className:u,...d}}=Ae("tool-button",t),f=yc(u,{"tool-button--active":l,"tool-button--loading":a,"tool-button--disabled":o}),g=typeof l=="boolean"?l?"true":"false":void 0,[m,p]=b.useState(!1),_=v=>{p(!1),r?.(v)};return S.jsx(Kf,{label:n,placement:"auto",openDelay:500,...h,isOpen:m,onOpen:()=>p(!0),onClose:()=>p(!1),children:S.jsx(wS,{className:f,ref:e,"aria-label":n,leftIcon:s,iconSpacing:0,padding:0,isDisabled:o,isLoading:a,isActive:l,"aria-pressed":g,...d,...c,onClick:_})})}),wS=b.forwardRef(function(t,e){const{"aria-labelledby":n,"aria-describedby":s,...r}=t;return S.jsx(eg,{ref:e,...r})}),ES="@open-pioneer/map-navigation",Cu=ts.bind(void 0,ES);var Mm={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},gf=Xn.createContext&&Xn.createContext(Mm),SS=["attr","size","title"];function IS(i,t){if(i==null)return{};var e=RS(i,t),n,s;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(e[n]=i[n])}return e}function RS(i,t){if(i==null)return{};var e={};for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){if(t.indexOf(n)>=0)continue;e[n]=i[n]}return e}function Uo(){return Uo=Object.assign?Object.assign.bind():function(i){for(var t=1;tXn.createElement(t.tag,$o({key:e},t.attr),Cm(t.child)))}function Cn(i){return t=>Xn.createElement(LS,Uo({attr:$o({},i.attr)},t),Cm(i.child))}function LS(i){var t=e=>{var{attr:n,size:s,title:r}=i,a=IS(i,SS),o=s||e.size||"1em",l;return e.className&&(l=e.className),i.className&&(l=(l?l+" ":"")+i.className),Xn.createElement("svg",Uo({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,n,a,{className:l,style:$o($o({color:i.color||e.color},e.style),i.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),r&&Xn.createElement("title",null,r),i.children)};return gf!==void 0?Xn.createElement(gf.Consumer,null,e=>t(e)):t(Mm)}function AS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"},child:[]},{tag:"line",attr:{x1:"12",y1:"9",x2:"12",y2:"13"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(i)}function DS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 14 4 9 9 4"},child:[]},{tag:"path",attr:{d:"M20 20v-7a4 4 0 0 0-4-4H4"},child:[]}]})(i)}function kS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 14 20 9 15 4"},child:[]},{tag:"path",attr:{d:"M4 20v-7a4 4 0 0 1 4-4h12"},child:[]}]})(i)}function FS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},child:[]},{tag:"polyline",attr:{points:"9 22 9 12 15 12 15 22"},child:[]}]})(i)}function NS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(i)}function GS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(i)}const VS=b.forwardRef(function(t,e){const{containerProps:n}=Ae("initial-extent",t),{map:s}=si(t),r=Cu();function a(){const o=s?.initialExtent,l=s?.olMap;if(o&&l){const h=[o.xMin,o.yMin,o.xMax,o.yMax];l.getView().fit(h,{duration:200})}}return S.jsx(Fa,{ref:e,label:r.formatMessage({id:"initial-extent.title"}),icon:S.jsx(FS,{}),onClick:a,...n})}),zS=b.forwardRef(function(t,e){return S.jsx(wm,{zoomDirection:"in",ref:e,...t})}),jS=b.forwardRef(function(t,e){return S.jsx(wm,{zoomDirection:"out",ref:e,...t})}),wm=b.forwardRef(function(t,e){const{zoomDirection:n}=t,{map:s}=si(t),r=Cu(),[a,o]=b.useState(!1),{defaultClassName:l,buttonLabel:h,buttonIcon:c}=BS(r,n),{containerProps:u}=Ae(yc("zoom",l),t);function d(){if(a)return;o(!0);const f=s?.olMap.getView();let g=f?.getZoom();const m=f?.getMaxZoom()||Number.MAX_SAFE_INTEGER,p=f?.getMinZoom()||0;f&&g!==void 0&&(n==="in"&&gp&&--g,f.animate({zoom:g,duration:200},()=>o(!1)))}return S.jsx(Fa,{ref:e,label:h,icon:c,onClick:d,...u})});function BS(i,t){switch(t){case"in":return{defaultClassName:"zoom-in",buttonLabel:i.formatMessage({id:"zoom-in.title"}),buttonIcon:S.jsx(GS,{})};case"out":return{defaultClassName:"zoom-out",buttonLabel:i.formatMessage({id:"zoom-out.title"}),buttonIcon:S.jsx(NS,{})}}}var WS=Symbol.for("preact-signals");function wu(){if(Ds>1)Ds--;else{for(var i,t=!1;Vr!==void 0;){var e=Vr;for(Vr=void 0,cc++;e!==void 0;){var n=e.o;if(e.o=void 0,e.f&=-3,!(8&e.f)&&Sm(e))try{e.c()}catch(s){t||(i=s,t=!0)}e=n}}if(cc=0,Ds--,t)throw i}}var yt=void 0;function Eu(i){var t=yt;yt=void 0;try{return i()}finally{yt=t}}var Vr=void 0,Ds=0,cc=0,Ho=0;function Em(i){if(yt!==void 0){var t=i.n;if(t===void 0||t.t!==yt)return t={i:0,S:i,p:yt.s,n:void 0,t:yt,e:void 0,x:void 0,r:t},yt.s!==void 0&&(yt.s.n=t),yt.s=t,i.n=t,32&yt.f&&i.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=yt.s,t.n=void 0,yt.s.n=t,yt.s=t),t}}function he(i){this.v=i,this.i=0,this.n=void 0,this.t=void 0}he.prototype.brand=WS;he.prototype.h=function(){return!0};he.prototype.S=function(i){this.t!==i&&i.e===void 0&&(i.x=this.t,this.t!==void 0&&(this.t.e=i),this.t=i)};he.prototype.U=function(i){if(this.t!==void 0){var t=i.e,e=i.x;t!==void 0&&(t.x=e,i.e=void 0),e!==void 0&&(e.e=t,i.x=void 0),i===this.t&&(this.t=e)}};he.prototype.subscribe=function(i){var t=this;return Om(function(){var e=t.value,n=yt;yt=void 0;try{i(e)}finally{yt=n}})};he.prototype.valueOf=function(){return this.value};he.prototype.toString=function(){return this.value+""};he.prototype.toJSON=function(){return this.value};he.prototype.peek=function(){var i=yt;yt=void 0;try{return this.value}finally{yt=i}};Object.defineProperty(he.prototype,"value",{get:function(){var i=Em(this);return i!==void 0&&(i.i=this.i),this.v},set:function(i){if(i!==this.v){if(cc>100)throw new Error("Cycle detected");this.v=i,this.i++,Ho++,Ds++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{wu()}}}});function US(i){return new he(i)}function Sm(i){for(var t=i.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Im(i){for(var t=i.s;t!==void 0;t=t.n){var e=t.S.n;if(e!==void 0&&(t.r=e),t.S.n=t,t.i=-1,t.n===void 0){i.s=t;break}}}function Rm(i){for(var t=i.s,e=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):e=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}i.s=e}function dr(i){he.call(this,void 0),this.x=i,this.s=void 0,this.g=Ho-1,this.f=4}(dr.prototype=new he).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ho))return!0;if(this.g=Ho,this.f|=1,this.i>0&&!Sm(this))return this.f&=-2,!0;var i=yt;try{Im(this),yt=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return yt=i,Rm(this),this.f&=-2,!0};dr.prototype.S=function(i){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}he.prototype.S.call(this,i)};dr.prototype.U=function(i){if(this.t!==void 0&&(he.prototype.U.call(this,i),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};dr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;i!==void 0;i=i.x)i.t.N()}};Object.defineProperty(dr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var i=Em(this);if(this.h(),i!==void 0&&(i.i=this.i),16&this.f)throw this.v;return this.v}});function Tm(i){return new dr(i)}function Pm(i){var t=i.u;if(i.u=void 0,typeof t=="function"){Ds++;var e=yt;yt=void 0;try{t()}catch(n){throw i.f&=-2,i.f|=8,Su(i),n}finally{yt=e,wu()}}}function Su(i){for(var t=i.s;t!==void 0;t=t.n)t.S.U(t);i.x=void 0,i.s=void 0,Pm(i)}function $S(i){if(yt!==this)throw new Error("Out-of-order effect");Rm(this),yt=i,this.f&=-2,8&this.f&&Su(this),wu()}function Na(i){this.x=i,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Na.prototype.c=function(){var i=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{i()}};Na.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Pm(this),Im(this),Ds++;var i=yt;return yt=this,$S.bind(this,i)};Na.prototype.N=function(){2&this.f||(this.f|=2,this.o=Vr,Vr=this)};Na.prototype.d=function(){this.f|=8,1&this.f||Su(this)};function Om(i){var t=new Na(i);try{t.c()}catch(e){throw t.d(),e}return t.d.bind(t)}function HS(i){let t;return{destroy:Om(function(){this[XS]=i.bind(void 0),t=this[qS].bind(this)}),start:t}}var XS="N",qS="S";function ks(i,t){return new KS(i,t?.equal)}function YS(i,t){return new ZS(i,t?.equal)}function Lm(i){return Eu(i)}var vs=Symbol("signal"),zr=Symbol("equals"),Am=class{[vs];constructor(i){this[vs]=i}get value(){return this[vs].value}set value(i){throw new Error("Cannot update a readonly reactive object.")}trigger(){throw new Error("Cannot trigger this reactive object.")}peek(){return this[vs].peek()}toJSON(){return this.value}toString(){return`Reactive[value=${QS(this[vs].value)}]`}},ZS=class extends Am{[zr];constructor(i,t){const e=Tm(t?JS(i,t):i);super(e),this[zr]=t}},KS=class extends Am{[zr];constructor(i,t){super(US(i)),this[zr]=t}get value(){return super.value}set value(i){Eu(()=>this[zr]?.(this.value,i))||(this[vs].value=i)}};function JS(i,t){let e=!0,n;return function(){const r=i();return Eu(()=>((e||!t(n,r))&&(n=r,e=!1),n))}}function QS(i){return typeof i=="string"?JSON.stringify(i):String(i)}function tI(i,t){return i===t?!0:i.length===t.length&&i.every((e,n)=>e===t[n])}function eI(i,t,e,n){const s=Tm(t),r=n?.immediate??!1,a=n?.equal??iI;let o=!0,l,h;function c(){const f=h;h=void 0;try{f?.()}catch(g){throw d.destroy(),g}}const u=i(()=>{const f=s.value;Lm(()=>{const g=l,m=o&&r||!o&&!a(g,f);(m||o)&&(l=f,o=!1),m&&(c(),h=e(f,g))})}),d={destroy(){try{c()}finally{u.destroy()}}};return d}function iI(i,t){return i===t}function Dm(i){Promise.reject(new Error("Error in effect or watch callback",{cause:i}))}var nI=class{queue=[];channel=new MessageChannel;constructor(){this.channel.port2.start()}enqueue(i){const t={fn:i,destroyed:!1};return this.queue.push(t),this.queue.length===1&&this.scheduleIteration(),{destroy(){t.destroyed||(t.destroyed=!0)}}}messageHandler=()=>this.runIteration();scheduleIteration(){const i=this.channel;i.port2.addEventListener("message",this.messageHandler),i.port1.postMessage("")}runIteration(){this.channel.port2.removeEventListener("message",this.messageHandler);const i=this.queue;this.queue=[];for(const t of i)if(!t.destroyed)try{t.fn()}catch(e){Dm(e)}}};function sI(i){const t=new rI(i);return{destroy:t.destroy.bind(t)}}var rI=class{callback;cleanup;watcher;scheduledExecution;isDestroyed=!1;initialExecution=!0;isExecuting=!1;constructor(i){this.callback=i,this.watcher=HS(this.scheduleExecution),this.execute(),this.initialExecution=!1}destroy(){if(!this.isDestroyed){this.isDestroyed=!0;try{this.triggerCleanup()}finally{this.watcher?.destroy(),this.watcher=void 0,this.scheduledExecution?.destroy(),this.scheduledExecution=void 0}}}execute(){const i=this.watcher;if(!i)return;this.isExecuting=!0;const t=i.start();try{if(this.initialExecution)try{this.triggerCallback()}catch(e){throw this.destroy(),e}else try{this.triggerCallback()}catch(e){Dm(e)}}finally{t(),this.isExecuting=!1}this.isDestroyed&&this.triggerCleanup()}triggerCallback(){if(!this.isDestroyed){this.triggerCleanup();const i=this.callback();typeof i=="function"&&(this.cleanup=i)}}triggerCleanup(){const i=this.cleanup;this.cleanup=void 0;try{i&&Lm(i)}catch(t){throw this.destroy(),t}}scheduleExecution=()=>{if(!this.isDestroyed){if(this.isExecuting)throw new Error("Cycle detected");this.scheduledExecution||(this.scheduledExecution=lI(()=>{try{this.execute()}finally{this.scheduledExecution=void 0}}))}}};function aI(i,t,e){return eI(sI,i,t,{equal:tI,...e})}var oI=new nI;function lI(i){return oI.enqueue(i)}function hI(i){return new cI(i)}var ee,Bs,$t,tn,_o,km,Fm,Hf,cI=(Hf=class{constructor(i){H(this,$t);H(this,ee,new Map);H(this,Bs,ks(!1));if(i)for(const[t,e]of i)R(this,ee).set(t,ks(e))}get size(){return ot(this,$t,tn).call(this),R(this,ee).size}forEach(i){ot(this,$t,tn).call(this);const t=R(this,ee).entries();for(const[e,n]of t)i(n.value,e)}entries(){return ot(this,$t,tn).call(this),ot(this,$t,km).call(this)}keys(){return ot(this,$t,tn).call(this),R(this,ee).keys()}values(){return ot(this,$t,tn).call(this),ot(this,$t,Fm).call(this)}[Symbol.iterator](){return this.entries()}clear(){const i=!!R(this,ee).size;R(this,ee).clear(),i&&ot(this,$t,_o).call(this)}delete(i){const t=R(this,ee).delete(i);return t&&ot(this,$t,_o).call(this),t}get(i){return ot(this,$t,tn).call(this),R(this,ee).get(i)?.value}has(i){return ot(this,$t,tn).call(this),R(this,ee).has(i)}set(i,t){const e=R(this,ee).get(i);return e?e.value=t:(R(this,ee).set(i,ks(t)),ot(this,$t,_o).call(this)),this}},ee=new WeakMap,Bs=new WeakMap,$t=new WeakSet,tn=function(){R(this,Bs).value},_o=function(){R(this,Bs).value=!R(this,Bs).peek()},km=function*(){const i=R(this,ee).entries();for(const[t,e]of i)yield[t,e.value]},Fm=function*(){const i=R(this,ee).values();for(const t of i)yield t.value},Hf);function uI(i,t){const e=b.useRef(i);e.current=i;const n=fI(t);return b.useMemo(()=>YS(()=>e.current()),[n])}function dI(i){const t=b.useCallback(()=>i.peek(),[i]),e=b.useCallback(s=>{const r=aI(()=>[i.value],s);return()=>r.destroy()},[i]),n=b.useSyncExternalStore(e,t);return b.useDebugValue(n),n}function Nm(i,t){const e=uI(i,t),n=dI(e);return b.useDebugValue(n),n}function fI(i){const t=b.useRef();return(t.current==null||!gI(t.current,i))&&(t.current=i??[]),t.current}function gI(i,t){return i===t?!0:i.length===(t?.length??0)&&i.every((e,n)=>e===t[n])}const mI=200;var Qe,uc,vo,Gm;class pI{constructor(t){H(this,Qe);Rt(this,"olMap");Rt(this,"handle");Rt(this,"_mapViews",hI());Rt(this,"_activeViewId",ks(0));Rt(this,"backward",()=>{if(this.canBackward)ot(this,Qe,vo).call(this,this.activeViewId-1),ot(this,Qe,uc).call(this,this.activeViewId);else throw new Error("Backward is not possible at the moment")});Rt(this,"forward",()=>{if(this.canForward)ot(this,Qe,vo).call(this,this.activeViewId+1),ot(this,Qe,uc).call(this,this.activeViewId);else throw new Error("Forward is not possible at the moment")});this.olMap=t.olMap,this.handle=ot(this,Qe,Gm).call(this)}destroy(){this.handle&&Pe(this.handle),this.handle=void 0}get activeViewId(){return this._activeViewId.value}get mapViews(){return this._mapViews}get canBackward(){return this.mapViews.get(this.activeViewId-1)!=null}get canForward(){return this.mapViews.get(this.activeViewId+1)!=null}}Qe=new WeakSet,uc=function(t){const e=this.olMap.getView();this.olMap.setView(new me({center:this.mapViews.get(t).center,resolution:this.mapViews.get(t).resolution,projection:e.getProjection()}))},vo=function(t){this._activeViewId.value=t},Gm=function(){const t=this.olMap.on("moveend",()=>{e()}),e=()=>{const n=this.olMap,s=this.mapViews,r=n.getView(),a=r.getResolution(),o=r.getCenter();if(a!=null&&o!=null&&(o!==s.get(this.activeViewId)?.center||a!==s.get(this.activeViewId)?.resolution)){const l={resolution:a,center:o},h=this.activeViewId+1;for(const c of s.keys())c>h&&s.delete(c);for(const c of s.keys()){if(s.size{if(!i)return;let n=_h.get(i);return n==null?(n={vm:new pI(i),useCount:1},_h.set(i,n)):n.useCount++,e(n.vm),()=>{e(void 0),n.useCount--,n.useCount===0&&(n.vm.destroy(),_h.delete(i))}},[i]),t}b.forwardRef(function(t,e){return S.jsx(Vm,{viewDirection:"forward",ref:e,...t})});b.forwardRef(function(t,e){return S.jsx(Vm,{viewDirection:"backward",ref:e,...t})});const Vm=b.forwardRef(function(t,e){const n=Cu(),{viewDirection:s}=t,{map:r}=si(t),a=_I(r),{defaultClassName:o,buttonLabel:l,buttonIcon:h}=vI(n,s),{containerProps:c}=Ae(yc("view",o),t),u=Nm(()=>a?s==="forward"?a.canForward:a.canBackward:!1,[a,s]),d=()=>{a&&(s==="forward"?a.forward():a.backward())};return a&&S.jsx(Fa,{ref:e,...c,label:l,icon:h,onClick:d,isDisabled:!u})});function vI(i,t){switch(t){case"forward":return{defaultClassName:"view-forward",buttonLabel:i.formatMessage({id:"view-forward.title"}),buttonIcon:S.jsx(kS,{})};case"backward":return{defaultClassName:"view-backward",buttonLabel:i.formatMessage({id:"view-backward.title"}),buttonIcon:S.jsx(DS,{})}}}const yI="ol-app",xI=ts.bind(void 0,yI),bI="@open-pioneer/coordinate-viewer",MI=ts.bind(void 0,bI),CI=4,wI="decimal",EI=i=>{const{precision:t,displayProjectionCode:e,format:n}=i,{containerProps:s}=Ae("coordinate-viewer",i),{map:r}=si(i),a=r?.olMap,o=hm(a)?.getCode()??"";let{coordinates:l}=II(a);l=l&&e?TI(l,o,e):l;const h=SI(l,t,n),c=e||o,u=h?h+" "+c:"";return S.jsx(Mt,{...s,children:S.jsx(al,{className:"coordinate-viewer-text",children:u})})};function SI(i,t,e){const n=MI();return i?RI(i,t,n,e):""}function II(i){const[t,e]=b.useState();return b.useEffect(()=>{if(!i)return;const n=i.on("pointermove",s=>{e(s.coordinate)});return()=>Pe(n)},[i]),{coordinates:t}}function RI(i,t,e,n){if(i[0]==null||i[1]==null)return"";const s=t??CI,r=n??wI,[a,o]=i;let l;if(r==="degree"&&isFinite(a)&&isFinite(o)){const[h,c,u]=pf(a,e,s),[d,f,g]=pf(o,e,s),m=`${Math.abs(h)}°${c}'${u}"${0<=h?"(E)":"(W)"}`,p=`${Math.abs(d)}°${f}'${g}"${0<=d?"(N)":"(S)"}`;l=m+" "+p}else{const h=e.formatNumber(a,{maximumFractionDigits:s,minimumFractionDigits:s}),c=e.formatNumber(o,{maximumFractionDigits:s,minimumFractionDigits:s});l=h+" "+c}return l}function pf(i,t,e){const n=Math.floor(i),s=i-n,r=Math.floor(60*s),o=60*(60*s-r),l=t.formatNumber(o,{maximumFractionDigits:e,minimumFractionDigits:e});return[n,r,l]}function TI(i,t,e){return Pg(i,t,e)}const PI="@open-pioneer/scale-viewer",OI=ts.bind(void 0,PI),LI=i=>{const{containerProps:t}=Ae("scale-viewer",i),{map:e}=si(i),n=OI(),s=m2(e?.olMap),r=s?n.formatNumber(s):void 0;return S.jsx(Mt,{...t,children:r&&S.jsxs(al,{children:["1:",r]})})},zm="@open-pioneer/geolocation",AI=vc.bind(void 0,zm),jm=ts.bind(void 0,zm);function DI(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"},child:[]}]})(i)}const _f=ii("geolocation:GeolocationController"),vf=17;var $n,Hn;class kI{constructor(t,e,n){Rt(this,"supported",!!navigator.geolocation);Rt(this,"olMap");Rt(this,"positionHighlightLayer");Rt(this,"geolocation");Rt(this,"onError");Rt(this,"maxZoom",vf);Rt(this,"accuracyFeature");Rt(this,"positionFeature");Rt(this,"changeHandlers",[]);Rt(this,"setMapToPosition",!0);Rt(this,"trackingOptions",{});Rt(this,"isInitialZoom",!0);H(this,$n,ks(!1));H(this,Hn,ks(!1));this.olMap=t,this.onError=e,this.isInitialZoom=!0,this.accuracyFeature=new Ye,this.accuracyFeature.setStyle(xf()),this.positionFeature=new Ye,this.positionFeature.setStyle(yf()),this.positionHighlightLayer=new El({source:new Rl({features:[this.accuracyFeature,this.positionFeature]})}),this.positionHighlightLayer.setZIndex(bu);const s=n||FI();this.geolocation=new t1({tracking:!1,trackingOptions:s,projection:t.getView()?.getProjection()}),this.trackingOptions=s,this.geolocation.on("error",r=>this.handleGeolocationError(r))}destroy(){this.stopGeolocation(),this.geolocation?.setTracking(!1),this.geolocation.dispose(),this.accuracyFeature=void 0,this.positionFeature=void 0,this.positionHighlightLayer.dispose()}startGeolocation(){if(R(this,Hn).value)return;const t=this.olMap;new Promise(n=>{R(this,Hn).value=!0,R(this,$n).value=!0,this.geolocation?.setProjection(t.getView()?.getProjection()),this.geolocation?.setTracking(!0);const s=this.geolocation.on("change:accuracyGeometry",()=>{const l=this.geolocation.getAccuracyGeometry()||void 0;if(this.accuracyFeature?.setGeometry(l),this.accuracyFeature?.getGeometry()!==void 0&&n(),this.isInitialZoom){const h=this?.accuracyFeature?.getGeometry()?.getExtent();if(h){const c=Y2(h);if(!c)return;t.getView().fit(c,{maxZoom:this.maxZoom}),this.isInitialZoom=!1}}}),r=this.geolocation.on("change:position",()=>{const l=this.geolocation.getPosition();l&&(l[0]||l[1])!==void 0&&(this.positionFeature?.setGeometry(new qn(l)),this.setMapToPosition&&t.getView().setCenter(l),this.positionFeature?.getGeometry()!==void 0&&n())}),a=t.getView().on("change:resolution",()=>{this.setMapToPosition=this.isInitialZoom}),o=t.on("pointermove",l=>{l.dragging&&(this.setMapToPosition=!1)});this.changeHandlers.push(s,r,a,o),t.addLayer(this.positionHighlightLayer)}).then(()=>{R(this,$n).value=!1}).catch(n=>{_f.error("Failed to determine location",n)})}stopGeolocation(){this.geolocation?.setTracking(!1),R(this,Hn).value=!1,R(this,$n).value=!1,this.trackingOptions={},this.setMapToPosition=!0,this.isInitialZoom=!0,this.changeHandlers.forEach(t=>{Pe(t)}),this.changeHandlers=[],this.accuracyFeature?.setGeometry(void 0),this.positionFeature?.setGeometry(void 0),this.olMap.removeLayer(this.positionHighlightLayer)}get active(){return R(this,Hn).value}get loading(){return R(this,$n).value}setPositionFeatureStyle(t){this.positionFeature?.setStyle(t??yf())}setAccuracyFeatureStyle(t){this.accuracyFeature?.setStyle(t??xf())}setMaxZoom(t){this.maxZoom=t??vf}getMaxZoom(){return this.maxZoom}getPositionFeature(){return this.positionFeature}getAccuracyFeature(){return this.accuracyFeature}getTrackingOptions(){return this.trackingOptions}getGeolocation(){return this.geolocation}handleGeolocationError(t){_f.error("Error from geolocation API:",t.message),this.stopGeolocation();const e=(()=>{switch(t.code){case 1:return"permission-denied";case 2:return"position-unavailable";case 3:return"timeout";default:return"unknown"}})();this.onError(e)}}$n=new WeakMap,Hn=new WeakMap;const yf=()=>new Et({image:new is({radius:6,fill:new xe({color:"#3399CC"}),stroke:new kt({color:"#fff",width:2})})}),xf=()=>new Et({stroke:new kt({color:"#3399CC",width:3}),fill:new xe({color:"rgba(0, 0, 255, 0.05)"})}),FI=()=>({enableHighAccuracy:!0,timeout:6e4,maximumAge:6e5}),NI=b.forwardRef(function(t,e){const{maxZoom:n,positionFeatureStyle:s,accuracyFeatureStyle:r,trackingOptions:a}=t,{map:o}=si(t),l=VI(o,n,a,s,r);return l&&S.jsx(GI,{...t,controller:l,ref:e})}),GI=b.forwardRef(function(t,e){const{controller:n}=t,{containerProps:s}=Ae("geolocation",t),{isLoading:r,isActive:a}=Nm(()=>({isLoading:n.loading,isActive:n.active}),[n]),o=jm(),l=n.supported?a?o.formatMessage({id:"locateMeEnd"}):o.formatMessage({id:"locateMeStart"}):o.formatMessage({id:"locateNotSupported"}),h=()=>{n.active?n.stopGeolocation():n.startGeolocation()};return S.jsx(Fa,{ref:e,label:l,icon:S.jsx(DI,{}),onClick:()=>h(),isActive:a,isLoading:r,isDisabled:!n.supported,...s})});function VI(i,t,e,n,s){const r=jm(),a=AI("notifier.NotificationService"),[o,l]=b.useState();return b.useEffect(()=>{if(!i)return;const h=u=>{const d=r.formatMessage({id:"error"}),f=(()=>{switch(u){case"permission-denied":return r.formatMessage({id:"permissionDenied"});case"position-unavailable":return r.formatMessage({id:"positionUnavailable"});case"timeout":return r.formatMessage({id:"timeout"});case"unknown":return r.formatMessage({id:"unknownError"})}})();a.notify({level:"error",title:d,message:f})},c=new kI(i.olMap,h,e);return l(c),()=>{c.destroy(),l(void 0)}},[i,e,r,a]),b.useEffect(()=>{o?.setPositionFeatureStyle(n)},[o,n]),b.useEffect(()=>{o?.setAccuracyFeatureStyle(s)},[o,s]),b.useEffect(()=>{o?.setMaxZoom(t)},[o,t]),o}const zI="@open-pioneer/notifier",jI=vc.bind(void 0,zI),BI=r_({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"}),WI=!1;function UI(i){const{position:t="top-right"}=i,e=a_(),n=jI("notifier.NotificationService"),[s,r]=b.useState(!WI),a=Ih(l=>{const h=l.level==="error"?S.jsx(BI,{h:"100%",w:"100%"}):void 0;e({position:t,title:l.title,description:l.message||null,status:l.level,isClosable:!0,duration:l.displayDuration??null,icon:h})}),o=Ih(()=>{e.closeAll()});return b.useEffect(()=>{const l=n.registerHandler({showNotification:a,closeAll:o});return()=>l.destroy()},[s,n,a,o]),S.jsx(S.Fragment,{})}const $I="200px",HI="300px",XI=i=>{const{olLayer:t,height:e=$I,width:n=HI}=i,{containerProps:s}=Ae("overview-map",i),r=b.useRef(null),{map:a}=si(i);return b.useEffect(()=>{if(r.current&&a&&t){const o=a.olMap,l=new xS({className:"ol-overviewmap",layers:[t],collapsible:!1,collapsed:!1,target:r.current});return o.addControl(l),()=>{o.removeControl(l)}}},[a,t]),S.jsx(Mt,{height:e,width:n,ref:r,...s})},qI="@open-pioneer/measurement",YI=ts.bind(void 0,qI);class ZI{olMap;messages;activeFeatureStyle;layer;source;draw=void 0;activeMeasurement;predefinedMeasurements=new Map;finishedMeasurements=new Set;helpTooltip;resources=[];measurementChangedHandler;constructor(t,e){this.olMap=t,this.messages=e;const n=this.source=new Rl;this.layer=new El({source:n,zIndex:bu,properties:{name:"measurement-layer"}}),t.addLayer(this.layer);const s=t.on("pointermove",this.handlePointerMove.bind(this));this.resources.push({destroy(){Pe(s)}});const r=()=>{this.helpTooltip.element.classList.add("hidden")};t.getViewport().addEventListener("mouseout",r),this.resources.push({destroy(){t.getViewport().removeEventListener("mouseout",r)}}),this.helpTooltip=JI(this.olMap)}destroy(){this.stopMeasurement();for(const t of this.resources)t.destroy();this.resources=[],this.activeMeasurement=Xu(this.activeMeasurement);for(const t of this.finishedMeasurements)t.destroy();this.finishedMeasurements.clear(),this.helpTooltip.destroy(),this.olMap.removeLayer(this.layer),this.layer.dispose(),this.source.dispose(),this.measurementChangedHandler=void 0,this.predefinedMeasurements.clear()}getVectorLayer(){return this.layer}setFinishedFeatureStyle(t){this.layer.setStyle(t)}setMeasurementSourceChangedHandler(t){this.measurementChangedHandler=t}setPredefinedMeasurements(t){this.updatePredefinedMeasurements(t)}setActiveFeatureStyle(t){const e=su(t);this.activeFeatureStyle=(n,...s)=>{const r=n?.getGeometry()?.getType();if(r==="Polygon"||r==="LineString"||r==="Point")return e(n,...s)},this.draw?.getOverlay().setStyle(this.activeFeatureStyle)}clearMeasurements(){const t=this.source.getFeatures();this.source.clear(),t.forEach(e=>{this.raiseMeasurementsChangeEvent("remove-measurement",e)}),this.predefinedMeasurements.clear();for(const e of this.finishedMeasurements)e.destroy();this.finishedMeasurements.clear()}startMeasurement(t){if(this.draw)throw new Error("Internal error: another measurement interaction is still active.");const e=t==="area"?"Polygon":"LineString",n=this.draw=new iS({source:this.source,type:e,style:this.activeFeatureStyle});this.olMap.addInteraction(n);let s,r;n.on("drawstart",a=>{const o=a.feature;o&&(s=this.activeMeasurement=new bf("active",o,this),r=o.getGeometry()?.on("change",()=>{s?.updateTooltipContent(),s?.updateTooltipPosition()}))}),n.on("drawend",()=>{if(s&&s===this.activeMeasurement){const a=s;a.updateState("finished"),this.finishedMeasurements.add(a),this.raiseMeasurementsChangeEvent("add-measurement",a.feature),this.activeMeasurement=s=void 0}s=void 0,r&&Pe(r)}),n.on("drawabort",()=>{s&&(s.destroy(),s===this.activeMeasurement&&(this.activeMeasurement=void 0),s=void 0),r&&Pe(r)})}stopMeasurement(){this.draw&&(this.olMap.removeInteraction(this.draw),this.draw.abortDrawing(),this.draw.dispose(),this.draw=void 0),this.activeMeasurement=Xu(this.activeMeasurement)}handlePointerMove(t){if(t.dragging)return;const e=this.helpTooltip,n=tR(this.messages,this.activeMeasurement);e.setText(n),e.overlay.setPosition(t.coordinate),e.element.classList.remove("hidden")}updatePredefinedMeasurements(t){const e=t.filter(s=>!this.predefinedMeasurements.has(s)),n=[];for(const s of this.predefinedMeasurements.keys())t.includes(s)||n.push(s);e.forEach(s=>{const r=new Ye(s);this.source.addFeature(r);const a=new bf("finished",r,this);this.finishedMeasurements.add(a),this.predefinedMeasurements.set(s,a),this.raiseMeasurementsChangeEvent("add-measurement",r)}),n.forEach(s=>{const r=this.predefinedMeasurements.get(s);r&&(this.source.removeFeature(r.feature),this.finishedMeasurements.delete(r),r.destroy(),this.raiseMeasurementsChangeEvent("remove-measurement",r.feature)),this.predefinedMeasurements.delete(s)})}raiseMeasurementsChangeEvent(t,e){const n=e.getGeometry();this.measurementChangedHandler&&n&&this.measurementChangedHandler({kind:t,geometry:(n instanceof ye,n)})}}class bf{controller;feature;_state;tooltip;constructor(t,e,n){this.controller=n,this._state=t,this.feature=e,this.tooltip=QI(this.olMap),this.updateTooltipContent(),this.updateTooltipPosition(),this.tooltip.setActive(t==="active")}destroy(){this.tooltip.destroy()}get state(){return this._state}updateState(t){this._state!==t&&(this._state=t,this.tooltip.setActive(t==="active"))}updateTooltipContent(){const t=this.feature.getGeometry();if(!t)return;const e=this.olMap.getView().getProjection();let n;t instanceof ye?n=eR(t,e,this.messages):t instanceof Ue&&(n=iR(t,e,this.messages)),n&&this.tooltip.setHtml(n)}updateTooltipPosition(){const t=this.feature.getGeometry();if(!t)return;let e;if(t instanceof ye)e=t.getInteriorPoint().getCoordinates()||null;else if(t instanceof Ue)e=t.getLastCoordinate()||null;else return;this.tooltip.overlay.setPosition(e)}get olMap(){return this.controller.olMap}get messages(){return this.controller.messages}}const Mf=[0,-15],KI=[0,-7];function JI(i){const t=document.createElement("div");t.className="measurement-tooltip printing-hide hidden",t.role="tooltip";const e=document.createElement("span");t.appendChild(e);const n=new cu({element:t,offset:[15,0],positioning:"center-left"});return i.addOverlay(n),{overlay:n,element:t,destroy(){i.removeOverlay(n)},setText(s){e.textContent=s},setHtml(s){e.innerHTML=s}}}function QI(i){const t=document.createElement("div");t.role="tooltip",t.className="measurement-tooltip measurement-active-tooltip printing-hide";const e=document.createElement("span");t.appendChild(e);const n=new cu({element:t,offset:Mf,positioning:"bottom-center",stopEvent:!1,insertFirst:!1});return i.addOverlay(n),{overlay:n,element:t,destroy(){i.removeOverlay(n)},setActive(s){s?(t.className="measurement-tooltip measurement-active-tooltip printing-hide",n.setOffset(Mf)):(t.className="measurement-tooltip measurement-finished-tooltip",n.setOffset(KI))},setText(s){e.textContent=s},setHtml(s){e.innerHTML=s}}}function tR(i,t){if(t){const e=t.feature.getGeometry();if(e instanceof ye||e instanceof Ue)return i.getContinueMessage()}return i.getHelpMessage()}function eR(i,t,e){const n=Ig(i,{projection:t});let s;return n>=1e6?s=`${e.formatNumber(n/1e6)} km2`:s=`${e.formatNumber(n)} m2`,s}function iR(i,t,e){const n=Sg(i,{projection:t});let s;return n>=1e3?s=`${e.formatNumber(n/1e3)} km`:s=`${e.formatNumber(n)} m`,s}const nR=i=>{const t=YI(),{containerProps:e}=Ae("measurement",i),[n,s]=b.useState("distance"),r=c=>t.formatMessage({id:c}),a=si(i),o=sR(a.map,i,t);b.useEffect(()=>{if(o)return o.startMeasurement(n),()=>{o.stopMeasurement()}},[o,n]);function l(c){if(c==="distance"||c==="area")s(c);else throw new Error(`Unexpected measurement type: '${c}'.`)}function h(){o?.clearMeasurements()}return S.jsxs(Mt,{...e,children:[S.jsx(al,{mb:3,children:t.formatMessage({id:"measurementInfoText"})}),S.jsx(ig,{mb:4,alignItems:"center",children:S.jsxs(n_,{mb:2,children:[S.jsx(bc,{mb:1,children:r("measurementLabel")}),S.jsxs(dg,{value:n,onChange:c=>l(c.target.value),className:"measurement-select",children:[S.jsx("option",{value:"distance",children:r("distance")}),S.jsx("option",{value:"area",children:r("area")})]})]})}),S.jsx(eg,{padding:2,className:"measurement-delete-button",onClick:h,width:"100%",children:r("deleteMeasurementLabel")})]})};function sR(i,t,e){const{activeFeatureStyle:n,finishedFeatureStyle:s,onMeasurementsChange:r,predefinedMeasurements:a}=t,[o,l]=b.useState(void 0);return b.useEffect(()=>{if(!i)return;const h=new ZI(i.olMap,{getContinueMessage(){return e.formatMessage({id:"tooltips.continue"})},getHelpMessage(){return e.formatMessage({id:"tooltips.help"})},formatNumber(c){return e.formatNumber(c,{maximumFractionDigits:2})}});return l(h),()=>{h.destroy(),l(void 0)}},[i,e]),b.useEffect(()=>{o?.setActiveFeatureStyle(n??rR())},[o,n]),b.useEffect(()=>{o?.setFinishedFeatureStyle(s??aR())},[o,s]),b.useEffect(()=>{o?.setMeasurementSourceChangedHandler(r)},[o,r]),b.useEffect(()=>{o?.setPredefinedMeasurements(a??[])},[o,a]),o}function rR(){return[new Et({stroke:new kt({color:"#fff",lineDash:[10,10],width:5})}),new Et({fill:new xe({color:"rgba(0,0,0,0.15)"}),stroke:new kt({color:"rgba(0, 0, 0, 0.7)",lineDash:[10,10],width:3}),image:new is({radius:5,stroke:new kt({color:"rgba(0, 0, 0, 0.7)",width:2}),fill:new xe({color:"rgba(255, 255, 255, 0.2)"})})})]}function aR(){return[new Et({stroke:new kt({color:"#fff",width:5})}),new Et({stroke:new kt({color:"#0b96fc",width:3}),fill:new xe({color:"rgba(11,150,252,0.15)"})})]}function oR(i){return Cn({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M233.91,74.79,181.22,22.1a14,14,0,0,0-19.8,0L22.09,161.41a14,14,0,0,0,0,19.8L74.78,233.9a14,14,0,0,0,19.8,0L233.91,94.59A14,14,0,0,0,233.91,74.79ZM225.42,86.1,86.1,225.41h0a2,2,0,0,1-2.83,0L30.58,172.73a2,2,0,0,1,0-2.83L64,136.48l27.76,27.76a6,6,0,1,0,8.48-8.48L72.48,128,96,104.48l27.76,27.76a6,6,0,0,0,8.48-8.48L104.48,96,128,72.49l27.76,27.75a6,6,0,0,0,8.48-8.48L136.49,64,169.9,30.59a2,2,0,0,1,2.83,0l52.69,52.68A2,2,0,0,1,225.42,86.1Z"},child:[]}]})(i)}const lR="@open-pioneer/basemap-switcher",Iu=ts.bind(void 0,lR);function Cf(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),e.push.apply(e,n)}return e}function W(i){for(var t=1;ti.length)&&(t=i.length);for(var e=0,n=Array(t);e({x:i,y:i});function ER(i){const{x:t,y:e,width:n,height:s}=i;return{width:n,height:s,top:e,left:t,right:t+n,bottom:e+s,x:t,y:e}}function Um(i){return Hm(i)?(i.nodeName||"").toLowerCase():"#document"}function Wi(i){var t;return(i==null||(t=i.ownerDocument)==null?void 0:t.defaultView)||window}function $m(i){var t;return(t=(Hm(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function Hm(i){return i instanceof Node||i instanceof Wi(i).Node}function SR(i){return i instanceof Element||i instanceof Wi(i).Element}function Ru(i){return i instanceof HTMLElement||i instanceof Wi(i).HTMLElement}function Ef(i){return typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof Wi(i).ShadowRoot}function Xm(i){const{overflow:t,overflowX:e,overflowY:n,display:s}=Tu(i);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&!["inline","contents"].includes(s)}function IR(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function RR(i){return["html","body","#document"].includes(Um(i))}function Tu(i){return Wi(i).getComputedStyle(i)}function TR(i){if(Um(i)==="html")return i;const t=i.assignedSlot||i.parentNode||Ef(i)&&i.host||$m(i);return Ef(t)?t.host:t}function qm(i){const t=TR(i);return RR(t)?i.ownerDocument?i.ownerDocument.body:i.body:Ru(t)&&Xm(t)?t:qm(t)}function Zo(i,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);const s=qm(i),r=s===((n=i.ownerDocument)==null?void 0:n.body),a=Wi(s);if(r){const o=fc(a);return t.concat(a,a.visualViewport||[],Xm(s)?s:[],o&&e?Zo(o):[])}return t.concat(s,Zo(s,[],e))}function fc(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function PR(i){const t=Tu(i);let e=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Ru(i),r=s?i.offsetWidth:e,a=s?i.offsetHeight:n,o=qo(e)!==r||qo(n)!==a;return o&&(e=r,n=a),{width:e,height:n,$:o}}function Pu(i){return SR(i)?i:i.contextElement}function Sf(i){const t=Pu(i);if(!Ru(t))return Yo(1);const e=t.getBoundingClientRect(),{width:n,height:s,$:r}=PR(t);let a=(r?qo(e.width):e.width)/n,o=(r?qo(e.height):e.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const OR=Yo(0);function LR(i){const t=Wi(i);return!IR()||!t.visualViewport?OR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AR(i,t,e){return!1}function If(i,t,e,n){t===void 0&&(t=!1);const s=i.getBoundingClientRect(),r=Pu(i);let a=Yo(1);t&&(a=Sf(i));const o=AR()?LR(r):Yo(0);let l=(s.left+o.x)/a.x,h=(s.top+o.y)/a.y,c=s.width/a.x,u=s.height/a.y;if(r){const d=Wi(r),f=n;let g=d,m=fc(g);for(;m&&n&&f!==g;){const p=Sf(m),_=m.getBoundingClientRect(),v=Tu(m),y=_.left+(m.clientLeft+parseFloat(v.paddingLeft))*p.x,x=_.top+(m.clientTop+parseFloat(v.paddingTop))*p.y;l*=p.x,h*=p.y,c*=p.x,u*=p.y,l+=y,h+=x,g=Wi(m),m=fc(g)}}return ER({width:c,height:u,x:l,y:h})}function DR(i,t){let e=null,n;const s=$m(i);function r(){var o;clearTimeout(n),(o=e)==null||o.disconnect(),e=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),r();const{left:h,top:c,width:u,height:d}=i.getBoundingClientRect();if(o||t(),!u||!d)return;const f=lo(c),g=lo(s.clientWidth-(h+u)),m=lo(s.clientHeight-(c+d)),p=lo(h),v={rootMargin:-f+"px "+-g+"px "+-m+"px "+-p+"px",threshold:wR(0,CR(1,l))||1};let y=!0;function x(M){const w=M[0].intersectionRatio;if(w!==l){if(!y)return a();w?a(!1,w):n=setTimeout(()=>{a(!1,1e-7)},1e3)}y=!1}try{e=new IntersectionObserver(x,{...v,root:s.ownerDocument})}catch{e=new IntersectionObserver(x,v)}e.observe(i)}return a(!0),r}function kR(i,t,e,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,h=Pu(i),c=s||r?[...h?Zo(h):[],...Zo(t)]:[];c.forEach(_=>{s&&_.addEventListener("scroll",e,{passive:!0}),r&&_.addEventListener("resize",e)});const u=h&&o?DR(h,e):null;let d=-1,f=null;a&&(f=new ResizeObserver(_=>{let[v]=_;v&&v.target===h&&f&&(f.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(t)})),e()}),h&&!l&&f.observe(h),f.observe(t));let g,m=l?If(i):null;l&&p();function p(){const _=If(i);m&&(_.x!==m.x||_.y!==m.y||_.width!==m.width||_.height!==m.height)&&e(),m=_,g=requestAnimationFrame(p)}return e(),()=>{var _;c.forEach(v=>{s&&v.removeEventListener("scroll",e),r&&v.removeEventListener("resize",e)}),u?.(),(_=f)==null||_.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var gc=b.useLayoutEffect,FR=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ko=function(){};function NR(i,t){return t?t[0]==="-"?i+t:i+"__"+t:i}function GR(i,t){for(var e=arguments.length,n=new Array(e>2?e-2:0),s=2;s-1}function zR(i){return Ll(i)?window.innerHeight:i.clientHeight}function Zm(i){return Ll(i)?window.pageYOffset:i.scrollTop}function Qo(i,t){if(Ll(i)){window.scrollTo(0,t);return}i.scrollTop=t}function jR(i){var t=getComputedStyle(i),e=t.position==="absolute",n=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var s=i;s=s.parentElement;)if(t=getComputedStyle(s),!(e&&t.position==="static")&&n.test(t.overflow+t.overflowY+t.overflowX))return s;return document.documentElement}function BR(i,t,e,n){return e*((i=i/n-1)*i*i+1)+t}function ho(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ko,s=Zm(i),r=t-s,a=10,o=0;function l(){o+=a;var h=BR(o,s,r,e);Qo(i,h),oe.bottom?Qo(i,Math.min(t.offsetTop+t.clientHeight-i.offsetHeight+s,i.scrollHeight)):n.top-s1?e-1:0),s=1;s=g)return{placement:"bottom",maxHeight:t};if(I>=g&&!a)return r&&ho(l,D,A),{placement:"bottom",maxHeight:t};if(!a&&I>=n||a&&E>=n){r&&ho(l,D,A);var G=a?E-x:I-x;return{placement:"bottom",maxHeight:G}}if(s==="auto"||a){var z=t,V=a?w:C;return V>=n&&(z=Math.min(V-x-o,t)),{placement:"top",maxHeight:z}}if(s==="bottom")return r&&Qo(l,D),{placement:"bottom",maxHeight:t};break;case"top":if(w>=g)return{placement:"top",maxHeight:t};if(C>=g&&!a)return r&&ho(l,k,A),{placement:"top",maxHeight:t};if(!a&&C>=n||a&&w>=n){var O=t;return(!a&&C>=n||a&&w>=n)&&(O=a?w-M:C-M),r&&ho(l,k,A),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(s,'".'))}return h}function QR(i){var t={bottom:"top",top:"bottom"};return i?t[i]:"bottom"}var Jm=function(t){return t==="auto"?"bottom":t},tT=function(t,e){var n,s=t.placement,r=t.theme,a=r.borderRadius,o=r.spacing,l=r.colors;return W((n={label:"menu"},ys(n,QR(s),"100%"),ys(n,"position","absolute"),ys(n,"width","100%"),ys(n,"zIndex",1),n),e?{}:{backgroundColor:l.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:o.menuGutter,marginTop:o.menuGutter})},Qm=b.createContext(null),eT=function(t){var e=t.children,n=t.minMenuHeight,s=t.maxMenuHeight,r=t.menuPlacement,a=t.menuPosition,o=t.menuShouldScrollIntoView,l=t.theme,h=b.useContext(Qm)||{},c=h.setPortalPlacement,u=b.useRef(null),d=b.useState(s),f=Wt(d,2),g=f[0],m=f[1],p=b.useState(null),_=Wt(p,2),v=_[0],y=_[1],x=l.spacing.controlHeight;return gc(function(){var M=u.current;if(M){var w=a==="fixed",E=o&&!w,C=JR({maxHeight:s,menuEl:M,minHeight:n,placement:r,shouldScroll:E,isFixedPosition:w,controlHeight:x});m(C.maxHeight),y(C.placement),c?.(C.placement)}},[s,r,a,o,n,c,x]),e({ref:u,placerProps:W(W({},t),{},{placement:v||Jm(r),maxHeight:g})})},iT=function(t){var e=t.children,n=t.innerRef,s=t.innerProps;return Y("div",K({},Ft(t,"menu",{menu:!0}),{ref:n},s),e)},nT=iT,sT=function(t,e){var n=t.maxHeight,s=t.theme.spacing.baseUnit;return W({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},e?{}:{paddingBottom:s,paddingTop:s})},rT=function(t){var e=t.children,n=t.innerProps,s=t.innerRef,r=t.isMulti;return Y("div",K({},Ft(t,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:s},n),e)},tp=function(t,e){var n=t.theme,s=n.spacing.baseUnit,r=n.colors;return W({textAlign:"center"},e?{}:{color:r.neutral40,padding:"".concat(s*2,"px ").concat(s*3,"px")})},aT=tp,oT=tp,lT=function(t){var e=t.children,n=e===void 0?"No options":e,s=t.innerProps,r=ri(t,ZR);return Y("div",K({},Ft(W(W({},r),{},{children:n,innerProps:s}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),s),n)},hT=function(t){var e=t.children,n=e===void 0?"Loading...":e,s=t.innerProps,r=ri(t,KR);return Y("div",K({},Ft(W(W({},r),{},{children:n,innerProps:s}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),s),n)},cT=function(t){var e=t.rect,n=t.offset,s=t.position;return{left:e.left,position:s,top:n,width:e.width,zIndex:1}},uT=function(t){var e=t.appendTo,n=t.children,s=t.controlElement,r=t.innerProps,a=t.menuPlacement,o=t.menuPosition,l=b.useRef(null),h=b.useRef(null),c=b.useState(Jm(a)),u=Wt(c,2),d=u[0],f=u[1],g=b.useMemo(function(){return{setPortalPlacement:f}},[]),m=b.useState(null),p=Wt(m,2),_=p[0],v=p[1],y=b.useCallback(function(){if(s){var E=WR(s),C=o==="fixed"?0:window.pageYOffset,I=E[d]+C;(I!==_?.offset||E.left!==_?.rect.left||E.width!==_?.rect.width)&&v({offset:I,rect:E})}},[s,o,d,_?.offset,_?.rect.left,_?.rect.width]);gc(function(){y()},[y]);var x=b.useCallback(function(){typeof h.current=="function"&&(h.current(),h.current=null),s&&l.current&&(h.current=kR(s,l.current,y,{elementResize:"ResizeObserver"in window}))},[s,y]);gc(function(){x()},[x]);var M=b.useCallback(function(E){l.current=E,x()},[x]);if(!e&&o!=="fixed"||!_)return null;var w=Y("div",K({ref:M},Ft(W(W({},t),{},{offset:_.offset,position:o,rect:_.rect}),"menuPortal",{"menu-portal":!0}),r),n);return Y(Qm.Provider,{value:g},e?Zf.createPortal(w,e):w)},dT=function(t){var e=t.isDisabled,n=t.isRtl;return{label:"container",direction:n?"rtl":void 0,pointerEvents:e?"none":void 0,position:"relative"}},fT=function(t){var e=t.children,n=t.innerProps,s=t.isDisabled,r=t.isRtl;return Y("div",K({},Ft(t,"container",{"--is-disabled":s,"--is-rtl":r}),n),e)},gT=function(t,e){var n=t.theme.spacing,s=t.isMulti,r=t.hasValue,a=t.selectProps.controlShouldRenderValue;return W({alignItems:"center",display:s&&r&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},e?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(n.baseUnit*2,"px")})},mT=function(t){var e=t.children,n=t.innerProps,s=t.isMulti,r=t.hasValue;return Y("div",K({},Ft(t,"valueContainer",{"value-container":!0,"value-container--is-multi":s,"value-container--has-value":r}),n),e)},pT=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},_T=function(t){var e=t.children,n=t.innerProps;return Y("div",K({},Ft(t,"indicatorsContainer",{indicators:!0}),n),e)},Pf,vT=["size"],yT=["innerProps","isRtl","size"],xT={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},ep=function(t){var e=t.size,n=ri(t,vT);return Y("svg",K({height:e,width:e,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:xT},n))},Ou=function(t){return Y(ep,K({size:20},t),Y("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},ip=function(t){return Y(ep,K({size:20},t),Y("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},np=function(t,e){var n=t.isFocused,s=t.theme,r=s.spacing.baseUnit,a=s.colors;return W({label:"indicatorContainer",display:"flex",transition:"color 150ms"},e?{}:{color:n?a.neutral60:a.neutral20,padding:r*2,":hover":{color:n?a.neutral80:a.neutral40}})},bT=np,MT=function(t){var e=t.children,n=t.innerProps;return Y("div",K({},Ft(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),e||Y(ip,null))},CT=np,wT=function(t){var e=t.children,n=t.innerProps;return Y("div",K({},Ft(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),e||Y(Ou,null))},ET=function(t,e){var n=t.isDisabled,s=t.theme,r=s.spacing.baseUnit,a=s.colors;return W({label:"indicatorSeparator",alignSelf:"stretch",width:1},e?{}:{backgroundColor:n?a.neutral10:a.neutral20,marginBottom:r*2,marginTop:r*2})},ST=function(t){var e=t.innerProps;return Y("span",K({},e,Ft(t,"indicatorSeparator",{"indicator-separator":!0})))},IT=Zp(Pf||(Pf=MR([`
0%, 80%, 100% { opacity: 0; }
diff --git a/starter/docs/functions/SimpleUiComponent.html b/starter/docs/functions/SimpleUiComponent.html
index 2ba90dbd0..0466e21c1 100644
--- a/starter/docs/functions/SimpleUiComponent.html
+++ b/starter/docs/functions/SimpleUiComponent.html
@@ -1,2 +1,2 @@
SimpleUiComponent | sample-package - v0.0.0Function SimpleUiComponent
- SimpleUiComponent(props, deprecatedLegacyContext?): ReactNode
Returns ReactNode
+Returns ReactNode
Deprecated
See
React Docs
-