From e71a9fb555f6e736d4fdd71d9069428c0ddc7c2d Mon Sep 17 00:00:00 2001 From: mbeckem Date: Wed, 13 Nov 2024 09:42:28 +0000 Subject: [PATCH] =?UTF-8?q?Deploy=20preview=20for=20PR=20355=20?= =?UTF-8?q?=F0=9F=9B=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pr-355/assets/{DXRVjCHc3TQl.js => 3kNqwj4ZjIyF.js} | 2 +- .../pr-previews/pr-355/assets/BZqu8ZKsC5y7.js | 4 ---- .../pr-355/assets/{B54buj5MMZhs.js => BdVObcUBxMFJ.js} | 2 +- .../pr-355/assets/{D6N1XV4yWCDw.js => BjoO2CDCNgNx.js} | 2 +- .../pr-355/assets/{C-wnl-ac_fZs.js => DDQuhaKEX29N.js} | 2 +- .../pr-355/assets/{CtkSqPB4B2ET.js => DIiS5B7_zqGr.js} | 2 +- .../pr-previews/pr-355/assets/DWXpGWYm5O7q.js | 4 ++++ .../pr-355/assets/{CwEDlz3FFp0l.js => Dq5NOIDwoIu6.js} | 2 +- .../pr-355/assets/{B2JeDJc3u--N.js => H7VhUBOXt34K.js} | 2 +- .../pr-355/assets/{CGddQzaLUNKL.js => HTd2VoWp6VZs.js} | 2 +- .../pr-355/assets/{B4hDpVmLHQcX.js => oPANC7vcIaRt.js} | 2 +- .../pr-355/samples/experimental-sidebar/index.html | 2 +- .../pr-previews/pr-355/samples/map-sample/index.html | 6 +++--- .../pr-previews/pr-355/samples/ogc-api-sample/index.html | 2 +- .../pr-previews/pr-355/samples/showcase/index.html | 6 +++--- .../pr-355/samples/test-highlight-and-zoom/index.html | 2 +- .../pr-previews/pr-355/samples/test-printing-api/index.html | 4 ++-- .../pr-previews/pr-355/samples/test-result-list/index.html | 2 +- .../pr-previews/pr-355/samples/test-toc/index.html | 2 +- 19 files changed, 26 insertions(+), 26 deletions(-) rename openlayers-base-packages/pr-previews/pr-355/assets/{DXRVjCHc3TQl.js => 3kNqwj4ZjIyF.js} (99%) delete mode 100644 openlayers-base-packages/pr-previews/pr-355/assets/BZqu8ZKsC5y7.js rename openlayers-base-packages/pr-previews/pr-355/assets/{B54buj5MMZhs.js => BdVObcUBxMFJ.js} (91%) rename openlayers-base-packages/pr-previews/pr-355/assets/{D6N1XV4yWCDw.js => BjoO2CDCNgNx.js} (90%) rename openlayers-base-packages/pr-previews/pr-355/assets/{C-wnl-ac_fZs.js => DDQuhaKEX29N.js} (88%) rename openlayers-base-packages/pr-previews/pr-355/assets/{CtkSqPB4B2ET.js => DIiS5B7_zqGr.js} (99%) create mode 100644 openlayers-base-packages/pr-previews/pr-355/assets/DWXpGWYm5O7q.js rename openlayers-base-packages/pr-previews/pr-355/assets/{CwEDlz3FFp0l.js => Dq5NOIDwoIu6.js} (79%) rename openlayers-base-packages/pr-previews/pr-355/assets/{B2JeDJc3u--N.js => H7VhUBOXt34K.js} (92%) rename openlayers-base-packages/pr-previews/pr-355/assets/{CGddQzaLUNKL.js => HTd2VoWp6VZs.js} (87%) rename openlayers-base-packages/pr-previews/pr-355/assets/{B4hDpVmLHQcX.js => oPANC7vcIaRt.js} (99%) diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/DXRVjCHc3TQl.js b/openlayers-base-packages/pr-previews/pr-355/assets/3kNqwj4ZjIyF.js similarity index 99% rename from openlayers-base-packages/pr-previews/pr-355/assets/DXRVjCHc3TQl.js rename to openlayers-base-packages/pr-previews/pr-355/assets/3kNqwj4ZjIyF.js index f646afc..68ba892 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/DXRVjCHc3TQl.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/3kNqwj4ZjIyF.js @@ -1 +1 @@ -import{a as k,c as y,r as c,j as e,B as m,e as z}from"./CzUo6bX8-UUU.js";import{t as S}from"./CWtAa_vMA4rU.js";import{S as j,T as I,O as C,M,H as P,d as L,g as R,i as g,e as _,B as p,f as E,j as A,k as s}from"./B36mctiVgF5V.js";import{P as T,N as H,I as q}from"./BZqu8ZKsC5y7.js";import{_ as b}from"./CmsKOCeNyeyo.js";import{S as N,T as i,V as v,U,a as h}from"./CovJx79h1x39.js";import"./DNaBv0QziP17.js";import"./Di-_YM5QvGet.js";const d="main";class O{mapId=d;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new j({title:"OSM",isBaseLayer:!0,olLayer:new I({source:new C})})]}}}const F={"printing-api-app":{name:"printing-api-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:O,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[{name:"printing.PrintingService",qualifier:void 0,all:!1}]},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/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:M,provides:[{name:"map.MapRegistry",qualifier:void 0}],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/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:P,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:T,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:H,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}}},G=':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)}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}',B=["en","de"];function D(o){switch(o){case"en":return b(()=>import("./-jAncdI_g-d4.js"),[],import.meta.url).then(r=>r.default);case"de":return b(()=>import("./1YhbJ59n8_2l.js"),[],import.meta.url).then(r=>r.default)}throw new Error(`Unsupported locale: '${o}'`)}const V=k(G),W=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:D,locales:B,packages:F,styles:V},Symbol.toStringTag,{value:"Module"})),K="printing-api-app",$=L.bind(void 0,K),J=y("printing");function Q(){const{map:o}=R(d),r=$("printing.PrintingService"),[t,n]=c.useState(void 0),f=async()=>{u("canvas")},x=async()=>{u("png")},u=async w=>{o&&await r.printMap(o.olMap).then(a=>{const l=a.getCanvas();w==="canvas"?(l.style.width="100%",l.style.height="100%",n(l)):n(a.getPNGDataURL(.6))},a=>{J.error(a)})};return e.jsx(g,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(_,{title:e.jsx(p,{textAlign:"center",py:1,children:e.jsx(E,{size:"md",children:"OpenLayers Base Packages - Printing API"})}),children:e.jsx(g,{flex:"1",direction:"column",position:"relative",children:e.jsxs(A,{mapId:d,children:[e.jsx(s,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(p,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:e.jsxs(N,{pt:5,children:[e.jsx(i,{align:"center",children:"Test Controls:"}),e.jsx(m,{onClick:()=>f(),children:"Canvas"}),e.jsx(m,{onClick:()=>x(),children:"Image data URL"})]})})}),e.jsx(s,{position:"top-right",horizontalGap:10,verticalGap:10,children:e.jsxs(v,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",maxHeight:"300px",overflow:"auto",children:[e.jsx(i,{as:"b",children:"Description"}),e.jsx(i,{children:"This application can be used to test the printing service. The service provides the screenshot of the given map view in a form of HTMLCanvasElement or a data url."}),e.jsxs(U,{children:[e.jsxs(h,{children:["Clicking on the ","'Canvas'"," button shows the HTMLCanvasElement of the map view embedded in another HTMLElement."]}),e.jsxs(h,{children:["Clicking on the ","'Image data URL'"," button shows the data url of the map view image used as source for HTMLImageElement."]})]})]})}),e.jsx(s,{position:"top-right",horizontalGap:450,verticalGap:10,children:t&&e.jsx(v,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",className:"result-display",maxWidth:"600",maxHeight:"500",children:e.jsx(X,{input:t})})})]})})})})}function X(o){const r=typeof o.input=="string"?o.input:void 0,t=r&&e.jsxs(e.Fragment,{children:[e.jsx(i,{as:"b",children:"Image from data URL"}),e.jsx(q,{src:r})]}),n=typeof o.input!="string"?e.jsx(Y,{canvas:o.input}):void 0;return t||n}function Y(o){const r=c.useRef(null);return c.useEffect(()=>{if(!r.current)return;const t=r.current;return t.appendChild(o.canvas),()=>{t.removeChild(o.canvas)}},[o.canvas]),e.jsxs(e.Fragment,{children:[e.jsx(i,{as:"b",children:"Image from canvas"}),e.jsx(p,{ref:r})]})}const Z=new URLSearchParams(window.location.search),ee=Z.get("lang"),oe=z({component:Q,config:{locale:ee??void 0},theme:S,appMetadata:W});customElements.define("printing-api-app",oe); +import{a as k,c as y,r as c,j as e,B as m,e as z}from"./CzUo6bX8-UUU.js";import{t as S}from"./CWtAa_vMA4rU.js";import{S as j,T as I,O as C,M,H as P,d as L,g as R,i as g,e as _,B as p,f as E,j as A,k as s}from"./B36mctiVgF5V.js";import{P as T,N as H,I as q}from"./DWXpGWYm5O7q.js";import{_ as b}from"./CmsKOCeNyeyo.js";import{S as N,T as i,V as v,U,a as h}from"./CovJx79h1x39.js";import"./DNaBv0QziP17.js";import"./Di-_YM5QvGet.js";const d="main";class O{mapId=d;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new j({title:"OSM",isBaseLayer:!0,olLayer:new I({source:new C})})]}}}const F={"printing-api-app":{name:"printing-api-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:O,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[{name:"printing.PrintingService",qualifier:void 0,all:!1}]},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/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:M,provides:[{name:"map.MapRegistry",qualifier:void 0}],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/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:P,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:T,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:H,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}}},G=':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)}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}',B=["en","de"];function D(o){switch(o){case"en":return b(()=>import("./-jAncdI_g-d4.js"),[],import.meta.url).then(r=>r.default);case"de":return b(()=>import("./1YhbJ59n8_2l.js"),[],import.meta.url).then(r=>r.default)}throw new Error(`Unsupported locale: '${o}'`)}const V=k(G),W=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:D,locales:B,packages:F,styles:V},Symbol.toStringTag,{value:"Module"})),K="printing-api-app",$=L.bind(void 0,K),J=y("printing");function Q(){const{map:o}=R(d),r=$("printing.PrintingService"),[t,n]=c.useState(void 0),f=async()=>{u("canvas")},x=async()=>{u("png")},u=async w=>{o&&await r.printMap(o.olMap).then(a=>{const l=a.getCanvas();w==="canvas"?(l.style.width="100%",l.style.height="100%",n(l)):n(a.getPNGDataURL(.6))},a=>{J.error(a)})};return e.jsx(g,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(_,{title:e.jsx(p,{textAlign:"center",py:1,children:e.jsx(E,{size:"md",children:"OpenLayers Base Packages - Printing API"})}),children:e.jsx(g,{flex:"1",direction:"column",position:"relative",children:e.jsxs(A,{mapId:d,children:[e.jsx(s,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(p,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:e.jsxs(N,{pt:5,children:[e.jsx(i,{align:"center",children:"Test Controls:"}),e.jsx(m,{onClick:()=>f(),children:"Canvas"}),e.jsx(m,{onClick:()=>x(),children:"Image data URL"})]})})}),e.jsx(s,{position:"top-right",horizontalGap:10,verticalGap:10,children:e.jsxs(v,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",maxHeight:"300px",overflow:"auto",children:[e.jsx(i,{as:"b",children:"Description"}),e.jsx(i,{children:"This application can be used to test the printing service. The service provides the screenshot of the given map view in a form of HTMLCanvasElement or a data url."}),e.jsxs(U,{children:[e.jsxs(h,{children:["Clicking on the ","'Canvas'"," button shows the HTMLCanvasElement of the map view embedded in another HTMLElement."]}),e.jsxs(h,{children:["Clicking on the ","'Image data URL'"," button shows the data url of the map view image used as source for HTMLImageElement."]})]})]})}),e.jsx(s,{position:"top-right",horizontalGap:450,verticalGap:10,children:t&&e.jsx(v,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",className:"result-display",maxWidth:"600",maxHeight:"500",children:e.jsx(X,{input:t})})})]})})})})}function X(o){const r=typeof o.input=="string"?o.input:void 0,t=r&&e.jsxs(e.Fragment,{children:[e.jsx(i,{as:"b",children:"Image from data URL"}),e.jsx(q,{src:r})]}),n=typeof o.input!="string"?e.jsx(Y,{canvas:o.input}):void 0;return t||n}function Y(o){const r=c.useRef(null);return c.useEffect(()=>{if(!r.current)return;const t=r.current;return t.appendChild(o.canvas),()=>{t.removeChild(o.canvas)}},[o.canvas]),e.jsxs(e.Fragment,{children:[e.jsx(i,{as:"b",children:"Image from canvas"}),e.jsx(p,{ref:r})]})}const Z=new URLSearchParams(window.location.search),ee=Z.get("lang"),oe=z({component:Q,config:{locale:ee??void 0},theme:S,appMetadata:W});customElements.define("printing-api-app",oe); diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/BZqu8ZKsC5y7.js b/openlayers-base-packages/pr-previews/pr-355/assets/BZqu8ZKsC5y7.js deleted file mode 100644 index 0ca879e..0000000 --- a/openlayers-base-packages/pr-previews/pr-355/assets/BZqu8ZKsC5y7.js +++ /dev/null @@ -1,4 +0,0 @@ -var z=a=>{throw TypeError(a)};var j=(a,e,t)=>e.has(a)||z("Cannot "+t);var C=(a,e,t)=>(j(a,e,"read from private field"),t?t.call(a):e.get(a)),D=(a,e,t)=>e.has(a)?z("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),T=(a,e,t,i)=>(j(a,e,"write to private field"),i?i.call(a,t):e.set(a,t),t),W=(a,e,t)=>(j(a,e,"access private method"),t);import{h as ie,j as X,r as I,a0 as de,l as J,c as ue,b as fe}from"./CzUo6bX8-UUU.js";import{_ as ge}from"./CmsKOCeNyeyo.js";import{bY as _e,bZ as me,v as pe,b_ as ye,b$ as Ce,c0 as we,be as ke,c1 as xe,bC as Te,bp as Q,bu as ve,a as Pe,b as Se,c2 as Le,bi as Z,bB as De,c3 as be,E as Ee,bn as w,c4 as Me,$ as Ie,bo as se,a$ as b,ao as V,c5 as ee,bx as Fe,ap as Re,an as ne,bA as Ne,c6 as Oe,c7 as re,c8 as Ge,aL as Ue,aN as Ae,b1 as te,ar as je}from"./B36mctiVgF5V.js";import{a as We,b as oe,M as ae,G as Ve}from"./DNaBv0QziP17.js";import{L as U}from"./Di-_YM5QvGet.js";var Y=ie(function(e,t){const{htmlWidth:i,htmlHeight:s,alt:r,...n}=e;return X.jsx("img",{width:i,height:s,ref:t,alt:r,...n})});Y.displayName="NativeImage";function Be(a){const{loading:e,src:t,srcSet:i,onLoad:s,onError:r,crossOrigin:n,sizes:o,ignoreFallback:h}=a,[l,c]=I.useState("pending");I.useEffect(()=>{c(t?"loading":"pending")},[t]);const d=I.useRef(),u=I.useCallback(()=>{if(!t)return;f();const g=new Image;g.src=t,n&&(g.crossOrigin=n),i&&(g.srcset=i),o&&(g.sizes=o),e&&(g.loading=e),g.onload=_=>{f(),c("loaded"),s?.(_)},g.onerror=_=>{f(),c("failed"),r?.(_)},d.current=g},[t,n,i,o,s,r,e]),f=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return de(()=>{if(!h)return l==="loading"&&u(),()=>{f()}},[l,u,h]),h?"loaded":l}var qe=(a,e)=>a!=="loaded"&&e==="beforeLoadOrError"||a==="failed"&&e==="onError";function He(a,e=[]){const t=Object.assign({},a);for(const i of e)i in t&&delete t[i];return t}var $e=ie(function(e,t){const{fallbackSrc:i,fallback:s,src:r,srcSet:n,align:o,fit:h,loading:l,ignoreFallback:c,crossOrigin:d,fallbackStrategy:u="beforeLoadOrError",referrerPolicy:f,...g}=e,_=i!==void 0||s!==void 0,m=l!=null||c||!_,x=Be({...e,crossOrigin:d,ignoreFallback:m}),k=qe(x,u),p={ref:t,objectFit:h,objectPosition:o,...m?g:He(g,["onError","onLoad"])};return k?s||X.jsx(J.img,{as:Y,className:"chakra-image__placeholder",src:i,...p}):X.jsx(J.img,{as:Y,src:r,srcSet:n,crossOrigin:d,loading:l,referrerPolicy:f,className:"chakra-image",...p})});$e.displayName="Image";class A extends _e{constructor(e,t,i){super(),i!==void 0&&t===void 0?this.setFlatCoordinates(i,e):(t=t||0,this.setCenterAndRadius(e,t,i))}clone(){const e=new A(this.flatCoordinates.slice(),void 0,this.layout);return e.applyProperties(this),e}closestPointXY(e,t,i,s){const r=this.flatCoordinates,n=e-r[0],o=t-r[1],h=n*n+o*o;if(h=i[0]||e[1]<=i[1]&&e[3]>=i[1]?!0:ye(e,this.intersectsCoordinate.bind(this))}return!1}setCenter(e){const t=this.stride,i=this.flatCoordinates[t]-this.flatCoordinates[0],s=e.slice();s[t]=s[0]+i;for(let r=1;r component has likely been used twice in your application.`),{destroy(){}};T(this,y,e);const t=C(this,S);if(T(this,S,void 0),t)for(const[s,...r]of t)e[s](...r);let i=!1;return{destroy:()=>{i||(i=!0,C(this,y)===e&&T(this,y,void 0))}}}}y=new WeakMap,S=new WeakMap,M=new WeakMap,L=new WeakSet,K=function(e,...t){if(C(this,y))C(this,y)[e](...t);else{const i=C(this,S)??T(this,S,[]);if(i.length>=1024){B.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:e,args:t});return}i.push([e,...t])}},Xe=function(){C(this,y)||B.warn(`No notification handler has been registered: notifications will not be visible. -Make sure that your app contains the component.`)};const F={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class R extends Re{constructor(e,t){super(e),this.feature=t}}function Ye(a,e){const t=[];for(let i=0;i=t?a[e-t]:a[e]}function O(a,e,t){let i,s;en){const h=P(a,i),l=P(a,s);return N(h,l)}let o=0;if(iu.startIndex?_u.startIndex&&(_-=f.length)),h=_,o=d)}const l=e.targets[o];let c=l.ring;if(e.targetIndex===o&&c){const d=P(l.coordinates,h),u=t.getPixelFromCoordinate(d);se(u,e.startPx)>i&&(c=!1)}if(c){const d=l.coordinates,u=d.length,f=l.startIndex,g=h;if(f=t?i-=t:i<0&&(i+=t);let r=i+1;r>=t&&(r-=t);const n=a[i],o=n[0],h=n[1],l=a[r],c=l[0]-o,d=l[1]-h;return[o+c*s,h+d*s]}class ze extends ke{constructor(e){const t=e;t.stopDown||(t.stopDown=xe),super(t),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=e.source?e.source:null,this.features_=e.features?e.features:null,this.snapTolerance_=e.snapTolerance?e.snapTolerance:12,this.type_=e.type,this.mode_=Qe(this.type_),this.stopClick_=!!e.stopClick,this.minPoints_=e.minPoints?e.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:e.maxPoints?e.maxPoints:1/0,this.finishCondition_=e.finishCondition?e.finishCondition:Te,this.geometryLayout_=e.geometryLayout?e.geometryLayout:"XY";let i=e.geometryFunction;if(!i){const s=this.mode_;if(s==="Circle")i=function(r,n,o){const h=n||new A([NaN,NaN]),l=Q(r[0]),c=ve(l,Q(r[r.length-1]));return h.setCenterAndRadius(l,Math.sqrt(c),this.geometryLayout_),h};else{let r;s==="Point"?r=V:s==="LineString"?r=U:s==="Polygon"&&(r=ne),i=function(n,o,h){return o?s==="Polygon"?n[0].length?o.setCoordinates([n[0].concat([n[0][0]])],this.geometryLayout_):o.setCoordinates([],this.geometryLayout_):o.setCoordinates(n,this.geometryLayout_):o=new r(n,this.geometryLayout_),o}}}this.geometryFunction_=i,this.dragVertexDelay_=e.dragVertexDelay!==void 0?e.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,this.overlay_=new Pe({source:new Se({useSpatialIndex:!1,wrapX:e.wrapX?e.wrapX:!1}),style:e.style?e.style:Je(),updateWhileInteracting:!0}),this.geometryName_=e.geometryName,this.condition_=e.condition?e.condition:Le,this.freehandCondition_,e.freehand?this.freehandCondition_=Z:this.freehandCondition_=e.freehandCondition?e.freehandCondition:De,this.traceCondition_,this.setTrace(e.trace||!1),this.traceState_={active:!1},this.traceSource_=e.traceSource||e.source||null,this.addChangeListener(be.ACTIVE,this.updateState_)}setTrace(e){let t;e?e===!0?t=Z:t=e:t=Ne,this.traceCondition_=t}setMap(e){super.setMap(e),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(e){e.originalEvent.type===Ee.CONTEXTMENU&&e.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(e);let t=e.type===w.POINTERMOVE,i=!0;return!this.freehand_&&this.lastDragTime_&&e.type===w.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,t=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&e.type===w.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(e.coordinate),i=!1):this.freehand_&&e.type===w.POINTERDOWN?i=!1:t&&this.getPointerCount()<2?(i=e.type===w.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):(e.originalEvent.pointerType==="mouse"||e.type===w.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(e)):e.type===w.DBLCLICK&&(i=!1),super.handleEvent(e)&&i}handleDownEvent(e){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=e.pixel,this.finishCoordinate_||this.startDrawing_(e.coordinate),!0):this.condition_(e)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(()=>{this.handlePointerMove_(new Me(w.POINTERMOVE,e.map,e.originalEvent,!1,e.frameState))},this.dragVertexDelay_),this.downPx_=e.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(e){if(!this.traceSource_||!this.traceCondition_(e))return;if(this.traceState_.active){this.deactivateTrace_();return}const t=this.getMap(),i=t.getCoordinateFromPixel([e.pixel[0]-this.snapTolerance_,e.pixel[1]+this.snapTolerance_]),s=t.getCoordinateFromPixel([e.pixel[0]+this.snapTolerance_,e.pixel[1]-this.snapTolerance_]),r=Ie([i,s]),n=this.traceSource_.getFeaturesInExtent(r);if(n.length===0)return;const o=Ye(e.coordinate,n);o.length&&(this.traceState_={active:!0,startPx:e.pixel.slice(),targets:o,targetIndex:-1})}addOrRemoveTracedCoordinates_(e,t){const i=e.startIndex<=e.endIndex,s=e.startIndex<=t;i===s?i&&t>e.endIndex||!i&&te.endIndex)&&this.removeTracedCoordinates_(t,e.endIndex):(this.removeTracedCoordinates_(e.startIndex,e.endIndex),this.addTracedCoordinates_(e,e.startIndex,t))}removeTracedCoordinates_(e,t){if(e===t)return;let i=0;if(e0&&this.removeLastPoints_(i)}addTracedCoordinates_(e,t,i){if(t===i)return;const s=[];if(t=n;--o)s.push(v(e.coordinates,o))}s.length&&this.appendCoordinates(s)}updateTrace_(e){const t=this.traceState_;if(!t.active||t.targetIndex===-1&&se(t.startPx,e.pixel)this.squaredClickTolerance_:n<=this.squaredClickTolerance_,!this.shouldHandle_)return}if(!this.finishCoordinate_){this.createOrUpdateSketchPoint_(e.coordinate.slice());return}this.updateTrace_(e),this.modifyDrawing_(e.coordinate)}atFinish_(e,t){let i=!1;if(this.sketchFeature_){let s=!1,r=[this.finishCoordinate_];const n=this.mode_;if(n==="Point")i=!0;else if(n==="Circle")i=this.sketchCoords_.length===2;else if(n==="LineString")s=!t&&this.sketchCoords_.length>this.minPoints_;else if(n==="Polygon"){const o=this.sketchCoords_;s=o[0].length>this.minPoints_,r=[o[0][0],o[0][o[0].length-2]],t?r=[o[0][0]]:r=[o[0][0],o[0][o[0].length-2]]}if(s){const o=this.getMap();for(let h=0,l=r.length;h=this.maxPoints_&&(this.freehand_?r.pop():s=!0),r.push(e.slice()),this.geometryFunction_(r,t,i)):n==="Polygon"&&(r=this.sketchCoords_[0],r.length>=this.maxPoints_&&(this.freehand_?r.pop():s=!0),r.push(e.slice()),s&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,t,i)),this.createOrUpdateSketchPoint_(e.slice()),this.updateSketchFeatures_(),s?this.finishDrawing():this.sketchFeature_}removeLastPoints_(e){if(!this.sketchFeature_)return;const t=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),s=this.mode_;for(let r=0;r=2){this.finishCoordinate_=n[n.length-2].slice();const o=this.finishCoordinate_.slice();n[n.length-1]=o,this.createOrUpdateSketchPoint_(o)}this.geometryFunction_(n,t,i),t.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(s==="Polygon"){n=this.sketchCoords_[0],n.splice(-2,1);const o=this.sketchLine_.getGeometry();if(n.length>=2){const h=n[n.length-2].slice();n[n.length-1]=h,this.createOrUpdateSketchPoint_(h)}o.setCoordinates(n),this.geometryFunction_(this.sketchCoords_,t,i)}if(n.length===1){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const e=this.abortDrawing_();if(!e)return null;let t=this.sketchCoords_;const i=e.getGeometry(),s=this.getMap().getView().getProjection();return this.mode_==="LineString"?(t.pop(),this.geometryFunction_(t,i,s)):this.mode_==="Polygon"&&(t[0].pop(),this.geometryFunction_(t,i,s),t=i.getCoordinates()),this.type_==="MultiPoint"?e.setGeometry(new We([t])):this.type_==="MultiLineString"?e.setGeometry(new oe([t])):this.type_==="MultiPolygon"&&e.setGeometry(new ae([t])),this.dispatchEvent(new R(F.DRAWEND,e)),this.features_&&this.features_.push(e),this.source_&&this.source_.addFeature(e),e}abortDrawing_(){this.finishCoordinate_=null;const e=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),e}abortDrawing(){const e=this.abortDrawing_();e&&this.dispatchEvent(new R(F.DRAWABORT,e))}appendCoordinates(e){const t=this.mode_,i=!this.sketchFeature_;i&&this.startDrawing_(e[0]);let s;if(t==="LineString"||t==="Circle")s=this.sketchCoords_;else if(t==="Polygon")s=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;i&&s.shift(),s.pop();for(let n=0;n=h){u=_,f=m,g=x;break}else if(f>=o)break;_=u,m=f,x=g,++d}const k=this.scaleBar_?this.createScaleBar(f,u,c):u.toFixed(g<0?-g:0)+" "+c;this.renderedHTML_!=k&&(this.innerElement_.innerHTML=k,this.renderedHTML_=k),this.renderedWidth_!=f&&(this.innerElement_.style.width=f+"px",this.renderedWidth_=f),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(e,t,i){const s=this.getScaleForResolution(),r=s<1?Math.round(1/s).toLocaleString()+" : 1":"1 : "+Math.round(s).toLocaleString(),n=this.scaleBarSteps_,o=e/n,h=[this.createMarker("absolute")];for(let c=0;c
`+this.createMarker("relative")+(c%2===0||n===2?this.createStepText(c,e,!1,t,i):"")+"")}return h.push(this.createStepText(n,e,!0,t,i)),(this.scaleBarText_?`
`+r+"
":"")+h.join("")}createMarker(e){return`
`}createStepText(e,t,i,s,r){const o=(e===0?0:Math.round(s/this.scaleBarSteps_*e*100)/100)+(e===0?"":" "+r),h=e===0?-3:t/this.scaleBarSteps_*-1,l=e===0?0:t/this.scaleBarSteps_*2;return`
`+o+"
"}getScaleForResolution(){const e=te(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),t=this.dpi_||E,i=1e3/25.4;return e*i*t}render(e){const t=e.frameState;t?this.viewState_=t.viewState:this.viewState_=null,this.updateElement_()}}const tt=.8,ce="printing-hide";function it(a,e){return a.toDataURL("image/png",e??tt)}function st(a,e){const t=document.createElement("div");t.classList.add("printing-overlay",ce),a.appendChild(t);const i=document.createElement("div");return i.classList.add("printing-overlay-status"),i.textContent=e,t.appendChild(i),{destroy(){t.remove()}}}class ft{defaultOverlayText;constructor(e){this.defaultOverlayText=e.intl.formatMessage({id:"printingMap"})}async printMap(e,t){return await new nt(e,{blockUserInteraction:!0,overlayText:this.defaultOverlayText,viewPadding:"auto",...t}).printMap()}}class nt{olMap;blockUserInteraction=!1;overlayText;viewPadding;running=!1;drawInformation=[];scaleLine=void 0;overlay=void 0;constructor(e,t){this.olMap=e,this.blockUserInteraction=t.blockUserInteraction,this.overlayText=t.overlayText,this.viewPadding=t.viewPadding}async printMap(){if(this.running)throw new Error("Printing already running.");try{await this.beginExport();let e=await this.printToCanvas(this.olMap.getViewport());if(!e)throw new Error("Canvas export failed");return this.viewPadding==="auto"&&(e=this.removePadding(e,this.getViewPadding())),new rt(e)}finally{this.reset()}}async beginExport(){this.running=!0;const e=this.olMap.getInteractions().getArray().filter(t=>t.getActive()&&t instanceof ze);if(this.drawInformation=[],e?.forEach(t=>{const i=t,s=i.getOverlay().getStyle();i.getOverlay().setStyle(null),this.drawInformation?.push({draw:i,style:s})}),this.blockUserInteraction){const t=this.olMap?.getTargetElement();t&&(this.overlay=st(t,this.overlayText))}await this.addScaleLine()}async addScaleLine(){const t=(this.scaleLine=new et({className:"printing-scale-bar ol-scale-bar",bar:!0,text:!0,minWidth:125})).element;if(!t)throw new Error("Scale line does not have an element");let i=50,s=8;if(this.viewPadding==="auto"){const{bottom:h,left:l}=this.getViewPadding();i=Math.max(h+8,i),s+=l}t.style.setProperty("--printing-scale-bar-bottom",`${i}px`),t.style.setProperty("--printing-scale-bar-left",`${s}px`);const r=fe(),n=setTimeout(()=>{r.reject(new Error("Scale line did not render"))},3e3),o=this.scaleLine.render;this.scaleLine.render=(...h)=>{o.apply(this.scaleLine,h),r.resolve()},this.olMap?.addControl(this.scaleLine);try{await r.promise,await new Promise(h=>{requestAnimationFrame(h)})}finally{clearTimeout(n)}}async printToCanvas(e){const t={useCORS:!0,ignoreElements:function(r){if(r.classList&&typeof r.classList=="object"){const n=r.classList;return n.contains("map-anchors")||n.contains(ce)}return!1}},i=(await ge(async()=>{const{default:r}=await import("./BfxBtG_Oxhhm.js");return{default:r}},[],import.meta.url)).default;return await i(e,t)}reset(){this.scaleLine&&(this.olMap?.removeControl(this.scaleLine),this.scaleLine=void 0),this.overlay&&(this.overlay.destroy(),this.overlay=void 0),this.running=!1,this.drawInformation?.length&&this.drawInformation.forEach(e=>{e.draw.getOverlay().setStyle(e.style)})}removePadding(e,t){const i=window.devicePixelRatio||1,s={top:t.top*i,right:t.right*i,bottom:t.bottom*i,left:t.left*i};if(s.left===0&&s.right===0&&s.top===0&&s.bottom===0)return e;const{width:r,height:n}=e,o=document.createElement("canvas");o.width=r-s.left-s.right,o.height=n-s.top-s.bottom;const h=o.getContext("2d");if(!h)throw new Error("Failed to get a canvas context");return h.drawImage(e,s.left,s.top,o.width,o.height,0,0,o.width,o.height),o}getViewPadding(){const t=this.olMap.getView().padding??[0,0,0,0];return{top:t[0]??0,right:t[1]??0,bottom:t[2]??0,left:t[3]??0}}}class rt{canvas;constructor(e){this.canvas=e}getCanvas(){return this.canvas}getPNGDataURL(e){return it(this.canvas,e)}}export{ze as D,$e as I,ut as N,ft as P,et as S,it as a,st as c}; diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/B54buj5MMZhs.js b/openlayers-base-packages/pr-previews/pr-355/assets/BdVObcUBxMFJ.js similarity index 91% rename from openlayers-base-packages/pr-previews/pr-355/assets/B54buj5MMZhs.js rename to openlayers-base-packages/pr-previews/pr-355/assets/BdVObcUBxMFJ.js index 37f6714..9b836c0 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/B54buj5MMZhs.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/BdVObcUBxMFJ.js @@ -1 +1 @@ -import{a as E,r as n,j as e,B as s,F,n as U,l as A,e as D}from"./CzUo6bX8-UUU.js";import{t as H}from"./CWtAa_vMA4rU.js";import{S as B,T as V,O as q,M as W,H as $,i as y,e as X,B as N,f as Y,j as Z,k as j}from"./B36mctiVgF5V.js";import{_ as S}from"./CmsKOCeNyeyo.js";import{C as J}from"./DfjlrXSmDfH9.js";import{a as z,b as u,R as K}from"./K_sKz2BiM23b.js";import{S as L,T as g,V as Q,U as ee,a as p}from"./CovJx79h1x39.js";import{M as oe}from"./C41Ku2EWcQEd.js";import{a as re,b as te,M as c}from"./DgJGd2MHfhXI.js";import{F as C}from"./0jkoYKtubXoE.js";import{F as I}from"./DAtS2L2h2gmX.js";import{C as ie}from"./DXNMkmWkGPwJ.js";import"./SSUBJAaBGB7g.js";import"./E5Cg9XwqIVqj.js";const G="main";class le{mapId=G;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new B({title:"OSM",isBaseLayer:!0,olLayer:new V({source:new q})})]}}}const ne={"result-list-app":{name:"result-list-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:le,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/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:W,provides:[{name:"map.MapRegistry",qualifier:void 0}],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/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:$,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},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:{}}},ae=':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)}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',se=["en","de"];function pe(o){switch(o){case"en":return S(()=>import("./CWewJjE-xeCE.js"),[],import.meta.url).then(i=>i.default);case"de":return S(()=>import("./BbSw8Fldfnox.js"),[],import.meta.url).then(i=>i.default)}throw new Error(`Unsupported locale: '${o}'`)}const ce=E(ae),de=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:pe,locales:se,packages:ne,styles:ce},Symbol.toStringTag,{value:"Module"})),M=400;function ue(){const[o,i]=n.useState(0),[r,x]=n.useState(),[T,m]=n.useState(!1),[d,R]=n.useState(!1),[h,_]=n.useState("multi"),[v,f]=n.useState("checkbox"),w=!!r&&T,a=l=>{x(l),m(!0),i(o+1)},k=n.useMemo(()=>{if(!r||!d)return r;const l=r.columns.filter((b,P)=>P%2==1);return{...r,columns:l}},[d,r]);return e.jsx(y,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(X,{title:e.jsx(N,{textAlign:"center",py:1,children:e.jsx(Y,{size:"md",children:"OpenLayers Base Packages - Result List"})}),children:e.jsxs(y,{flex:"1",direction:"column",position:"relative",children:[e.jsxs(Z,{mapId:G,viewPadding:{bottom:w?M:0},children:[e.jsx(j,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(N,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:e.jsxs(L,{children:[e.jsx(g,{align:"center",children:"Test Controls:"}),e.jsxs(oe,{placement:"right-end",children:[e.jsx(re,{as:s,rightIcon:e.jsx(J,{}),children:"Fill result list"}),e.jsx(F,{children:e.jsxs(te,{children:[e.jsx(c,{onClick:()=>a(he),children:"Persons"}),e.jsx(c,{onClick:()=>a(Ne),children:"Custom render"}),e.jsx(c,{onClick:()=>a(be),children:"Generated"}),e.jsx(c,{onClick:()=>a(ge),children:"Long Strings"}),e.jsx(c,{onClick:()=>a(Oe),children:"Many Columns"})]})})]}),e.jsxs(s,{onClick:()=>R(!d),children:[d?"Show":"Hide"," even columns"]}),e.jsx(s,{isDisabled:r===void 0,onClick:()=>m(!0),children:"Show result list"}),e.jsx(s,{onClick:()=>m(!1),children:"Hide result list"}),e.jsx(s,{isDisabled:r===void 0,onClick:()=>x(void 0),children:"Close result list"}),e.jsxs(C,{children:[e.jsx(I,{children:"Selection mode"}),e.jsx(z,{value:h,onChange:l=>{const b=l;_(b),f(b==="single"?"radio":"checkbox")},children:e.jsxs(L,{direction:"row",children:[e.jsx(u,{value:"single",children:"Single"}),e.jsx(u,{value:"multi",children:"Multi"})]})})]}),e.jsxs(C,{children:[e.jsx(I,{children:"Selection style"}),e.jsx(z,{value:v,onChange:l=>{f(l)},children:e.jsxs(L,{direction:"row",children:[e.jsx(u,{value:"radio",isDisabled:h==="multi",children:"Radio"}),e.jsx(u,{value:"checkbox",children:"Checkbox"})]})})]})]})})}),e.jsx(j,{position:"top-right",horizontalGap:10,verticalGap:10,children:e.jsxs(Q,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",maxHeight:"300px",overflow:"auto",children:[e.jsx(g,{as:"b",children:"Description"}),e.jsx(g,{children:"This application can be used to test the result list component. Internally, this application keeps track of the current result list input and displays it when the component shall be shown."}),e.jsxs(ee,{children:[e.jsx(p,{children:"If the result list has been filled, it can be hidden and shown again while preserving the state (selection, sort, scroll, ...)."}),e.jsx(p,{children:"The result list is embedded with a fixed height (with internal scrolling) above the map (using view padding). Showing or hiding the component will animate the view."}),e.jsx(p,{children:"Toggling columns will preserve the state of the result list."}),e.jsx(p,{children:"Filling the result list again resets the state (even when using equal data)."}),e.jsx(p,{children:"Fully closing the result list drops all state."})]})]})})]}),k&&e.jsx(N,{position:"absolute",visibility:w?"visible":"hidden",bottom:"0",backgroundColor:"white",width:"100%",height:`${M}px`,borderTop:"2px solid",borderColor:"trails.500",zIndex:1,children:e.jsx(K,{mapId:G,input:k,selectionMode:h,selectionStyle:v},String(o))})]})})})}let me=1;function t(o,i,r){return{id:String(me++),properties:{name:o,age:i,city:r}}}const he={data:[t("Test User A",21,"Cologne"),t("Test User B",33,"Berlin"),t("Test User C",44,"New York"),t("Test User D",55,"London"),t("Test User E",8,"Rome"),t("Test User F",14,"Vienna"),t("Test User G",17,"Paris"),t("Test User H",27,"Brussels"),t("Test User I",19,"Warsaw")],columns:[{displayName:"id",getPropertyValue(o){return o.id}},{propertyName:"name"},{propertyName:"age"},{propertyName:"city"}]},be={data:Array.from(Array(100).keys()).map(o=>({id:o,properties:{boolean:o%2==0,empty:o%2==0?null:void 0,number:o,float:o/7,string:`Item ${o}`,date:new Date}})),columns:[{propertyName:"boolean"},{propertyName:"number"},{propertyName:"float"},{propertyName:"string"},{propertyName:"date"},{propertyName:"empty"}],formatOptions:{numberOptions:{maximumFractionDigits:2},dateOptions:{timeStyle:"full",dateStyle:"full",timeZone:"UTC"}}},Ne={data:[{id:1,properties:{bool:!0}},{id:2,properties:{bool:!1}},{id:3,properties:{bool:void 0}}],columns:[{displayName:"id (with tooltip)",getPropertyValue(o){return o.id},renderCell({feature:o}){return e.jsx(Le,{id:o.id})}},{displayName:"boolean as checkbox (read only)",propertyName:"bool",renderCell({value:o}){return e.jsx(ie,{isIndeterminate:o===void 0,isChecked:!!o})}}]};function Le(o){return e.jsx(U,{label:`tooltip for feature ${o.id}`,placement:"top",children:e.jsx(A.span,{children:o.id})})}const ge={data:[{id:1,properties:{short:"Short 1",long:"LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG "}},{id:2,properties:{short:"Short 2",long:"LONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONG"}}],columns:[{propertyName:"short"},{propertyName:"long",width:300}]},Oe={columns:[{propertyName:"a"},{propertyName:"b"},{propertyName:"c"},{propertyName:"d"},{propertyName:"e"},{propertyName:"f"},{propertyName:"g"},{propertyName:"h"},{propertyName:"i"}],data:[{id:0,properties:{a:1,b:1,c:1,d:1,e:1,f:1,g:1,h:1,i:1}}]},Ge=new URLSearchParams(window.location.search),O=Ge.get("lang"),xe=D({component:ue,theme:H,appMetadata:de,config:{locale:O==="de"||O==="en"?O:void 0}});customElements.define("result-list-app",xe); +import{a as E,r as n,j as e,B as s,F,n as U,l as A,e as D}from"./CzUo6bX8-UUU.js";import{t as H}from"./CWtAa_vMA4rU.js";import{S as B,T as V,O as q,M as W,H as $,i as y,e as X,B as N,f as Y,j as Z,k as j}from"./B36mctiVgF5V.js";import{_ as S}from"./CmsKOCeNyeyo.js";import{C as J}from"./DfjlrXSmDfH9.js";import{a as z,b as u,R as K}from"./K_sKz2BiM23b.js";import{S as L,T as g,V as Q,U as ee,a as p}from"./CovJx79h1x39.js";import{M as oe}from"./C41Ku2EWcQEd.js";import{a as re,b as te,M as c}from"./DgJGd2MHfhXI.js";import{F as C}from"./0jkoYKtubXoE.js";import{F as I}from"./DAtS2L2h2gmX.js";import{C as ie}from"./DXNMkmWkGPwJ.js";import"./SSUBJAaBGB7g.js";import"./E5Cg9XwqIVqj.js";const G="main";class le{mapId=G;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new B({title:"OSM",isBaseLayer:!0,olLayer:new V({source:new q})})]}}}const ne={"result-list-app":{name:"result-list-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:le,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/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:W,provides:[{name:"map.MapRegistry",qualifier:void 0}],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/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:$,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},ae=':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)}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',se=["en","de"];function pe(o){switch(o){case"en":return S(()=>import("./CWewJjE-xeCE.js"),[],import.meta.url).then(i=>i.default);case"de":return S(()=>import("./BbSw8Fldfnox.js"),[],import.meta.url).then(i=>i.default)}throw new Error(`Unsupported locale: '${o}'`)}const ce=E(ae),de=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:pe,locales:se,packages:ne,styles:ce},Symbol.toStringTag,{value:"Module"})),M=400;function ue(){const[o,i]=n.useState(0),[r,x]=n.useState(),[T,m]=n.useState(!1),[d,R]=n.useState(!1),[h,_]=n.useState("multi"),[v,f]=n.useState("checkbox"),w=!!r&&T,a=l=>{x(l),m(!0),i(o+1)},k=n.useMemo(()=>{if(!r||!d)return r;const l=r.columns.filter((b,P)=>P%2==1);return{...r,columns:l}},[d,r]);return e.jsx(y,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(X,{title:e.jsx(N,{textAlign:"center",py:1,children:e.jsx(Y,{size:"md",children:"OpenLayers Base Packages - Result List"})}),children:e.jsxs(y,{flex:"1",direction:"column",position:"relative",children:[e.jsxs(Z,{mapId:G,viewPadding:{bottom:w?M:0},children:[e.jsx(j,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(N,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:e.jsxs(L,{children:[e.jsx(g,{align:"center",children:"Test Controls:"}),e.jsxs(oe,{placement:"right-end",children:[e.jsx(re,{as:s,rightIcon:e.jsx(J,{}),children:"Fill result list"}),e.jsx(F,{children:e.jsxs(te,{children:[e.jsx(c,{onClick:()=>a(he),children:"Persons"}),e.jsx(c,{onClick:()=>a(Ne),children:"Custom render"}),e.jsx(c,{onClick:()=>a(be),children:"Generated"}),e.jsx(c,{onClick:()=>a(ge),children:"Long Strings"}),e.jsx(c,{onClick:()=>a(Oe),children:"Many Columns"})]})})]}),e.jsxs(s,{onClick:()=>R(!d),children:[d?"Show":"Hide"," even columns"]}),e.jsx(s,{isDisabled:r===void 0,onClick:()=>m(!0),children:"Show result list"}),e.jsx(s,{onClick:()=>m(!1),children:"Hide result list"}),e.jsx(s,{isDisabled:r===void 0,onClick:()=>x(void 0),children:"Close result list"}),e.jsxs(C,{children:[e.jsx(I,{children:"Selection mode"}),e.jsx(z,{value:h,onChange:l=>{const b=l;_(b),f(b==="single"?"radio":"checkbox")},children:e.jsxs(L,{direction:"row",children:[e.jsx(u,{value:"single",children:"Single"}),e.jsx(u,{value:"multi",children:"Multi"})]})})]}),e.jsxs(C,{children:[e.jsx(I,{children:"Selection style"}),e.jsx(z,{value:v,onChange:l=>{f(l)},children:e.jsxs(L,{direction:"row",children:[e.jsx(u,{value:"radio",isDisabled:h==="multi",children:"Radio"}),e.jsx(u,{value:"checkbox",children:"Checkbox"})]})})]})]})})}),e.jsx(j,{position:"top-right",horizontalGap:10,verticalGap:10,children:e.jsxs(Q,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",maxHeight:"300px",overflow:"auto",children:[e.jsx(g,{as:"b",children:"Description"}),e.jsx(g,{children:"This application can be used to test the result list component. Internally, this application keeps track of the current result list input and displays it when the component shall be shown."}),e.jsxs(ee,{children:[e.jsx(p,{children:"If the result list has been filled, it can be hidden and shown again while preserving the state (selection, sort, scroll, ...)."}),e.jsx(p,{children:"The result list is embedded with a fixed height (with internal scrolling) above the map (using view padding). Showing or hiding the component will animate the view."}),e.jsx(p,{children:"Toggling columns will preserve the state of the result list."}),e.jsx(p,{children:"Filling the result list again resets the state (even when using equal data)."}),e.jsx(p,{children:"Fully closing the result list drops all state."})]})]})})]}),k&&e.jsx(N,{position:"absolute",visibility:w?"visible":"hidden",bottom:"0",backgroundColor:"white",width:"100%",height:`${M}px`,borderTop:"2px solid",borderColor:"trails.500",zIndex:1,children:e.jsx(K,{mapId:G,input:k,selectionMode:h,selectionStyle:v},String(o))})]})})})}let me=1;function t(o,i,r){return{id:String(me++),properties:{name:o,age:i,city:r}}}const he={data:[t("Test User A",21,"Cologne"),t("Test User B",33,"Berlin"),t("Test User C",44,"New York"),t("Test User D",55,"London"),t("Test User E",8,"Rome"),t("Test User F",14,"Vienna"),t("Test User G",17,"Paris"),t("Test User H",27,"Brussels"),t("Test User I",19,"Warsaw")],columns:[{displayName:"id",getPropertyValue(o){return o.id}},{propertyName:"name"},{propertyName:"age"},{propertyName:"city"}]},be={data:Array.from(Array(100).keys()).map(o=>({id:o,properties:{boolean:o%2==0,empty:o%2==0?null:void 0,number:o,float:o/7,string:`Item ${o}`,date:new Date}})),columns:[{propertyName:"boolean"},{propertyName:"number"},{propertyName:"float"},{propertyName:"string"},{propertyName:"date"},{propertyName:"empty"}],formatOptions:{numberOptions:{maximumFractionDigits:2},dateOptions:{timeStyle:"full",dateStyle:"full",timeZone:"UTC"}}},Ne={data:[{id:1,properties:{bool:!0}},{id:2,properties:{bool:!1}},{id:3,properties:{bool:void 0}}],columns:[{displayName:"id (with tooltip)",getPropertyValue(o){return o.id},renderCell({feature:o}){return e.jsx(Le,{id:o.id})}},{displayName:"boolean as checkbox (read only)",propertyName:"bool",renderCell({value:o}){return e.jsx(ie,{isIndeterminate:o===void 0,isChecked:!!o})}}]};function Le(o){return e.jsx(U,{label:`tooltip for feature ${o.id}`,placement:"top",children:e.jsx(A.span,{children:o.id})})}const ge={data:[{id:1,properties:{short:"Short 1",long:"LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG "}},{id:2,properties:{short:"Short 2",long:"LONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONG"}}],columns:[{propertyName:"short"},{propertyName:"long",width:300}]},Oe={columns:[{propertyName:"a"},{propertyName:"b"},{propertyName:"c"},{propertyName:"d"},{propertyName:"e"},{propertyName:"f"},{propertyName:"g"},{propertyName:"h"},{propertyName:"i"}],data:[{id:0,properties:{a:1,b:1,c:1,d:1,e:1,f:1,g:1,h:1,i:1}}]},Ge=new URLSearchParams(window.location.search),O=Ge.get("lang"),xe=D({component:ue,theme:H,appMetadata:de,config:{locale:O==="de"||O==="en"?O:void 0}});customElements.define("result-list-app",xe); diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/D6N1XV4yWCDw.js b/openlayers-base-packages/pr-previews/pr-355/assets/BjoO2CDCNgNx.js similarity index 90% rename from openlayers-base-packages/pr-previews/pr-355/assets/D6N1XV4yWCDw.js rename to openlayers-base-packages/pr-previews/pr-355/assets/BjoO2CDCNgNx.js index c9ce576..bc6de73 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/D6N1XV4yWCDw.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/BjoO2CDCNgNx.js @@ -1 +1 @@ -import{a as y,r as m,j as o,e as z}from"./CzUo6bX8-UUU.js";import{S as a,T as f,O as _,bM as T,bN as M,b as w,a as x,M as L,H as P,u as I,i as s,e as b,B as p,f as g,j as D,k as c}from"./B36mctiVgF5V.js";import{W as S,b as j}from"./kPJ9UZ8lVIau.js";import{G as k,e as C,T as R}from"./C1o_VwAkx5Nm.js";import{_ as h}from"./CmsKOCeNyeyo.js";import{V as A,T as v}from"./CovJx79h1x39.js";import"./CkG3hRXjrvfc.js";import"./DNaBv0QziP17.js";import"./Di-_YM5QvGet.js";import"./_05fvbTuDT_t.js";import"./E5Cg9XwqIVqj.js";import"./0jkoYKtubXoE.js";import"./C41Ku2EWcQEd.js";import"./BSX9fy8BsUsv.js";import"./DXNMkmWkGPwJ.js";import"./DgJGd2MHfhXI.js";const d="main";class E{mapId=d;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},projection:"EPSG:25832",layers:[new a({id:"topplus_open",title:"TopPlus Open",isBaseLayer:!0,visible:!0,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_openERROR/1.0.0/WMTSCapabilities.xml",olLayer:u("web")}),new a({id:"topplus_open_grau",title:"TopPlus Open (Grau)",isBaseLayer:!0,visible:!1,healthCheck:async()=>{function t(r){return new Promise(n=>setTimeout(n,r))}return await t(2e3),"error"},olLayer:u("web_grau")}),new a({id:"topplus_open_light",title:"TopPlus Open (Light)",isBaseLayer:!0,visible:!1,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",olLayer:u("web_light")}),new a({title:"OSM",visible:!1,isBaseLayer:!0,olLayer:new f({source:new _})}),new a({title:"Haltestellen Stadt Rostock",visible:!0,description:"Haltestellen des öffentlichen Personenverkehrs in der Hanse- und Universitätsstadt Rostock.",olLayer:O()}),new a({title:"Kindertagesstätten",visible:!0,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",olLayer:G()}),W(),q()]}}}function u(e){const t=[-380316598427299e-8,880590808284866e-8],r=[4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.874056570353,76.4370282851763,38.2185141425881,19.1092570712941,9.55462853564703,4.77731426782352,2.38865713391176,1.19432856695588,.59716428347794],n=new Array(r.length);for(let l=0;lDatenquellen`});return new f({source:i})}function O(){const e=new w({url:"https://geo.sv.rostock.de/download/opendata/haltestellen/haltestellen.json",format:new k,attributions:"Haltestellen Stadt Rostock, Creative Commons CC Zero License (cc-zero)"});return new x({source:e})}function G(){const e=new w({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new k,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'});return new x({source:e})}function W(){return new S({title:"Schulstandorte",description:"Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.",visible:!0,healthCheck:async()=>{function e(t){return new Promise(r=>setTimeout(r,t))}return await e(3e3),"error"},url:"https://www.wms.nrw.de/wms/wms_nw_inspire-schulen",sublayers:[{name:"US.education",title:"INSPIRE - WMS Schulstandorte NRW"}],sourceOptions:{ratio:1}})}function q(){return new S({title:"Straßennetz Landesbetrieb Straßenbau NRW",url:"https://www.wms.nrw.de/wms/strassen_nrw_wms",sublayers:[{name:"1",title:"Verwaltungen"},{name:"4",title:"Abschnitte und Äste"},{name:"6",title:"Unfälle"}]})}const H={"toc-map":{name:"toc-map",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:E,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},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/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:L,provides:[{name:"map.MapRegistry",qualifier:void 0}],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/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:P,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}}},B=':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)}',N=["en","de"];function U(e){switch(e){case"en":return h(()=>import("./Clif7aTs2LHR.js"),[],import.meta.url).then(t=>t.default);case"de":return h(()=>import("./Cx-LAL-6-WEp.js"),[],import.meta.url).then(t=>t.default)}throw new Error(`Unsupported locale: '${e}'`)}const V=y(B),F=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:U,locales:N,packages:H,styles:V},Symbol.toStringTag,{value:"Module"})),K="toc-map",$=I.bind(void 0,K);function J(){const e=$(),t=m.useId(),[r,n]=m.useState(!0);function i(){n(!r)}return o.jsx(s,{height:"100%",direction:"column",overflow:"hidden",children:o.jsx(b,{title:o.jsx(p,{role:"region","aria-label":e.formatMessage({id:"ariaLabel.header"}),textAlign:"center",py:1,children:o.jsx(g,{size:"md",children:"OpenLayers Base Packages - TOC and Health Check Sample"})}),children:o.jsx(s,{flex:"1",direction:"column",children:o.jsxs(D,{mapId:d,role:"main","aria-label":e.formatMessage({id:"ariaLabel.map"}),children:[o.jsx(c,{position:"top-left",horizontalGap:10,verticalGap:10,children:r&&o.jsx(p,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:350,children:r&&o.jsx(p,{role:"dialog","aria-labelledby":t,children:o.jsx(b,{title:o.jsx(g,{id:t,size:"md",mb:2,children:e.formatMessage({id:"tocTitle"})}),children:o.jsx(C,{mapId:d,showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})})}),o.jsx(c,{position:"top-right",horizontalGap:10,verticalGap:10,children:o.jsxs(A,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[o.jsx(v,{as:"b",children:"Description"}),o.jsxs(v,{children:["This application can be used to test the TOC, including health checks for configured layers. Two base layers (",'"',"TopPlus Open",'"'," and ",'"',"TopPlus Open (Grau)",'"',") and one operational layer (",'"',"Schulstandorte",'"',") will be unavailable and should be marked as such by the UI."]})]})}),o.jsx(c,{position:"bottom-right",horizontalGap:10,verticalGap:45,children:o.jsx(s,{role:"toolbar","aria-label":e.formatMessage({id:"ariaLabel.toolbar"}),direction:"column",gap:1,padding:1,children:o.jsx(R,{label:e.formatMessage({id:"tocTitle"}),icon:o.jsx(j,{}),isActive:r,onClick:i})})})]})})})})}const Y=z({component:J,appMetadata:F,async resolveConfig(e){const t=e.getAttribute("forced-locale");if(t)return{locale:t}}});customElements.define("toc-map-app",Y);const Z=document.getElementsByTagName("body")[0];Q();function Q(){const e=window.location.search,r=new URLSearchParams(e).get("lang"),n=document.createElement("toc-map-app");n.classList.add("full-height"),n.classList.add("app"),n.setAttribute("id","test"),r&&n.setAttribute("forced-locale",r),Z.appendChild(n)} +import{a as y,r as m,j as o,e as z}from"./CzUo6bX8-UUU.js";import{S as a,T as f,O as _,bM as T,bN as M,b as w,a as x,M as L,H as P,u as I,i as s,e as b,B as p,f as g,j as D,k as c}from"./B36mctiVgF5V.js";import{W as S,b as j}from"./kPJ9UZ8lVIau.js";import{G as k,e as C,T as R}from"./C1o_VwAkx5Nm.js";import{_ as h}from"./CmsKOCeNyeyo.js";import{V as A,T as v}from"./CovJx79h1x39.js";import"./CkG3hRXjrvfc.js";import"./DNaBv0QziP17.js";import"./Di-_YM5QvGet.js";import"./_05fvbTuDT_t.js";import"./E5Cg9XwqIVqj.js";import"./0jkoYKtubXoE.js";import"./C41Ku2EWcQEd.js";import"./BSX9fy8BsUsv.js";import"./DXNMkmWkGPwJ.js";import"./DgJGd2MHfhXI.js";const d="main";class E{mapId=d;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},projection:"EPSG:25832",layers:[new a({id:"topplus_open",title:"TopPlus Open",isBaseLayer:!0,visible:!0,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_openERROR/1.0.0/WMTSCapabilities.xml",olLayer:u("web")}),new a({id:"topplus_open_grau",title:"TopPlus Open (Grau)",isBaseLayer:!0,visible:!1,healthCheck:async()=>{function t(r){return new Promise(n=>setTimeout(n,r))}return await t(2e3),"error"},olLayer:u("web_grau")}),new a({id:"topplus_open_light",title:"TopPlus Open (Light)",isBaseLayer:!0,visible:!1,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",olLayer:u("web_light")}),new a({title:"OSM",visible:!1,isBaseLayer:!0,olLayer:new f({source:new _})}),new a({title:"Haltestellen Stadt Rostock",visible:!0,description:"Haltestellen des öffentlichen Personenverkehrs in der Hanse- und Universitätsstadt Rostock.",olLayer:O()}),new a({title:"Kindertagesstätten",visible:!0,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",olLayer:G()}),W(),q()]}}}function u(e){const t=[-380316598427299e-8,880590808284866e-8],r=[4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.874056570353,76.4370282851763,38.2185141425881,19.1092570712941,9.55462853564703,4.77731426782352,2.38865713391176,1.19432856695588,.59716428347794],n=new Array(r.length);for(let l=0;lDatenquellen`});return new f({source:i})}function O(){const e=new w({url:"https://geo.sv.rostock.de/download/opendata/haltestellen/haltestellen.json",format:new k,attributions:"Haltestellen Stadt Rostock, Creative Commons CC Zero License (cc-zero)"});return new x({source:e})}function G(){const e=new w({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new k,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'});return new x({source:e})}function W(){return new S({title:"Schulstandorte",description:"Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.",visible:!0,healthCheck:async()=>{function e(t){return new Promise(r=>setTimeout(r,t))}return await e(3e3),"error"},url:"https://www.wms.nrw.de/wms/wms_nw_inspire-schulen",sublayers:[{name:"US.education",title:"INSPIRE - WMS Schulstandorte NRW"}],sourceOptions:{ratio:1}})}function q(){return new S({title:"Straßennetz Landesbetrieb Straßenbau NRW",url:"https://www.wms.nrw.de/wms/strassen_nrw_wms",sublayers:[{name:"1",title:"Verwaltungen"},{name:"4",title:"Abschnitte und Äste"},{name:"6",title:"Unfälle"}]})}const H={"toc-map":{name:"toc-map",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:E,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:L,provides:[{name:"map.MapRegistry",qualifier:void 0}],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/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:P,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",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:{}}},B=':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)}',N=["en","de"];function U(e){switch(e){case"en":return h(()=>import("./Clif7aTs2LHR.js"),[],import.meta.url).then(t=>t.default);case"de":return h(()=>import("./Cx-LAL-6-WEp.js"),[],import.meta.url).then(t=>t.default)}throw new Error(`Unsupported locale: '${e}'`)}const V=y(B),F=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:U,locales:N,packages:H,styles:V},Symbol.toStringTag,{value:"Module"})),K="toc-map",$=I.bind(void 0,K);function J(){const e=$(),t=m.useId(),[r,n]=m.useState(!0);function i(){n(!r)}return o.jsx(s,{height:"100%",direction:"column",overflow:"hidden",children:o.jsx(b,{title:o.jsx(p,{role:"region","aria-label":e.formatMessage({id:"ariaLabel.header"}),textAlign:"center",py:1,children:o.jsx(g,{size:"md",children:"OpenLayers Base Packages - TOC and Health Check Sample"})}),children:o.jsx(s,{flex:"1",direction:"column",children:o.jsxs(D,{mapId:d,role:"main","aria-label":e.formatMessage({id:"ariaLabel.map"}),children:[o.jsx(c,{position:"top-left",horizontalGap:10,verticalGap:10,children:r&&o.jsx(p,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:350,children:r&&o.jsx(p,{role:"dialog","aria-labelledby":t,children:o.jsx(b,{title:o.jsx(g,{id:t,size:"md",mb:2,children:e.formatMessage({id:"tocTitle"})}),children:o.jsx(C,{mapId:d,showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})})}),o.jsx(c,{position:"top-right",horizontalGap:10,verticalGap:10,children:o.jsxs(A,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[o.jsx(v,{as:"b",children:"Description"}),o.jsxs(v,{children:["This application can be used to test the TOC, including health checks for configured layers. Two base layers (",'"',"TopPlus Open",'"'," and ",'"',"TopPlus Open (Grau)",'"',") and one operational layer (",'"',"Schulstandorte",'"',") will be unavailable and should be marked as such by the UI."]})]})}),o.jsx(c,{position:"bottom-right",horizontalGap:10,verticalGap:45,children:o.jsx(s,{role:"toolbar","aria-label":e.formatMessage({id:"ariaLabel.toolbar"}),direction:"column",gap:1,padding:1,children:o.jsx(R,{label:e.formatMessage({id:"tocTitle"}),icon:o.jsx(j,{}),isActive:r,onClick:i})})})]})})})})}const Y=z({component:J,appMetadata:F,async resolveConfig(e){const t=e.getAttribute("forced-locale");if(t)return{locale:t}}});customElements.define("toc-map-app",Y);const Z=document.getElementsByTagName("body")[0];Q();function Q(){const e=window.location.search,r=new URLSearchParams(e).get("lang"),n=document.createElement("toc-map-app");n.classList.add("full-height"),n.classList.add("app"),n.setAttribute("id","test"),r&&n.setAttribute("forced-locale",r),Z.appendChild(n)} diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/C-wnl-ac_fZs.js b/openlayers-base-packages/pr-previews/pr-355/assets/DDQuhaKEX29N.js similarity index 88% rename from openlayers-base-packages/pr-previews/pr-355/assets/C-wnl-ac_fZs.js rename to openlayers-base-packages/pr-previews/pr-355/assets/DDQuhaKEX29N.js index fb59a49..a712838 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/C-wnl-ac_fZs.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/DDQuhaKEX29N.js @@ -1 +1 @@ -var go=Object.defineProperty;var pt=t=>{throw TypeError(t)};var fo=(t,e,o)=>e in t?go(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var y=(t,e,o)=>fo(t,typeof e!="symbol"?e+"":e,o),$e=(t,e,o)=>e.has(t)||pt("Cannot "+o);var l=(t,e,o)=>($e(t,e,"read from private field"),o?o.call(t):e.get(t)),h=(t,e,o)=>e.has(t)?pt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),v=(t,e,o,r)=>($e(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),S=(t,e,o)=>($e(t,e,"access private method"),o);import{f as vo,h as B,u as bo,o as wo,k as Ce,r as b,j as n,l as Le,c as je,B as Z,F as Pt,A as Ke,m as Ze,n as Tt,E as R,a as yo,e as xo}from"./CzUo6bX8-UUU.js";import{aF as So,aG as ko,P as Io,N as X,aH as Mo,aI as Eo,ap as _o,aJ as Co,aK as Lo,aL as jo,E as Ao,at as Po,aM as ht,aN as To,aO as Ro,aP as mt,aQ as No,aR as Vo,aS as Ye,V as Rt,aT as gt,Z as Do,a3 as Oo,aU as Fo,a1 as Go,aV as zo,aW as Bo,aX as Ho,aY as Uo,aZ as ft,h as we,B as V,S as tt,T as Nt,O as Vt,a as ot,b as Dt,a_ as ge,g as ee,d as rt,u as Ae,a$ as vt,b0 as Wo,ao as qo,c as Ot,C as $o,F as Ft,ay as Gt,b1 as Ko,b2 as Zo,b3 as Yo,b4 as Xo,i as L,b5 as Jo,b6 as Qo,e as Ne,f as Je,H as er,M as tr,D as or,j as rr,k as bt}from"./B36mctiVgF5V.js";import{W as ir,i as nr,j as zt}from"./kPJ9UZ8lVIau.js";import{O as Bt,W as ar,c as sr,u as lr,I as Ht,e as cr,C as dr,b as ur,a as pr,M as hr,P as mr,L as gr,d as fr,S as vr,E as br,V as wr,f as Ut,N as yr}from"./CtkSqPB4B2ET.js";import{G as Wt,T as xr,e as Sr}from"./C1o_VwAkx5Nm.js";import{g as kr,c as Ir,T as Ue,V as Qe,L as Mr}from"./CovJx79h1x39.js";import{b as Er,r as J,u as Q,a as _r,w as qt,Z as Cr,c as Lr,I as jr,H as Ar,d as Pr,e as Tr,f as Rr,V as Nr,S as Vr}from"./BUCtgDDw782G.js";import{G as Dr}from"./CkG3hRXjrvfc.js";import{c as it}from"./SSUBJAaBGB7g.js";import{M as Or,a as Fr,b as Gr}from"./DgJGd2MHfhXI.js";import{M as zr}from"./C41Ku2EWcQEd.js";import{S as Br}from"./BSX9fy8BsUsv.js";import{u as $t}from"./E5Cg9XwqIVqj.js";import{r as Hr}from"./_05fvbTuDT_t.js";import{I as wt}from"./XuMECp8BqZmI.js";import{R as Ur}from"./K_sKz2BiM23b.js";import{N as Wr,P as qr}from"./BZqu8ZKsC5y7.js";import{_ as yt}from"./CmsKOCeNyeyo.js";import{F as $r}from"./0jkoYKtubXoE.js";import{H as Kr}from"./_YjaCHRtWzU8.js";import{F as Zr}from"./DAtS2L2h2gmX.js";import"./DNaBv0QziP17.js";import"./Di-_YM5QvGet.js";import"./DXNMkmWkGPwJ.js";var[Yr,Kt]=vo({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),nt=B(function(e,o){const r=bo("Input",e),{children:i,className:a,...s}=wo(e),c=Ce("chakra-input__group",a),d={},u=kr(i),p=r.field;u.forEach(m=>{var f,w;r&&(p&&m.type.id==="InputLeftElement"&&(d.paddingStart=(f=p.height)!=null?f:p.h),p&&m.type.id==="InputRightElement"&&(d.paddingEnd=(w=p.height)!=null?w:p.h),m.type.id==="InputRightAddon"&&(d.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(d.borderStartRadius=0))});const g=u.map(m=>{var f,w;const j=Ir({size:((f=m.props)==null?void 0:f.size)||e.size,variant:((w=m.props)==null?void 0:w.variant)||e.variant});return m.type.id!=="Input"?b.cloneElement(m,j):b.cloneElement(m,Object.assign(j,d,m.props))});return n.jsx(Le.div,{className:c,ref:o,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate",...r.group},"data-group":!0,...s,children:n.jsx(Yr,{value:r,children:g})})});nt.displayName="InputGroup";var Xr={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Jr=Le("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),at=B(function(e,o){var r;const{placement:i="left",...a}=e,s=(r=Xr[i])!=null?r:{},c=Kt();return n.jsx(Jr,{ref:o,...a,__css:{...c.addon,...s}})});at.displayName="InputAddon";var Zt=B(function(e,o){return n.jsx(at,{ref:o,placement:"left",...e,className:Ce("chakra-input__left-addon",e.className)})});Zt.displayName="InputLeftAddon";Zt.id="InputLeftAddon";var st=B(function(e,o){return n.jsx(at,{ref:o,placement:"right",...e,className:Ce("chakra-input__right-addon",e.className)})});st.displayName="InputRightAddon";st.id="InputRightAddon";var Qr=Le("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),We=B(function(e,o){var r,i;const{placement:a="left",...s}=e,c=Kt(),d=c.field,p={[a==="left"?"insetStart":"insetEnd"]:"0",width:(r=d?.height)!=null?r:d?.h,height:(i=d?.height)!=null?i:d?.h,fontSize:d?.fontSize,...c.element};return n.jsx(Qr,{ref:o,__css:p,...s})});We.id="InputElement";We.displayName="InputElement";var Yt=B(function(e,o){const{className:r,...i}=e,a=Ce("chakra-input__left-element",r);return n.jsx(We,{ref:o,placement:"left",className:a,...i})});Yt.id="InputLeftElement";Yt.displayName="InputLeftElement";var Ve=B(function(e,o){const{className:r,...i}=e,a=Ce("chakra-input__right-element",r);return n.jsx(We,{ref:o,placement:"right",className:a,...i})});Ve.id="InputRightElement";Ve.displayName="InputRightElement";var Xt=Le("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Xt.displayName="Center";var ei={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};B(function(e,o){const{axis:r="both",...i}=e;return n.jsx(Le.div,{ref:o,__css:ei[r],...i,position:"absolute"})});const x={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},ti={ERROR:"error"};class oi extends _o{constructor(e){super(ti.ERROR),this.code=e.code,this.message=e.message}}let ri=class extends So{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.position_=null,this.transform_=ko,this.watchId_=void 0,this.addChangeListener(x.PROJECTION,this.handleProjectionChanged_),this.addChangeListener(x.TRACKING,this.handleTrackingChanged_),e.projection!==void 0&&this.setProjection(e.projection),e.trackingOptions!==void 0&&this.setTrackingOptions(e.trackingOptions),this.setTracking(e.tracking!==void 0?e.tracking:!1)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const e=this.getProjection();e&&(this.transform_=Io(X("EPSG:4326"),e),this.position_&&this.set(x.POSITION,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const e=this.getTracking();e&&this.watchId_===void 0?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):!e&&this.watchId_!==void 0&&(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(e){const o=e.coords;this.set(x.ACCURACY,o.accuracy),this.set(x.ALTITUDE,o.altitude===null?void 0:o.altitude),this.set(x.ALTITUDE_ACCURACY,o.altitudeAccuracy===null?void 0:o.altitudeAccuracy),this.set(x.HEADING,o.heading===null?void 0:Mo(o.heading)),this.position_?(this.position_[0]=o.longitude,this.position_[1]=o.latitude):this.position_=[o.longitude,o.latitude];const r=this.transform_(this.position_);this.set(x.POSITION,r.slice()),this.set(x.SPEED,o.speed===null?void 0:o.speed);const i=Eo(this.position_,o.accuracy);i.applyTransform(this.transform_),this.set(x.ACCURACY_GEOMETRY,i),this.changed()}positionError_(e){this.dispatchEvent(new oi(e))}getAccuracy(){return this.get(x.ACCURACY)}getAccuracyGeometry(){return this.get(x.ACCURACY_GEOMETRY)||null}getAltitude(){return this.get(x.ALTITUDE)}getAltitudeAccuracy(){return this.get(x.ALTITUDE_ACCURACY)}getHeading(){return this.get(x.HEADING)}getPosition(){return this.get(x.POSITION)}getProjection(){return this.get(x.PROJECTION)}getSpeed(){return this.get(x.SPEED)}getTracking(){return this.get(x.TRACKING)}getTrackingOptions(){return this.get(x.TRACKING_OPTIONS)}setProjection(e){this.set(x.PROJECTION,X(e))}setTracking(e){this.set(x.TRACKING,e)}setTrackingOptions(e){this.set(x.TRACKING_OPTIONS,e)}};const ii=1.2;function ni(t,e=ii){ai(t);const o=Co(t),r=Lo(t),i=o*e,a=r*e;return[t[0]-(i-o)/2,t[1]-(a-r)/2,t[2]+(i-o)/2,t[3]+(a-r)/2]}function ai(t){if(t.length!==4)throw new Error(`Invalid extent (expected length 4, but got length ${t.length}).`)}const Xe=.75,Te=.1;let si=class extends jo{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=e.collapsed!==void 0?e.collapsed:!0,this.collapsible_=e.collapsible!==void 0?e.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=e.rotateWithView!==void 0?e.rotateWithView:!1,this.viewExtent_=void 0;const o=e.className!==void 0?e.className:"ol-overviewmap",r=e.tipLabel!==void 0?e.tipLabel:"Overview map",i=e.collapseLabel!==void 0?e.collapseLabel:"‹";typeof i=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=i):this.collapseLabel_=i;const a=e.label!==void 0?e.label:"›";typeof a=="string"?(this.label_=document.createElement("span"),this.label_.textContent=a):this.label_=a;const s=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,c=document.createElement("button");c.setAttribute("type","button"),c.title=r,c.appendChild(s),c.addEventListener(Ao.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=e.view;const d=new Po({view:e.view,controls:new ht,interactions:new ht});this.ovmap_=d,e.layers&&e.layers.forEach(function(I){d.addLayer(I)});const u=document.createElement("div");u.className="ol-overviewmap-box",u.style.boxSizing="border-box",this.boxOverlay_=new Bt({position:[0,0],positioning:"center-center",element:u}),this.ovmap_.addOverlay(this.boxOverlay_);const p=o+" "+To+" "+Ro+(this.collapsed_&&this.collapsible_?" "+mt:"")+(this.collapsible_?"":" ol-uncollapsible"),g=this.element;g.className=p,g.appendChild(this.ovmapDiv_),g.appendChild(c);const m=this,f=this.boxOverlay_,w=this.boxOverlay_.getElement(),j=function(I){return{clientX:I.clientX,clientY:I.clientY}},te=function(I){const E=j(I),ut=d.getEventCoordinateInternal(E);f.setPosition(ut)},H=function(I){const E=d.getEventCoordinateInternal(I);m.getMap().getView().setCenterInternal(E),window.removeEventListener("mousemove",te),window.removeEventListener("mouseup",H)};w.addEventListener("mousedown",function(){window.addEventListener("mousemove",te),window.addEventListener("mouseup",H)})}setMap(e){const o=this.getMap();if(e!==o){if(o){const r=o.getView();r&&this.unbindView_(r),this.ovmap_.setTarget(null)}if(super.setMap(e),e){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(No(e,Vo.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const r=e.getView();r&&(this.bindView_(r),r.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(e){if(e.key===Ye.VIEW){const o=e.oldValue;o&&this.unbindView_(o);const r=this.getMap().getView();this.bindView_(r)}else!this.ovmap_.isRendered()&&(e.key===Ye.TARGET||e.key===Ye.SIZE)&&this.ovmap_.updateSize()}bindView_(e){if(!this.view_){const o=new Rt({projection:e.getProjection()});this.ovmap_.setView(o)}e.addChangeListener(gt.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()}unbindView_(e){e.removeChangeListener(gt.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const e=this.getMap(),o=this.ovmap_;if(!e.isRendered()||!o.isRendered())return;const r=e.getSize(),a=e.getView().calculateExtentInternal(r);if(this.viewExtent_&&Do(a,this.viewExtent_))return;this.viewExtent_=a;const s=o.getSize(),d=o.getView().calculateExtentInternal(s),u=o.getPixelFromCoordinateInternal(Oo(a)),p=o.getPixelFromCoordinateInternal(Fo(a)),g=Math.abs(u[0]-p[0]),m=Math.abs(u[1]-p[1]),f=s[0],w=s[1];gf*Xe||m>w*Xe?this.resetExtent_():Go(d,a)||this.recenter_()}resetExtent_(){const e=this.getMap(),o=this.ovmap_,r=e.getSize(),a=e.getView().calculateExtentInternal(r),s=o.getView(),c=Math.log(Xe/Te)/Math.LN2,d=1/(Math.pow(2,c/2)*Te);zo(a,d),s.fitInternal(Bo(a))}recenter_(){const e=this.getMap(),o=this.ovmap_,r=e.getView();o.getView().setCenterInternal(r.getCenterInternal())}updateBox_(){const e=this.getMap(),o=this.ovmap_;if(!e.isRendered()||!o.isRendered())return;const r=e.getSize(),i=e.getView(),a=o.getView(),s=this.rotateWithView_?0:-i.getRotation(),c=this.boxOverlay_,d=this.boxOverlay_.getElement(),u=i.getCenterInternal(),p=i.getResolution(),g=a.getResolution(),m=r[0]*p/g,f=r[1]*p/g;if(c.setPosition(u),d){d.style.width=m+"px",d.style.height=f+"px";const w="rotate("+s+"rad)";d.style.transform=w}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=Ho(this.ovmap_,Uo.POSTRENDER,function(e){delete this.ovmapPostrenderKey_,this.updateBox_()},this))}handleClick_(e){e.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(mt),this.collapsed_?ft(this.collapseLabel_,this.label_):ft(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const e=this.ovmap_;if(!this.collapsed_){if(e.isRendered()){this.viewExtent_=void 0,e.render();return}e.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),!e&&this.collapsed_&&this.handleToggle_())}setCollapsed(e){!this.collapsible_||this.collapsed_===e||this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(e){this.rotateWithView_!==e&&(this.rotateWithView_=e,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(e){this.validateExtent_(),this.updateBox_()}};var li=it({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"}),ci=it({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),di=it({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"}),C,et,Re,Jt;class ui{constructor(e){h(this,C);y(this,"olMap");y(this,"handle");y(this,"_mapViews",Er());y(this,"_activeViewId",J(0));y(this,"backward",()=>{if(this.canBackward)S(this,C,Re).call(this,this.activeViewId-1),S(this,C,et).call(this,this.activeViewId);else throw new Error("Backward is not possible at the moment")});y(this,"forward",()=>{if(this.canForward)S(this,C,Re).call(this,this.activeViewId+1),S(this,C,et).call(this,this.activeViewId);else throw new Error("Forward is not possible at the moment")});this.olMap=e.olMap,this.handle=S(this,C,Jt).call(this)}destroy(){this.handle&&we(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}}C=new WeakSet,et=function(e){const o=this.olMap.getView();this.olMap.setView(new Rt({center:this.mapViews.get(e).center,resolution:this.mapViews.get(e).resolution,projection:o.getProjection()}))},Re=function(e){this._activeViewId.value=e},Jt=function(){const e=this.olMap.on("moveend",()=>{o()}),o=()=>{const r=this.olMap,i=this.mapViews,a=r.getView(),s=a.getResolution(),c=a.getCenter();if(s!=null&&c!=null&&(c!==i.get(this.activeViewId)?.center||s!==i.get(this.activeViewId)?.resolution)){const d={resolution:s,center:c},u=this.activeViewId+1;for(const p of i.keys())p>u&&i.delete(p);S(this,C,Re).call(this,u),i.set(u,d)}};return e};const pi={height:"25px",width:"25px",borderColor:"#4cb3ff",borderWidth:"3px",borderRadius:"50%",display:"inline-block "};function hi(t){return n.jsxs(V,{children:[n.jsx(Ue,{children:t.layer.title}),n.jsx(V,{style:pi})]})}const fe="main";class mi{mapId=fe;vectorSourceFactory;constructor(e){this.vectorSourceFactory=e.references.vectorSourceFactory}async getMapConfig(){return{initialView:{kind:"position",center:{x:823091,y:6724521},zoom:8},layers:[new tt({title:"OSM",id:"osm",isBaseLayer:!0,olLayer:new Nt({source:new Vt})}),new ar({isBaseLayer:!0,title:"Orthofotos NRW",url:"https://www.wmts.nrw.de/geobasis/wmts_nw_dop/1.0.0/WMTSCapabilities.xml",name:"nw_dop",matrixSet:"EPSG_3857_16",sourceOptions:{attributions:'Die Geobasisdaten des amtlichen Vermessungswesens werden als öffentliche Aufgabe gem. VermKatG NRW und gebührenfrei nach Open Data-Prinzipien über online-Verfahren bereitgestellt. Nutzungsbedingungen: siehe '}}),vi(),fi(),gi(this.vectorSourceFactory)]}}}function gi(t){const e="https://ogc-api-test.nrw.de/inspire-us-krankenhaus/v1",o="governmentalservice",r=t.createVectorSource({baseUrl:e,collectionId:o,limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:`Land NRW (${new Date().getFullYear()}), Datenlizenz Deutschland - Namensnennung - Version 2.0, Datenquelle`}),i=new ot({source:r});return new tt({id:"krankenhaus",title:"Krankenhäuser-Demo-Dienst",visible:!1,olLayer:i,attributes:{collectionURL:e+"/collections/"+o}})}function fi(){const t=new Dt({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new Wt,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'}),e=new ot({source:t}),o={Component:hi};return new tt({id:"ogc_kitas",title:"Kindertagesstätten",visible:!0,olLayer:e,attributes:{legend:o}})}function vi(){return new ir({title:"Verwaltungsgebiete",id:"verwaltungsgebiete",visible:!1,url:"https://www.wms.nrw.de/geobasis/wms_nw_dvg",sublayers:[{name:"nw_dvg_krs",title:"Kreise und kreisfreie Städte"}]})}const bi="200px",wi="300px",yi=t=>{const{olLayer:e,height:o=bi,width:r=wi}=t,{containerProps:i}=ge("overview-map",t),a=b.useRef(null),{map:s}=ee(t);return b.useEffect(()=>{if(a.current&&s&&e){const c=s.olMap,d=new si({className:"ol-overviewmap",layers:[e],collapsible:!1,collapsed:!1,target:a.current});return c.addControl(d),()=>{c.removeControl(d)}}},[s,e]),n.jsx(V,{height:o,width:r,ref:a,...i})};function xi({intl:t}){return{id:"overviewMap",title:t.formatMessage({id:"demos.overviewMap.title"}),createModel(){const e=new Nt({source:new Vt});return{description:t.formatMessage({id:"demos.overviewMap.description"}),mainWidget:n.jsx(yi,{olLayer:e}),destroy(){e.dispose()}}}}}class Si{label;filteredTypes;httpService;constructor(e,o,r){this.label=e,this.filteredTypes=o,this.httpService=r}async search(e,{mapProjection:o,signal:r}){const i=await this.request(e,100,r),a=new Wt({dataProjection:"EPSG:4326",featureProjection:o});return i.features.filter(s=>this.filteredTypes.includes(s.properties.type)).map((s,c)=>{const d=a.readGeometry(s.geometry);return{id:s.properties.osm_id||c,label:this.createLabel(s),geometry:d,properties:s.properties}})}async request(e,o,r){const i=new URL("https://photon.komoot.io/api?");i.searchParams.set("q",e),i.searchParams.set("lang","de"),i.searchParams.set("lat","51.961563"),i.searchParams.set("lon","7.628202"),i.searchParams.set("limit",o.toString());const a=await this.httpService.fetch(i,{signal:r});if(!a.ok)throw new Error("Request failed: "+a.status);return await a.json()}createLabel(e){return`${e.properties.name} (${e.properties.osm_value?e.properties.osm_value+", ":""}${e.properties.postcode?e.properties.postcode+", ":""}${e.properties.city?e.properties.city+", ":""}${e.properties.country?e.properties.country+")":")"}`}}function ki({intl:t,httpService:e,mapModel:o}){return{id:"searchAndHighlight",title:t.formatMessage({id:"demos.searchAndHighlight.title"}),createModel(){return new Ii(t,o,e)}}}var ye,xe,re,De,ie,jt;let Ii=(jt=class{constructor(e,o,r){h(this,ye);h(this,xe);h(this,re);y(this,"description");y(this,"mainWidget");h(this,De,e=>{const o=e.result.geometry;o&&(l(this,ie).call(this),v(this,re,Mi(l(this,xe),[o])))});h(this,ie,()=>{l(this,re)?.destroy(),v(this,re,void 0)});v(this,ye,new Si("Photon Geocoder",["city","street"],r)),v(this,xe,o),this.description=e.formatMessage({id:"demos.searchAndHighlight.description"}),this.mainWidget=n.jsx(sr,{sources:[l(this,ye)],onSelect:l(this,De),onClear:l(this,ie)})}destroy(){l(this,ie).call(this)}},ye=new WeakMap,xe=new WeakMap,re=new WeakMap,De=new WeakMap,ie=new WeakMap,jt);function Mi(t,e){const o=t.olMap.getViewport();return t.highlightAndZoom(e,{viewPadding:o&&o.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}const Qt="@open-pioneer/geolocation",Ei=rt.bind(void 0,Qt),eo=Ae.bind(void 0,Qt);function _i(t){return Dr({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:[]}]})(t)}const xt=je("geolocation:GeolocationController"),St=17;var U,W;class Ci{constructor(e,o,r){y(this,"supported",!!navigator.geolocation);y(this,"olMap");y(this,"positionHighlightLayer");y(this,"geolocation");y(this,"onError");y(this,"maxZoom",St);y(this,"accuracyFeature");y(this,"positionFeature");y(this,"changeHandlers",[]);y(this,"setMapToPosition",!0);y(this,"trackingOptions",{});y(this,"isInitialZoom",!0);h(this,U,J(!1));h(this,W,J(!1));this.olMap=e,this.onError=o,this.isInitialZoom=!0,this.accuracyFeature=new vt,this.accuracyFeature.setStyle(It()),this.positionFeature=new vt,this.positionFeature.setStyle(kt()),this.positionHighlightLayer=new ot({source:new Dt({features:[this.accuracyFeature,this.positionFeature]})}),this.positionHighlightLayer.setZIndex(Wo);const i=r||Li();this.geolocation=new ri({tracking:!1,trackingOptions:i,projection:e.getView()?.getProjection()}),this.trackingOptions=i,this.geolocation.on("error",a=>this.handleGeolocationError(a))}destroy(){this.stopGeolocation(),this.geolocation?.setTracking(!1),this.geolocation.dispose(),this.accuracyFeature=void 0,this.positionFeature=void 0,this.positionHighlightLayer.dispose()}startGeolocation(){if(l(this,W).value)return;const e=this.olMap;new Promise(r=>{l(this,W).value=!0,l(this,U).value=!0,this.geolocation?.setProjection(e.getView()?.getProjection()),this.geolocation?.setTracking(!0);const i=this.geolocation.on("change:accuracyGeometry",()=>{const d=this.geolocation.getAccuracyGeometry()||void 0;if(this.accuracyFeature?.setGeometry(d),this.accuracyFeature?.getGeometry()!==void 0&&r(),this.isInitialZoom){const u=this?.accuracyFeature?.getGeometry()?.getExtent();if(u){const p=ni(u);if(!p)return;e.getView().fit(p,{maxZoom:this.maxZoom}),this.isInitialZoom=!1}}}),a=this.geolocation.on("change:position",()=>{const d=this.geolocation.getPosition();d&&(d[0]||d[1])!==void 0&&(this.positionFeature?.setGeometry(new qo(d)),this.setMapToPosition&&e.getView().setCenter(d),this.positionFeature?.getGeometry()!==void 0&&r())}),s=e.getView().on("change:resolution",()=>{this.setMapToPosition=this.isInitialZoom}),c=e.on("pointermove",d=>{d.dragging&&(this.setMapToPosition=!1)});this.changeHandlers.push(i,a,s,c),e.addLayer(this.positionHighlightLayer)}).then(()=>{l(this,U).value=!1}).catch(r=>{xt.error("Failed to determine location",r)})}stopGeolocation(){this.geolocation?.setTracking(!1),l(this,W).value=!1,l(this,U).value=!1,this.trackingOptions={},this.setMapToPosition=!0,this.isInitialZoom=!0,this.changeHandlers.forEach(e=>{we(e)}),this.changeHandlers=[],this.accuracyFeature?.setGeometry(void 0),this.positionFeature?.setGeometry(void 0),this.olMap.removeLayer(this.positionHighlightLayer)}get active(){return l(this,W).value}get loading(){return l(this,U).value}setPositionFeatureStyle(e){this.positionFeature?.setStyle(e??kt())}setAccuracyFeatureStyle(e){this.accuracyFeature?.setStyle(e??It())}setMaxZoom(e){this.maxZoom=e??St}getMaxZoom(){return this.maxZoom}getPositionFeature(){return this.positionFeature}getAccuracyFeature(){return this.accuracyFeature}getTrackingOptions(){return this.trackingOptions}getGeolocation(){return this.geolocation}handleGeolocationError(e){xt.error("Error from geolocation API:",e.message),this.stopGeolocation();const o=(()=>{switch(e.code){case 1:return"permission-denied";case 2:return"position-unavailable";case 3:return"timeout";default:return"unknown"}})();this.onError(o)}}U=new WeakMap,W=new WeakMap;const kt=()=>new Ot({image:new $o({radius:6,fill:new Ft({color:"#3399CC"}),stroke:new Gt({color:"#fff",width:2})})}),It=()=>new Ot({stroke:new Gt({color:"#3399CC",width:3}),fill:new Ft({color:"rgba(0, 0, 255, 0.05)"})}),Li=()=>({enableHighAccuracy:!0,timeout:6e4,maximumAge:6e5}),ji=b.forwardRef(function(e,o){const{maxZoom:r,positionFeatureStyle:i,accuracyFeatureStyle:a,trackingOptions:s}=e,{map:c}=ee(e),d=Pi(c,r,s,i,a);return d&&n.jsx(Ai,{...e,controller:d,ref:o})}),Ai=b.forwardRef(function(e,o){const{controller:r}=e,{containerProps:i}=ge("geolocation",e),{isLoading:a,isActive:s}=Q(()=>({isLoading:r.loading,isActive:r.active}),[r]),c=eo(),d=r.supported?s?c.formatMessage({id:"locateMeEnd"}):c.formatMessage({id:"locateMeStart"}):c.formatMessage({id:"locateNotSupported"}),u=()=>{r.active?r.stopGeolocation():r.startGeolocation()};return n.jsx(xr,{ref:o,label:d,icon:n.jsx(_i,{}),onClick:()=>u(),isActive:s,isLoading:a,isDisabled:!r.supported,...i})});function Pi(t,e,o,r,i){const a=eo(),s=Ei("notifier.NotificationService"),[c,d]=b.useState();return b.useEffect(()=>{if(!t)return;const u=g=>{const m=a.formatMessage({id:"error"}),f=(()=>{switch(g){case"permission-denied":return a.formatMessage({id:"permissionDenied"});case"position-unavailable":return a.formatMessage({id:"positionUnavailable"});case"timeout":return a.formatMessage({id:"timeout"});case"unknown":return a.formatMessage({id:"unknownError"})}})();s.notify({level:"error",title:m,message:f})},p=new Ci(t.olMap,u,o);return d(p),()=>{p.destroy(),d(void 0)}},[t,o,a,s]),b.useEffect(()=>{c?.setPositionFeatureStyle(r)},[c,r]),b.useEffect(()=>{c?.setAccuracyFeatureStyle(i)},[c,i]),b.useEffect(()=>{c?.setMaxZoom(e)},[c,e]),c}const Ti="@open-pioneer/scale-setter",Ri=Ae.bind(void 0,Ti),Ni=25.4/.28,Vi=39.37,Di=[17471320,8735660,4367830,2183915,1091957,545978,272989,136494,68247,34123,17061,8530,4265,2132],Oi=t=>{const{scales:e=Di}=t,{containerProps:o}=ge("scale-setter",t),{map:r}=ee(t),i=Ri(),a=lr(r?.olMap)??1;function s(u){if(!r)return;const p=r.olMap.getView(),g=r.olMap.getView().getProjection(),m=g.getMetersPerUnit()??1,f=Vi*Ni*m,w=r.olMap.getView().getCenter();if(!w)return;const j=u/Ko(g,f,w);p.setResolution(j)}const c=e.map(u=>n.jsx(Or,{value:u,onClick:()=>s(u),onFocus:p=>{p.target?.scrollIntoView?.({block:"nearest"})},className:"scale-setter-option",children:Mt(i,u)},u)),d=Mt(i,a);return n.jsx(V,{...o,children:n.jsxs(zr,{isLazy:!0,children:[n.jsx(Fr,{as:Z,rightIcon:n.jsx(li,{}),className:"scale-setter-menubutton","aria-label":i.formatMessage({id:"button.ariaLabel"},{scale:d}),"aria-description":i.formatMessage({id:"button.ariaDescription"}),children:d}),n.jsx(Pt,{children:n.jsx(Gr,{className:"scale-setter-menuoptions",maxHeight:"20em",overflowY:"auto",children:c})})]})})};function Mt(t,e){return"1 : "+t.formatNumber(e)}const to="@open-pioneer/spatial-bookmarks",Fi=rt.bind(void 0,to),Gi=Ae.bind(void 0,to),O=je("spatial-bookmark:SpatialBookmarkViewModel");class zi{map;packageNamespace;writableBookmarks=_r([]);watchBookmarksHandle;get bookmarks(){return this.writableBookmarks.getItems()}constructor(e,o){this.map=e,this.packageNamespace=o.getNamespace("spatial-bookmarks"),this.loadState(),this.watchBookmarksHandle=qt(()=>[this.writableBookmarks.getItems()],([r])=>this.saveState(r),{immediate:!1})}destroy(){this.watchBookmarksHandle.destroy()}createBookmark(e){const o=this.map.olMap,r=o.getView().calculateExtent(),i=o.getView().getProjection().getCode(),a={minX:r[0],minY:r[1],maxX:r[2],maxY:r[3]},s={id:Zo(),title:e,extent:a,projection:i};O.debug("Created a new bookmark",s),this.writableBookmarks.push(s)}activateBookmark(e){O.debug("Activating bookmark",e);const o=this.getBookmarkExtent(e);O.debug("Attempting to apply extent",o),this.applyExtent(o)}deleteBookmark(e){O.debug("Deleting bookmark",e);const o=this.writableBookmarks.findIndex(r=>r.id===e);o>-1&&this.writableBookmarks.splice(o,1)}deleteAllBookmarks(){O.debug("Deleting all bookmarks"),this.writableBookmarks.splice(0)}loadState(){O.debug("Restoring bookmarks from local storage");const e=this.packageNamespace.get("bookmarks")??[];try{Bi(e),this.writableBookmarks.push(...e)}catch(o){O.error("Bookmarks data in local storage is invalid, resetting to default value.",o),this.writableBookmarks.splice(0),this.saveState([])}}saveState(e){O.debug("Saving bookmarks to local storage"),this.packageNamespace.set("bookmarks",e)}getBookmarkExtent(e){const r=this.map.olMap.getView(),i=e.extent,a=[i.minX,i.minY,i.maxX,i.maxY],s=r.getProjection(),c=e.projection;return Yo(a,c,s)}applyExtent(e){const r=this.map.olMap.getView(),i=Xo(e),a=r.getResolutionForExtent(e);r.setCenter(i),r.setResolution(a)}}function Bi(t){if(!Array.isArray(t))throw new Error("Expected bookmarks from local storage to be an array.");for(const e of t)Hi(e)}function Hi(t){if(!t||typeof t!="object")throw new Error("Expected bookmark from local storage to be an object.");const e=t;if(typeof e.id!="string")throw new Error("Bookmark does not have a valid id.");if(typeof e.title!="string")throw new Error("Bookmark does not have a valid title.");if(Ui(e.extent),typeof e.projection!="string")throw new Error("Bookmark does not have a valid projection value.")}function Ui(t){if(!t||typeof t!="object")throw new Error("Expected bookmark extent from local storage to be an object.");const e=t;if(typeof e.minX!="number"||typeof e.minY!="number"||typeof e.maxX!="number"||typeof e.maxY!="number")throw new Error("Expected bookmark extent from local storage to have valid coordinates.")}const Wi=t=>{const{map:e}=ee(t),o=Fi("local-storage.LocalStorageService"),r=Ji(e,o);return r&&n.jsx(qi,{...t,viewModel:r})};function qi(t){const{viewModel:e}=t,o=Gi(),r=b.useRef([]),[i,a]=b.useState(!1),s=Q(()=>e.bookmarks,[e]),[c,d]=b.useState(""),u=c.trim().length>0,{containerProps:p}=ge("spatial-bookmarks",t),[g,m]=b.useState("list"),f=()=>{e.deleteAllBookmarks(),m("list")},w=()=>{u&&(e.createBookmark(c),m("list"),d(""),a(!0))};b.useEffect(()=>{if(i){const E=r.current;E&&E[s.length-1]?.scrollIntoView?.(),a(!1)}},[s,i]);const j=()=>n.jsxs(Qe,{children:[n.jsxs(Ke,{rounded:"md",status:"warning",children:[n.jsx(Ze,{}),o.formatMessage({id:"bookmark.alert.delete"})]}),n.jsx(Yi,{intl:o,onClear:f,onCancel:()=>m("list")})]}),te=()=>n.jsxs(Qe,{children:[n.jsxs(Ke,{rounded:"md",status:"info",children:[n.jsx(Ze,{}),o.formatMessage({id:"bookmark.alert.create"})]}),n.jsx(Ht,{"aria-label":o.formatMessage({id:"bookmark.input.label"}),placeholder:o.formatMessage({id:"bookmark.input.placeholder"}),value:c,onChange:E=>{d(E.target.value)},onKeyDown:E=>{E.key==="Enter"&&w()},isRequired:!0,isInvalid:!u,autoFocus:!0}),n.jsx(Xi,{intl:o,isInvalid:!u,onCancel:()=>{d(""),m("list")},onSave:w})]}),H=()=>n.jsxs(n.Fragment,{children:[s.length?$i(s,e,o,r):n.jsxs(Ke,{rounded:"md",status:"info",children:[n.jsx(Ze,{}),o.formatMessage({id:"bookmark.alert.noSaved"})]}),n.jsx(Zi,{intl:o,bookmarks:s,showCreate:()=>m("create"),showDelete:()=>m("delete")})]}),I=n.jsxs(n.Fragment,{children:[g==="list"&&H(),g==="create"&&te(),g==="delete"&&j()]});return n.jsx(L,{flexDirection:"column",...p,children:I})}function $i(t,e,o,r){const i=o.formatMessage({id:"bookmark.button.deleteOne"}),a=t.map((s,c)=>n.jsx(Ki,{index:c,listItemNodes:r,bookmark:s,onActivate:()=>e.activateBookmark(s),onDelete:()=>e.deleteBookmark(s.id),deleteBtnLabel:i},s.id));return n.jsx(Mr,{as:"ul",className:"spatial-bookmark-list",role:"listbox","aria-label":o.formatMessage({id:"bookmark.list.label"}),flexShrink:1,flexGrow:1,p:1,spacing:1,overflowY:"auto",listStyleType:"none",children:a})}const Et={ArrowDown:1,ArrowUp:-1};function Ki(t){const{index:e,listItemNodes:o,bookmark:r,onDelete:i,onActivate:a,deleteBtnLabel:s}=t,c=r.title,d=u=>{const p=u.key;if(p==="Enter"){u.target===u.currentTarget&&a();return}if(Et[p]!=null){const g=o.current?.length;if(!g)return;let m=(e+Et[p])%g;m<0&&(m=g-1),o.current[m]?.focus()}};return n.jsx(V,{as:"li",p:1,ref:u=>{if(!u){o.current.splice(e,1);return}o.current[e]=u},className:Jo("spatial-bookmarks-item"),tabIndex:0,rounded:"md",role:"option",cursor:"pointer",outline:0,_hover:{background:"trails.50"},_focusVisible:{boxShadow:"outline"},onKeyDown:d,onClick:a,children:n.jsxs(L,{width:"100%",flexDirection:"row",align:"center",gap:1,children:[n.jsx(Xt,{children:n.jsx(nr,{})}),n.jsx(Ue,{ps:2,noOfLines:1,children:c}),n.jsx(Br,{}),n.jsx(Tt,{hasArrow:!0,label:s,placement:"right",children:n.jsx(Z,{className:"spatial-bookmarks-item-delete","aria-label":s,borderRadius:"full",iconSpacing:0,padding:0,colorScheme:"red",variant:"ghost",leftIcon:n.jsx(zt,{}),onClick:u=>{i(),u.stopPropagation()}})},e)]})})}function Zi(t){const{intl:e,bookmarks:o,showCreate:r,showDelete:i}=t;return n.jsxs(lt,{children:[n.jsx(pe,{isDisabled:o.length===0,colorScheme:"red",width:void 0,iconSpacing:0,leftIcon:n.jsx(zt,{}),onClick:i,"aria-label":e.formatMessage({id:"bookmark.button.deleteAll"}),variant:"outline"}),n.jsx(pe,{onClick:r,width:"100%",children:e.formatMessage({id:"bookmark.button.create"})})]})}function Yi(t){const{intl:e,onCancel:o,onClear:r}=t;return n.jsxs(lt,{children:[n.jsx(pe,{variant:"outline",onClick:o,children:e.formatMessage({id:"bookmark.button.cancelDelete"})}),n.jsx(pe,{onClick:r,children:e.formatMessage({id:"bookmark.button.confirmDelete"})})]})}function Xi(t){const{intl:e,onCancel:o,onSave:r,isInvalid:i}=t;return n.jsxs(lt,{children:[n.jsx(pe,{variant:"outline",onClick:()=>o(),children:e.formatMessage({id:"bookmark.button.cancel"})}),n.jsx(pe,{isDisabled:i,onClick:()=>r(),children:e.formatMessage({id:"bookmark.button.save"})})]})}function lt(t){return n.jsx(L,{width:"100%",flexDirection:"row",mt:2,gap:1,flexGrow:0,flexShrink:0,children:t.children})}function pe(t){return n.jsx(Z,{width:"100%",...t})}function Ji(t,e){const[o,r]=b.useState();return b.useEffect(()=>{let i;return t?i=new zi(t,e):i=void 0,r(i),()=>i?.destroy()},[t,e]),o}const Qi="@open-pioneer/coordinate-search",Pe=Ae.bind(void 0,Qi),en=3,tn=[{label:"WGS 84",value:X("EPSG:4326"),precision:3},{label:"Web Mercator",value:X("EPSG:3857"),precision:2}],oo=t=>{const{onSelect:e,onClear:o,projections:r=tn,input:i,placeholder:a=""}=t,{containerProps:s}=ge("coordinate-input",t),{map:c}=ee(t),d=Pe(),u=c?.olMap,p=cr(u)??void 0,g=ln(r),[m,f]=b.useState(g[0]),[w,j]=sn(i,p,m,e),te=cn(a,p,m),H=ro(d,w,m.value),I=H==="success",E=b.useRef(null);return n.jsxs(V,{...s,children:[n.jsx(Pt,{children:n.jsx("div",{ref:E})}),n.jsx(L,{flexDirection:"row",flexDir:"row",children:n.jsx(Tt,{label:I?void 0:d.formatMessage({id:H}),hasArrow:!0,placement:"auto",isOpen:!I,className:"coordinateInputToolTip",children:n.jsxs(nt,{className:"coordinateInputGroup",children:[n.jsx(on,{coordinateSearchInput:w,setCoordinateSearchInput:j,placeholder:a,placeholderString:te,onClear:o,isInputValid:I,selectedProjection:m,mapProjection:p,onSelect:e}),n.jsx(st,{padding:"0px",borderLeft:"0px",children:n.jsx(nn,{selectedProjection:m,availableProjections:g,portalElement:E,setSelectedProjection:f,coordinateSearchInput:w,mapProjection:p,onSelect:e})})]})})})]})};function on(t){const{isInputValid:e,selectedProjection:o,mapProjection:r,onSelect:i,coordinateSearchInput:a,setCoordinateSearchInput:s,placeholder:c,placeholderString:d,onClear:u}=t,p=Pe();return n.jsxs(nt,{className:"coordinateInputFieldGroup",children:[n.jsx(Ht,{type:"text",value:a,onChange:g=>{s(g.target.value)},isInvalid:!e,backgroundColor:e?"undefined":"red.100",placeholder:d,errorBorderColor:"red.500","aria-label":p.formatMessage({id:"coordinateInput.ariaLabel"}),borderRightRadius:0,onKeyDown:g=>{g.key=="Enter"&&ct(p,a,o.value,r,i)}}),n.jsx(rn,{coordinateSearchInput:a,setCoordinateSearchInput:s,placeholder:c,placeholderString:d,onClear:u,intl:p})]})}function rn(t){const{coordinateSearchInput:e,setCoordinateSearchInput:o,placeholder:r,placeholderString:i,onClear:a,intl:s}=t;return e!==""?n.jsx(Ve,{children:n.jsx(wt,{className:"clearButton",size:"sm",onClick:()=>{o(""),a&&a()},isDisabled:e=="",padding:0,icon:n.jsx(ci,{}),"aria-label":s.formatMessage({id:"coordinateInput.ariaLabel"})})}):typeof r=="object"&&e==""?n.jsx(Ve,{children:n.jsx(wt,{className:"copyButton",size:"sm",onClick:()=>{navigator.clipboard.writeText(i)},padding:0,icon:n.jsx(di,{}),"aria-label":s.formatMessage({id:"coordinateInput.copyPlaceholder"})})}):n.jsx(n.Fragment,{})}function nn(t){const[e,o]=b.useState(!1),r=$t(f=>{!e&&f.key==="Enter"&&o(!0)}),{selectedProjection:i,availableProjections:a,portalElement:s,setSelectedProjection:c,coordinateSearchInput:d,mapProjection:u,onSelect:p}=t,g=Pe(),m=an(g);return n.jsx(Hr,{value:i,defaultValue:i,options:a,menuPlacement:"auto",menuPortalTarget:s.current,"aria-label":g.formatMessage({id:"coordinateInput.ariaLabel"}),classNamePrefix:"coordinate-Input-Select",isSearchable:!1,chakraStyles:{menu:f=>({...f,width:"max-content",minWidth:"100%"}),control:(f,{selectProps:{menuIsOpen:w}})=>({...f,width:"max-content",minWidth:"100%",color:"white",borderleftstyle:"none",borderLeftRadius:0,padding:0,backgroundColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`,_focus:{boxShadow:"var(--chakra-shadows-outline)"}}),valueContainer:f=>({...f,paddingEnd:0,cursor:"pointer"}),dropdownIndicator:(f,{selectProps:{menuIsOpen:w}})=>({...f,paddingStart:0,backgroundColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`}),option:f=>({...f,_focus:{background:"var(--chakra-colors-trails-300)"}}),indicatorSeparator:(f,{selectProps:{menuIsOpen:w}})=>({...f,backgroundColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`,borderColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`})},ariaLiveMessages:m,onChange:f=>{f?.value!==void 0&&(c(f),ct(g,d,f?.value,u,p))},onKeyDown:r,menuIsOpen:e,onMenuOpen:()=>o(!0),onMenuClose:()=>o(!1)})}function an(t){return b.useMemo(()=>({onFocus:()=>"",onChange:a=>a.action=="select-option"||a.action=="initial-input-focus"?a.label+" "+t.formatMessage({id:"selected"}):"",guidance:()=>"",onFilter:()=>""}),[t])}function sn(t,e,o,r){const i=Pe(),[a,s]=b.useState(""),c=b.useMemo(()=>{if(!t||!e)return"";const u=qe(t,e,o.value);return io(u,o.precision,i)},[t,e,o,i]),d=$t(u=>{r?.(u)});return b.useEffect(()=>{t!=null&&(s(c),ct(i,c,o.value,e,d))},[t,c,d,i,e,o]),[a,s]}function ln(t){return b.useMemo(()=>t.flatMap(o=>X(o.value)!=null?{label:o.label,value:X(o.value),precision:o.precision??en}:[]),[t])}function cn(t,e,o){const r=Pe();return b.useMemo(()=>{let i;if(typeof t=="string")i=t;else if(!e)i="";else{const a=qe(t,e,o.value);i=io(a,o.precision,r)}return i},[t,e,o,r])}function ro(t,e,o){if(e=="")return"success";if(!e.includes(" "))return"tooltip.space";if(e.indexOf(" ")!=e.lastIndexOf(" "))return"tooltip.spaceOne";const r=e.split(" ");if(r.length!=2||r[0]==""||r[1]=="")return"tooltip.2coords";let i="";if(t.locale==="de"){i=".";const s=e.replaceAll(i,"");if(!/^-?\d+(,\d+)? -?\d+(,\d+)?$/.test(s))return"tooltip.dividerDe"}else if(t.locale==="en"){i=",";const s=e.replaceAll(i,"");if(!/^-?\d+(.\d+)? -?\d+(.\d+)?$/.test(s))return"tooltip.dividerEn"}const a=dn(e,i);try{if(!_t(o,a))return"tooltip.extent"}catch{console.log()}try{if(!_t(X("EPSG:4326"),qe(a,o,"EPSG:4326")))return"tooltip.extent"}catch(s){return console.log(s),"tooltip.projection"}return"success"}function _t(t,e){return t.getExtent().length==4&&t.getExtent()[0]<=e[0]&&t.getExtent()[1]<=e[1]&&t.getExtent()[2]>=e[0]&&t.getExtent()[3]>=e[1]}function dn(t,e){const i=t.replaceAll(e,"").replaceAll(",",".").split(" ");return[parseFloat(i[0]),parseFloat(i[1])]}function ct(t,e,o,r,i){if(o==null||e==""||ro(t,e,o)!=="success")return;let a=e;t.locale==="de"?a=e.replaceAll(".",""):t.locale==="en"&&(a=e.replaceAll(",",""));const s=un(a,o,r);i&&r&&i({coords:s,projection:r})}function un(t,e,o){const r=t.split(" "),i=[parseFloat(r[0].replace(",",".")),parseFloat(r[1].replace(",","."))];return qe(i,e,o)}function qe(t,e,o){return Qo(t,e,o)}function io(t,e,o){if(t[0]==null||t[1]==null)return"";const[r,i]=t,a=o.formatNumber(r,{maximumFractionDigits:e,minimumFractionDigits:e}),s=o.formatNumber(i,{maximumFractionDigits:e,minimumFractionDigits:e});return a+" "+s}const pn=t=>{const{onSelect:e,onClear:o,projections:r}=t,{containerProps:i}=ge("coordinate-search",t),{map:a}=ee(t),s=a?.olMap,{coordinates:c}=hn(s);return n.jsx(oo,{...i,mapId:t.mapId,onSelect:d=>{a&&(s?.getView().setCenter(d.coords),e?.(d))},onClear:o,placeholder:c||"",projections:r})};function hn(t){const[e,o]=b.useState();return b.useEffect(()=>{if(!t)return;const r=t.on("pointermove",i=>{o(i.coordinate)});return()=>we(r)},[t]),{coordinates:e}}function mn({intl:t}){return{id:"coordinateViewer",title:t.formatMessage({id:"demos.coordinateViewer.title"}),createModel(){return{description:t.formatMessage({id:"demos.coordinateViewer.description"}),mainWidget:n.jsx(dr,{})}}}}function gn({intl:t,notificationService:e}){return{id:"coordinateInput",title:t.formatMessage({id:"demos.coordinateInput.title"}),createModel(){return{description:t.formatMessage({id:"demos.coordinateInput.description"}),mainWidget:n.jsx(fn,{notificationService:e})}}}}function fn(t){const{notificationService:e}=t,[o,r]=b.useState();function i(s,c){e.notify({level:"info",message:"coordinate entered: "+s+" in "+c.getCode(),displayDuration:4e3})}function a(){e.notify({level:"info",message:"search cleared",displayDuration:4e3}),r(void 0)}return n.jsxs(L,{direction:"column",gap:10,children:[n.jsx(oo,{mapId:fe,input:o,placeholder:"Enter coordinate here",onSelect:({coords:s,projection:c})=>i(s,c),onClear:a,projections:[{label:"EPSG:25832",value:"EPSG:25832"},{label:"WGS 84",value:"EPSG:4326"},{label:"Web Mercator",value:"EPSG:3857"},{label:"EPSG:25833",value:"EPSG:25833"},{label:"EPSG:31466",value:"EPSG:31466"},{label:"EPSG:31467",value:"EPSG:31467"},{label:"EPSG:3035",value:"EPSG:3035"}]}),n.jsx(Z,{onClick:()=>{r([761166,6692084])},children:"Set input value"})]})}function vn({intl:t,notificationService:e}){return{id:"coordinateSearch",title:t.formatMessage({id:"demos.coordinateSearch.title"}),createModel(){return{description:t.formatMessage({id:"demos.coordinateSearch.description"}),mainWidget:n.jsx(bn,{notificationService:e})}}}}function bn(t){const{notificationService:e}=t;function o(i,a){e.notify({level:"info",message:"coordinate entered: "+i+" in "+a.getCode(),displayDuration:4e3})}function r(){e.notify({level:"info",message:"search cleared",displayDuration:4e3})}return n.jsx(L,{direction:"column",gap:10,children:n.jsx(pn,{mapId:fe,onSelect:({coords:i,projection:a})=>o(i,a),onClear:r,projections:[{label:"EPSG:25832",value:"EPSG:25832"},{label:"WGS 84",value:"EPSG:4326"},{label:"Web Mercator",value:"EPSG:3857"},{label:"EPSG:25833",value:"EPSG:25833"},{label:"EPSG:31466",value:"EPSG:31466"},{label:"EPSG:31467",value:"EPSG:31467"},{label:"EPSG:3035",value:"EPSG:3035"}]})})}function wn({intl:t}){return{id:"scaleViewer",title:t.formatMessage({id:"demos.scaleViewer.title"}),createModel(){return{description:t.formatMessage({id:"demos.scaleViewer.description"}),mainWidget:n.jsx(ur,{})}}}}function yn({intl:t}){return{id:"scaleSetter",title:t.formatMessage({id:"demos.scaleSetter.title"}),createModel(){return{description:t.formatMessage({id:"demos.scaleSetter.description"}),mainWidget:n.jsx(Oi,{})}}}}function xn({intl:t}){return{id:"scaleBar",title:t.formatMessage({id:"demos.scaleBar.title"}),createModel(){return{description:t.formatMessage({id:"demos.scaleBar.description"}),tools:n.jsx(pr,{})}}}}function Sn({intl:t}){return{id:"measurement",title:t.formatMessage({id:"demos.measurement.title"}),createModel(){return{description:t.formatMessage({id:"demos.measurement.description"}),mainWidget:n.jsx(hr,{})}}}}function kn({intl:t}){return{id:"mapNavigation",title:t.formatMessage({id:"demos.mapNavigation.title"}),createModel(){return{description:t.formatMessage({id:"demos.mapNavigation.description"}),tools:n.jsxs(n.Fragment,{children:[n.jsx(Cr,{}),n.jsx(Lr,{}),n.jsx(In,{}),n.jsx(jr,{})]})}}}}function In(){const{map:t}=ee(),[e,o]=b.useState(void 0);return b.useEffect(()=>{if(!t)return;const r=new ui(t);return o(r),()=>r.destroy()},[t]),e&&n.jsxs(n.Fragment,{children:[n.jsx(Ar,{viewModel:e}),n.jsx(Pr,{viewModel:e})]})}function Mn({intl:t}){return{id:"geolocation",title:t.formatMessage({id:"demos.geolocation.title"}),createModel(){return{description:t.formatMessage({id:"demos.geolocation.description"}),tools:n.jsx(ji,{})}}}}function En({intl:t}){return{id:"spatialBookmarks",title:t.formatMessage({id:"demos.spatialBookmarks.title"}),createModel(){return{description:t.formatMessage({id:"demos.spatialBookmarks.description"}),mainWidget:n.jsx(Wi,{})}}}}function _n({intl:t}){return{id:"printing",title:t.formatMessage({id:"demos.printing.title"}),createModel(){return{description:t.formatMessage({id:"demos.printing.description"}),mainWidget:n.jsx(mr,{})}}}}const no="showcase-app",ao=rt.bind(void 0,no),ve=Ae.bind(void 0,no);function Cn({intl:t,mapModel:e}){return{id:"tocLegend",title:t.formatMessage({id:"demos.tocLegend.title"}),createModel(){function o(i=!0){e.layers.getLayerById("verwaltungsgebiete").setVisible(i),e.layers.getLayerById("krankenhaus").setVisible(i),e.layers.getLayerById("ogc_kitas").setVisible(i)}function r(){o(!1),e?.layers.activateBaseLayer("osm")}return{description:t.formatMessage({id:"demos.tocLegend.description"}),mainWidget:n.jsx(Ln,{}),destroy:r}}}}function Ln(){const t=b.useId(),e=b.useId(),o=ve();return n.jsxs(n.Fragment,{children:[n.jsx(V,{role:"dialog","aria-labelledby":t,children:n.jsx(Ne,{title:n.jsx(Je,{id:t,size:"md",mb:2,children:n.jsx(Ue,{children:o.formatMessage({id:"demos.tocLegend.tocTitle"})})}),children:n.jsx(Sr,{showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})}),n.jsx(V,{pt:2,role:"dialog","aria-labelledby":e,children:n.jsx(Ne,{title:n.jsx(Je,{id:e,size:"md",mb:2,children:o.formatMessage({id:"demos.tocLegend.legendTitle"})}),children:n.jsx(gr,{showBaseLayers:!0})})})]})}function jn(t){return{id:"selectionResultList",title:t.intl.formatMessage({id:"demos.selectionResultList.title"}),createModel(){return new An(t)}}}var Se,ne,ae,Oe,Fe,At;let An=(At=class{constructor(e){h(this,Se);h(this,ne);h(this,ae,J({key:0,input:void 0,open:!1}));y(this,"description");y(this,"mainWidget");h(this,Oe,e=>{const{results:o}=e,a={columns:[{id:"id",displayName:"ID",width:100,getPropertyValue(c){return c.id}},{propertyName:"pointOfContact.address.postCode",displayName:"PLZ",width:120},{propertyName:"name",displayName:"Name"},{propertyName:"inspireId",displayName:"inspireID"},{displayName:"Gefördert",width:160,getPropertyValue(c){switch(c.properties?.gefoerdert){case"ja":return!0;case"nein":return!1;default:return c.properties?.gefoerdert}}}],data:o,formatOptions:{numberOptions:{maximumFractionDigits:3},dateOptions:{dateStyle:"medium",timeStyle:"medium",timeZone:"UTC"}}},s=l(this,ae).value.key;l(this,ae).value={open:!0,key:s+1,input:a}});h(this,Fe,e=>{console.log("Selected features: ",e.features)});const{mapModel:o,vectorSelectionSourceFactory:r,intl:i}=e;v(this,Se,o),v(this,ne,Pn(o,r)),this.description=i.formatMessage({id:"demos.selectionResultList.description"}),this.mainWidget=n.jsx(fr,{sources:[l(this,ne)],onSelectionComplete:l(this,Oe)}),o.layers.getLayerById("ogc_kitas").setVisible(!0)}destroy(){l(this,ne).destroy(),l(this,Se).layers.getLayerById("ogc_kitas").setVisible(!1)}get listContainer(){const e=l(this,ae).value;if(!(!e.open||!e.input))return n.jsx(Ur,{input:e.input,onSelectionChange:l(this,Fe)},e.key)}},Se=new WeakMap,ne=new WeakMap,ae=new WeakMap,Oe=new WeakMap,Fe=new WeakMap,At);function Pn(t,e){const o=t.layers.getLayerById("ogc_kitas");return e.createSelectionSource({vectorLayer:o.olLayer,label:o.title})}const Tn="krankenhaus";function Rn(t){return{id:"editing",title:t.intl.formatMessage({id:"demos.editing.title"}),createModel(){return new Nn(t)}}}var ke,se;class Nn{constructor(e){y(this,"description");y(this,"mainWidget");h(this,ke);h(this,se);const{mapModel:o,intl:r,editingService:i,notificationService:a}=e;v(this,ke,o),this.description=r.formatMessage({id:"demos.editing.description"}),v(this,se,new Vn(o,i,a,r)),this.mainWidget=n.jsx(Dn,{editingController:l(this,se)}),this._setEditLayerVisible(!0)}destroy(){this._setEditLayerVisible(!1),l(this,se).stopEditing()}_setEditLayerVisible(e=!0){l(this,ke).layers.getLayerById(Tn).setVisible(e)}}ke=new WeakMap,se=new WeakMap;var M,_,q,le,$,D,K,F;class Vn{constructor(e,o,r,i){h(this,M);h(this,_);h(this,q);h(this,le);h(this,$);h(this,D);h(this,K);h(this,F);v(this,M,J(!1)),v(this,_,e),v(this,q,o),v(this,le,r),v(this,$,i)}editingActive(){return l(this,M).value}startCreateWorkflow(){if(!l(this,M).value)try{l(this,M).value=!0;const e=l(this,_).layers.getLayerById("krankenhaus"),o=new URL(e.attributes.collectionURL+"/items");l(this,q).createFeature(l(this,_),o).whenComplete().then(i=>{if(!i)return;l(this,le).notify({level:"info",message:l(this,$).formatMessage({id:"demos.editing.create.featureCreated"},{featureId:i.featureId})}),(e?.olLayer).getSource()?.refresh()}).catch(i=>{console.error(i)}).finally(()=>{l(this,M).value=!1})}catch(e){l(this,M).value=!1,console.error(e)}}startUpdateWorkflow(){if(!l(this,M).value)try{l(this,M).value=!0,v(this,F,this._createEditingSelectTooltip());const e=l(this,_).layers.getLayerById("krankenhaus"),o=e?.olLayer;v(this,D,new vr({layers:[o]})),l(this,_).olMap.addInteraction(l(this,D)),l(this,F).element.classList.remove("editing-tooltip-hidden"),v(this,K,l(this,D).on("select",r=>{const i=r.selected,a=r.deselected;if(i.length!==1||a.length!==0)return;this._stopUpdateSelection();const s=i[0];if(!s)throw Error("feature is undefined");const c=new URL(e.attributes.collectionURL+"/items");l(this,q).updateFeature(l(this,_),c,s).whenComplete().then(u=>{u&&(l(this,le).notify({level:"info",message:l(this,$).formatMessage({id:"demos.editing.update.featureModified"},{featureId:u.featureId})}),o.getSource()?.refresh())}).catch(u=>{console.error(u)}).finally(()=>{l(this,M).value=!1})}))}catch(e){l(this,M).value=!1,console.error(e)}}_createEditingSelectTooltip(){const e=document.createElement("div");e.className="editing-tooltip editing-tooltip-hidden",e.textContent=l(this,$).formatMessage({id:"demos.editing.update.tooltip.select"});const o=new Bt({element:e,offset:[15,0],positioning:"center-left"}),r=l(this,_).olMap,i=r.on("pointermove",a=>{a.dragging||o.setPosition(a.coordinate)});return r.addOverlay(o),{overlay:o,element:e,destroy(){we(i),r.removeOverlay(o)}}}_stopUpdateSelection(){l(this,D)&&l(this,_).olMap.removeInteraction(l(this,D)),l(this,K)&&we(l(this,K)),l(this,F)&&l(this,F).destroy(),v(this,D,void 0),v(this,K,void 0),v(this,F,void 0)}stopEditing(){l(this,q).stop(fe),this._stopUpdateSelection(),l(this,M).value=!1}}M=new WeakMap,_=new WeakMap,q=new WeakMap,le=new WeakMap,$=new WeakMap,D=new WeakMap,K=new WeakMap,F=new WeakMap;function Dn({editingController:t}){const e=ve(),o=Q(()=>t.editingActive(),[t]),r=o?e.formatMessage({id:"demos.editing.activeInfo"}):e.formatMessage({id:"demos.editing.inactiveInfo"});return n.jsxs(n.Fragment,{children:[n.jsxs(L,{px:1,py:1,children:[n.jsx(Z,{mr:2,isDisabled:o,onClick:()=>{t.startCreateWorkflow()},children:e.formatMessage({id:"demos.editing.startCreateButton"})}),n.jsx(Z,{mr:2,isDisabled:o,onClick:()=>{t.startUpdateWorkflow()},children:e.formatMessage({id:"demos.editing.startUpdateButton"})}),n.jsx(Z,{isDisabled:!o,onClick:()=>{t.stopEditing()},children:e.formatMessage({id:"demos.editing.stopButton"})})]}),n.jsx(L,{px:1,py:1,children:r})]})}function On(t){return[Cn(t),mn(t),gn(t),vn(t),wn(t),yn(t),xn(t),Sn(t),Rn(t),kn(t),Mn(t),En(t),xi(t),_n(t),jn(t),ki(t)]}const Fn=je("app::AppModel");var Ge,Ie,Me,G,A,ze,Be,me,so,lo;class Gn{constructor(e,o,r,i){h(this,me);h(this,Ge);h(this,Ie);h(this,Me);h(this,G);h(this,A);h(this,ze,Tr(()=>Array.from(l(this,G).values())));h(this,Be,[]);if(v(this,Ge,e),v(this,Ie,o),v(this,Me,r),v(this,G,new Map(i.map(s=>[s.id,s]))),l(this,G).size===0)throw new Error("No demos defined.");const a=i[0];v(this,A,J([a,a.createModel()])),S(this,me,so).call(this),l(this,Be).push(S(this,me,lo).call(this))}destroy(){l(this,A).value[1].destroy?.()}get currentDemo(){return l(this,A).value[0]}get currentDemoModel(){return l(this,A).value[1]}get allDemoInfos(){return l(this,ze).value}selectDemo(e){const o=l(this,G).get(e);if(!o)throw new Error(`Demo '${e}' does not exist.`);Rr(()=>{const[,r]=l(this,A).value;r.destroy?.(),l(this,A).value=[o,o.createModel()]})}}Ge=new WeakMap,Ie=new WeakMap,Me=new WeakMap,G=new WeakMap,A=new WeakMap,ze=new WeakMap,Be=new WeakMap,me=new WeakSet,so=function(){const o=new URL(window.location.href).searchParams.get("demo");if(o){if(!l(this,G).has(o)){l(this,Ie).notify({title:l(this,Me).formatMessage({id:"demoSelection.notFound"},{demoId:o})});return}try{this.selectDemo(o)}catch(r){Fn.error("Failed to select demo from URL",r)}}},lo=function(){return qt(()=>[l(this,A).value[0].id],([e])=>{const o=new URL(window.location.href);o.searchParams.set("demo",e),window.history.replaceState(null,"",o.toString())},{immediate:!0})};var ce,Ee,_e,He,co;class zn{constructor(e){h(this,He);h(this,ce,J({kind:"loading"}));h(this,Ee,[]);h(this,_e,!1);const{mapRegistry:o,httpService:r,notifier:i,vectorSelectionSourceFactory:a,editingService:s,notificationService:c}=e.references,d=e.intl;S(this,He,co).call(this,{mapRegistry:o,httpService:r,notifier:i,vectorSelectionSourceFactory:a,editingService:s,intl:d,notificationService:c}).catch(u=>{l(this,ce).value={kind:"error",message:u.message||"Unknown error"}})}destroy(){v(this,_e,!0);for(const e of l(this,Ee))e.destroy()}get appState(){return l(this,ce).value}}ce=new WeakMap,Ee=new WeakMap,_e=new WeakMap,He=new WeakSet,co=async function(e){const{mapRegistry:o,httpService:r,notifier:i,vectorSelectionSourceFactory:a,editingService:s,intl:c,notificationService:d}=e,u=await o.getMapModel(fe);if(!u)throw new Error("No mapModel found.");const p=On({intl:c,httpService:r,mapModel:u,vectorSelectionSourceFactory:a,editingService:s,notificationService:d}),g={kind:"ready",appModel:new Gn(u,i,c,p),destroy(){this.appModel.destroy()}};if(l(this,_e)){g.destroy();return}l(this,ce).value=g,l(this,Ee).push(g)};const Y=je("local-storage"),Bn=0,N={CORRUPTED_DATA:"local-storage:corrupted-data",INVALID_PATH:"local-storage:invalid-path",INVALID_VALUE:"local-storage:invalid-value",NOT_SUPPORTED:"local-storage:not-supported",INTERNAL:"local-storage:internal-error"};var de,P,z,ue,T,k,uo,po,be,oe,ho;class Hn{constructor(e){h(this,k);h(this,de);h(this,P,{});h(this,z);h(this,ue);h(this,T);v(this,de,$n(e.properties)),v(this,z,Kn()),l(this,z)&&(S(this,k,po).call(this),v(this,ue,S(this,k,ho).call(this)))}destroy(){l(this,T)&&(clearTimeout(l(this,T)),v(this,T,void 0)),l(this,z)&&S(this,k,be).call(this)}get isSupported(){return!!l(this,ue)}get(e){return S(this,k,oe).call(this).get(e)}set(e,o){return S(this,k,oe).call(this).set(e,o)}remove(e){return S(this,k,oe).call(this).remove(e)}removeAll(){return S(this,k,oe).call(this).removeAll()}getNamespace(e){return S(this,k,oe).call(this).getNamespace(e)}}de=new WeakMap,P=new WeakMap,z=new WeakMap,ue=new WeakMap,T=new WeakMap,k=new WeakSet,uo=function(){l(this,T)&&clearTimeout(l(this,T)),v(this,T,setTimeout(()=>{v(this,T,void 0),S(this,k,be).call(this)},Bn))},po=function(){try{const e=l(this,z);if(!e)throw new R(N.INTERNAL,"Local storage is not available.");const o=e.getItem(l(this,de));if(o==null){v(this,P,{}),S(this,k,be).call(this);return}try{const r=JSON.parse(o);if(!he(r))throw new R(N.CORRUPTED_DATA,"Persisted value should be an object.");v(this,P,r)}catch(r){Y.warn("Invalid persisted data, reverting to default.",r),v(this,P,{}),S(this,k,be).call(this)}}catch(e){Y.error("Failed to load from local storage",e)}},be=function(){try{const e=l(this,z);if(!e)throw new R(N.INTERNAL,"Local storage is not available.");const o=JSON.stringify(l(this,P));e.setItem(l(this,de),o)}catch(e){Y.error("Failed to save to local storage",e)}},oe=function(){const e=l(this,ue);if(!e)throw new R(N.NOT_SUPPORTED,"Local storage is not supported by this browser.");return e},ho=function(){const e={getByPath:o=>Lt(Un(l(this,P),o)),setByPath:(o,r)=>{if(!qn(r))throw new R(N.INVALID_VALUE,"The value is not supported by local storage.");if(r=Lt(r),o.length===0){if(!he(r))throw new R(N.INVALID_VALUE,"The root value must be a plain object.");v(this,P,r)}else Wn(l(this,P),o,r);S(this,k,uo).call(this)}};return new dt([],e)};class dt{path;access;constructor(e,o){this.path=e,this.access=o}get(e){return this.access.getByPath([...this.path,e])}set(e,o){this.access.setByPath([...this.path,e],o)}remove(e){this.access.setByPath([...this.path,e],void 0)}removeAll(){this.access.setByPath(this.path,{})}getNamespace(e){const o=this.get(e);if(o===void 0)this.set(e,{});else if(!he(o))throw new R(N.INVALID_PATH,`Cannot use '${e}' as a namespace because it is not associated with an object.`);return new dt(this.path.concat([e]),this.access)}}const Ct="trails-state";function Un(t,e){let o=t;for(const r of e){if(!he(o))throw new R(N.INVALID_PATH,`Cannot get nested property '${r}' because the parent is no object.`);o=o[r]}return o}function Wn(t,e,o){if(!e.length)throw new R(N.INTERNAL,"Path must not be empty.");let r=t;for(let a=0,s=e.length-1;a"u"){Y.warn("Local storage is not supported by this browser.");return}try{const t=globalThis.localStorage;if(!t){Y.warn("Local storage is not supported by this browser.");return}return t}catch(t){Y.warn("Local storage is not supported by this browser.",t);return}}function Lt(t){return t!=null&&(t=JSON.parse(JSON.stringify(t))),t}const Zn={"showcase-app":{name:"showcase-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:mi,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},AppInitModel:{name:"AppInitModel",clazz:zn,provides:[{name:"app.AppInitModel",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1},mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},notifier:{name:"notifier.NotificationService",qualifier:void 0,all:!1},vectorSelectionSourceFactory:{name:"selection.VectorSelectionSourceFactory",qualifier:void 0,all:!1},editingService:{name:"editing.EditingService",qualifier:void 0,all:!1},notificationService:{name:"notifier.NotificationService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"app.AppInitModel",qualifier:void 0,all:!1},{name:"runtime.ApplicationContext",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/editing":{name:"@open-pioneer/editing",services:{EditingServiceImpl:{name:"EditingServiceImpl",clazz:br,provides:[{name:"editing.EditingService",qualifier:void 0}],references:{mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{polygonStyle:{value:{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"red","stroke-width":1.25,"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1},vertexStyle:{value:{"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1}}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:er,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/legend":{name:"@open-pioneer/legend",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:tr,provides:[{name:"map.MapRegistry",qualifier:void 0}],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-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:Wr,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:Nr,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:Vr,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:qr,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",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/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/selection":{name:"@open-pioneer/selection",services:{VectorSelectionSourceFactory:{name:"VectorSelectionSourceFactory",clazz:wr,provides:[{name:"selection.VectorSelectionSourceFactory",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",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/overview-map":{name:"@open-pioneer/overview-map",services:{},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-search":{name:"@open-pioneer/coordinate-search",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/scale-setter":{name:"@open-pioneer/scale-setter",services:{},ui:{references:[]},properties:{}},"@open-pioneer/spatial-bookmarks":{name:"@open-pioneer/spatial-bookmarks",services:{},ui:{references:[{name:"local-storage.LocalStorageService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/local-storage":{name:"@open-pioneer/local-storage",services:{LocalStorageServiceImpl:{name:"LocalStorageServiceImpl",clazz:Hn,provides:[{name:"local-storage.LocalStorageService",qualifier:"local-storage.LocalStorageService"}],references:{}}},ui:{references:[]},properties:{storageId:{value:null,required:!1}}}},Yn='.editing-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}.editing-tooltip-hidden{visibility:hidden}: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)}.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}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}.selection-drag-box{background-color:#ffffff4d!important;border:3px solid var(--chakra-colors-background_primary)!important}.selection-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}.selection .react-select{cursor:default}.map-container .selection-active{cursor:crosshair}.map-container .selection-inactive{cursor:no-drop}.selection-source-value.selection-source-value--disabled{opacity:.4}.selection-source-value.selection-source-value--disabled span{margin:0 6px 0 0}.map-anchor.main-map-anchor{overflow-x:hidden;overflow-y:auto}.map-container:focus-visible{outline:none}.map-container:focus-visible:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;border:3px solid var(--chakra-colors-trails-500)}@media screen and (max-width: 48em){.map-anchor.main-map-anchor{max-height:45%}}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}.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)}.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}',Xn=["en","de"];function Jn(t){switch(t){case"en":return yt(()=>import("./DJqJKPvidfOd.js"),[],import.meta.url).then(e=>e.default);case"de":return yt(()=>import("./CmztmVuowTj7.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${t}'`)}const Qn=yo(Yn),ea=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:Jn,locales:Xn,packages:Zn,styles:Qn},Symbol.toStringTag,{value:"Module"}));function mo({label:t,children:e}){return n.jsxs($r,{as:Kr,maxWidth:{base:"none",md:"20em"},width:{base:"100%",sm:"47%",md:void 0},children:[n.jsx(Zr,{flexBasis:{base:"8em",sm:"auto"},m:0,children:t}),e]})}const ta=je("app::DemoSelection");function oa({appModel:t}){const e=ve(),{allDemos:o,currentDemo:r}=Q(()=>({allDemos:t.allDemoInfos,currentDemo:t.currentDemo}),[t]),i=b.useMemo(()=>o.map(a=>n.jsx("option",{value:a.id,children:a.title},a.id)),[o]);return n.jsx(mo,{label:e.formatMessage({id:"demoSelection.label"}),children:n.jsx(Ut,{value:r.id,onChange:a=>{const s=a.target.value;try{t.selectDemo(s)}catch(c){ta.error("Failed to select demo",c)}},children:i})})}function ra(){const t=ve(),e=ao("runtime.ApplicationContext"),o=ia(e.getLocale()),r=i=>{switch(i){case"en":e.setLocale("en-GB");break;case"de":e.setLocale("de-DE");break}};return n.jsx(mo,{label:t.formatMessage({id:"localeSwitcher.label"}),children:n.jsxs(Ut,{value:o,onChange:i=>r(i.target.value),children:[n.jsx("option",{value:"de",children:t.formatMessage({id:"localeSwitcher.locale.de"})}),n.jsx("option",{value:"en",children:t.formatMessage({id:"localeSwitcher.locale.en"})})]})})}function ia(t){const e=t.match(/^[a-z]+/i)?.[0];if(e==="en"||e=="de")return e;throw new Error("unexpected locale prefix: "+e)}function na({appModel:t}){const e=ve();return n.jsxs(L,{as:"header",px:2,py:3,flexWrap:{base:"wrap",md:"nowrap"},alignItems:"baseline",gap:2,boxShadow:"1px 0px 3px rgba(0, 0, 0, 0.5)",bgColor:"white",zIndex:100,children:[n.jsx(Je,{size:"md",flexShrink:0,flexGrow:1,textAlign:{base:"center",md:"left"},width:{base:"100%",md:"auto"},mb:{base:2,md:0},children:e.formatMessage({id:"header.title"})}),n.jsx(oa,{appModel:t}),n.jsx(ra,{})]})}function aa(){const t=ao("app.AppInitModel"),e=Q(()=>t.appState,[t]);let o;switch(e.kind){case"loading":o="Loading...";break;case"error":o="Error: "+e.message;break;case"ready":o=n.jsx(sa,{state:e})}return o}function sa(t){const e=ve(),o=t.state.appModel,{currentDemo:r,currentDemoModel:i}=Q(()=>({currentDemo:o.currentDemo,currentDemoModel:o.currentDemoModel}),[o]),a=Q(()=>i.listContainer,[i]),s=b.useMemo(()=>({left:0,right:0,bottom:a!=null?400:0,top:0}),[a]);return n.jsxs(n.Fragment,{children:[n.jsx(yr,{position:"top-right"}),n.jsx(L,{height:"100%",direction:"column",children:n.jsx(Ne,{title:n.jsx(na,{appModel:o}),children:n.jsx(L,{flex:"1",direction:"column",position:"relative",children:n.jsx(or,{mapId:fe,children:n.jsxs(rr,{viewPadding:s,role:"main","aria-label":e.formatMessage({id:"ariaLabels.map"}),children:[n.jsx(bt,{className:"main-map-anchor",position:"top-left",horizontalGap:10,verticalGap:10,children:n.jsx(V,{bgColor:"white",borderRadius:10,p:2,maxW:"500px",children:n.jsxs(Ne,{title:r.title,sectionHeadingProps:{size:"lg"},children:[n.jsx(Ue,{py:4,dangerouslySetInnerHTML:{__html:i.description}}),i.mainWidget]})})}),n.jsx(bt,{position:"bottom-right",horizontalGap:6,children:n.jsx(Qe,{p:1,children:i.tools})}),a&&n.jsx(V,{className:"list-container",position:"absolute",bottom:"0",backgroundColor:"white",width:"100%",height:"400px",zIndex:1,borderTop:"2px solid",borderColor:"trails.100",children:a})]})})})})})]})}const la=new URLSearchParams(window.location.search),ca=la.get("lang")||void 0,da=xo({component:aa,appMetadata:ea,config:{properties:{"@open-pioneer/local-storage":{storageId:"ol-showcase-state"}},locale:ca}});customElements.define("showcase-app",da); +var go=Object.defineProperty;var pt=t=>{throw TypeError(t)};var fo=(t,e,o)=>e in t?go(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var y=(t,e,o)=>fo(t,typeof e!="symbol"?e+"":e,o),$e=(t,e,o)=>e.has(t)||pt("Cannot "+o);var l=(t,e,o)=>($e(t,e,"read from private field"),o?o.call(t):e.get(t)),h=(t,e,o)=>e.has(t)?pt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),v=(t,e,o,r)=>($e(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),S=(t,e,o)=>($e(t,e,"access private method"),o);import{f as vo,h as B,u as bo,o as wo,k as Ce,r as b,j as n,l as Le,c as je,B as Z,F as Pt,A as Ke,m as Ze,n as Tt,E as R,a as yo,e as xo}from"./CzUo6bX8-UUU.js";import{aF as So,aG as ko,P as Io,N as X,aH as Mo,aI as Eo,ap as _o,aJ as Co,aK as Lo,aL as jo,E as Ao,at as Po,aM as ht,aN as To,aO as Ro,aP as mt,aQ as No,aR as Vo,aS as Ye,V as Rt,aT as gt,Z as Do,a3 as Oo,aU as Fo,a1 as Go,aV as zo,aW as Bo,aX as Ho,aY as Uo,aZ as ft,h as we,B as V,S as tt,T as Nt,O as Vt,a as ot,b as Dt,a_ as ge,g as ee,d as rt,u as Ae,a$ as vt,b0 as Wo,ao as qo,c as Ot,C as $o,F as Ft,ay as Gt,b1 as Ko,b2 as Zo,b3 as Yo,b4 as Xo,i as L,b5 as Jo,b6 as Qo,e as Ne,f as Je,H as er,M as tr,D as or,j as rr,k as bt}from"./B36mctiVgF5V.js";import{W as ir,i as nr,j as zt}from"./kPJ9UZ8lVIau.js";import{O as Bt,W as ar,c as sr,u as lr,I as Ht,e as cr,C as dr,b as ur,a as pr,M as hr,P as mr,L as gr,d as fr,S as vr,E as br,V as wr,f as Ut,N as yr}from"./DIiS5B7_zqGr.js";import{G as Wt,T as xr,e as Sr}from"./C1o_VwAkx5Nm.js";import{g as kr,c as Ir,T as Ue,V as Qe,L as Mr}from"./CovJx79h1x39.js";import{b as Er,r as J,u as Q,a as _r,w as qt,Z as Cr,c as Lr,I as jr,H as Ar,d as Pr,e as Tr,f as Rr,V as Nr,S as Vr}from"./BUCtgDDw782G.js";import{G as Dr}from"./CkG3hRXjrvfc.js";import{c as it}from"./SSUBJAaBGB7g.js";import{M as Or,a as Fr,b as Gr}from"./DgJGd2MHfhXI.js";import{M as zr}from"./C41Ku2EWcQEd.js";import{S as Br}from"./BSX9fy8BsUsv.js";import{u as $t}from"./E5Cg9XwqIVqj.js";import{r as Hr}from"./_05fvbTuDT_t.js";import{I as wt}from"./XuMECp8BqZmI.js";import{R as Ur}from"./K_sKz2BiM23b.js";import{N as Wr,P as qr}from"./DWXpGWYm5O7q.js";import{_ as yt}from"./CmsKOCeNyeyo.js";import{F as $r}from"./0jkoYKtubXoE.js";import{H as Kr}from"./_YjaCHRtWzU8.js";import{F as Zr}from"./DAtS2L2h2gmX.js";import"./DNaBv0QziP17.js";import"./Di-_YM5QvGet.js";import"./DXNMkmWkGPwJ.js";var[Yr,Kt]=vo({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),nt=B(function(e,o){const r=bo("Input",e),{children:i,className:a,...s}=wo(e),c=Ce("chakra-input__group",a),d={},u=kr(i),p=r.field;u.forEach(m=>{var f,w;r&&(p&&m.type.id==="InputLeftElement"&&(d.paddingStart=(f=p.height)!=null?f:p.h),p&&m.type.id==="InputRightElement"&&(d.paddingEnd=(w=p.height)!=null?w:p.h),m.type.id==="InputRightAddon"&&(d.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(d.borderStartRadius=0))});const g=u.map(m=>{var f,w;const j=Ir({size:((f=m.props)==null?void 0:f.size)||e.size,variant:((w=m.props)==null?void 0:w.variant)||e.variant});return m.type.id!=="Input"?b.cloneElement(m,j):b.cloneElement(m,Object.assign(j,d,m.props))});return n.jsx(Le.div,{className:c,ref:o,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate",...r.group},"data-group":!0,...s,children:n.jsx(Yr,{value:r,children:g})})});nt.displayName="InputGroup";var Xr={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Jr=Le("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),at=B(function(e,o){var r;const{placement:i="left",...a}=e,s=(r=Xr[i])!=null?r:{},c=Kt();return n.jsx(Jr,{ref:o,...a,__css:{...c.addon,...s}})});at.displayName="InputAddon";var Zt=B(function(e,o){return n.jsx(at,{ref:o,placement:"left",...e,className:Ce("chakra-input__left-addon",e.className)})});Zt.displayName="InputLeftAddon";Zt.id="InputLeftAddon";var st=B(function(e,o){return n.jsx(at,{ref:o,placement:"right",...e,className:Ce("chakra-input__right-addon",e.className)})});st.displayName="InputRightAddon";st.id="InputRightAddon";var Qr=Le("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),We=B(function(e,o){var r,i;const{placement:a="left",...s}=e,c=Kt(),d=c.field,p={[a==="left"?"insetStart":"insetEnd"]:"0",width:(r=d?.height)!=null?r:d?.h,height:(i=d?.height)!=null?i:d?.h,fontSize:d?.fontSize,...c.element};return n.jsx(Qr,{ref:o,__css:p,...s})});We.id="InputElement";We.displayName="InputElement";var Yt=B(function(e,o){const{className:r,...i}=e,a=Ce("chakra-input__left-element",r);return n.jsx(We,{ref:o,placement:"left",className:a,...i})});Yt.id="InputLeftElement";Yt.displayName="InputLeftElement";var Ve=B(function(e,o){const{className:r,...i}=e,a=Ce("chakra-input__right-element",r);return n.jsx(We,{ref:o,placement:"right",className:a,...i})});Ve.id="InputRightElement";Ve.displayName="InputRightElement";var Xt=Le("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Xt.displayName="Center";var ei={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};B(function(e,o){const{axis:r="both",...i}=e;return n.jsx(Le.div,{ref:o,__css:ei[r],...i,position:"absolute"})});const x={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},ti={ERROR:"error"};class oi extends _o{constructor(e){super(ti.ERROR),this.code=e.code,this.message=e.message}}let ri=class extends So{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.position_=null,this.transform_=ko,this.watchId_=void 0,this.addChangeListener(x.PROJECTION,this.handleProjectionChanged_),this.addChangeListener(x.TRACKING,this.handleTrackingChanged_),e.projection!==void 0&&this.setProjection(e.projection),e.trackingOptions!==void 0&&this.setTrackingOptions(e.trackingOptions),this.setTracking(e.tracking!==void 0?e.tracking:!1)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const e=this.getProjection();e&&(this.transform_=Io(X("EPSG:4326"),e),this.position_&&this.set(x.POSITION,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const e=this.getTracking();e&&this.watchId_===void 0?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):!e&&this.watchId_!==void 0&&(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(e){const o=e.coords;this.set(x.ACCURACY,o.accuracy),this.set(x.ALTITUDE,o.altitude===null?void 0:o.altitude),this.set(x.ALTITUDE_ACCURACY,o.altitudeAccuracy===null?void 0:o.altitudeAccuracy),this.set(x.HEADING,o.heading===null?void 0:Mo(o.heading)),this.position_?(this.position_[0]=o.longitude,this.position_[1]=o.latitude):this.position_=[o.longitude,o.latitude];const r=this.transform_(this.position_);this.set(x.POSITION,r.slice()),this.set(x.SPEED,o.speed===null?void 0:o.speed);const i=Eo(this.position_,o.accuracy);i.applyTransform(this.transform_),this.set(x.ACCURACY_GEOMETRY,i),this.changed()}positionError_(e){this.dispatchEvent(new oi(e))}getAccuracy(){return this.get(x.ACCURACY)}getAccuracyGeometry(){return this.get(x.ACCURACY_GEOMETRY)||null}getAltitude(){return this.get(x.ALTITUDE)}getAltitudeAccuracy(){return this.get(x.ALTITUDE_ACCURACY)}getHeading(){return this.get(x.HEADING)}getPosition(){return this.get(x.POSITION)}getProjection(){return this.get(x.PROJECTION)}getSpeed(){return this.get(x.SPEED)}getTracking(){return this.get(x.TRACKING)}getTrackingOptions(){return this.get(x.TRACKING_OPTIONS)}setProjection(e){this.set(x.PROJECTION,X(e))}setTracking(e){this.set(x.TRACKING,e)}setTrackingOptions(e){this.set(x.TRACKING_OPTIONS,e)}};const ii=1.2;function ni(t,e=ii){ai(t);const o=Co(t),r=Lo(t),i=o*e,a=r*e;return[t[0]-(i-o)/2,t[1]-(a-r)/2,t[2]+(i-o)/2,t[3]+(a-r)/2]}function ai(t){if(t.length!==4)throw new Error(`Invalid extent (expected length 4, but got length ${t.length}).`)}const Xe=.75,Te=.1;let si=class extends jo{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=e.collapsed!==void 0?e.collapsed:!0,this.collapsible_=e.collapsible!==void 0?e.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=e.rotateWithView!==void 0?e.rotateWithView:!1,this.viewExtent_=void 0;const o=e.className!==void 0?e.className:"ol-overviewmap",r=e.tipLabel!==void 0?e.tipLabel:"Overview map",i=e.collapseLabel!==void 0?e.collapseLabel:"‹";typeof i=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=i):this.collapseLabel_=i;const a=e.label!==void 0?e.label:"›";typeof a=="string"?(this.label_=document.createElement("span"),this.label_.textContent=a):this.label_=a;const s=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,c=document.createElement("button");c.setAttribute("type","button"),c.title=r,c.appendChild(s),c.addEventListener(Ao.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=e.view;const d=new Po({view:e.view,controls:new ht,interactions:new ht});this.ovmap_=d,e.layers&&e.layers.forEach(function(I){d.addLayer(I)});const u=document.createElement("div");u.className="ol-overviewmap-box",u.style.boxSizing="border-box",this.boxOverlay_=new Bt({position:[0,0],positioning:"center-center",element:u}),this.ovmap_.addOverlay(this.boxOverlay_);const p=o+" "+To+" "+Ro+(this.collapsed_&&this.collapsible_?" "+mt:"")+(this.collapsible_?"":" ol-uncollapsible"),g=this.element;g.className=p,g.appendChild(this.ovmapDiv_),g.appendChild(c);const m=this,f=this.boxOverlay_,w=this.boxOverlay_.getElement(),j=function(I){return{clientX:I.clientX,clientY:I.clientY}},te=function(I){const E=j(I),ut=d.getEventCoordinateInternal(E);f.setPosition(ut)},H=function(I){const E=d.getEventCoordinateInternal(I);m.getMap().getView().setCenterInternal(E),window.removeEventListener("mousemove",te),window.removeEventListener("mouseup",H)};w.addEventListener("mousedown",function(){window.addEventListener("mousemove",te),window.addEventListener("mouseup",H)})}setMap(e){const o=this.getMap();if(e!==o){if(o){const r=o.getView();r&&this.unbindView_(r),this.ovmap_.setTarget(null)}if(super.setMap(e),e){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(No(e,Vo.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const r=e.getView();r&&(this.bindView_(r),r.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(e){if(e.key===Ye.VIEW){const o=e.oldValue;o&&this.unbindView_(o);const r=this.getMap().getView();this.bindView_(r)}else!this.ovmap_.isRendered()&&(e.key===Ye.TARGET||e.key===Ye.SIZE)&&this.ovmap_.updateSize()}bindView_(e){if(!this.view_){const o=new Rt({projection:e.getProjection()});this.ovmap_.setView(o)}e.addChangeListener(gt.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()}unbindView_(e){e.removeChangeListener(gt.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const e=this.getMap(),o=this.ovmap_;if(!e.isRendered()||!o.isRendered())return;const r=e.getSize(),a=e.getView().calculateExtentInternal(r);if(this.viewExtent_&&Do(a,this.viewExtent_))return;this.viewExtent_=a;const s=o.getSize(),d=o.getView().calculateExtentInternal(s),u=o.getPixelFromCoordinateInternal(Oo(a)),p=o.getPixelFromCoordinateInternal(Fo(a)),g=Math.abs(u[0]-p[0]),m=Math.abs(u[1]-p[1]),f=s[0],w=s[1];gf*Xe||m>w*Xe?this.resetExtent_():Go(d,a)||this.recenter_()}resetExtent_(){const e=this.getMap(),o=this.ovmap_,r=e.getSize(),a=e.getView().calculateExtentInternal(r),s=o.getView(),c=Math.log(Xe/Te)/Math.LN2,d=1/(Math.pow(2,c/2)*Te);zo(a,d),s.fitInternal(Bo(a))}recenter_(){const e=this.getMap(),o=this.ovmap_,r=e.getView();o.getView().setCenterInternal(r.getCenterInternal())}updateBox_(){const e=this.getMap(),o=this.ovmap_;if(!e.isRendered()||!o.isRendered())return;const r=e.getSize(),i=e.getView(),a=o.getView(),s=this.rotateWithView_?0:-i.getRotation(),c=this.boxOverlay_,d=this.boxOverlay_.getElement(),u=i.getCenterInternal(),p=i.getResolution(),g=a.getResolution(),m=r[0]*p/g,f=r[1]*p/g;if(c.setPosition(u),d){d.style.width=m+"px",d.style.height=f+"px";const w="rotate("+s+"rad)";d.style.transform=w}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=Ho(this.ovmap_,Uo.POSTRENDER,function(e){delete this.ovmapPostrenderKey_,this.updateBox_()},this))}handleClick_(e){e.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(mt),this.collapsed_?ft(this.collapseLabel_,this.label_):ft(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const e=this.ovmap_;if(!this.collapsed_){if(e.isRendered()){this.viewExtent_=void 0,e.render();return}e.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),!e&&this.collapsed_&&this.handleToggle_())}setCollapsed(e){!this.collapsible_||this.collapsed_===e||this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(e){this.rotateWithView_!==e&&(this.rotateWithView_=e,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(e){this.validateExtent_(),this.updateBox_()}};var li=it({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"}),ci=it({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),di=it({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"}),C,et,Re,Jt;class ui{constructor(e){h(this,C);y(this,"olMap");y(this,"handle");y(this,"_mapViews",Er());y(this,"_activeViewId",J(0));y(this,"backward",()=>{if(this.canBackward)S(this,C,Re).call(this,this.activeViewId-1),S(this,C,et).call(this,this.activeViewId);else throw new Error("Backward is not possible at the moment")});y(this,"forward",()=>{if(this.canForward)S(this,C,Re).call(this,this.activeViewId+1),S(this,C,et).call(this,this.activeViewId);else throw new Error("Forward is not possible at the moment")});this.olMap=e.olMap,this.handle=S(this,C,Jt).call(this)}destroy(){this.handle&&we(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}}C=new WeakSet,et=function(e){const o=this.olMap.getView();this.olMap.setView(new Rt({center:this.mapViews.get(e).center,resolution:this.mapViews.get(e).resolution,projection:o.getProjection()}))},Re=function(e){this._activeViewId.value=e},Jt=function(){const e=this.olMap.on("moveend",()=>{o()}),o=()=>{const r=this.olMap,i=this.mapViews,a=r.getView(),s=a.getResolution(),c=a.getCenter();if(s!=null&&c!=null&&(c!==i.get(this.activeViewId)?.center||s!==i.get(this.activeViewId)?.resolution)){const d={resolution:s,center:c},u=this.activeViewId+1;for(const p of i.keys())p>u&&i.delete(p);S(this,C,Re).call(this,u),i.set(u,d)}};return e};const pi={height:"25px",width:"25px",borderColor:"#4cb3ff",borderWidth:"3px",borderRadius:"50%",display:"inline-block "};function hi(t){return n.jsxs(V,{children:[n.jsx(Ue,{children:t.layer.title}),n.jsx(V,{style:pi})]})}const fe="main";class mi{mapId=fe;vectorSourceFactory;constructor(e){this.vectorSourceFactory=e.references.vectorSourceFactory}async getMapConfig(){return{initialView:{kind:"position",center:{x:823091,y:6724521},zoom:8},layers:[new tt({title:"OSM",id:"osm",isBaseLayer:!0,olLayer:new Nt({source:new Vt})}),new ar({isBaseLayer:!0,title:"Orthofotos NRW",url:"https://www.wmts.nrw.de/geobasis/wmts_nw_dop/1.0.0/WMTSCapabilities.xml",name:"nw_dop",matrixSet:"EPSG_3857_16",sourceOptions:{attributions:'Die Geobasisdaten des amtlichen Vermessungswesens werden als öffentliche Aufgabe gem. VermKatG NRW und gebührenfrei nach Open Data-Prinzipien über online-Verfahren bereitgestellt. Nutzungsbedingungen: siehe '}}),vi(),fi(),gi(this.vectorSourceFactory)]}}}function gi(t){const e="https://ogc-api-test.nrw.de/inspire-us-krankenhaus/v1",o="governmentalservice",r=t.createVectorSource({baseUrl:e,collectionId:o,limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:`Land NRW (${new Date().getFullYear()}), Datenlizenz Deutschland - Namensnennung - Version 2.0, Datenquelle`}),i=new ot({source:r});return new tt({id:"krankenhaus",title:"Krankenhäuser-Demo-Dienst",visible:!1,olLayer:i,attributes:{collectionURL:e+"/collections/"+o}})}function fi(){const t=new Dt({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new Wt,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'}),e=new ot({source:t}),o={Component:hi};return new tt({id:"ogc_kitas",title:"Kindertagesstätten",visible:!0,olLayer:e,attributes:{legend:o}})}function vi(){return new ir({title:"Verwaltungsgebiete",id:"verwaltungsgebiete",visible:!1,url:"https://www.wms.nrw.de/geobasis/wms_nw_dvg",sublayers:[{name:"nw_dvg_krs",title:"Kreise und kreisfreie Städte"}]})}const bi="200px",wi="300px",yi=t=>{const{olLayer:e,height:o=bi,width:r=wi}=t,{containerProps:i}=ge("overview-map",t),a=b.useRef(null),{map:s}=ee(t);return b.useEffect(()=>{if(a.current&&s&&e){const c=s.olMap,d=new si({className:"ol-overviewmap",layers:[e],collapsible:!1,collapsed:!1,target:a.current});return c.addControl(d),()=>{c.removeControl(d)}}},[s,e]),n.jsx(V,{height:o,width:r,ref:a,...i})};function xi({intl:t}){return{id:"overviewMap",title:t.formatMessage({id:"demos.overviewMap.title"}),createModel(){const e=new Nt({source:new Vt});return{description:t.formatMessage({id:"demos.overviewMap.description"}),mainWidget:n.jsx(yi,{olLayer:e}),destroy(){e.dispose()}}}}}class Si{label;filteredTypes;httpService;constructor(e,o,r){this.label=e,this.filteredTypes=o,this.httpService=r}async search(e,{mapProjection:o,signal:r}){const i=await this.request(e,100,r),a=new Wt({dataProjection:"EPSG:4326",featureProjection:o});return i.features.filter(s=>this.filteredTypes.includes(s.properties.type)).map((s,c)=>{const d=a.readGeometry(s.geometry);return{id:s.properties.osm_id||c,label:this.createLabel(s),geometry:d,properties:s.properties}})}async request(e,o,r){const i=new URL("https://photon.komoot.io/api?");i.searchParams.set("q",e),i.searchParams.set("lang","de"),i.searchParams.set("lat","51.961563"),i.searchParams.set("lon","7.628202"),i.searchParams.set("limit",o.toString());const a=await this.httpService.fetch(i,{signal:r});if(!a.ok)throw new Error("Request failed: "+a.status);return await a.json()}createLabel(e){return`${e.properties.name} (${e.properties.osm_value?e.properties.osm_value+", ":""}${e.properties.postcode?e.properties.postcode+", ":""}${e.properties.city?e.properties.city+", ":""}${e.properties.country?e.properties.country+")":")"}`}}function ki({intl:t,httpService:e,mapModel:o}){return{id:"searchAndHighlight",title:t.formatMessage({id:"demos.searchAndHighlight.title"}),createModel(){return new Ii(t,o,e)}}}var ye,xe,re,De,ie,jt;let Ii=(jt=class{constructor(e,o,r){h(this,ye);h(this,xe);h(this,re);y(this,"description");y(this,"mainWidget");h(this,De,e=>{const o=e.result.geometry;o&&(l(this,ie).call(this),v(this,re,Mi(l(this,xe),[o])))});h(this,ie,()=>{l(this,re)?.destroy(),v(this,re,void 0)});v(this,ye,new Si("Photon Geocoder",["city","street"],r)),v(this,xe,o),this.description=e.formatMessage({id:"demos.searchAndHighlight.description"}),this.mainWidget=n.jsx(sr,{sources:[l(this,ye)],onSelect:l(this,De),onClear:l(this,ie)})}destroy(){l(this,ie).call(this)}},ye=new WeakMap,xe=new WeakMap,re=new WeakMap,De=new WeakMap,ie=new WeakMap,jt);function Mi(t,e){const o=t.olMap.getViewport();return t.highlightAndZoom(e,{viewPadding:o&&o.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}const Qt="@open-pioneer/geolocation",Ei=rt.bind(void 0,Qt),eo=Ae.bind(void 0,Qt);function _i(t){return Dr({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:[]}]})(t)}const xt=je("geolocation:GeolocationController"),St=17;var U,W;class Ci{constructor(e,o,r){y(this,"supported",!!navigator.geolocation);y(this,"olMap");y(this,"positionHighlightLayer");y(this,"geolocation");y(this,"onError");y(this,"maxZoom",St);y(this,"accuracyFeature");y(this,"positionFeature");y(this,"changeHandlers",[]);y(this,"setMapToPosition",!0);y(this,"trackingOptions",{});y(this,"isInitialZoom",!0);h(this,U,J(!1));h(this,W,J(!1));this.olMap=e,this.onError=o,this.isInitialZoom=!0,this.accuracyFeature=new vt,this.accuracyFeature.setStyle(It()),this.positionFeature=new vt,this.positionFeature.setStyle(kt()),this.positionHighlightLayer=new ot({source:new Dt({features:[this.accuracyFeature,this.positionFeature]})}),this.positionHighlightLayer.setZIndex(Wo);const i=r||Li();this.geolocation=new ri({tracking:!1,trackingOptions:i,projection:e.getView()?.getProjection()}),this.trackingOptions=i,this.geolocation.on("error",a=>this.handleGeolocationError(a))}destroy(){this.stopGeolocation(),this.geolocation?.setTracking(!1),this.geolocation.dispose(),this.accuracyFeature=void 0,this.positionFeature=void 0,this.positionHighlightLayer.dispose()}startGeolocation(){if(l(this,W).value)return;const e=this.olMap;new Promise(r=>{l(this,W).value=!0,l(this,U).value=!0,this.geolocation?.setProjection(e.getView()?.getProjection()),this.geolocation?.setTracking(!0);const i=this.geolocation.on("change:accuracyGeometry",()=>{const d=this.geolocation.getAccuracyGeometry()||void 0;if(this.accuracyFeature?.setGeometry(d),this.accuracyFeature?.getGeometry()!==void 0&&r(),this.isInitialZoom){const u=this?.accuracyFeature?.getGeometry()?.getExtent();if(u){const p=ni(u);if(!p)return;e.getView().fit(p,{maxZoom:this.maxZoom}),this.isInitialZoom=!1}}}),a=this.geolocation.on("change:position",()=>{const d=this.geolocation.getPosition();d&&(d[0]||d[1])!==void 0&&(this.positionFeature?.setGeometry(new qo(d)),this.setMapToPosition&&e.getView().setCenter(d),this.positionFeature?.getGeometry()!==void 0&&r())}),s=e.getView().on("change:resolution",()=>{this.setMapToPosition=this.isInitialZoom}),c=e.on("pointermove",d=>{d.dragging&&(this.setMapToPosition=!1)});this.changeHandlers.push(i,a,s,c),e.addLayer(this.positionHighlightLayer)}).then(()=>{l(this,U).value=!1}).catch(r=>{xt.error("Failed to determine location",r)})}stopGeolocation(){this.geolocation?.setTracking(!1),l(this,W).value=!1,l(this,U).value=!1,this.trackingOptions={},this.setMapToPosition=!0,this.isInitialZoom=!0,this.changeHandlers.forEach(e=>{we(e)}),this.changeHandlers=[],this.accuracyFeature?.setGeometry(void 0),this.positionFeature?.setGeometry(void 0),this.olMap.removeLayer(this.positionHighlightLayer)}get active(){return l(this,W).value}get loading(){return l(this,U).value}setPositionFeatureStyle(e){this.positionFeature?.setStyle(e??kt())}setAccuracyFeatureStyle(e){this.accuracyFeature?.setStyle(e??It())}setMaxZoom(e){this.maxZoom=e??St}getMaxZoom(){return this.maxZoom}getPositionFeature(){return this.positionFeature}getAccuracyFeature(){return this.accuracyFeature}getTrackingOptions(){return this.trackingOptions}getGeolocation(){return this.geolocation}handleGeolocationError(e){xt.error("Error from geolocation API:",e.message),this.stopGeolocation();const o=(()=>{switch(e.code){case 1:return"permission-denied";case 2:return"position-unavailable";case 3:return"timeout";default:return"unknown"}})();this.onError(o)}}U=new WeakMap,W=new WeakMap;const kt=()=>new Ot({image:new $o({radius:6,fill:new Ft({color:"#3399CC"}),stroke:new Gt({color:"#fff",width:2})})}),It=()=>new Ot({stroke:new Gt({color:"#3399CC",width:3}),fill:new Ft({color:"rgba(0, 0, 255, 0.05)"})}),Li=()=>({enableHighAccuracy:!0,timeout:6e4,maximumAge:6e5}),ji=b.forwardRef(function(e,o){const{maxZoom:r,positionFeatureStyle:i,accuracyFeatureStyle:a,trackingOptions:s}=e,{map:c}=ee(e),d=Pi(c,r,s,i,a);return d&&n.jsx(Ai,{...e,controller:d,ref:o})}),Ai=b.forwardRef(function(e,o){const{controller:r}=e,{containerProps:i}=ge("geolocation",e),{isLoading:a,isActive:s}=Q(()=>({isLoading:r.loading,isActive:r.active}),[r]),c=eo(),d=r.supported?s?c.formatMessage({id:"locateMeEnd"}):c.formatMessage({id:"locateMeStart"}):c.formatMessage({id:"locateNotSupported"}),u=()=>{r.active?r.stopGeolocation():r.startGeolocation()};return n.jsx(xr,{ref:o,label:d,icon:n.jsx(_i,{}),onClick:()=>u(),isActive:s,isLoading:a,isDisabled:!r.supported,...i})});function Pi(t,e,o,r,i){const a=eo(),s=Ei("notifier.NotificationService"),[c,d]=b.useState();return b.useEffect(()=>{if(!t)return;const u=g=>{const m=a.formatMessage({id:"error"}),f=(()=>{switch(g){case"permission-denied":return a.formatMessage({id:"permissionDenied"});case"position-unavailable":return a.formatMessage({id:"positionUnavailable"});case"timeout":return a.formatMessage({id:"timeout"});case"unknown":return a.formatMessage({id:"unknownError"})}})();s.notify({level:"error",title:m,message:f})},p=new Ci(t.olMap,u,o);return d(p),()=>{p.destroy(),d(void 0)}},[t,o,a,s]),b.useEffect(()=>{c?.setPositionFeatureStyle(r)},[c,r]),b.useEffect(()=>{c?.setAccuracyFeatureStyle(i)},[c,i]),b.useEffect(()=>{c?.setMaxZoom(e)},[c,e]),c}const Ti="@open-pioneer/scale-setter",Ri=Ae.bind(void 0,Ti),Ni=25.4/.28,Vi=39.37,Di=[17471320,8735660,4367830,2183915,1091957,545978,272989,136494,68247,34123,17061,8530,4265,2132],Oi=t=>{const{scales:e=Di}=t,{containerProps:o}=ge("scale-setter",t),{map:r}=ee(t),i=Ri(),a=lr(r?.olMap)??1;function s(u){if(!r)return;const p=r.olMap.getView(),g=r.olMap.getView().getProjection(),m=g.getMetersPerUnit()??1,f=Vi*Ni*m,w=r.olMap.getView().getCenter();if(!w)return;const j=u/Ko(g,f,w);p.setResolution(j)}const c=e.map(u=>n.jsx(Or,{value:u,onClick:()=>s(u),onFocus:p=>{p.target?.scrollIntoView?.({block:"nearest"})},className:"scale-setter-option",children:Mt(i,u)},u)),d=Mt(i,a);return n.jsx(V,{...o,children:n.jsxs(zr,{isLazy:!0,children:[n.jsx(Fr,{as:Z,rightIcon:n.jsx(li,{}),className:"scale-setter-menubutton","aria-label":i.formatMessage({id:"button.ariaLabel"},{scale:d}),"aria-description":i.formatMessage({id:"button.ariaDescription"}),children:d}),n.jsx(Pt,{children:n.jsx(Gr,{className:"scale-setter-menuoptions",maxHeight:"20em",overflowY:"auto",children:c})})]})})};function Mt(t,e){return"1 : "+t.formatNumber(e)}const to="@open-pioneer/spatial-bookmarks",Fi=rt.bind(void 0,to),Gi=Ae.bind(void 0,to),O=je("spatial-bookmark:SpatialBookmarkViewModel");class zi{map;packageNamespace;writableBookmarks=_r([]);watchBookmarksHandle;get bookmarks(){return this.writableBookmarks.getItems()}constructor(e,o){this.map=e,this.packageNamespace=o.getNamespace("spatial-bookmarks"),this.loadState(),this.watchBookmarksHandle=qt(()=>[this.writableBookmarks.getItems()],([r])=>this.saveState(r),{immediate:!1})}destroy(){this.watchBookmarksHandle.destroy()}createBookmark(e){const o=this.map.olMap,r=o.getView().calculateExtent(),i=o.getView().getProjection().getCode(),a={minX:r[0],minY:r[1],maxX:r[2],maxY:r[3]},s={id:Zo(),title:e,extent:a,projection:i};O.debug("Created a new bookmark",s),this.writableBookmarks.push(s)}activateBookmark(e){O.debug("Activating bookmark",e);const o=this.getBookmarkExtent(e);O.debug("Attempting to apply extent",o),this.applyExtent(o)}deleteBookmark(e){O.debug("Deleting bookmark",e);const o=this.writableBookmarks.findIndex(r=>r.id===e);o>-1&&this.writableBookmarks.splice(o,1)}deleteAllBookmarks(){O.debug("Deleting all bookmarks"),this.writableBookmarks.splice(0)}loadState(){O.debug("Restoring bookmarks from local storage");const e=this.packageNamespace.get("bookmarks")??[];try{Bi(e),this.writableBookmarks.push(...e)}catch(o){O.error("Bookmarks data in local storage is invalid, resetting to default value.",o),this.writableBookmarks.splice(0),this.saveState([])}}saveState(e){O.debug("Saving bookmarks to local storage"),this.packageNamespace.set("bookmarks",e)}getBookmarkExtent(e){const r=this.map.olMap.getView(),i=e.extent,a=[i.minX,i.minY,i.maxX,i.maxY],s=r.getProjection(),c=e.projection;return Yo(a,c,s)}applyExtent(e){const r=this.map.olMap.getView(),i=Xo(e),a=r.getResolutionForExtent(e);r.setCenter(i),r.setResolution(a)}}function Bi(t){if(!Array.isArray(t))throw new Error("Expected bookmarks from local storage to be an array.");for(const e of t)Hi(e)}function Hi(t){if(!t||typeof t!="object")throw new Error("Expected bookmark from local storage to be an object.");const e=t;if(typeof e.id!="string")throw new Error("Bookmark does not have a valid id.");if(typeof e.title!="string")throw new Error("Bookmark does not have a valid title.");if(Ui(e.extent),typeof e.projection!="string")throw new Error("Bookmark does not have a valid projection value.")}function Ui(t){if(!t||typeof t!="object")throw new Error("Expected bookmark extent from local storage to be an object.");const e=t;if(typeof e.minX!="number"||typeof e.minY!="number"||typeof e.maxX!="number"||typeof e.maxY!="number")throw new Error("Expected bookmark extent from local storage to have valid coordinates.")}const Wi=t=>{const{map:e}=ee(t),o=Fi("local-storage.LocalStorageService"),r=Ji(e,o);return r&&n.jsx(qi,{...t,viewModel:r})};function qi(t){const{viewModel:e}=t,o=Gi(),r=b.useRef([]),[i,a]=b.useState(!1),s=Q(()=>e.bookmarks,[e]),[c,d]=b.useState(""),u=c.trim().length>0,{containerProps:p}=ge("spatial-bookmarks",t),[g,m]=b.useState("list"),f=()=>{e.deleteAllBookmarks(),m("list")},w=()=>{u&&(e.createBookmark(c),m("list"),d(""),a(!0))};b.useEffect(()=>{if(i){const E=r.current;E&&E[s.length-1]?.scrollIntoView?.(),a(!1)}},[s,i]);const j=()=>n.jsxs(Qe,{children:[n.jsxs(Ke,{rounded:"md",status:"warning",children:[n.jsx(Ze,{}),o.formatMessage({id:"bookmark.alert.delete"})]}),n.jsx(Yi,{intl:o,onClear:f,onCancel:()=>m("list")})]}),te=()=>n.jsxs(Qe,{children:[n.jsxs(Ke,{rounded:"md",status:"info",children:[n.jsx(Ze,{}),o.formatMessage({id:"bookmark.alert.create"})]}),n.jsx(Ht,{"aria-label":o.formatMessage({id:"bookmark.input.label"}),placeholder:o.formatMessage({id:"bookmark.input.placeholder"}),value:c,onChange:E=>{d(E.target.value)},onKeyDown:E=>{E.key==="Enter"&&w()},isRequired:!0,isInvalid:!u,autoFocus:!0}),n.jsx(Xi,{intl:o,isInvalid:!u,onCancel:()=>{d(""),m("list")},onSave:w})]}),H=()=>n.jsxs(n.Fragment,{children:[s.length?$i(s,e,o,r):n.jsxs(Ke,{rounded:"md",status:"info",children:[n.jsx(Ze,{}),o.formatMessage({id:"bookmark.alert.noSaved"})]}),n.jsx(Zi,{intl:o,bookmarks:s,showCreate:()=>m("create"),showDelete:()=>m("delete")})]}),I=n.jsxs(n.Fragment,{children:[g==="list"&&H(),g==="create"&&te(),g==="delete"&&j()]});return n.jsx(L,{flexDirection:"column",...p,children:I})}function $i(t,e,o,r){const i=o.formatMessage({id:"bookmark.button.deleteOne"}),a=t.map((s,c)=>n.jsx(Ki,{index:c,listItemNodes:r,bookmark:s,onActivate:()=>e.activateBookmark(s),onDelete:()=>e.deleteBookmark(s.id),deleteBtnLabel:i},s.id));return n.jsx(Mr,{as:"ul",className:"spatial-bookmark-list",role:"listbox","aria-label":o.formatMessage({id:"bookmark.list.label"}),flexShrink:1,flexGrow:1,p:1,spacing:1,overflowY:"auto",listStyleType:"none",children:a})}const Et={ArrowDown:1,ArrowUp:-1};function Ki(t){const{index:e,listItemNodes:o,bookmark:r,onDelete:i,onActivate:a,deleteBtnLabel:s}=t,c=r.title,d=u=>{const p=u.key;if(p==="Enter"){u.target===u.currentTarget&&a();return}if(Et[p]!=null){const g=o.current?.length;if(!g)return;let m=(e+Et[p])%g;m<0&&(m=g-1),o.current[m]?.focus()}};return n.jsx(V,{as:"li",p:1,ref:u=>{if(!u){o.current.splice(e,1);return}o.current[e]=u},className:Jo("spatial-bookmarks-item"),tabIndex:0,rounded:"md",role:"option",cursor:"pointer",outline:0,_hover:{background:"trails.50"},_focusVisible:{boxShadow:"outline"},onKeyDown:d,onClick:a,children:n.jsxs(L,{width:"100%",flexDirection:"row",align:"center",gap:1,children:[n.jsx(Xt,{children:n.jsx(nr,{})}),n.jsx(Ue,{ps:2,noOfLines:1,children:c}),n.jsx(Br,{}),n.jsx(Tt,{hasArrow:!0,label:s,placement:"right",children:n.jsx(Z,{className:"spatial-bookmarks-item-delete","aria-label":s,borderRadius:"full",iconSpacing:0,padding:0,colorScheme:"red",variant:"ghost",leftIcon:n.jsx(zt,{}),onClick:u=>{i(),u.stopPropagation()}})},e)]})})}function Zi(t){const{intl:e,bookmarks:o,showCreate:r,showDelete:i}=t;return n.jsxs(lt,{children:[n.jsx(pe,{isDisabled:o.length===0,colorScheme:"red",width:void 0,iconSpacing:0,leftIcon:n.jsx(zt,{}),onClick:i,"aria-label":e.formatMessage({id:"bookmark.button.deleteAll"}),variant:"outline"}),n.jsx(pe,{onClick:r,width:"100%",children:e.formatMessage({id:"bookmark.button.create"})})]})}function Yi(t){const{intl:e,onCancel:o,onClear:r}=t;return n.jsxs(lt,{children:[n.jsx(pe,{variant:"outline",onClick:o,children:e.formatMessage({id:"bookmark.button.cancelDelete"})}),n.jsx(pe,{onClick:r,children:e.formatMessage({id:"bookmark.button.confirmDelete"})})]})}function Xi(t){const{intl:e,onCancel:o,onSave:r,isInvalid:i}=t;return n.jsxs(lt,{children:[n.jsx(pe,{variant:"outline",onClick:()=>o(),children:e.formatMessage({id:"bookmark.button.cancel"})}),n.jsx(pe,{isDisabled:i,onClick:()=>r(),children:e.formatMessage({id:"bookmark.button.save"})})]})}function lt(t){return n.jsx(L,{width:"100%",flexDirection:"row",mt:2,gap:1,flexGrow:0,flexShrink:0,children:t.children})}function pe(t){return n.jsx(Z,{width:"100%",...t})}function Ji(t,e){const[o,r]=b.useState();return b.useEffect(()=>{let i;return t?i=new zi(t,e):i=void 0,r(i),()=>i?.destroy()},[t,e]),o}const Qi="@open-pioneer/coordinate-search",Pe=Ae.bind(void 0,Qi),en=3,tn=[{label:"WGS 84",value:X("EPSG:4326"),precision:3},{label:"Web Mercator",value:X("EPSG:3857"),precision:2}],oo=t=>{const{onSelect:e,onClear:o,projections:r=tn,input:i,placeholder:a=""}=t,{containerProps:s}=ge("coordinate-input",t),{map:c}=ee(t),d=Pe(),u=c?.olMap,p=cr(u)??void 0,g=ln(r),[m,f]=b.useState(g[0]),[w,j]=sn(i,p,m,e),te=cn(a,p,m),H=ro(d,w,m.value),I=H==="success",E=b.useRef(null);return n.jsxs(V,{...s,children:[n.jsx(Pt,{children:n.jsx("div",{ref:E})}),n.jsx(L,{flexDirection:"row",flexDir:"row",children:n.jsx(Tt,{label:I?void 0:d.formatMessage({id:H}),hasArrow:!0,placement:"auto",isOpen:!I,className:"coordinateInputToolTip",children:n.jsxs(nt,{className:"coordinateInputGroup",children:[n.jsx(on,{coordinateSearchInput:w,setCoordinateSearchInput:j,placeholder:a,placeholderString:te,onClear:o,isInputValid:I,selectedProjection:m,mapProjection:p,onSelect:e}),n.jsx(st,{padding:"0px",borderLeft:"0px",children:n.jsx(nn,{selectedProjection:m,availableProjections:g,portalElement:E,setSelectedProjection:f,coordinateSearchInput:w,mapProjection:p,onSelect:e})})]})})})]})};function on(t){const{isInputValid:e,selectedProjection:o,mapProjection:r,onSelect:i,coordinateSearchInput:a,setCoordinateSearchInput:s,placeholder:c,placeholderString:d,onClear:u}=t,p=Pe();return n.jsxs(nt,{className:"coordinateInputFieldGroup",children:[n.jsx(Ht,{type:"text",value:a,onChange:g=>{s(g.target.value)},isInvalid:!e,backgroundColor:e?"undefined":"red.100",placeholder:d,errorBorderColor:"red.500","aria-label":p.formatMessage({id:"coordinateInput.ariaLabel"}),borderRightRadius:0,onKeyDown:g=>{g.key=="Enter"&&ct(p,a,o.value,r,i)}}),n.jsx(rn,{coordinateSearchInput:a,setCoordinateSearchInput:s,placeholder:c,placeholderString:d,onClear:u,intl:p})]})}function rn(t){const{coordinateSearchInput:e,setCoordinateSearchInput:o,placeholder:r,placeholderString:i,onClear:a,intl:s}=t;return e!==""?n.jsx(Ve,{children:n.jsx(wt,{className:"clearButton",size:"sm",onClick:()=>{o(""),a&&a()},isDisabled:e=="",padding:0,icon:n.jsx(ci,{}),"aria-label":s.formatMessage({id:"coordinateInput.ariaLabel"})})}):typeof r=="object"&&e==""?n.jsx(Ve,{children:n.jsx(wt,{className:"copyButton",size:"sm",onClick:()=>{navigator.clipboard.writeText(i)},padding:0,icon:n.jsx(di,{}),"aria-label":s.formatMessage({id:"coordinateInput.copyPlaceholder"})})}):n.jsx(n.Fragment,{})}function nn(t){const[e,o]=b.useState(!1),r=$t(f=>{!e&&f.key==="Enter"&&o(!0)}),{selectedProjection:i,availableProjections:a,portalElement:s,setSelectedProjection:c,coordinateSearchInput:d,mapProjection:u,onSelect:p}=t,g=Pe(),m=an(g);return n.jsx(Hr,{value:i,defaultValue:i,options:a,menuPlacement:"auto",menuPortalTarget:s.current,"aria-label":g.formatMessage({id:"coordinateInput.ariaLabel"}),classNamePrefix:"coordinate-Input-Select",isSearchable:!1,chakraStyles:{menu:f=>({...f,width:"max-content",minWidth:"100%"}),control:(f,{selectProps:{menuIsOpen:w}})=>({...f,width:"max-content",minWidth:"100%",color:"white",borderleftstyle:"none",borderLeftRadius:0,padding:0,backgroundColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`,_focus:{boxShadow:"var(--chakra-shadows-outline)"}}),valueContainer:f=>({...f,paddingEnd:0,cursor:"pointer"}),dropdownIndicator:(f,{selectProps:{menuIsOpen:w}})=>({...f,paddingStart:0,backgroundColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`}),option:f=>({...f,_focus:{background:"var(--chakra-colors-trails-300)"}}),indicatorSeparator:(f,{selectProps:{menuIsOpen:w}})=>({...f,backgroundColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`,borderColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`})},ariaLiveMessages:m,onChange:f=>{f?.value!==void 0&&(c(f),ct(g,d,f?.value,u,p))},onKeyDown:r,menuIsOpen:e,onMenuOpen:()=>o(!0),onMenuClose:()=>o(!1)})}function an(t){return b.useMemo(()=>({onFocus:()=>"",onChange:a=>a.action=="select-option"||a.action=="initial-input-focus"?a.label+" "+t.formatMessage({id:"selected"}):"",guidance:()=>"",onFilter:()=>""}),[t])}function sn(t,e,o,r){const i=Pe(),[a,s]=b.useState(""),c=b.useMemo(()=>{if(!t||!e)return"";const u=qe(t,e,o.value);return io(u,o.precision,i)},[t,e,o,i]),d=$t(u=>{r?.(u)});return b.useEffect(()=>{t!=null&&(s(c),ct(i,c,o.value,e,d))},[t,c,d,i,e,o]),[a,s]}function ln(t){return b.useMemo(()=>t.flatMap(o=>X(o.value)!=null?{label:o.label,value:X(o.value),precision:o.precision??en}:[]),[t])}function cn(t,e,o){const r=Pe();return b.useMemo(()=>{let i;if(typeof t=="string")i=t;else if(!e)i="";else{const a=qe(t,e,o.value);i=io(a,o.precision,r)}return i},[t,e,o,r])}function ro(t,e,o){if(e=="")return"success";if(!e.includes(" "))return"tooltip.space";if(e.indexOf(" ")!=e.lastIndexOf(" "))return"tooltip.spaceOne";const r=e.split(" ");if(r.length!=2||r[0]==""||r[1]=="")return"tooltip.2coords";let i="";if(t.locale==="de"){i=".";const s=e.replaceAll(i,"");if(!/^-?\d+(,\d+)? -?\d+(,\d+)?$/.test(s))return"tooltip.dividerDe"}else if(t.locale==="en"){i=",";const s=e.replaceAll(i,"");if(!/^-?\d+(.\d+)? -?\d+(.\d+)?$/.test(s))return"tooltip.dividerEn"}const a=dn(e,i);try{if(!_t(o,a))return"tooltip.extent"}catch{console.log()}try{if(!_t(X("EPSG:4326"),qe(a,o,"EPSG:4326")))return"tooltip.extent"}catch(s){return console.log(s),"tooltip.projection"}return"success"}function _t(t,e){return t.getExtent().length==4&&t.getExtent()[0]<=e[0]&&t.getExtent()[1]<=e[1]&&t.getExtent()[2]>=e[0]&&t.getExtent()[3]>=e[1]}function dn(t,e){const i=t.replaceAll(e,"").replaceAll(",",".").split(" ");return[parseFloat(i[0]),parseFloat(i[1])]}function ct(t,e,o,r,i){if(o==null||e==""||ro(t,e,o)!=="success")return;let a=e;t.locale==="de"?a=e.replaceAll(".",""):t.locale==="en"&&(a=e.replaceAll(",",""));const s=un(a,o,r);i&&r&&i({coords:s,projection:r})}function un(t,e,o){const r=t.split(" "),i=[parseFloat(r[0].replace(",",".")),parseFloat(r[1].replace(",","."))];return qe(i,e,o)}function qe(t,e,o){return Qo(t,e,o)}function io(t,e,o){if(t[0]==null||t[1]==null)return"";const[r,i]=t,a=o.formatNumber(r,{maximumFractionDigits:e,minimumFractionDigits:e}),s=o.formatNumber(i,{maximumFractionDigits:e,minimumFractionDigits:e});return a+" "+s}const pn=t=>{const{onSelect:e,onClear:o,projections:r}=t,{containerProps:i}=ge("coordinate-search",t),{map:a}=ee(t),s=a?.olMap,{coordinates:c}=hn(s);return n.jsx(oo,{...i,mapId:t.mapId,onSelect:d=>{a&&(s?.getView().setCenter(d.coords),e?.(d))},onClear:o,placeholder:c||"",projections:r})};function hn(t){const[e,o]=b.useState();return b.useEffect(()=>{if(!t)return;const r=t.on("pointermove",i=>{o(i.coordinate)});return()=>we(r)},[t]),{coordinates:e}}function mn({intl:t}){return{id:"coordinateViewer",title:t.formatMessage({id:"demos.coordinateViewer.title"}),createModel(){return{description:t.formatMessage({id:"demos.coordinateViewer.description"}),mainWidget:n.jsx(dr,{})}}}}function gn({intl:t,notificationService:e}){return{id:"coordinateInput",title:t.formatMessage({id:"demos.coordinateInput.title"}),createModel(){return{description:t.formatMessage({id:"demos.coordinateInput.description"}),mainWidget:n.jsx(fn,{notificationService:e})}}}}function fn(t){const{notificationService:e}=t,[o,r]=b.useState();function i(s,c){e.notify({level:"info",message:"coordinate entered: "+s+" in "+c.getCode(),displayDuration:4e3})}function a(){e.notify({level:"info",message:"search cleared",displayDuration:4e3}),r(void 0)}return n.jsxs(L,{direction:"column",gap:10,children:[n.jsx(oo,{mapId:fe,input:o,placeholder:"Enter coordinate here",onSelect:({coords:s,projection:c})=>i(s,c),onClear:a,projections:[{label:"EPSG:25832",value:"EPSG:25832"},{label:"WGS 84",value:"EPSG:4326"},{label:"Web Mercator",value:"EPSG:3857"},{label:"EPSG:25833",value:"EPSG:25833"},{label:"EPSG:31466",value:"EPSG:31466"},{label:"EPSG:31467",value:"EPSG:31467"},{label:"EPSG:3035",value:"EPSG:3035"}]}),n.jsx(Z,{onClick:()=>{r([761166,6692084])},children:"Set input value"})]})}function vn({intl:t,notificationService:e}){return{id:"coordinateSearch",title:t.formatMessage({id:"demos.coordinateSearch.title"}),createModel(){return{description:t.formatMessage({id:"demos.coordinateSearch.description"}),mainWidget:n.jsx(bn,{notificationService:e})}}}}function bn(t){const{notificationService:e}=t;function o(i,a){e.notify({level:"info",message:"coordinate entered: "+i+" in "+a.getCode(),displayDuration:4e3})}function r(){e.notify({level:"info",message:"search cleared",displayDuration:4e3})}return n.jsx(L,{direction:"column",gap:10,children:n.jsx(pn,{mapId:fe,onSelect:({coords:i,projection:a})=>o(i,a),onClear:r,projections:[{label:"EPSG:25832",value:"EPSG:25832"},{label:"WGS 84",value:"EPSG:4326"},{label:"Web Mercator",value:"EPSG:3857"},{label:"EPSG:25833",value:"EPSG:25833"},{label:"EPSG:31466",value:"EPSG:31466"},{label:"EPSG:31467",value:"EPSG:31467"},{label:"EPSG:3035",value:"EPSG:3035"}]})})}function wn({intl:t}){return{id:"scaleViewer",title:t.formatMessage({id:"demos.scaleViewer.title"}),createModel(){return{description:t.formatMessage({id:"demos.scaleViewer.description"}),mainWidget:n.jsx(ur,{})}}}}function yn({intl:t}){return{id:"scaleSetter",title:t.formatMessage({id:"demos.scaleSetter.title"}),createModel(){return{description:t.formatMessage({id:"demos.scaleSetter.description"}),mainWidget:n.jsx(Oi,{})}}}}function xn({intl:t}){return{id:"scaleBar",title:t.formatMessage({id:"demos.scaleBar.title"}),createModel(){return{description:t.formatMessage({id:"demos.scaleBar.description"}),tools:n.jsx(pr,{})}}}}function Sn({intl:t}){return{id:"measurement",title:t.formatMessage({id:"demos.measurement.title"}),createModel(){return{description:t.formatMessage({id:"demos.measurement.description"}),mainWidget:n.jsx(hr,{})}}}}function kn({intl:t}){return{id:"mapNavigation",title:t.formatMessage({id:"demos.mapNavigation.title"}),createModel(){return{description:t.formatMessage({id:"demos.mapNavigation.description"}),tools:n.jsxs(n.Fragment,{children:[n.jsx(Cr,{}),n.jsx(Lr,{}),n.jsx(In,{}),n.jsx(jr,{})]})}}}}function In(){const{map:t}=ee(),[e,o]=b.useState(void 0);return b.useEffect(()=>{if(!t)return;const r=new ui(t);return o(r),()=>r.destroy()},[t]),e&&n.jsxs(n.Fragment,{children:[n.jsx(Ar,{viewModel:e}),n.jsx(Pr,{viewModel:e})]})}function Mn({intl:t}){return{id:"geolocation",title:t.formatMessage({id:"demos.geolocation.title"}),createModel(){return{description:t.formatMessage({id:"demos.geolocation.description"}),tools:n.jsx(ji,{})}}}}function En({intl:t}){return{id:"spatialBookmarks",title:t.formatMessage({id:"demos.spatialBookmarks.title"}),createModel(){return{description:t.formatMessage({id:"demos.spatialBookmarks.description"}),mainWidget:n.jsx(Wi,{})}}}}function _n({intl:t}){return{id:"printing",title:t.formatMessage({id:"demos.printing.title"}),createModel(){return{description:t.formatMessage({id:"demos.printing.description"}),mainWidget:n.jsx(mr,{})}}}}const no="showcase-app",ao=rt.bind(void 0,no),ve=Ae.bind(void 0,no);function Cn({intl:t,mapModel:e}){return{id:"tocLegend",title:t.formatMessage({id:"demos.tocLegend.title"}),createModel(){function o(i=!0){e.layers.getLayerById("verwaltungsgebiete").setVisible(i),e.layers.getLayerById("krankenhaus").setVisible(i),e.layers.getLayerById("ogc_kitas").setVisible(i)}function r(){o(!1),e?.layers.activateBaseLayer("osm")}return{description:t.formatMessage({id:"demos.tocLegend.description"}),mainWidget:n.jsx(Ln,{}),destroy:r}}}}function Ln(){const t=b.useId(),e=b.useId(),o=ve();return n.jsxs(n.Fragment,{children:[n.jsx(V,{role:"dialog","aria-labelledby":t,children:n.jsx(Ne,{title:n.jsx(Je,{id:t,size:"md",mb:2,children:n.jsx(Ue,{children:o.formatMessage({id:"demos.tocLegend.tocTitle"})})}),children:n.jsx(Sr,{showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})}),n.jsx(V,{pt:2,role:"dialog","aria-labelledby":e,children:n.jsx(Ne,{title:n.jsx(Je,{id:e,size:"md",mb:2,children:o.formatMessage({id:"demos.tocLegend.legendTitle"})}),children:n.jsx(gr,{showBaseLayers:!0})})})]})}function jn(t){return{id:"selectionResultList",title:t.intl.formatMessage({id:"demos.selectionResultList.title"}),createModel(){return new An(t)}}}var Se,ne,ae,Oe,Fe,At;let An=(At=class{constructor(e){h(this,Se);h(this,ne);h(this,ae,J({key:0,input:void 0,open:!1}));y(this,"description");y(this,"mainWidget");h(this,Oe,e=>{const{results:o}=e,a={columns:[{id:"id",displayName:"ID",width:100,getPropertyValue(c){return c.id}},{propertyName:"pointOfContact.address.postCode",displayName:"PLZ",width:120},{propertyName:"name",displayName:"Name"},{propertyName:"inspireId",displayName:"inspireID"},{displayName:"Gefördert",width:160,getPropertyValue(c){switch(c.properties?.gefoerdert){case"ja":return!0;case"nein":return!1;default:return c.properties?.gefoerdert}}}],data:o,formatOptions:{numberOptions:{maximumFractionDigits:3},dateOptions:{dateStyle:"medium",timeStyle:"medium",timeZone:"UTC"}}},s=l(this,ae).value.key;l(this,ae).value={open:!0,key:s+1,input:a}});h(this,Fe,e=>{console.log("Selected features: ",e.features)});const{mapModel:o,vectorSelectionSourceFactory:r,intl:i}=e;v(this,Se,o),v(this,ne,Pn(o,r)),this.description=i.formatMessage({id:"demos.selectionResultList.description"}),this.mainWidget=n.jsx(fr,{sources:[l(this,ne)],onSelectionComplete:l(this,Oe)}),o.layers.getLayerById("ogc_kitas").setVisible(!0)}destroy(){l(this,ne).destroy(),l(this,Se).layers.getLayerById("ogc_kitas").setVisible(!1)}get listContainer(){const e=l(this,ae).value;if(!(!e.open||!e.input))return n.jsx(Ur,{input:e.input,onSelectionChange:l(this,Fe)},e.key)}},Se=new WeakMap,ne=new WeakMap,ae=new WeakMap,Oe=new WeakMap,Fe=new WeakMap,At);function Pn(t,e){const o=t.layers.getLayerById("ogc_kitas");return e.createSelectionSource({vectorLayer:o.olLayer,label:o.title})}const Tn="krankenhaus";function Rn(t){return{id:"editing",title:t.intl.formatMessage({id:"demos.editing.title"}),createModel(){return new Nn(t)}}}var ke,se;class Nn{constructor(e){y(this,"description");y(this,"mainWidget");h(this,ke);h(this,se);const{mapModel:o,intl:r,editingService:i,notificationService:a}=e;v(this,ke,o),this.description=r.formatMessage({id:"demos.editing.description"}),v(this,se,new Vn(o,i,a,r)),this.mainWidget=n.jsx(Dn,{editingController:l(this,se)}),this._setEditLayerVisible(!0)}destroy(){this._setEditLayerVisible(!1),l(this,se).stopEditing()}_setEditLayerVisible(e=!0){l(this,ke).layers.getLayerById(Tn).setVisible(e)}}ke=new WeakMap,se=new WeakMap;var M,_,q,le,$,D,K,F;class Vn{constructor(e,o,r,i){h(this,M);h(this,_);h(this,q);h(this,le);h(this,$);h(this,D);h(this,K);h(this,F);v(this,M,J(!1)),v(this,_,e),v(this,q,o),v(this,le,r),v(this,$,i)}editingActive(){return l(this,M).value}startCreateWorkflow(){if(!l(this,M).value)try{l(this,M).value=!0;const e=l(this,_).layers.getLayerById("krankenhaus"),o=new URL(e.attributes.collectionURL+"/items");l(this,q).createFeature(l(this,_),o).whenComplete().then(i=>{if(!i)return;l(this,le).notify({level:"info",message:l(this,$).formatMessage({id:"demos.editing.create.featureCreated"},{featureId:i.featureId})}),(e?.olLayer).getSource()?.refresh()}).catch(i=>{console.error(i)}).finally(()=>{l(this,M).value=!1})}catch(e){l(this,M).value=!1,console.error(e)}}startUpdateWorkflow(){if(!l(this,M).value)try{l(this,M).value=!0,v(this,F,this._createEditingSelectTooltip());const e=l(this,_).layers.getLayerById("krankenhaus"),o=e?.olLayer;v(this,D,new vr({layers:[o]})),l(this,_).olMap.addInteraction(l(this,D)),l(this,F).element.classList.remove("editing-tooltip-hidden"),v(this,K,l(this,D).on("select",r=>{const i=r.selected,a=r.deselected;if(i.length!==1||a.length!==0)return;this._stopUpdateSelection();const s=i[0];if(!s)throw Error("feature is undefined");const c=new URL(e.attributes.collectionURL+"/items");l(this,q).updateFeature(l(this,_),c,s).whenComplete().then(u=>{u&&(l(this,le).notify({level:"info",message:l(this,$).formatMessage({id:"demos.editing.update.featureModified"},{featureId:u.featureId})}),o.getSource()?.refresh())}).catch(u=>{console.error(u)}).finally(()=>{l(this,M).value=!1})}))}catch(e){l(this,M).value=!1,console.error(e)}}_createEditingSelectTooltip(){const e=document.createElement("div");e.className="editing-tooltip editing-tooltip-hidden",e.textContent=l(this,$).formatMessage({id:"demos.editing.update.tooltip.select"});const o=new Bt({element:e,offset:[15,0],positioning:"center-left"}),r=l(this,_).olMap,i=r.on("pointermove",a=>{a.dragging||o.setPosition(a.coordinate)});return r.addOverlay(o),{overlay:o,element:e,destroy(){we(i),r.removeOverlay(o)}}}_stopUpdateSelection(){l(this,D)&&l(this,_).olMap.removeInteraction(l(this,D)),l(this,K)&&we(l(this,K)),l(this,F)&&l(this,F).destroy(),v(this,D,void 0),v(this,K,void 0),v(this,F,void 0)}stopEditing(){l(this,q).stop(fe),this._stopUpdateSelection(),l(this,M).value=!1}}M=new WeakMap,_=new WeakMap,q=new WeakMap,le=new WeakMap,$=new WeakMap,D=new WeakMap,K=new WeakMap,F=new WeakMap;function Dn({editingController:t}){const e=ve(),o=Q(()=>t.editingActive(),[t]),r=o?e.formatMessage({id:"demos.editing.activeInfo"}):e.formatMessage({id:"demos.editing.inactiveInfo"});return n.jsxs(n.Fragment,{children:[n.jsxs(L,{px:1,py:1,children:[n.jsx(Z,{mr:2,isDisabled:o,onClick:()=>{t.startCreateWorkflow()},children:e.formatMessage({id:"demos.editing.startCreateButton"})}),n.jsx(Z,{mr:2,isDisabled:o,onClick:()=>{t.startUpdateWorkflow()},children:e.formatMessage({id:"demos.editing.startUpdateButton"})}),n.jsx(Z,{isDisabled:!o,onClick:()=>{t.stopEditing()},children:e.formatMessage({id:"demos.editing.stopButton"})})]}),n.jsx(L,{px:1,py:1,children:r})]})}function On(t){return[Cn(t),mn(t),gn(t),vn(t),wn(t),yn(t),xn(t),Sn(t),Rn(t),kn(t),Mn(t),En(t),xi(t),_n(t),jn(t),ki(t)]}const Fn=je("app::AppModel");var Ge,Ie,Me,G,A,ze,Be,me,so,lo;class Gn{constructor(e,o,r,i){h(this,me);h(this,Ge);h(this,Ie);h(this,Me);h(this,G);h(this,A);h(this,ze,Tr(()=>Array.from(l(this,G).values())));h(this,Be,[]);if(v(this,Ge,e),v(this,Ie,o),v(this,Me,r),v(this,G,new Map(i.map(s=>[s.id,s]))),l(this,G).size===0)throw new Error("No demos defined.");const a=i[0];v(this,A,J([a,a.createModel()])),S(this,me,so).call(this),l(this,Be).push(S(this,me,lo).call(this))}destroy(){l(this,A).value[1].destroy?.()}get currentDemo(){return l(this,A).value[0]}get currentDemoModel(){return l(this,A).value[1]}get allDemoInfos(){return l(this,ze).value}selectDemo(e){const o=l(this,G).get(e);if(!o)throw new Error(`Demo '${e}' does not exist.`);Rr(()=>{const[,r]=l(this,A).value;r.destroy?.(),l(this,A).value=[o,o.createModel()]})}}Ge=new WeakMap,Ie=new WeakMap,Me=new WeakMap,G=new WeakMap,A=new WeakMap,ze=new WeakMap,Be=new WeakMap,me=new WeakSet,so=function(){const o=new URL(window.location.href).searchParams.get("demo");if(o){if(!l(this,G).has(o)){l(this,Ie).notify({title:l(this,Me).formatMessage({id:"demoSelection.notFound"},{demoId:o})});return}try{this.selectDemo(o)}catch(r){Fn.error("Failed to select demo from URL",r)}}},lo=function(){return qt(()=>[l(this,A).value[0].id],([e])=>{const o=new URL(window.location.href);o.searchParams.set("demo",e),window.history.replaceState(null,"",o.toString())},{immediate:!0})};var ce,Ee,_e,He,co;class zn{constructor(e){h(this,He);h(this,ce,J({kind:"loading"}));h(this,Ee,[]);h(this,_e,!1);const{mapRegistry:o,httpService:r,notifier:i,vectorSelectionSourceFactory:a,editingService:s,notificationService:c}=e.references,d=e.intl;S(this,He,co).call(this,{mapRegistry:o,httpService:r,notifier:i,vectorSelectionSourceFactory:a,editingService:s,intl:d,notificationService:c}).catch(u=>{l(this,ce).value={kind:"error",message:u.message||"Unknown error"}})}destroy(){v(this,_e,!0);for(const e of l(this,Ee))e.destroy()}get appState(){return l(this,ce).value}}ce=new WeakMap,Ee=new WeakMap,_e=new WeakMap,He=new WeakSet,co=async function(e){const{mapRegistry:o,httpService:r,notifier:i,vectorSelectionSourceFactory:a,editingService:s,intl:c,notificationService:d}=e,u=await o.getMapModel(fe);if(!u)throw new Error("No mapModel found.");const p=On({intl:c,httpService:r,mapModel:u,vectorSelectionSourceFactory:a,editingService:s,notificationService:d}),g={kind:"ready",appModel:new Gn(u,i,c,p),destroy(){this.appModel.destroy()}};if(l(this,_e)){g.destroy();return}l(this,ce).value=g,l(this,Ee).push(g)};const Y=je("local-storage"),Bn=0,N={CORRUPTED_DATA:"local-storage:corrupted-data",INVALID_PATH:"local-storage:invalid-path",INVALID_VALUE:"local-storage:invalid-value",NOT_SUPPORTED:"local-storage:not-supported",INTERNAL:"local-storage:internal-error"};var de,P,z,ue,T,k,uo,po,be,oe,ho;class Hn{constructor(e){h(this,k);h(this,de);h(this,P,{});h(this,z);h(this,ue);h(this,T);v(this,de,$n(e.properties)),v(this,z,Kn()),l(this,z)&&(S(this,k,po).call(this),v(this,ue,S(this,k,ho).call(this)))}destroy(){l(this,T)&&(clearTimeout(l(this,T)),v(this,T,void 0)),l(this,z)&&S(this,k,be).call(this)}get isSupported(){return!!l(this,ue)}get(e){return S(this,k,oe).call(this).get(e)}set(e,o){return S(this,k,oe).call(this).set(e,o)}remove(e){return S(this,k,oe).call(this).remove(e)}removeAll(){return S(this,k,oe).call(this).removeAll()}getNamespace(e){return S(this,k,oe).call(this).getNamespace(e)}}de=new WeakMap,P=new WeakMap,z=new WeakMap,ue=new WeakMap,T=new WeakMap,k=new WeakSet,uo=function(){l(this,T)&&clearTimeout(l(this,T)),v(this,T,setTimeout(()=>{v(this,T,void 0),S(this,k,be).call(this)},Bn))},po=function(){try{const e=l(this,z);if(!e)throw new R(N.INTERNAL,"Local storage is not available.");const o=e.getItem(l(this,de));if(o==null){v(this,P,{}),S(this,k,be).call(this);return}try{const r=JSON.parse(o);if(!he(r))throw new R(N.CORRUPTED_DATA,"Persisted value should be an object.");v(this,P,r)}catch(r){Y.warn("Invalid persisted data, reverting to default.",r),v(this,P,{}),S(this,k,be).call(this)}}catch(e){Y.error("Failed to load from local storage",e)}},be=function(){try{const e=l(this,z);if(!e)throw new R(N.INTERNAL,"Local storage is not available.");const o=JSON.stringify(l(this,P));e.setItem(l(this,de),o)}catch(e){Y.error("Failed to save to local storage",e)}},oe=function(){const e=l(this,ue);if(!e)throw new R(N.NOT_SUPPORTED,"Local storage is not supported by this browser.");return e},ho=function(){const e={getByPath:o=>Lt(Un(l(this,P),o)),setByPath:(o,r)=>{if(!qn(r))throw new R(N.INVALID_VALUE,"The value is not supported by local storage.");if(r=Lt(r),o.length===0){if(!he(r))throw new R(N.INVALID_VALUE,"The root value must be a plain object.");v(this,P,r)}else Wn(l(this,P),o,r);S(this,k,uo).call(this)}};return new dt([],e)};class dt{path;access;constructor(e,o){this.path=e,this.access=o}get(e){return this.access.getByPath([...this.path,e])}set(e,o){this.access.setByPath([...this.path,e],o)}remove(e){this.access.setByPath([...this.path,e],void 0)}removeAll(){this.access.setByPath(this.path,{})}getNamespace(e){const o=this.get(e);if(o===void 0)this.set(e,{});else if(!he(o))throw new R(N.INVALID_PATH,`Cannot use '${e}' as a namespace because it is not associated with an object.`);return new dt(this.path.concat([e]),this.access)}}const Ct="trails-state";function Un(t,e){let o=t;for(const r of e){if(!he(o))throw new R(N.INVALID_PATH,`Cannot get nested property '${r}' because the parent is no object.`);o=o[r]}return o}function Wn(t,e,o){if(!e.length)throw new R(N.INTERNAL,"Path must not be empty.");let r=t;for(let a=0,s=e.length-1;a"u"){Y.warn("Local storage is not supported by this browser.");return}try{const t=globalThis.localStorage;if(!t){Y.warn("Local storage is not supported by this browser.");return}return t}catch(t){Y.warn("Local storage is not supported by this browser.",t);return}}function Lt(t){return t!=null&&(t=JSON.parse(JSON.stringify(t))),t}const Zn={"showcase-app":{name:"showcase-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:mi,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},AppInitModel:{name:"AppInitModel",clazz:zn,provides:[{name:"app.AppInitModel",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1},mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},notifier:{name:"notifier.NotificationService",qualifier:void 0,all:!1},vectorSelectionSourceFactory:{name:"selection.VectorSelectionSourceFactory",qualifier:void 0,all:!1},editingService:{name:"editing.EditingService",qualifier:void 0,all:!1},notificationService:{name:"notifier.NotificationService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"app.AppInitModel",qualifier:void 0,all:!1},{name:"runtime.ApplicationContext",qualifier:void 0,all:!1}]},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/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:er,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:Wr,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:tr,provides:[{name:"map.MapRegistry",qualifier:void 0}],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/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:Nr,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:Vr,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},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/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:qr,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-search":{name:"@open-pioneer/coordinate-search",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/editing":{name:"@open-pioneer/editing",services:{EditingServiceImpl:{name:"EditingServiceImpl",clazz:br,provides:[{name:"editing.EditingService",qualifier:void 0}],references:{mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{polygonStyle:{value:{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"red","stroke-width":1.25,"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1},vertexStyle:{value:{"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1}}},"@open-pioneer/legend":{name:"@open-pioneer/legend",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-setter":{name:"@open-pioneer/scale-setter",services:{},ui:{references:[]},properties:{}},"@open-pioneer/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/selection":{name:"@open-pioneer/selection",services:{VectorSelectionSourceFactory:{name:"VectorSelectionSourceFactory",clazz:wr,provides:[{name:"selection.VectorSelectionSourceFactory",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/spatial-bookmarks":{name:"@open-pioneer/spatial-bookmarks",services:{},ui:{references:[{name:"local-storage.LocalStorageService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/local-storage":{name:"@open-pioneer/local-storage",services:{LocalStorageServiceImpl:{name:"LocalStorageServiceImpl",clazz:Hn,provides:[{name:"local-storage.LocalStorageService",qualifier:"local-storage.LocalStorageService"}],references:{}}},ui:{references:[]},properties:{storageId:{value:null,required:!1}}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}}},Yn=':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)}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}.editing-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}.editing-tooltip-hidden{visibility:hidden}.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}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}.selection-drag-box{background-color:#ffffff4d!important;border:3px solid var(--chakra-colors-background_primary)!important}.selection-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}.selection .react-select{cursor:default}.map-container .selection-active{cursor:crosshair}.map-container .selection-inactive{cursor:no-drop}.selection-source-value.selection-source-value--disabled{opacity:.4}.selection-source-value.selection-source-value--disabled span{margin:0 6px 0 0}.map-anchor.main-map-anchor{overflow-x:hidden;overflow-y:auto}.map-container:focus-visible{outline:none}.map-container:focus-visible:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;border:3px solid var(--chakra-colors-trails-500)}@media screen and (max-width: 48em){.map-anchor.main-map-anchor{max-height:45%}}.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)}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',Xn=["en","de"];function Jn(t){switch(t){case"en":return yt(()=>import("./DJqJKPvidfOd.js"),[],import.meta.url).then(e=>e.default);case"de":return yt(()=>import("./CmztmVuowTj7.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${t}'`)}const Qn=yo(Yn),ea=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:Jn,locales:Xn,packages:Zn,styles:Qn},Symbol.toStringTag,{value:"Module"}));function mo({label:t,children:e}){return n.jsxs($r,{as:Kr,maxWidth:{base:"none",md:"20em"},width:{base:"100%",sm:"47%",md:void 0},children:[n.jsx(Zr,{flexBasis:{base:"8em",sm:"auto"},m:0,children:t}),e]})}const ta=je("app::DemoSelection");function oa({appModel:t}){const e=ve(),{allDemos:o,currentDemo:r}=Q(()=>({allDemos:t.allDemoInfos,currentDemo:t.currentDemo}),[t]),i=b.useMemo(()=>o.map(a=>n.jsx("option",{value:a.id,children:a.title},a.id)),[o]);return n.jsx(mo,{label:e.formatMessage({id:"demoSelection.label"}),children:n.jsx(Ut,{value:r.id,onChange:a=>{const s=a.target.value;try{t.selectDemo(s)}catch(c){ta.error("Failed to select demo",c)}},children:i})})}function ra(){const t=ve(),e=ao("runtime.ApplicationContext"),o=ia(e.getLocale()),r=i=>{switch(i){case"en":e.setLocale("en-GB");break;case"de":e.setLocale("de-DE");break}};return n.jsx(mo,{label:t.formatMessage({id:"localeSwitcher.label"}),children:n.jsxs(Ut,{value:o,onChange:i=>r(i.target.value),children:[n.jsx("option",{value:"de",children:t.formatMessage({id:"localeSwitcher.locale.de"})}),n.jsx("option",{value:"en",children:t.formatMessage({id:"localeSwitcher.locale.en"})})]})})}function ia(t){const e=t.match(/^[a-z]+/i)?.[0];if(e==="en"||e=="de")return e;throw new Error("unexpected locale prefix: "+e)}function na({appModel:t}){const e=ve();return n.jsxs(L,{as:"header",px:2,py:3,flexWrap:{base:"wrap",md:"nowrap"},alignItems:"baseline",gap:2,boxShadow:"1px 0px 3px rgba(0, 0, 0, 0.5)",bgColor:"white",zIndex:100,children:[n.jsx(Je,{size:"md",flexShrink:0,flexGrow:1,textAlign:{base:"center",md:"left"},width:{base:"100%",md:"auto"},mb:{base:2,md:0},children:e.formatMessage({id:"header.title"})}),n.jsx(oa,{appModel:t}),n.jsx(ra,{})]})}function aa(){const t=ao("app.AppInitModel"),e=Q(()=>t.appState,[t]);let o;switch(e.kind){case"loading":o="Loading...";break;case"error":o="Error: "+e.message;break;case"ready":o=n.jsx(sa,{state:e})}return o}function sa(t){const e=ve(),o=t.state.appModel,{currentDemo:r,currentDemoModel:i}=Q(()=>({currentDemo:o.currentDemo,currentDemoModel:o.currentDemoModel}),[o]),a=Q(()=>i.listContainer,[i]),s=b.useMemo(()=>({left:0,right:0,bottom:a!=null?400:0,top:0}),[a]);return n.jsxs(n.Fragment,{children:[n.jsx(yr,{position:"top-right"}),n.jsx(L,{height:"100%",direction:"column",children:n.jsx(Ne,{title:n.jsx(na,{appModel:o}),children:n.jsx(L,{flex:"1",direction:"column",position:"relative",children:n.jsx(or,{mapId:fe,children:n.jsxs(rr,{viewPadding:s,role:"main","aria-label":e.formatMessage({id:"ariaLabels.map"}),children:[n.jsx(bt,{className:"main-map-anchor",position:"top-left",horizontalGap:10,verticalGap:10,children:n.jsx(V,{bgColor:"white",borderRadius:10,p:2,maxW:"500px",children:n.jsxs(Ne,{title:r.title,sectionHeadingProps:{size:"lg"},children:[n.jsx(Ue,{py:4,dangerouslySetInnerHTML:{__html:i.description}}),i.mainWidget]})})}),n.jsx(bt,{position:"bottom-right",horizontalGap:6,children:n.jsx(Qe,{p:1,children:i.tools})}),a&&n.jsx(V,{className:"list-container",position:"absolute",bottom:"0",backgroundColor:"white",width:"100%",height:"400px",zIndex:1,borderTop:"2px solid",borderColor:"trails.100",children:a})]})})})})})]})}const la=new URLSearchParams(window.location.search),ca=la.get("lang")||void 0,da=xo({component:aa,appMetadata:ea,config:{properties:{"@open-pioneer/local-storage":{storageId:"ol-showcase-state"}},locale:ca}});customElements.define("showcase-app",da); diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/CtkSqPB4B2ET.js b/openlayers-base-packages/pr-previews/pr-355/assets/DIiS5B7_zqGr.js similarity index 99% rename from openlayers-base-packages/pr-previews/pr-355/assets/CtkSqPB4B2ET.js rename to openlayers-base-packages/pr-previews/pr-355/assets/DIiS5B7_zqGr.js index c10c7c9..6de270c 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/CtkSqPB4B2ET.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/DIiS5B7_zqGr.js @@ -1,2 +1,2 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./QpsqTuY2Z5jc.js","./CmsKOCeNyeyo.js","./_05fvbTuDT_t.js","./CzUo6bX8-UUU.js","./B36mctiVgF5V.js","./E5Cg9XwqIVqj.js","./0jkoYKtubXoE.js","./CovJx79h1x39.js","./C41Ku2EWcQEd.js","./CkG3hRXjrvfc.js"])))=>i.map(i=>d[i]); -var Qt=Object.defineProperty;var Xe=i=>{throw TypeError(i)};var en=(i,e,t)=>e in i?Qt(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var y=(i,e,t)=>en(i,typeof e!="symbol"?e+"":e,t),Ie=(i,e,t)=>e.has(i)||Xe("Cannot "+t);var v=(i,e,t)=>(Ie(i,e,"read from private field"),t?t.call(i):e.get(i)),x=(i,e,t)=>e.has(i)?Xe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),C=(i,e,t,n)=>(Ie(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t),te=(i,e,t)=>(Ie(i,e,"access private method"),t);import{aF as tn,b7 as nn,b8 as sn,b9 as rn,ba as on,aQ as an,aY as ln,bb as cn,bc as un,a1 as dn,bd as hn,b1 as gn,h as A,be as fn,bf as mn,bg as pn,bh as St,bi as yn,bj as _n,a as ee,b as Me,aM as ye,bk as Ze,bl as K,E as Qe,$ as j,bm as Te,a$ as Z,ao as _e,bn as fe,bo as et,bp as k,m as M,bq as U,br as Oe,bs as vn,bt as Sn,x as xn,bu as je,bv as Cn,bw as wn,bx as xt,ap as Ct,by as bn,bz as En,bA as tt,bB as Mn,bC as nt,bD as Pn,bE as st,bF as Be,b0 as $e,b2 as Fn,d as Ue,u as z,a_ as H,g as B,B as P,b6 as Ln,b5 as Pe,bG as In,an as ve,bH as Tn,bI as kn,c as Se,ay as se,F as Re,C as An,bJ as it,bK as Nn,bL as rt,i as ot}from"./B36mctiVgF5V.js";import{p as On,q as jn,r as f,s as Rn,h as We,u as wt,o as bt,k as Et,j as d,l as D,t as Dn,v as Gn,c as ge,b as Mt,w as at,B as Pt,C as Vn,x as Hn,i as Ft,y as Lt,n as Bn,I as $n}from"./CzUo6bX8-UUU.js";import{G as It,i as Tt}from"./C1o_VwAkx5Nm.js";import{a as Un}from"./DNaBv0QziP17.js";import{D as kt,S as Wn,I as zn,c as Kn,a as qn}from"./BZqu8ZKsC5y7.js";import{u as V}from"./E5Cg9XwqIVqj.js";import{T as Q,L as Yn,V as Jn}from"./CovJx79h1x39.js";import{c as At}from"./SSUBJAaBGB7g.js";import{L as De}from"./Di-_YM5QvGet.js";import{u as Nt,F as xe}from"./0jkoYKtubXoE.js";import{F as Ce}from"./DAtS2L2h2gmX.js";import{H as Ge}from"./_YjaCHRtWzU8.js";import{F as N,r as Ot}from"./_05fvbTuDT_t.js";import{F as Xn}from"./CkG3hRXjrvfc.js";import{_ as Zn}from"./CmsKOCeNyeyo.js";function Qn(i){const{theme:e}=On(),t=jn();return f.useMemo(()=>Rn(e.direction,{...t,...i}),[i,e.direction,t])}var ze=We(function(e,t){const{htmlSize:n,...s}=e,r=wt("Input",s),o=bt(s),a=Nt(o),l=Et("chakra-input",e.className);return d.jsx(D.input,{size:n,...a,__css:r.field,ref:t,className:l})});ze.displayName="Input";ze.id="Input";var jt=We(function(e,t){const{children:n,placeholder:s,className:r,...o}=e;return d.jsxs(D.select,{...o,ref:t,className:Et("chakra-select",r),children:[s&&d.jsx("option",{value:"",children:s}),n]})});jt.displayName="SelectField";function es(i,e){const t={},n={};for(const[s,r]of Object.entries(i))e.includes(s)?t[s]=r:n[s]=r;return[t,n]}var Ke=We((i,e)=>{var t;const n=wt("Select",i),{rootProps:s,placeholder:r,icon:o,color:a,height:l,h:c,minH:u,minHeight:h,iconColor:m,iconSize:g,...p}=bt(i),[_,w]=es(p,Gn),F=Nt(w),O={width:"100%",height:"fit-content",position:"relative",color:a},S={paddingEnd:"2rem",...n.field,_focus:{zIndex:"unset",...(t=n.field)==null?void 0:t._focus}};return d.jsxs(D.div,{className:"chakra-select__wrapper",__css:O,..._,...s,children:[d.jsx(jt,{ref:e,height:c??l,minH:u??h,placeholder:r,...F,__css:S,children:i.children}),d.jsx(Rt,{"data-disabled":Dn(F.disabled),...(m||a)&&{color:m||a},__css:n.icon,...g&&{fontSize:g},children:o})]})});Ke.displayName="Select";var ts=i=>d.jsx("svg",{viewBox:"0 0 24 24",...i,children:d.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),ns=D("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),Rt=i=>{const{children:e=d.jsx(ts,{}),...t}=i,n=f.cloneElement(e,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return d.jsx(ns,{...t,className:"chakra-select__icon-wrapper",children:f.isValidElement(e)?n:null})};Rt.displayName="SelectIcon";const b={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class Fe extends tn{constructor(e){super(),this.on,this.once,this.un,this.options=e,this.id=e.id,this.insertFirst=e.insertFirst!==void 0?e.insertFirst:!0,this.stopEvent=e.stopEvent!==void 0?e.stopEvent:!0,this.element=document.createElement("div"),this.element.className=e.className!==void 0?e.className:"ol-overlay-container "+nn,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=e.autoPan===!0?{}:e.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(b.ELEMENT,this.handleElementChanged),this.addChangeListener(b.MAP,this.handleMapChanged),this.addChangeListener(b.OFFSET,this.handleOffsetChanged),this.addChangeListener(b.POSITION,this.handlePositionChanged),this.addChangeListener(b.POSITIONING,this.handlePositioningChanged),e.element!==void 0&&this.setElement(e.element),this.setOffset(e.offset!==void 0?e.offset:[0,0]),this.setPositioning(e.positioning||"top-left"),e.position!==void 0&&this.setPosition(e.position)}getElement(){return this.get(b.ELEMENT)}getId(){return this.id}getMap(){return this.get(b.MAP)||null}getOffset(){return this.get(b.OFFSET)}getPosition(){return this.get(b.POSITION)}getPositioning(){return this.get(b.POSITIONING)}handleElementChanged(){sn(this.element);const e=this.getElement();e&&this.element.appendChild(e)}handleMapChanged(){this.mapPostrenderListenerKey&&(rn(this.element),on(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const e=this.getMap();if(e){this.mapPostrenderListenerKey=an(e,ln.POSTRENDER,this.render,this),this.updatePixelPosition();const t=this.stopEvent?e.getOverlayContainerStopEvent():e.getOverlayContainer();this.insertFirst?t.insertBefore(this.element,t.childNodes[0]||null):t.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(e){this.set(b.ELEMENT,e)}setMap(e){this.set(b.MAP,e)}setOffset(e){this.set(b.OFFSET,e)}setPosition(e){this.set(b.POSITION,e)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(e){const t=this.getMap();if(!t||!t.getTargetElement()||!this.get(b.POSITION))return;const n=this.getRect(t.getTargetElement(),t.getSize()),s=this.getElement(),r=this.getRect(s,[cn(s),un(s)]);e=e||{};const o=e.margin===void 0?20:e.margin;if(!dn(n,r)){const a=r[0]-n[0],l=n[2]-r[2],c=r[1]-n[1],u=n[3]-r[3],h=[0,0];if(a<0?h[0]=a-o:l<0&&(h[0]=Math.abs(l)+o),c<0?h[1]=c-o:u<0&&(h[1]=Math.abs(u)+o),h[0]!==0||h[1]!==0){const m=t.getView().getCenterInternal(),g=t.getPixelFromCoordinateInternal(m);if(!g)return;const p=[g[0]+h[0],g[1]+h[1]],_=e.animation||{};t.getView().animateInternal({center:t.getCoordinateFromPixelInternal(p),duration:_.duration,easing:_.easing})}}}getRect(e,t){const n=e.getBoundingClientRect(),s=n.left+window.pageXOffset,r=n.top+window.pageYOffset;return[s,r,s+t[0],r+t[1]]}setPositioning(e){this.set(b.POSITIONING,e)}setVisible(e){this.rendered.visible!==e&&(this.element.style.display=e?"":"none",this.rendered.visible=e)}updatePixelPosition(){const e=this.getMap(),t=this.getPosition();if(!e||!e.isRendered()||!t){this.setVisible(!1);return}const n=e.getPixelFromCoordinate(t),s=e.getSize();this.updateRenderedPosition(n,s)}updateRenderedPosition(e,t){const n=this.element.style,s=this.getOffset(),r=this.getPositioning();this.setVisible(!0);const o=Math.round(e[0]+s[0])+"px",a=Math.round(e[1]+s[1])+"px";let l="0%",c="0%";r=="bottom-right"||r=="center-right"||r=="top-right"?l="-100%":(r=="bottom-center"||r=="center-center"||r=="top-center")&&(l="-50%"),r=="bottom-left"||r=="bottom-center"||r=="bottom-right"?c="-100%":(r=="center-left"||r=="center-center"||r=="center-right")&&(c="-50%");const u=`translate(${l}, ${c}) translate(${o}, ${a})`;this.rendered.transform_!=u&&(this.rendered.transform_=u,n.transform=u)}getOptions(){return this.options}}const lr=hn,ss=25.4/.28,is=39.37;function qe(i){return Ye(i,rs,os)}function rs(i){return i.getView()}function os(i,e){return i.on("change:view",e)}function Dt(i){return qe(i)?.getProjection()}function as(i){const e=qe(i);return Ye(e,ls,cs)}function ls(i){return i.getResolution()}function cs(i,e){return i.on("change:resolution",e)}function us(i){const e=qe(i);return Ye(e,ds,hs)}function ds(i){return i.getCenter()}function hs(i,e){return i.on("change:center",e)}function gs(i){const e=us(i),t=as(i),n=Dt(i);return f.useMemo(()=>{if(n==null||t==null||e==null)return;const r=gn(n,t,e);return Math.round(r*is*ss)},[n,t,e])}function Ye(i,e,t){const n=f.useCallback(()=>i?e(i):void 0,[i,e]),s=f.useCallback(r=>{if(!i)return()=>{};const o=t(i,r);return()=>A(o)},[i,t]);return f.useSyncExternalStore(s,n)}const lt=0,ie=1,ct=[0,0,0,0],q=[],ke={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class Ae extends Ct{constructor(e,t,n){super(e),this.features=t,this.mapBrowserEvent=n}}class fs extends fn{constructor(e){super(e),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=e.condition?e.condition:mn,this.defaultDeleteCondition_=function(n){return pn(n)&&St(n)},this.deleteCondition_=e.deleteCondition?e.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:yn,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new _n,this.pixelTolerance_=e.pixelTolerance!==void 0?e.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new ee({source:new Me({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:ps(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null;let t;if(e.features?t=e.features:e.source&&(this.source_=e.source,t=new ye(this.source_.getFeatures()),this.source_.addEventListener(Ze.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(Ze.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!t)throw new Error("The modify interaction requires features, a source or a layer");e.hitDetection&&(this.hitDetection_=e.hitDetection),this.features_=t,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(K.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(K.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=e.snapToPointer===void 0?!this.hitDetection_:e.snapToPointer}addFeature_(e){const t=e.getGeometry();if(t){const s=this.SEGMENT_WRITERS_[t.getType()];s&&s(e,t)}const n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),e.addEventListener(Qe.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(e,t){if(!this.featuresBeingModified_){this.featuresBeingModified_=new ye;const n=this.featuresBeingModified_.getArray();for(let s=0,r=t.length;s=0;--s){const r=n[s];for(let o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===r&&this.dragSegments_.splice(o,1);t.remove(r)}}setActive(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(e)}setMap(e){this.overlay_.setMap(e),super.setMap(e)}getOverlay(){return this.overlay_}handleSourceAdd_(e){e.feature&&this.features_.push(e.feature)}handleSourceRemove_(e){e.feature&&this.features_.remove(e.feature)}handleFeatureAdd_(e){this.addFeature_(e.element)}handleFeatureChange_(e){if(!this.changingFeature_){const t=e.target;this.removeFeature_(t),this.addFeature_(t)}}handleFeatureRemove_(e){this.removeFeature_(e.element)}writePointGeometry_(e,t){const n=t.getCoordinates(),s={feature:e,geometry:t,segment:[n,n]};this.rBush_.insert(t.getExtent(),s)}writeMultiPointGeometry_(e,t){const n=t.getCoordinates();for(let s=0,r=n.length;s=0;--c)this.insertVertex_(s[c],r)}return!!this.vertexFeature_}handleUpEvent(e){for(let t=this.dragSegments_.length-1;t>=0;--t){const n=this.dragSegments_[t][0],s=n.geometry;if(s.getType()==="Circle"){const r=s.getCenter(),o=n.featureSegments[0],a=n.featureSegments[1];o.segment[0]=r,o.segment[1]=r,a.segment[0]=r,a.segment[1]=r,this.rBush_.update(Te(r),o);let l=s;this.rBush_.update(l.getExtent(),a)}else this.rBush_.update(j(n.segment),n)}return this.featuresBeingModified_&&(this.dispatchEvent(new Ae(ke.MODIFYEND,this.featuresBeingModified_,e)),this.featuresBeingModified_=null),!1}handlePointerMove_(e){this.lastPixel_=e.pixel,this.handlePointerAtPixel_(e.pixel,e.map,e.coordinate)}handlePointerAtPixel_(e,t,n){const s=n||t.getCoordinateFromPixel(e);t.getView().getProjection();const r=function(l,c){return ut(s,l)-ut(s,c)};let o,a;if(this.hitDetection_){const l=typeof this.hitDetection_=="object"?c=>c===this.hitDetection_:void 0;t.forEachFeatureAtPixel(e,(c,u,h)=>{h&&h.getType()==="Point"&&(h=new _e(Oe(h.getCoordinates())));const m=h||c.getGeometry();if(c instanceof Z&&this.features_.getArray().includes(c)){a=m;const g=c.getGeometry().getFlatCoordinates().slice(0,2);o=[{feature:c,geometry:a,segment:[g,g]}]}return!0},{layerFilter:l})}if(!o){const l=vn(Te(s,ct)),c=t.getView().getResolution()*this.pixelTolerance_,u=Sn(xn(l,c,ct));o=this.rBush_.getInExtent(u)}if(o&&o.length>0){const l=o.sort(r)[0],c=l.segment;let u=dt(s,l);const h=t.getPixelFromCoordinate(u);let m=et(e,h);if(a||m<=this.pixelTolerance_){const g={};if(g[M(c)]=!0,this.snapToPointer_||(this.delta_[0]=u[0]-s[0],this.delta_[1]=u[1]-s[1]),l.geometry.getType()==="Circle"&&l.index===ie)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);else{const p=t.getPixelFromCoordinate(c[0]),_=t.getPixelFromCoordinate(c[1]),w=je(h,p),F=je(h,_);m=Math.sqrt(Math.min(w,F)),this.snappedToVertex_=m<=this.pixelTolerance_,this.snappedToVertex_&&(u=w>F?c[1]:c[0]),this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);const O={};O[M(l.geometry)]=!0;for(let S=1,L=o.length;S=0;--l)o=e[l],g=o[0],p=M(g.feature),g.depth&&(p+="-"+g.depth.join("-")),p in t||(t[p]={}),o[1]===0?(t[p].right=g,t[p].index=g.index):o[1]==1&&(t[p].left=g,t[p].index=g.index+1);for(p in t){switch(m=t[p].right,u=t[p].left,c=t[p].index,h=c-1,u!==void 0?g=u:g=m,h<0&&(h=0),a=g.geometry,r=a.getCoordinates(),s=r,n=!1,a.getType()){case"MultiLineString":r[g.depth[0]].length>2&&(r[g.depth[0]].splice(c,1),n=!0);break;case"LineString":r.length>2&&(r.splice(c,1),n=!0);break;case"MultiPolygon":s=s[g.depth[1]];case"Polygon":s=s[g.depth[0]],s.length>4&&(c==s.length-1&&(c=0),s.splice(c,1),n=!0,c===0&&(s.pop(),s.push(s[0]),h=s.length-1));break}if(n){this.setGeometryCoordinates_(a,r);const _=[];if(u!==void 0&&(this.rBush_.remove(u),_.push(u.segment[0])),m!==void 0&&(this.rBush_.remove(m),_.push(m.segment[1])),u!==void 0&&m!==void 0){const w={depth:g.depth,feature:g.feature,geometry:g.geometry,index:h,segment:_};this.rBush_.insert(j(w.segment),w)}this.updateSegmentIndices_(a,c,g.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),e.length=0}}return n}setGeometryCoordinates_(e,t){this.changingFeature_=!0,e.setCoordinates(t),this.changingFeature_=!1}updateSegmentIndices_(e,t,n,s){this.rBush_.forEachInExtent(e.getExtent(),function(r){r.geometry===e&&(n===void 0||r.depth===void 0||Cn(r.depth,n))&&r.index>t&&(r.index+=s)})}}function ms(i,e){return i.index-e.index}function ut(i,e,t){const n=e.geometry;if(n.getType()==="Circle"){let r=n;if(e.index===ie){const o=je(r.getCenter(),k(i)),a=Math.sqrt(o)-r.getRadius();return a*a}}const s=k(i);return q[0]=k(e.segment[0]),q[1]=k(e.segment[1]),bn(s,q)}function dt(i,e,t){const n=e.geometry;if(n.getType()==="Circle"&&e.index===ie)return Oe(n.getClosestPoint(k(i)));const s=k(i);return q[0]=k(e.segment[0]),q[1]=k(e.segment[1]),Oe(wn(s,q))}function ps(){const i=xt();return function(e,t){return i.Point}}const ys={SELECT:"select"};class _s extends Ct{constructor(e,t,n,s){super(e),this.selected=t,this.deselected=n,this.mapBrowserEvent=s}}const me={};class Gt extends En{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.boundAddFeature_=this.addFeature_.bind(this),this.boundRemoveFeature_=this.removeFeature_.bind(this),this.condition_=e.condition?e.condition:St,this.addCondition_=e.addCondition?e.addCondition:tt,this.removeCondition_=e.removeCondition?e.removeCondition:tt,this.toggleCondition_=e.toggleCondition?e.toggleCondition:Mn,this.multi_=e.multi?e.multi:!1,this.filter_=e.filter?e.filter:nt,this.hitTolerance_=e.hitTolerance?e.hitTolerance:0,this.style_=e.style!==void 0?e.style:vs(),this.features_=e.features||new ye;let t;if(e.layers)if(typeof e.layers=="function")t=e.layers;else{const n=e.layers;t=function(s){return n.includes(s)}}else t=nt;this.layerFilter_=t,this.featureLayerAssociation_={}}addFeatureLayerAssociation_(e,t){this.featureLayerAssociation_[M(e)]=t}getFeatures(){return this.features_}getHitTolerance(){return this.hitTolerance_}getLayer(e){return this.featureLayerAssociation_[M(e)]}setHitTolerance(e){this.hitTolerance_=e}setMap(e){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),super.setMap(e),e?(this.features_.addEventListener(K.ADD,this.boundAddFeature_),this.features_.addEventListener(K.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(K.ADD,this.boundAddFeature_),this.features_.removeEventListener(K.REMOVE,this.boundRemoveFeature_))}addFeature_(e){const t=e.element;if(this.style_&&this.applySelectedStyle_(t),!this.getLayer(t)){const n=this.getMap().getAllLayers().find(function(s){if(s instanceof ee&&s.getSource()&&s.getSource().hasFeature(t))return s});n&&this.addFeatureLayerAssociation_(t,n)}}removeFeature_(e){this.style_&&this.restorePreviousStyle_(e.element)}getStyle(){return this.style_}applySelectedStyle_(e){const t=M(e);t in me||(me[t]=e.getStyle()),e.setStyle(this.style_)}restorePreviousStyle_(e){const t=this.getMap().getInteractions().getArray();for(let s=t.length-1;s>=0;--s){const r=t[s];if(r!==this&&r instanceof Gt&&r.getStyle()&&r.getFeatures().getArray().lastIndexOf(e)!==-1){e.setStyle(r.getStyle());return}}const n=M(e);e.setStyle(me[n]),delete me[n]}removeFeatureLayerAssociation_(e){delete this.featureLayerAssociation_[M(e)]}handleEvent(e){if(!this.condition_(e))return!0;const t=this.addCondition_(e),n=this.removeCondition_(e),s=this.toggleCondition_(e),r=!t&&!n&&!s,o=e.map,a=this.getFeatures(),l=[],c=[];if(r){Pn(this.featureLayerAssociation_),o.forEachFeatureAtPixel(e.pixel,(u,h)=>{if(!(!(u instanceof Z)||!this.filter_(u,h)))return this.addFeatureLayerAssociation_(u,h),c.push(u),!this.multi_},{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let u=a.getLength()-1;u>=0;--u){const h=a.item(u),m=c.indexOf(h);m>-1?c.splice(m,1):(a.remove(h),l.push(h))}c.length!==0&&a.extend(c)}else{o.forEachFeatureAtPixel(e.pixel,(u,h)=>{if(!(!(u instanceof Z)||!this.filter_(u,h)))return(t||s)&&!a.getArray().includes(u)?(this.addFeatureLayerAssociation_(u,h),c.push(u)):(n||s)&&a.getArray().includes(u)&&(l.push(u),this.removeFeatureLayerAssociation_(u)),!this.multi_},{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let u=l.length-1;u>=0;--u)a.remove(l[u]);a.extend(c)}return(c.length>0||l.length>0)&&this.dispatchEvent(new _s(ys.SELECT,c,l,e)),!0}}function vs(){const i=xt();return st(i.Polygon,i.LineString),st(i.GeometryCollection,i.LineString),function(e){return e.getGeometry()?i[e.getGeometry().getType()]:null}}async function Ss(i,e,t,n){const r=n.getCode().replace("EPSG:","http://www.opengis.net/def/crs/EPSG/0/"),o=await i.fetch(e,{method:"POST",body:JSON.stringify({type:"Feature",properties:{},geometry:t}),headers:{"Content-Type":"application/geo+json; charset=utf-8","Content-Crs":`<${r}>`}});if(!o||!o.ok||o.status!==201)throw new Error("Request failed: "+o.status);const a=o.headers.get("location");if(!a)throw new Error("Request failed: no Location response header");const l=a.substring(a.lastIndexOf("/")+1);return Promise.resolve(l)}async function xs(i,e,t,n,s){const o=s.getCode().replace("EPSG:","http://www.opengis.net/def/crs/EPSG/0/"),a=new URL(`${e.toString()}/${t}`),l=await i.fetch(a,{method:"PATCH",body:JSON.stringify({type:"Feature",properties:{},geometry:n}),headers:{"Content-Type":"application/geo+json; charset=utf-8","Content-Crs":`<${o}>`}});if(!l||!l.ok||l.status!==204)throw new Error("Request failed: "+l.status);return Promise.resolve(t)}function Vt(i,e){const t=document.createElement("div");t.className="editing-tooltip editing-tooltip-hidden",t.role="tooltip";const n=document.createElement("span");n.textContent=e,t.appendChild(n);const s=new Fe({element:t,offset:[15,0],positioning:"center-left"}),r=i.on("pointermove",o=>{o.dragging||s.setPosition(o.coordinate)});return i.addOverlay(s),{destroy(){A(r),i.removeOverlay(s)},setVisible(o){t.classList.toggle("editing-tooltip-hidden",!o)},setText(o){n.textContent=o}}}function Ht(i){let e=ht(i.polygon);Array.isArray(e)&&(e=e[0]);let t=ht(i.vertex);Array.isArray(t)&&(t=t[0]);const n=[];return e&&n.push(e),t&&(t.setGeometry(Cs),n.push(t)),n}const Cs=i=>{if(i){const e=i.getGeometry();if(e&&e.getType()==="Polygon"){const t=e.getCoordinates()[0];if(t)return new Un(t)}}},ht=i=>{const e=new Z,n=new ee({style:i}).getStyleFunction();if(!n)throw new Error("can't retrieve style function");const s=n(e,1);if(!s)throw new Error("can't retrieve styles from feature style function");return Array.isArray(s)&&s.length?s.length>1?s:s[0]:s},ws=ge("editing:EditingCreateWorkflowImpl");var R;class bs extends Be{constructor(t){super();x(this,R);y(this,"_httpService");y(this,"_intl");y(this,"_map");y(this,"_polygonStyle");y(this,"_vertexStyle");y(this,"_state");y(this,"_editLayerURL");y(this,"_featureId");y(this,"_editingSource");y(this,"_editingLayer");y(this,"_drawInteraction");y(this,"_olMap");y(this,"_mapContainer");y(this,"_tooltip");y(this,"_enterHandler");y(this,"_escapeHandler");y(this,"_error");y(this,"_interactionListener");y(this,"_mapListener");this._httpService=t.httpService,this._intl=t.intl,this._polygonStyle=t.polygonStyle,this._vertexStyle=t.vertexStyle,this._map=t.map,this._olMap=t.map.olMap,this._state="active:initialized",this._editLayerURL=t.ogcApiFeatureLayerUrl,this._editingSource=new Me,this._editingLayer=new ee({source:this._editingSource,zIndex:$e,properties:{name:"editing-layer"}}),this._drawInteraction=new kt({source:this._editingSource,type:"Polygon",style:Ht({polygon:this._polygonStyle,vertex:this._vertexStyle})}),this._tooltip=Vt(this._olMap,this._intl.formatMessage({id:"create.tooltip.begin"})),this._enterHandler=n=>{if((n.code==="Enter"||n.code==="NumpadEnter")&&n.target===this._olMap.getTargetElement()){const s=this._drawInteraction.getOverlay().getSource()?.getFeatures()??[];s[0]&&s[0].getGeometry().getCoordinates()[0].length>4&&this.triggerSave()}},this._escapeHandler=n=>{n.code==="Escape"&&n.target===this._olMap.getTargetElement()&&this.reset()},this._interactionListener=[],this._mapListener=[],this._start()}getDrawInteraction(){return this._drawInteraction}getState(){return this._state}_setState(t){this._state=t,this.emit(t)}_save(t){this._setState("active:saving");const n=this._editLayerURL,s=t.getGeometry();if(!s){this._destroy(),this._error=new Error("no geometry available"),v(this,R)?.reject(this._error);return}const r=this._olMap.getView().getProjection(),a=new It({dataProjection:r}).writeGeometryObject(s,{rightHanded:!0,decimals:10});Ss(this._httpService,n,a,r).then(l=>{this._featureId=l,this._destroy(),v(this,R)?.resolve({featureId:this._featureId})}).catch(l=>{ws.error(l),this._destroy(),this._error=new Error("Failed to save feature",{cause:l}),v(this,R)?.reject(this._error)})}_start(){this._olMap.addLayer(this._editingLayer),this._olMap.addInteraction(this._drawInteraction),this._mapContainer=this._olMap.getTargetElement()??void 0,this._mapContainer&&(this._mapContainer.addEventListener("keydown",this._enterHandler,!1),this._mapContainer.addEventListener("keydown",this._escapeHandler,!1)),this._tooltip.setVisible(!0);const t=this._drawInteraction.on("drawstart",()=>{this._setState("active:drawing"),this._tooltip.setText(this._intl.formatMessage({id:"create.tooltip.continue"}))}),n=this._drawInteraction.on("drawend",r=>{const o=r.feature;if(!o){this._destroy(),this._error=new Error("no feature available"),v(this,R)?.reject(this._error);return}this._save(o)}),s=this._map.on("changed:container",()=>{this._mapContainer?.removeEventListener("keydown",this._enterHandler),this._mapContainer?.removeEventListener("keydown",this._escapeHandler),this._mapContainer=this._olMap.getTargetElement()??void 0,this._mapContainer&&(this._mapContainer.addEventListener("keydown",this._enterHandler,!1),this._mapContainer.addEventListener("keydown",this._escapeHandler,!1))});this._interactionListener.push(t,n),this._mapListener.push(s)}reset(){this._drawInteraction.abortDrawing(),this._tooltip.setText(this._intl.formatMessage({id:"create.tooltip.begin"})),this._setState("active:initialized")}stop(){this._destroy(),v(this,R)?.resolve(void 0)}_destroy(){this._olMap.removeLayer(this._editingLayer),this._olMap.removeInteraction(this._drawInteraction),this._tooltip.destroy(),this._interactionListener.map(t=>{A(t)}),this._mapListener.map(t=>{t.destroy()}),this._mapContainer?.removeEventListener("keydown",this._enterHandler),this._mapContainer?.removeEventListener("keydown",this._escapeHandler),this._setState("destroyed")}triggerSave(){this._drawInteraction.finishDrawing()}whenComplete(){return this._state==="destroyed"?this._error?Promise.reject(this._error):this._featureId?Promise.resolve({featureId:this._featureId}):Promise.resolve(void 0):(v(this,R)??C(this,R,Mt())).promise}}R=new WeakMap;var I;class Es extends Be{constructor(t){super();x(this,I);y(this,"_httpService");y(this,"_intl");y(this,"_map");y(this,"_polygonStyle");y(this,"_vertexStyle");y(this,"_state");y(this,"_editLayerURL");y(this,"_featureId");y(this,"_initialFeature");y(this,"_editFeature");y(this,"_editingSource");y(this,"_editingLayer");y(this,"_modifyInteraction");y(this,"_olMap");y(this,"_mapContainer");y(this,"_tooltip");y(this,"_enterHandler");y(this,"_escapeHandler");y(this,"_error");y(this,"_interactionListener");y(this,"_mapListener");this._httpService=t.httpService,this._intl=t.intl,this._polygonStyle=t.polygonStyle,this._vertexStyle=t.vertexStyle,this._map=t.map,this._olMap=t.map.olMap,this._state="active:initialized",this._editLayerURL=t.ogcApiFeatureLayerUrl,this._initialFeature=t.feature.clone(),this._initialFeature.setId(t.feature.getId()),this._editFeature=t.feature.clone(),this._editFeature.setId(t.feature.getId()),this._editFeature.setStyle(Ht({polygon:this._polygonStyle,vertex:this._vertexStyle})),this._editingSource=new Me({features:new ye([this._editFeature])}),this._editingLayer=new ee({source:this._editingSource,zIndex:$e,properties:{name:"editing-layer"}}),this._modifyInteraction=new fs({source:this._editingSource}),this._tooltip=Vt(this._olMap,this._intl.formatMessage({id:"create.tooltip.deselect"})),this._enterHandler=n=>{if((n.code==="Enter"||n.code==="NumpadEnter")&&n.target===this._olMap.getTargetElement()){const s=this._editingSource.getFeatures()[0];if(!s)throw Error("no updated feature found");this._save(s)}},this._escapeHandler=n=>{n.code==="Escape"&&n.target===this._olMap.getTargetElement()&&this.reset()},this._interactionListener=[],this._mapListener=[],this._start()}getModifyInteraction(){return this._modifyInteraction}getState(){return this._state}_setState(t){this._state=t,this.emit(t)}_save(t){this._setState("active:saving");const n=this._editLayerURL;if(this._featureId=t.getId()?.toString(),!this._featureId){this._destroy(),this._error=new Error("no feature id available"),v(this,I)?.reject(this._error);return}const s=t?.getGeometry();if(!s){this._destroy(),this._error=new Error("no geometry available"),v(this,I)?.reject(this._error);return}const r=this._olMap.getView().getProjection(),a=new It({dataProjection:r}).writeGeometryObject(s,{rightHanded:!0,decimals:10});xs(this._httpService,n,this._featureId,a,r).then(l=>{this._destroy(),v(this,I)?.resolve({featureId:l})}).catch(l=>{this._destroy(),this._error=new Error("Failed to save feature",{cause:l}),v(this,I)?.reject(this._error)})}_start(){this._olMap.addLayer(this._editingLayer),this._olMap.addInteraction(this._modifyInteraction);const t=this._editingSource.getFeatures()[0];if(t&&!t.getId()?.toString()){this._destroy(),this._error=new Error("no feature id available"),v(this,I)?.reject(this._error);return}this._mapContainer=this._olMap.getTargetElement()??void 0,this._mapContainer&&(this._mapContainer.addEventListener("keydown",this._enterHandler,!1),this._mapContainer.addEventListener("keydown",this._escapeHandler,!1)),this._tooltip.setVisible(!0);const n=this._map.olMap.on("click",o=>{const a=o.coordinate,l=o.originalEvent.altKey,c=this._editingSource.getFeaturesAtCoordinate(a);l||c.length===0&&this.triggerSave()}),s=this._modifyInteraction.on("modifystart",()=>{this._setState("active:drawing")}),r=this._map.on("changed:container",()=>{this._mapContainer?.removeEventListener("keydown",this._enterHandler),this._mapContainer?.removeEventListener("keydown",this._escapeHandler),this._mapContainer=this._olMap.getTargetElement()??void 0,this._mapContainer&&(this._mapContainer.addEventListener("keydown",this._enterHandler,!1),this._mapContainer.addEventListener("keydown",this._escapeHandler,!1))});this._interactionListener.push(n,s),this._mapListener.push(r)}reset(){const t=this._initialFeature.getGeometry()?.clone(),n=this._editingSource.getFeatures()[0];if(!n)throw Error("no updated feature found");n.setGeometry(t),this._setState("active:initialized")}stop(){this._destroy(),v(this,I)?.resolve(void 0)}_destroy(){this._editingSource.clear(),this._olMap.removeLayer(this._editingLayer),this._olMap.removeInteraction(this._modifyInteraction),this._tooltip.destroy(),this._interactionListener.map(t=>{A(t)}),this._mapListener.map(t=>{t.destroy()}),this._mapContainer?.removeEventListener("keydown",this._enterHandler),this._mapContainer?.removeEventListener("keydown",this._escapeHandler),this._setState("destroyed")}triggerSave(){const t=this._editingSource.getFeatures()[0];if(!t)throw Error("no updated feature found");this._save(t)}whenComplete(){return this._state==="destroyed"?this._error?Promise.reject(this._error):this._featureId?Promise.resolve({featureId:this._featureId}):Promise.resolve(void 0):(v(this,I)??C(this,I,Mt())).promise}}I=new WeakMap;class cr{_serviceOptions;_workflows;constructor(e){this._serviceOptions=e,this._workflows=new Map}createFeature(e,t){if(!t||!e||!e.id)throw new Error("Map, mapId or url is undefined.");const n=e.id;let s=this._workflows.get(n);if(s)throw new Error("EditingWorkflow could not be started. EditingWorkflow already in progress for this map.");return s=new bs({map:e,ogcApiFeatureLayerUrl:t,polygonStyle:this._serviceOptions.properties.polygonStyle,vertexStyle:this._serviceOptions.properties.vertexStyle,httpService:this._serviceOptions.references.httpService,intl:this._serviceOptions.intl}),this._workflows.set(n,s),this._connectToWorkflowDestroyEvent(s,n),s}updateFeature(e,t,n){if(!t||!e||!e.id)throw new Error("Map, mapId or url is undefined.");const s=e.id;let r=this._workflows.get(s);if(r)throw new Error("EditingWorkflow could not be started. EditingWorkflow already in progress for this map.");return r=new Es({map:e,ogcApiFeatureLayerUrl:t,feature:n,polygonStyle:this._serviceOptions.properties.polygonStyle,vertexStyle:this._serviceOptions.properties.vertexStyle,httpService:this._serviceOptions.references.httpService,intl:this._serviceOptions.intl}),this._workflows.set(s,r),this._connectToWorkflowDestroyEvent(r,s),r}stop(e){const t=this._workflows.get(e);t&&t.stop()}reset(e){const t=this._workflows.get(e);if(t)t.reset();else throw new Error("No workflow found for mapId: "+e)}_connectToWorkflowDestroyEvent(e,t){e.on("destroyed",()=>{this._workflows.get(t)===e&&this._workflows.delete(t)})}}new _e([407354,5754673]),new _e([404740,5757893]);var W,G,re,oe,ae,Ve;class Ms extends Be{constructor(t,n,s){super();x(this,ae);y(this,"label");x(this,W,{kind:"available"});x(this,G);x(this,re);x(this,oe);this.label=n,C(this,G,t),C(this,oe,s),te(this,ae,Ve).call(this),C(this,re,v(this,G).on("change:visible",()=>{te(this,ae,Ve).call(this)}))}destroy(){A(v(this,re))}get status(){return v(this,W)}async select(t,n){if(t.type!=="extent")throw new Error(`Unsupported selection kind: ${t.type}`);if(v(this,W).kind!=="available"||v(this,G).getSource()===null)return[];const s=[];v(this,G).getSource().forEachFeatureIntersectingExtent(t.extent,a=>{if(!a.getGeometry())return;const l={...a.getProperties()};delete l.geometries;const c={id:a.getId()?.toString()||Fn(),geometry:a.getGeometry(),properties:l};s.push(c)});const r=s.filter(a=>a!=null);return r.length>n.maxResults?r.slice(0,n.maxResults):r}}W=new WeakMap,G=new WeakMap,re=new WeakMap,oe=new WeakMap,ae=new WeakSet,Ve=function(){const n=v(this,G).getVisible()?{kind:"available"}:{kind:"unavailable",reason:v(this,oe)};n.kind!==v(this,W).kind&&(C(this,W,n),this.emit("changed:status"))};var le;class ur{constructor({intl:e}){x(this,le);C(this,le,e)}createSelectionSource(e){return new Ms(e.vectorLayer,e.label,v(this,le).formatMessage({id:"layerNotVisibleReason"}))}}le=new WeakMap;const Ps="@open-pioneer/notifier",Fs=Ue.bind(void 0,Ps);var Bt=At({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"}),Ls=At({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});const Is=!1;function dr(i){const{position:e="top-right"}=i,t=Qn(),n=Fs("notifier.NotificationService"),[s,r]=f.useState(!Is),o=V(l=>{const c=l.level==="error"?d.jsx(Bt,{h:"100%",w:"100%"}):void 0;t({position:e,title:l.title,description:l.message||null,status:l.level,isClosable:!0,duration:l.displayDuration??null,icon:c})}),a=V(()=>{t.closeAll()});return f.useEffect(()=>{const l=n.registerHandler({showNotification:o,closeAll:a});return()=>l.destroy()},[s,n,o,a]),d.jsx(d.Fragment,{})}const Ts="@open-pioneer/coordinate-viewer",ks=z.bind(void 0,Ts),As=4,Ns="decimal",hr=i=>{const{precision:e,displayProjectionCode:t,format:n}=i,{containerProps:s}=H("coordinate-viewer",i),{map:r}=B(i),o=r?.olMap,a=Dt(o)?.getCode()??"";let{coordinates:l}=js(o);l=l&&t?Ds(l,a,t):l;const c=Os(l,e,n),u=t||a,h=c?c+" "+u:"";return d.jsx(P,{...s,children:d.jsx(Q,{className:"coordinate-viewer-text",children:h})})};function Os(i,e,t){const n=ks();return i?Rs(i,e,n,t):""}function js(i){const[e,t]=f.useState();return f.useEffect(()=>{if(!i)return;const n=i.on("pointermove",s=>{t(s.coordinate)});return()=>A(n)},[i]),{coordinates:e}}function Rs(i,e,t,n){if(i[0]==null||i[1]==null)return"";const s=e??As,r=n??Ns,[o,a]=i;let l;if(r==="degree"&&isFinite(o)&&isFinite(a)){const[c,u,h]=gt(o,t,s),[m,g,p]=gt(a,t,s),_=`${Math.abs(c)}°${u}'${h}"${0<=c?"(E)":"(W)"}`,w=`${Math.abs(m)}°${g}'${p}"${0<=m?"(N)":"(S)"}`;l=_+" "+w}else{const c=t.formatNumber(o,{maximumFractionDigits:s,minimumFractionDigits:s}),u=t.formatNumber(a,{maximumFractionDigits:s,minimumFractionDigits:s});l=c+" "+u}return l}function gt(i,e,t){const n=Math.floor(i),s=i-n,r=Math.floor(60*s),a=60*(60*s-r),l=e.formatNumber(a,{maximumFractionDigits:t,minimumFractionDigits:t});return[n,r,l]}function Ds(i,e,t){return Ln(i,e,t)}const gr=i=>{const{displayMode:e="line"}=i,{containerProps:t}=H("scale-bar",i),{map:n}=B(i),s=f.useRef(null);return f.useEffect(()=>{if(s.current&&n){const r=n.olMap,o=new Wn({units:"metric",target:s.current,bar:e==="bar"});return r.addControl(o),()=>{r.removeControl(o)}}},[e,n]),d.jsx(P,{...t,ref:s})},Gs="@open-pioneer/scale-viewer",Vs=z.bind(void 0,Gs),fr=i=>{const{containerProps:e}=H("scale-viewer",i),{map:t}=B(i),n=Vs(),s=gs(t?.olMap),r=s?n.formatNumber(s):void 0;return d.jsx(P,{...e,children:r&&d.jsxs(Q,{children:["1:",r]})})},Hs="@open-pioneer/legend",$t=z.bind(void 0,Hs),mr=i=>{const{showBaseLayers:e=!1}=i,{containerProps:t}=H("legend",i),{map:n}=B(i);return d.jsx(P,{...t,children:n?d.jsx(Bs,{map:n,showBaseLayers:e}):null})};function Bs(i){const{map:e,showBaseLayers:t}=i,s=Ws(e).map(r=>d.jsx(Ut,{layer:r,showBaseLayers:t},r.id));return d.jsx(Yn,{as:"ul",className:"legend-layer-list",listStyleType:"none",spacing:2,children:s})}function Ut(i){const{layer:e,showBaseLayers:t}=i,{isVisible:n}=Ks(e),s=zs(e);if(!n||!t&&Tt(e)&&e.isBaseLayer)return;const r=[];return s?.length&&s.forEach(o=>{r.push(d.jsx(Ut,{layer:o,showBaseLayers:t},o.id))}),d.jsxs(d.Fragment,{children:[d.jsx($s,{layer:e,showBaseLayers:t}),r]})}function $s(i){const e=$t(),{layer:t,showBaseLayers:n}=i,s=qs(t),r=Us(t);let o;s?.Component?o=d.jsx(s.Component,{layer:t}):s?.imageUrl?o=d.jsx(ft,{layer:t,imageUrl:s.imageUrl}):r&&(o=d.jsx(ft,{layer:t,imageUrl:r}));const a=Tt(t)&&t.isBaseLayer;return o?d.jsxs(P,{as:"li",className:Pe("legend-item",`layer-${Ys(t.id)}`),children:[n&&a?d.jsx(Q,{as:"b",children:e.formatMessage({id:"basemapLabel"})}):null,o]}):void 0}function ft(i){const e=$t(),{layer:t,imageUrl:n}=i;return d.jsxs(P,{children:[d.jsx(Q,{children:t.title}),d.jsx(zn,{maxW:"none",maxH:"none",src:n,alt:e.formatMessage({id:"altLabel"},{layerName:t.title}),className:"legend-item__image",fallbackStrategy:"onError",fallback:d.jsx(P,{children:d.jsxs(Q,{children:[d.jsx(Bt,{me:2}),e.formatMessage({id:"fallbackLabel"})]})})})]})}function Us(i){const e=f.useCallback(()=>i.legend,[i]),t=f.useCallback(n=>{const s=i.on("changed:legend",n);return()=>s.destroy()},[i]);return f.useSyncExternalStore(t,e)}function Ws(i){const e=f.useCallback(n=>{const s=i.layers.on("changed",n);return()=>s.destroy()},[i]),t=f.useCallback(()=>{let n=i.layers.getAllLayers({sortByDisplayOrder:!0})??[];return n=n.reverse(),n},[i]);return Wt(e,t)}function zs(i){const e=f.useCallback(n=>{const s=i.sublayers?.on("changed",n);return()=>s?.destroy()},[i]),t=f.useCallback(()=>{if(!i.sublayers)return;let s=i.sublayers?.getSublayers({sortByDisplayOrder:!0});return s=s.reverse(),s},[i]);return Wt(e,t)}function Wt(i,e){const t=f.useRef(),n=f.useCallback(r=>{const o=i(()=>{t.current=void 0,r()});return()=>{t.current=void 0,o()}},[i]),s=f.useCallback(()=>{if(t.current)return t.current.value;const r=e();return t.current={value:r},r},[e]);return f.useSyncExternalStore(n,s)}function Ks(i){const e=f.useCallback(()=>i.visible,[i]),t=f.useCallback(s=>{const r=i.on("changed:visible",s);return()=>r.destroy()},[i]);return{isVisible:f.useSyncExternalStore(t,e)}}function qs(i){const[e,t]=f.useState(void 0);return f.useEffect(()=>{t(i.attributes.legend);const n=i.on("changed:attributes",()=>{t(i.attributes.legend)});return()=>n.destroy()},[i]),e}function Ys(i){return i.toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}const Js="@open-pioneer/measurement",Xs=z.bind(void 0,Js);class Zs{olMap;messages;activeFeatureStyle;layer;source;draw=void 0;activeMeasurement;predefinedMeasurements=new Map;finishedMeasurements=new Set;helpTooltip;resources=[];measurementChangedHandler;constructor(e,t){this.olMap=e,this.messages=t;const n=this.source=new Me;this.layer=new ee({source:n,zIndex:$e,properties:{name:"measurement-layer"}}),e.addLayer(this.layer);const s=e.on("pointermove",this.handlePointerMove.bind(this));this.resources.push({destroy(){A(s)}});const r=()=>{this.helpTooltip.element.classList.add("hidden")};e.getViewport().addEventListener("mouseout",r),this.resources.push({destroy(){e.getViewport().removeEventListener("mouseout",r)}}),this.helpTooltip=ei(this.olMap)}destroy(){this.stopMeasurement();for(const e of this.resources)e.destroy();this.resources=[],this.activeMeasurement=at(this.activeMeasurement);for(const e of this.finishedMeasurements)e.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(e){this.layer.setStyle(e)}setMeasurementSourceChangedHandler(e){this.measurementChangedHandler=e}setPredefinedMeasurements(e){this.updatePredefinedMeasurements(e)}setActiveFeatureStyle(e){const t=In(e);this.activeFeatureStyle=(n,...s)=>{const r=n?.getGeometry()?.getType();if(r==="Polygon"||r==="LineString"||r==="Point")return t(n,...s)},this.draw?.getOverlay().setStyle(this.activeFeatureStyle)}clearMeasurements(){const e=this.source.getFeatures();this.source.clear(),e.forEach(t=>{this.raiseMeasurementsChangeEvent("remove-measurement",t)}),this.predefinedMeasurements.clear();for(const t of this.finishedMeasurements)t.destroy();this.finishedMeasurements.clear()}startMeasurement(e){if(this.draw)throw new Error("Internal error: another measurement interaction is still active.");const t=e==="area"?"Polygon":"LineString",n=this.draw=new kt({source:this.source,type:t,style:this.activeFeatureStyle});this.olMap.addInteraction(n);let s,r;n.on("drawstart",o=>{const a=o.feature;a&&(s=this.activeMeasurement=new mt("active",a,this),r=a.getGeometry()?.on("change",()=>{s?.updateTooltipContent(),s?.updateTooltipPosition()}))}),n.on("drawend",()=>{if(s&&s===this.activeMeasurement){const o=s;o.updateState("finished"),this.finishedMeasurements.add(o),this.raiseMeasurementsChangeEvent("add-measurement",o.feature),this.activeMeasurement=s=void 0}s=void 0,r&&A(r)}),n.on("drawabort",()=>{s&&(s.destroy(),s===this.activeMeasurement&&(this.activeMeasurement=void 0),s=void 0),r&&A(r)})}stopMeasurement(){this.draw&&(this.olMap.removeInteraction(this.draw),this.draw.abortDrawing(),this.draw.dispose(),this.draw=void 0),this.activeMeasurement=at(this.activeMeasurement)}handlePointerMove(e){if(e.dragging)return;const t=this.helpTooltip,n=ni(this.messages,this.activeMeasurement);t.setText(n),t.overlay.setPosition(e.coordinate),t.element.classList.remove("hidden")}updatePredefinedMeasurements(e){const t=e.filter(s=>!this.predefinedMeasurements.has(s)),n=[];for(const s of this.predefinedMeasurements.keys())e.includes(s)||n.push(s);t.forEach(s=>{const r=new Z(s);this.source.addFeature(r);const o=new mt("finished",r,this);this.finishedMeasurements.add(o),this.predefinedMeasurements.set(s,o),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(e,t){const n=t.getGeometry();this.measurementChangedHandler&&n&&this.measurementChangedHandler({kind:e,geometry:(n instanceof ve,n)})}}class mt{controller;feature;_state;tooltip;constructor(e,t,n){this.controller=n,this._state=e,this.feature=t,this.tooltip=ti(this.olMap),this.updateTooltipContent(),this.updateTooltipPosition(),this.tooltip.setActive(e==="active")}destroy(){this.tooltip.destroy()}get state(){return this._state}updateState(e){this._state!==e&&(this._state=e,this.tooltip.setActive(e==="active"))}updateTooltipContent(){const e=this.feature.getGeometry();if(!e)return;const t=this.olMap.getView().getProjection();let n;e instanceof ve?n=si(e,t,this.messages):e instanceof De&&(n=ii(e,t,this.messages)),n&&this.tooltip.setHtml(n)}updateTooltipPosition(){const e=this.feature.getGeometry();if(!e)return;let t;if(e instanceof ve)t=e.getInteriorPoint().getCoordinates()||null;else if(e instanceof De)t=e.getLastCoordinate()||null;else return;this.tooltip.overlay.setPosition(t)}get olMap(){return this.controller.olMap}get messages(){return this.controller.messages}}const pt=[0,-15],Qs=[0,-7];function ei(i){const e=document.createElement("div");e.className="measurement-tooltip printing-hide hidden",e.role="tooltip";const t=document.createElement("span");e.appendChild(t);const n=new Fe({element:e,offset:[15,0],positioning:"center-left"});return i.addOverlay(n),{overlay:n,element:e,destroy(){i.removeOverlay(n)},setText(s){t.textContent=s},setHtml(s){t.innerHTML=s}}}function ti(i){const e=document.createElement("div");e.role="tooltip",e.className="measurement-tooltip measurement-active-tooltip printing-hide";const t=document.createElement("span");e.appendChild(t);const n=new Fe({element:e,offset:pt,positioning:"bottom-center",stopEvent:!1,insertFirst:!1});return i.addOverlay(n),{overlay:n,element:e,destroy(){i.removeOverlay(n)},setActive(s){s?(e.className="measurement-tooltip measurement-active-tooltip printing-hide",n.setOffset(pt)):(e.className="measurement-tooltip measurement-finished-tooltip",n.setOffset(Qs))},setText(s){t.textContent=s},setHtml(s){t.innerHTML=s}}}function ni(i,e){if(e){const t=e.feature.getGeometry();if(t instanceof ve||t instanceof De)return i.getContinueMessage()}return i.getHelpMessage()}function si(i,e,t){const n=Tn(i,{projection:e});let s;return n>=1e6?s=`${t.formatNumber(n/1e6)} km2`:s=`${t.formatNumber(n)} m2`,s}function ii(i,e,t){const n=kn(i,{projection:e});let s;return n>=1e3?s=`${t.formatNumber(n/1e3)} km`:s=`${t.formatNumber(n)} m`,s}const pr=i=>{const e=Xs(),{containerProps:t}=H("measurement",i),[n,s]=f.useState("distance"),r=u=>e.formatMessage({id:u}),o=B(i),a=ri(o.map,i,e);f.useEffect(()=>{if(a)return a.startMeasurement(n),()=>{a.stopMeasurement()}},[a,n]);function l(u){if(u==="distance"||u==="area")s(u);else throw new Error(`Unexpected measurement type: '${u}'.`)}function c(){a?.clearMeasurements()}return d.jsxs(P,{...t,children:[d.jsx(Q,{mb:3,children:e.formatMessage({id:"measurementInfoText"})}),d.jsx(xe,{mb:4,alignItems:"center",children:d.jsxs(Ge,{mb:2,children:[d.jsx(Ce,{mb:1,children:r("measurementLabel")}),d.jsxs(Ke,{value:n,onChange:u=>l(u.target.value),className:"measurement-select",children:[d.jsx("option",{value:"distance",children:r("distance")}),d.jsx("option",{value:"area",children:r("area")})]})]})}),d.jsx(Pt,{padding:2,className:"measurement-delete-button",onClick:c,width:"100%",children:r("deleteMeasurementLabel")})]})};function ri(i,e,t){const{activeFeatureStyle:n,finishedFeatureStyle:s,onMeasurementsChange:r,predefinedMeasurements:o}=e,[a,l]=f.useState(void 0);return f.useEffect(()=>{if(!i)return;const c=new Zs(i.olMap,{getContinueMessage(){return t.formatMessage({id:"tooltips.continue"})},getHelpMessage(){return t.formatMessage({id:"tooltips.help"})},formatNumber(u){return t.formatNumber(u,{maximumFractionDigits:2})}});return l(c),()=>{c.destroy(),l(void 0)}},[i,t]),f.useEffect(()=>{a?.setActiveFeatureStyle(n??oi())},[a,n]),f.useEffect(()=>{a?.setFinishedFeatureStyle(s??ai())},[a,s]),f.useEffect(()=>{a?.setMeasurementSourceChangedHandler(r)},[a,r]),f.useEffect(()=>{a?.setPredefinedMeasurements(o??[])},[a,o]),a}function oi(){return[new Se({stroke:new se({color:"#fff",lineDash:[10,10],width:5})}),new Se({fill:new Re({color:"rgba(0,0,0,0.15)"}),stroke:new se({color:"rgba(0, 0, 0, 0.7)",lineDash:[10,10],width:3}),image:new An({radius:5,stroke:new se({color:"rgba(0, 0, 0, 0.7)",width:2}),fill:new Re({color:"rgba(255, 255, 255, 0.2)"})})})]}function ai(){return[new Se({stroke:new se({color:"#fff",width:5})}),new Se({stroke:new se({color:"#0b96fc",width:3}),fill:new Re({color:"rgba(11,150,252,0.15)"})})]}const li="@open-pioneer/search",Le=z.bind(void 0,li);function ci(i){const e=i.selectProps.inputValue.length>0,t={...i,className:Pe(i.className,{"search-invisible":!e})};return d.jsx(N.Menu,{...t,children:i.children})}function ui(i){const e=i.data.label,t={...i.innerProps,"aria-label":e,role:"group"};return d.jsx(N.Group,{...i,innerProps:t})}function di(i){const t=Le().formatMessage({id:"noOptionsText"});return d.jsx(N.NoOptionsMessage,{...i,children:d.jsx(D.span,{className:"search-no-match",children:t})})}function hi(i){const t=Le().formatMessage({id:"loadingText"});return d.jsx(N.LoadingMessage,{...i,children:d.jsx(D.span,{className:"search-loading-text",children:t})})}function gi({children:i,...e}){const t={...e,className:Pe(e.className,"search-value-container")};return d.jsxs(N.ValueContainer,{...t,children:[!!i&&d.jsx(Ls,{style:{position:"absolute",left:8}}),i]})}function fi(i){const e={...i,isHidden:!1};return d.jsx(N.Input,{...e})}function mi(i){return null}function pi(i){return d.jsxs(N.IndicatorsContainer,{...i,children:[i.children,!i.selectProps.isLoading&&i.selectProps.inputValue&&d.jsx(yi,{selectProps:i.selectProps,clearValue:i.clearValue})]})}function yi(i){const t=Le().formatMessage({id:"ariaLabel.clearButton"}),n=s=>{s.preventDefault(),s.stopPropagation(),i.clearValue()};return d.jsx(Vn,{role:"button",size:"md",mr:1,"aria-label":t,onClick:n,onTouchEnd:n,onMouseDown:s=>s.preventDefault()})}function _i(i){return null}function vi(i){const e=i.selectProps.inputValue,t=i.data.label,n={...i,className:Pe(i.className,"search-option")};return d.jsx(N.Option,{...n,children:d.jsx(D.div,{className:"search-option-label",children:e.trim().length>0?Si(t,e):t})})}function Si(i,e){const t=i.toLowerCase().indexOf(e.toLowerCase());return t>=0?d.jsxs(d.Fragment,{children:[i.substring(0,t),d.jsx(D.span,{className:"search-highlighted-match",children:i.substring(t,t+e.length)},"highlighted"),i.substring(t+e.length)]}):i}const yt=ge("search:SearchController"),_t=200,vt=5;var ce,Y,J,X,T,be,zt;class xi{constructor(e,t){x(this,be);x(this,ce);x(this,Y,[]);x(this,J,vt);x(this,X,_t);x(this,T);C(this,ce,e),C(this,Y,t)}destroy(){v(this,T)?.abort(),C(this,T,void 0)}async search(e){if(v(this,T)?.abort(),C(this,T,void 0),!e)return[];const t=C(this,T,new AbortController);try{return await Ci(t.signal,v(this,X)),t.signal.aborted&&(yt.debug(`search canceled with ${e}`),Hn()),(await Promise.all(v(this,Y).map(s=>te(this,be,zt).call(this,s,e,t.signal)))).filter(s=>s!=null)}finally{v(this,T)===t&&C(this,T,void 0)}}get searchTypingDelay(){return v(this,X)}set searchTypingDelay(e){C(this,X,e??_t)}get maxResultsPerSource(){return v(this,J)}set maxResultsPerSource(e){C(this,J,e??vt)}get sources(){return v(this,Y)}}ce=new WeakMap,Y=new WeakMap,J=new WeakMap,X=new WeakMap,T=new WeakMap,be=new WeakSet,zt=async function(e,t,n){const s=e.label,r=v(this,ce).olMap.getView().getProjection();try{const o=v(this,J);let a=await e.search(t,{maxResults:o,signal:n,mapProjection:r});return a.length>o&&(a=a.slice(0,o)),{label:s,source:e,results:a}}catch(o){Ft(o)||yt.error(`search for source ${s} failed`,o);return}};async function Ci(i,e){i.aborted||await new Promise(t=>{const n=()=>{i.removeEventListener("abort",n),clearTimeout(s),t()};i.addEventListener("abort",n);const s=setTimeout(n,e)})}const we=ge("search:Search"),yr=i=>{const{sources:e,searchTypingDelay:t,maxResultsPerGroup:n,onSelect:s,onClear:r}=i,{containerProps:o}=H("search",i),{map:a}=B(i),l=Le(),c=Mi(e,t,n,a),{input:u,search:h,selectedOption:m,onInputChanged:g,onResultConfirmed:p}=Pi(c),_=Ei(),w=wi(l),F=bi(),O=V((E,$)=>{$.action==="input-change"&&g(E)}),S=V((E,$)=>{switch($.action){case"select-option":E&&(p(E),s?.({source:E.source,result:E.result}));break;case"clear":g(""),L.current?.blur(),L.current?.focus(),r?.();break;default:we.debug(`Unhandled action type '${$.action}'.`);break}}),L=f.useRef(null);return d.jsx(P,{...o,children:d.jsx(Ot,{className:"search-component",classNamePrefix:"react-select",ref:L,inputValue:u,onInputChange:O,"aria-label":l.formatMessage({id:"ariaLabel.search"}),ariaLiveMessages:w,colorScheme:"trails",selectedOptionStyle:"color",selectedOptionColorScheme:"trails",chakraStyles:_,isClearable:!0,placeholder:l.formatMessage({id:"searchPlaceholder"}),closeMenuOnSelect:!0,isLoading:h.kind==="loading",options:h.kind==="ready"?h.results:void 0,filterOption:()=>!0,tabSelectsValue:!1,components:F,onChange:S,value:m,menuPosition:"fixed"})})};function wi(i){return f.useMemo(()=>({onFocus:()=>"",onChange:()=>"",guidance:()=>`${i.formatMessage({id:"ariaLabel.instructions"})}`,onFilter:()=>""}),[i])}function bi(){return f.useMemo(()=>({Menu:ci,Input:fi,SingleValue:mi,Option:vi,NoOptionsMessage:di,LoadingMessage:hi,ValueContainer:gi,IndicatorsContainer:pi,ClearIndicator:_i,Group:ui}),[])}function Ei(){const[i,e]=Lt("colors",["trails.100","trails.50"],["#d5e5ec","#eaf2f5"]);return f.useMemo(()=>({groupHeading:n=>({...n,backgroundColor:i,padding:"8px 12px",fontSize:"inherit",fontWeight:"inherit"}),option:n=>({...n,backgroundColor:"inherit",_focus:{backgroundColor:e}}),dropdownIndicator:n=>({...n,display:"none"})}),[i,e])}function Mi(i,e,t,n){const[s,r]=f.useState(void 0);return f.useEffect(()=>{if(!n)return;const o=new xi(n,i);return r(o),()=>{o.destroy(),r(void 0)}},[n,i]),f.useEffect(()=>{s&&(s.searchTypingDelay=e)},[s,e]),f.useEffect(()=>{s&&(s.maxResultsPerSource=t)},[s,t]),s}function Pi(i){const[e,t]=f.useReducer((a,l)=>{switch(l.kind){case"input":return{...a,query:l.query,selectedOption:null};case"select-option":return{...a,selectedOption:l.option,query:l.option.label};case"load-results":return{...a,search:{kind:"loading"}};case"accept-results":return{...a,search:{kind:"ready",results:l.results}}}},void 0,()=>({query:"",selectedOption:null,search:{kind:"ready",results:[]}})),n=f.useRef(),s=V(a=>{if(!i){n.current=void 0,t({kind:"accept-results",results:[]});return}we.isDebug()&&we.debug(`Starting new search for query ${JSON.stringify(a)}.`),t({kind:"load-results"});const l=n.current=Fi(i,a).then(c=>{n.current===l&&t({kind:"accept-results",results:c})})}),r=f.useCallback(a=>{t({kind:"select-option",option:a})},[]),o=f.useCallback(a=>{t({kind:"input",query:a}),s(a)},[s]);return{input:e.query,search:e.search,selectedOption:e.selectedOption,onResultConfirmed:r,onInputChanged:o}}async function Fi(i,e){let t;try{t=await i.search(e)}catch(n){Ft(n)||we.error("Search failed",n),t=[]}return Li(t)}function Li(i){return i.map((t,n)=>({label:t.label,options:t.results.map(s=>({value:`${n}-${s.id}`,label:s.label,source:t.source,result:s}))}))}const Kt="@open-pioneer/selection",Ii=Ue.bind(void 0,Kt),Je=z.bind(void 0,Kt),ne="selection-active",pe="selection-inactive";class Ti{tooltip;interactionResources=[];olMap;isActive=!0;tooltipMessage;tooltipDisabledMessage;constructor(e,t,n,s){const r=this.initViewport(e);this.interactionResources.push(this.createDragBox(e,s,r,this.interactionResources)),this.interactionResources.push(this.createDrag(e,r,this.interactionResources)),this.tooltip=this.createHelpTooltip(e,t),this.olMap=e,this.tooltipMessage=t,this.tooltipDisabledMessage=n}initViewport(e){const t=e.getViewport();return t.classList.add(ne),t.oncontextmenu=n=>(n.preventDefault(),!1),t}destroy(){this.tooltip.destroy(),this.interactionResources.forEach(e=>{e.destroy()})}setActive(e){if(this.isActive===e)return;const t=this.olMap.getViewport();e?(this.interactionResources.forEach(n=>this.olMap.addInteraction(n.interaction)),this.tooltip.setText(this.tooltipMessage),t.classList.remove(pe),t.classList.add(ne),this.isActive=!0):(this.interactionResources.forEach(n=>this.olMap.removeInteraction(n.interaction)),this.tooltip.setText(this.tooltipDisabledMessage),t.classList.remove(ne),t.classList.add(pe),this.isActive=!1)}createDragBox(e,t,n,s){const r=new it({className:"selection-drag-box",condition:Nn});return e.addInteraction(r),r.on("boxend",function(){t(r.getGeometry())}),{interaction:r,destroy(){e.removeInteraction(r),s.splice(s.indexOf(this)),r.dispose(),n.classList.remove(ne),n.classList.remove(pe),n.oncontextmenu=null}}}createDrag(e,t,n){const s=function(a){return a.originalEvent.button==2},r=new rt({condition:s});return e.addInteraction(r),{interaction:r,destroy(){e.removeInteraction(r),n.splice(n.indexOf(this)),r.dispose(),t.classList.remove(ne),t.classList.remove(pe),t.oncontextmenu=null}}}createHelpTooltip(e,t){const n=document.createElement("div");n.className="selection-tooltip printing-hide",n.role="tooltip";const s=document.createElement("span");s.textContent=t,n.appendChild(s);const r=new Fe({element:n,offset:[15,0],positioning:"center-left"}),o=e.on("pointermove",a=>{r.setPosition(a.coordinate)});return e.addOverlay(r),{overlay:r,element:n,destroy(){e.removeOverlay(r),r.dispose(),A(o)},setText(a){s.textContent=a}}}getDragboxInteraction(){return this.interactionResources.find(e=>e.interaction instanceof it)}getDragPanInteraction(){return this.interactionResources.find(e=>e.interaction instanceof rt)}}const Ne=ge("selection:SelectionController"),ki=1e4;var ue,de,he,Ee,qt;class Ai{constructor(e){x(this,Ee);x(this,ue);x(this,de);x(this,he);const{mapModel:t,onError:n,maxResults:s=ki}=e;C(this,ue,t),C(this,de,s),C(this,he,n)}destroy(){}async select(e,t){if(t)return await te(this,Ee,qt).call(this,e,t)}}ue=new WeakMap,de=new WeakMap,he=new WeakMap,Ee=new WeakSet,qt=async function(e,t){const n=v(this,ue).olMap.getView().getProjection();try{Ne.debug(`Starting selection on source '${e.label}'`);const s=v(this,de);let r=await e.select({type:"extent",extent:t},{maxResults:s,mapProjection:n,signal:new AbortController().signal});return r.length>s&&(r=r.slice(0,s)),Ne.debug(`Found ${r.length} results on source '${e.label}'`),{source:e,results:r}}catch(s){Ne.error(`selection from source ${e.label} failed`,s),v(this,he).call(this);return}};const Ni={classNamePrefix:"react-select",menuPosition:"fixed",isSearchable:!1,isClearable:!1},_r=i=>{const e=Je(),{sources:t,onSelectionComplete:n,onSelectionSourceChanged:s}=i,{containerProps:r}=H("selection",i),o=e.formatMessage({id:"sourceNotAvailable"}),[a,l]=Ri(t,s),c=Jt(a,o),u=B(i),{onExtentSelected:h}=Di(u.map,t,a,n),m=Vi(),[g,p]=f.useState(!1);Gi(u.map,e,h,c.kind==="available",!!a);const _=f.useMemo(()=>t.map(S=>({label:S.label,value:S})),[t]),w=f.useMemo(()=>_.find(L=>L.value===a)||null,[_,a]),F=V(S=>{l(S?.value)}),O=V(S=>{!g&&S.key==="Enter"&&p(!0)});return d.jsx(Jn,{...r,spacing:2,children:d.jsxs(xe,{children:[d.jsx(Ce,{children:e.formatMessage({id:"selectSource"})}),d.jsx(Ot,{className:"selection-source react-select",...Ni,options:_,placeholder:e.formatMessage({id:"selectionPlaceholder"}),value:w,onChange:F,components:{Option:Oi,SingleValue:ji},isOptionDisabled:()=>!1,getOptionLabel:S=>{const L=S.label,E=He(S.value,o);return E.kind=="available"?L:L+" "+E.reason},ariaLiveMessages:{guidance:()=>"",onChange:S=>S.action=="select-option"||S.action=="initial-input-focus"?S.label+" "+e.formatMessage({id:"selected"}):"",onFilter:()=>"",onFocus:()=>""},chakraStyles:m,onKeyDown:O,menuIsOpen:g,onMenuOpen:()=>p(!0),onMenuClose:()=>p(!1)})]})})};function Oi(i){const{value:e}=i.data,{isAvailable:t,content:n}=Yt(e,!1);return d.jsx(N.Option,{...i,isDisabled:!t,className:"selection-source-option",children:n})}function ji(i){const{value:e}=i.data,{isAvailable:t,content:n}=Yt(e,!0),s=t?"selection-source-value":"selection-source-value selection-source-value--disabled";return d.jsx(N.SingleValue,{...i,isDisabled:!t,className:s,children:n})}function Ri(i,e){const[t,n]=f.useState(()=>i[0]);f.useEffect(()=>{t&&!i.includes(t)&&n(void 0)},[i,t]);const s=f.useRef(void 0);return f.useEffect(()=>{t!==s.current&&(s.current=t,e?.({source:t}))},[t,e]),[t,n]}function Yt(i,e){const t=Je(),n=i?.label,s=t.formatMessage({id:"sourceNotAvailable"}),r=Jt(i,s);return{isAvailable:r.kind==="available",content:d.jsxs(ot,{direction:"row",alignItems:"center",grow:1,children:[!e&&d.jsx(ot,{grow:1,children:n}),r.kind==="unavailable"&&d.jsx(P,{ml:2,children:d.jsx(Bn,{label:r.reason,placement:"right",openDelay:500,children:d.jsx(D.span,{children:d.jsx($n,{as:Xn,color:"red",className:"warning-icon","aria-label":r.reason})})})}),e&&n]})}}function Di(i,e,t,n){const s=Ii("notifier.NotificationService"),r=Je(),[o,a]=f.useState(void 0);f.useEffect(()=>{if(!i)return;const c=new Ai({mapModel:i,onError(){s.notify({level:"error",message:r.formatMessage({id:"selectionFailed"})})}});return a(c),()=>{c.destroy()}},[i,s,e,r]);const l=V(async c=>{if(!o||!t)return;const u=await o.select(t,c.getExtent());u&&n?.(u)});return{controller:o,onExtentSelected:l}}function He(i,e){const t=i.status??"available",n=typeof t=="string"?{kind:t}:t;return n.kind==="available"?n:{kind:"unavailable",reason:n.reason??e}}function Jt(i,e){const[t,n]=f.useState(()=>({kind:"unavailable",reason:e}));return f.useEffect(()=>{if(!i){n({kind:"unavailable",reason:e});return}n(He(i,e));const s=i.on?.("changed:status",()=>{n(He(i,e))});return()=>s?.destroy()},[i,e]),t}function Gi(i,e,t,n,s){f.useEffect(()=>{if(!i)return;const r=s?e.formatMessage({id:"disabledTooltip"}):e.formatMessage({id:"noSourceTooltip"}),o=new Ti(i.olMap,e.formatMessage({id:"tooltip"}),r,t);return o.setActive(n),()=>{o?.destroy()}},[i,e,t,n,s])}function Vi(){const[i,e]=Lt("colors",["background_body","border"],["#ffffff","#ffffff"]);return f.useMemo(()=>({control:n=>({...n,cursor:"pointer"}),indicatorSeparator:n=>({...n,borderColor:e}),dropdownIndicator:n=>({...n,backgroundColor:i})}),[i,e])}const Xt="@open-pioneer/printing",Zt=Ue.bind(void 0,Xt),Hi=z.bind(void 0,Xt),Bi="map";class $i{olMap;i18n;printingService;viewPadding;printMap=void 0;overlay=void 0;constructor(e,t,n){this.olMap=e,this.printingService=t,this.i18n=n}destroy(){this.reset()}setViewPadding(e){this.viewPadding=e}async handleMapExport(e){if(this.olMap)try{this.begin(),this.printMap=await this.printingService.printMap(this.olMap,{blockUserInteraction:!1,viewPadding:this.viewPadding});const t=this.printMap.getCanvas();if(t)e.fileFormat=="png"?await this.exportMapInPNG(t,e):await this.exportMapInPDF(t,e);else throw new Error("Canvas export failed")}finally{this.reset()}}begin(){const e=this.olMap.getTargetElement();e&&(this.overlay=Kn(e,this.i18n.overlayText))}reset(){this.overlay?.destroy(),this.overlay=void 0}getTitleAndFileName(e){const t=e.title||"",n=e.title||Bi;return{title:t,fileName:n}}async exportMapInPNG(e,t){const n=document.createElement("canvas");n.width=e.width,n.height=e.height+50,n.style.backgroundColor="#fff";const s=n.getContext("2d");if(!s)throw new Error("2d canvas rendering context not available");const{title:r,fileName:o}=this.getTitleAndFileName(t);s.fillStyle="#fff",s.fillRect(0,0,n.width,n.height),s.font="20px bold sans-serif",s.textAlign="center",s.fillStyle="#000";const a=n.width/2;s.fillText(r,a,20),s.drawImage(e,0,50);const l=document.createElement("a");l.setAttribute("download",o+".png");const c=qn(n);if(!c)throw new Error("Failed to get image data URL");l.href=c,l.click()}async exportMapInPDF(e,t){const{jsPDF:n}=await Zn(async()=>{const{jsPDF:F}=await import("./QpsqTuY2Z5jc.js");return{jsPDF:F}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),s=new n({orientation:"landscape",unit:"mm",format:"a4"}),r=s.internal.pageSize.getWidth(),o=s.internal.pageSize.getHeight(),a=15,l=20,c=o-l;s.setFontSize(20);const{title:u,fileName:h}=this.getTitleAndFileName(t);s.text(u,r/2,a,{align:"center"});const m=e.width/e.height;let g=c,p=g*m;p>=r&&(p=r,g=p/m);const _=(r-p)/2,w=l+(c-g)/2;s.addImage(e,"",_,w,p,g),s.save(h+".pdf")}}const Ui=ge("printing"),vr=i=>{const e=Hi(),{viewPadding:t="auto"}=i,{containerProps:n}=H("printing",i),[s,r]=f.useState("pdf"),[o,a]=f.useState(""),[l,c]=f.useState(!1),u=Zt("notifier.NotificationService"),{map:h}=B(i),m=Wi(h,e,t);function g(_){(_==="png"||_==="pdf")&&r(_)}function p(){l||!m||(c(!0),m.handleMapExport({title:o,fileFormat:s}).catch(_=>{const w=e.formatMessage({id:"printingFailed"});u.notify({level:"error",message:w}),Ui.error("Failed to print the map",_)}).finally(()=>{c(!1)}))}return d.jsx(P,{...n,children:d.jsxs(P,{as:"form",m:2,alignItems:"center",onSubmit:_=>{_.preventDefault(),p()},children:[d.jsxs(xe,{as:Ge,mb:2,children:[d.jsx(Ce,{minWidth:"82",mb:1,children:e.formatMessage({id:"title"})}),d.jsx(ze,{placeholder:e.formatMessage({id:"input.placeholder"}),value:o,onChange:_=>{a(_.target.value)},autoFocus:!0})]}),d.jsxs(xe,{as:Ge,mb:2,children:[d.jsx(Ce,{minWidth:"82",mb:1,children:e.formatMessage({id:"fileFormat"})}),d.jsxs(Ke,{value:s,onChange:_=>g(_.target.value),className:"printing-select",children:[d.jsx("option",{value:"png",children:"PNG"}),d.jsx("option",{value:"pdf",children:"PDF"})]})]}),d.jsx(Pt,{isLoading:l,loadingText:e.formatMessage({id:"printingMap"}),disabled:l,mt:2,p:2,className:"printing-export-button",type:"submit",width:"100%",children:e.formatMessage({id:"export"})})]})})};function Wi(i,e,t){const n=Zt("printing.PrintingService"),[s,r]=f.useState(void 0);return f.useEffect(()=>{if(!i)return;const o=new $i(i.olMap,n,{overlayText:e.formatMessage({id:"printingMap"})});return r(o),()=>{o.destroy(),r(void 0)}},[i,e,n]),f.useEffect(()=>{s?.setViewPadding(t)},[s,t]),s}export{hr as C,cr as E,ze as I,mr as L,pr as M,dr as N,Fe as O,vr as P,Gt as S,ur as V,lr as W,gr as a,fr as b,yr as c,_r as d,Dt as e,Ke as f,gs as u}; +var Qt=Object.defineProperty;var Xe=i=>{throw TypeError(i)};var en=(i,e,t)=>e in i?Qt(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var y=(i,e,t)=>en(i,typeof e!="symbol"?e+"":e,t),Ie=(i,e,t)=>e.has(i)||Xe("Cannot "+t);var v=(i,e,t)=>(Ie(i,e,"read from private field"),t?t.call(i):e.get(i)),x=(i,e,t)=>e.has(i)?Xe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),C=(i,e,t,n)=>(Ie(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t),te=(i,e,t)=>(Ie(i,e,"access private method"),t);import{aF as tn,b7 as nn,b8 as sn,b9 as rn,ba as on,aQ as an,aY as ln,bb as cn,bc as un,a1 as dn,bd as hn,b1 as gn,h as A,be as fn,bf as mn,bg as pn,bh as St,bi as yn,bj as _n,a as ee,b as Me,aM as ye,bk as Ze,bl as K,E as Qe,$ as j,bm as Te,a$ as Z,ao as _e,bn as fe,bo as et,bp as k,m as M,bq as U,br as Oe,bs as vn,bt as Sn,x as xn,bu as je,bv as Cn,bw as wn,bx as xt,ap as Ct,by as bn,bz as En,bA as tt,bB as Mn,bC as nt,bD as Pn,bE as st,bF as Be,b0 as $e,b2 as Fn,d as Ue,u as z,a_ as H,g as B,B as P,b6 as Ln,b5 as Pe,bG as In,an as ve,bH as Tn,bI as kn,c as Se,ay as se,F as Re,C as An,bJ as it,bK as Nn,bL as rt,i as ot}from"./B36mctiVgF5V.js";import{p as On,q as jn,r as f,s as Rn,h as We,u as wt,o as bt,k as Et,j as d,l as D,t as Dn,v as Gn,c as ge,b as Mt,w as at,B as Pt,C as Vn,x as Hn,i as Ft,y as Lt,n as Bn,I as $n}from"./CzUo6bX8-UUU.js";import{G as It,i as Tt}from"./C1o_VwAkx5Nm.js";import{a as Un}from"./DNaBv0QziP17.js";import{D as kt,S as Wn,I as zn,c as Kn,a as qn}from"./DWXpGWYm5O7q.js";import{u as V}from"./E5Cg9XwqIVqj.js";import{T as Q,L as Yn,V as Jn}from"./CovJx79h1x39.js";import{c as At}from"./SSUBJAaBGB7g.js";import{L as De}from"./Di-_YM5QvGet.js";import{u as Nt,F as xe}from"./0jkoYKtubXoE.js";import{F as Ce}from"./DAtS2L2h2gmX.js";import{H as Ge}from"./_YjaCHRtWzU8.js";import{F as N,r as Ot}from"./_05fvbTuDT_t.js";import{F as Xn}from"./CkG3hRXjrvfc.js";import{_ as Zn}from"./CmsKOCeNyeyo.js";function Qn(i){const{theme:e}=On(),t=jn();return f.useMemo(()=>Rn(e.direction,{...t,...i}),[i,e.direction,t])}var ze=We(function(e,t){const{htmlSize:n,...s}=e,r=wt("Input",s),o=bt(s),a=Nt(o),l=Et("chakra-input",e.className);return d.jsx(D.input,{size:n,...a,__css:r.field,ref:t,className:l})});ze.displayName="Input";ze.id="Input";var jt=We(function(e,t){const{children:n,placeholder:s,className:r,...o}=e;return d.jsxs(D.select,{...o,ref:t,className:Et("chakra-select",r),children:[s&&d.jsx("option",{value:"",children:s}),n]})});jt.displayName="SelectField";function es(i,e){const t={},n={};for(const[s,r]of Object.entries(i))e.includes(s)?t[s]=r:n[s]=r;return[t,n]}var Ke=We((i,e)=>{var t;const n=wt("Select",i),{rootProps:s,placeholder:r,icon:o,color:a,height:l,h:c,minH:u,minHeight:h,iconColor:m,iconSize:g,...p}=bt(i),[_,w]=es(p,Gn),F=Nt(w),O={width:"100%",height:"fit-content",position:"relative",color:a},S={paddingEnd:"2rem",...n.field,_focus:{zIndex:"unset",...(t=n.field)==null?void 0:t._focus}};return d.jsxs(D.div,{className:"chakra-select__wrapper",__css:O,..._,...s,children:[d.jsx(jt,{ref:e,height:c??l,minH:u??h,placeholder:r,...F,__css:S,children:i.children}),d.jsx(Rt,{"data-disabled":Dn(F.disabled),...(m||a)&&{color:m||a},__css:n.icon,...g&&{fontSize:g},children:o})]})});Ke.displayName="Select";var ts=i=>d.jsx("svg",{viewBox:"0 0 24 24",...i,children:d.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),ns=D("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),Rt=i=>{const{children:e=d.jsx(ts,{}),...t}=i,n=f.cloneElement(e,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return d.jsx(ns,{...t,className:"chakra-select__icon-wrapper",children:f.isValidElement(e)?n:null})};Rt.displayName="SelectIcon";const b={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class Fe extends tn{constructor(e){super(),this.on,this.once,this.un,this.options=e,this.id=e.id,this.insertFirst=e.insertFirst!==void 0?e.insertFirst:!0,this.stopEvent=e.stopEvent!==void 0?e.stopEvent:!0,this.element=document.createElement("div"),this.element.className=e.className!==void 0?e.className:"ol-overlay-container "+nn,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=e.autoPan===!0?{}:e.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(b.ELEMENT,this.handleElementChanged),this.addChangeListener(b.MAP,this.handleMapChanged),this.addChangeListener(b.OFFSET,this.handleOffsetChanged),this.addChangeListener(b.POSITION,this.handlePositionChanged),this.addChangeListener(b.POSITIONING,this.handlePositioningChanged),e.element!==void 0&&this.setElement(e.element),this.setOffset(e.offset!==void 0?e.offset:[0,0]),this.setPositioning(e.positioning||"top-left"),e.position!==void 0&&this.setPosition(e.position)}getElement(){return this.get(b.ELEMENT)}getId(){return this.id}getMap(){return this.get(b.MAP)||null}getOffset(){return this.get(b.OFFSET)}getPosition(){return this.get(b.POSITION)}getPositioning(){return this.get(b.POSITIONING)}handleElementChanged(){sn(this.element);const e=this.getElement();e&&this.element.appendChild(e)}handleMapChanged(){this.mapPostrenderListenerKey&&(rn(this.element),on(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const e=this.getMap();if(e){this.mapPostrenderListenerKey=an(e,ln.POSTRENDER,this.render,this),this.updatePixelPosition();const t=this.stopEvent?e.getOverlayContainerStopEvent():e.getOverlayContainer();this.insertFirst?t.insertBefore(this.element,t.childNodes[0]||null):t.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(e){this.set(b.ELEMENT,e)}setMap(e){this.set(b.MAP,e)}setOffset(e){this.set(b.OFFSET,e)}setPosition(e){this.set(b.POSITION,e)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(e){const t=this.getMap();if(!t||!t.getTargetElement()||!this.get(b.POSITION))return;const n=this.getRect(t.getTargetElement(),t.getSize()),s=this.getElement(),r=this.getRect(s,[cn(s),un(s)]);e=e||{};const o=e.margin===void 0?20:e.margin;if(!dn(n,r)){const a=r[0]-n[0],l=n[2]-r[2],c=r[1]-n[1],u=n[3]-r[3],h=[0,0];if(a<0?h[0]=a-o:l<0&&(h[0]=Math.abs(l)+o),c<0?h[1]=c-o:u<0&&(h[1]=Math.abs(u)+o),h[0]!==0||h[1]!==0){const m=t.getView().getCenterInternal(),g=t.getPixelFromCoordinateInternal(m);if(!g)return;const p=[g[0]+h[0],g[1]+h[1]],_=e.animation||{};t.getView().animateInternal({center:t.getCoordinateFromPixelInternal(p),duration:_.duration,easing:_.easing})}}}getRect(e,t){const n=e.getBoundingClientRect(),s=n.left+window.pageXOffset,r=n.top+window.pageYOffset;return[s,r,s+t[0],r+t[1]]}setPositioning(e){this.set(b.POSITIONING,e)}setVisible(e){this.rendered.visible!==e&&(this.element.style.display=e?"":"none",this.rendered.visible=e)}updatePixelPosition(){const e=this.getMap(),t=this.getPosition();if(!e||!e.isRendered()||!t){this.setVisible(!1);return}const n=e.getPixelFromCoordinate(t),s=e.getSize();this.updateRenderedPosition(n,s)}updateRenderedPosition(e,t){const n=this.element.style,s=this.getOffset(),r=this.getPositioning();this.setVisible(!0);const o=Math.round(e[0]+s[0])+"px",a=Math.round(e[1]+s[1])+"px";let l="0%",c="0%";r=="bottom-right"||r=="center-right"||r=="top-right"?l="-100%":(r=="bottom-center"||r=="center-center"||r=="top-center")&&(l="-50%"),r=="bottom-left"||r=="bottom-center"||r=="bottom-right"?c="-100%":(r=="center-left"||r=="center-center"||r=="center-right")&&(c="-50%");const u=`translate(${l}, ${c}) translate(${o}, ${a})`;this.rendered.transform_!=u&&(this.rendered.transform_=u,n.transform=u)}getOptions(){return this.options}}const lr=hn,ss=25.4/.28,is=39.37;function qe(i){return Ye(i,rs,os)}function rs(i){return i.getView()}function os(i,e){return i.on("change:view",e)}function Dt(i){return qe(i)?.getProjection()}function as(i){const e=qe(i);return Ye(e,ls,cs)}function ls(i){return i.getResolution()}function cs(i,e){return i.on("change:resolution",e)}function us(i){const e=qe(i);return Ye(e,ds,hs)}function ds(i){return i.getCenter()}function hs(i,e){return i.on("change:center",e)}function gs(i){const e=us(i),t=as(i),n=Dt(i);return f.useMemo(()=>{if(n==null||t==null||e==null)return;const r=gn(n,t,e);return Math.round(r*is*ss)},[n,t,e])}function Ye(i,e,t){const n=f.useCallback(()=>i?e(i):void 0,[i,e]),s=f.useCallback(r=>{if(!i)return()=>{};const o=t(i,r);return()=>A(o)},[i,t]);return f.useSyncExternalStore(s,n)}const lt=0,ie=1,ct=[0,0,0,0],q=[],ke={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class Ae extends Ct{constructor(e,t,n){super(e),this.features=t,this.mapBrowserEvent=n}}class fs extends fn{constructor(e){super(e),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=e.condition?e.condition:mn,this.defaultDeleteCondition_=function(n){return pn(n)&&St(n)},this.deleteCondition_=e.deleteCondition?e.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:yn,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new _n,this.pixelTolerance_=e.pixelTolerance!==void 0?e.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new ee({source:new Me({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:ps(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null;let t;if(e.features?t=e.features:e.source&&(this.source_=e.source,t=new ye(this.source_.getFeatures()),this.source_.addEventListener(Ze.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(Ze.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!t)throw new Error("The modify interaction requires features, a source or a layer");e.hitDetection&&(this.hitDetection_=e.hitDetection),this.features_=t,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(K.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(K.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=e.snapToPointer===void 0?!this.hitDetection_:e.snapToPointer}addFeature_(e){const t=e.getGeometry();if(t){const s=this.SEGMENT_WRITERS_[t.getType()];s&&s(e,t)}const n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),e.addEventListener(Qe.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(e,t){if(!this.featuresBeingModified_){this.featuresBeingModified_=new ye;const n=this.featuresBeingModified_.getArray();for(let s=0,r=t.length;s=0;--s){const r=n[s];for(let o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===r&&this.dragSegments_.splice(o,1);t.remove(r)}}setActive(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(e)}setMap(e){this.overlay_.setMap(e),super.setMap(e)}getOverlay(){return this.overlay_}handleSourceAdd_(e){e.feature&&this.features_.push(e.feature)}handleSourceRemove_(e){e.feature&&this.features_.remove(e.feature)}handleFeatureAdd_(e){this.addFeature_(e.element)}handleFeatureChange_(e){if(!this.changingFeature_){const t=e.target;this.removeFeature_(t),this.addFeature_(t)}}handleFeatureRemove_(e){this.removeFeature_(e.element)}writePointGeometry_(e,t){const n=t.getCoordinates(),s={feature:e,geometry:t,segment:[n,n]};this.rBush_.insert(t.getExtent(),s)}writeMultiPointGeometry_(e,t){const n=t.getCoordinates();for(let s=0,r=n.length;s=0;--c)this.insertVertex_(s[c],r)}return!!this.vertexFeature_}handleUpEvent(e){for(let t=this.dragSegments_.length-1;t>=0;--t){const n=this.dragSegments_[t][0],s=n.geometry;if(s.getType()==="Circle"){const r=s.getCenter(),o=n.featureSegments[0],a=n.featureSegments[1];o.segment[0]=r,o.segment[1]=r,a.segment[0]=r,a.segment[1]=r,this.rBush_.update(Te(r),o);let l=s;this.rBush_.update(l.getExtent(),a)}else this.rBush_.update(j(n.segment),n)}return this.featuresBeingModified_&&(this.dispatchEvent(new Ae(ke.MODIFYEND,this.featuresBeingModified_,e)),this.featuresBeingModified_=null),!1}handlePointerMove_(e){this.lastPixel_=e.pixel,this.handlePointerAtPixel_(e.pixel,e.map,e.coordinate)}handlePointerAtPixel_(e,t,n){const s=n||t.getCoordinateFromPixel(e);t.getView().getProjection();const r=function(l,c){return ut(s,l)-ut(s,c)};let o,a;if(this.hitDetection_){const l=typeof this.hitDetection_=="object"?c=>c===this.hitDetection_:void 0;t.forEachFeatureAtPixel(e,(c,u,h)=>{h&&h.getType()==="Point"&&(h=new _e(Oe(h.getCoordinates())));const m=h||c.getGeometry();if(c instanceof Z&&this.features_.getArray().includes(c)){a=m;const g=c.getGeometry().getFlatCoordinates().slice(0,2);o=[{feature:c,geometry:a,segment:[g,g]}]}return!0},{layerFilter:l})}if(!o){const l=vn(Te(s,ct)),c=t.getView().getResolution()*this.pixelTolerance_,u=Sn(xn(l,c,ct));o=this.rBush_.getInExtent(u)}if(o&&o.length>0){const l=o.sort(r)[0],c=l.segment;let u=dt(s,l);const h=t.getPixelFromCoordinate(u);let m=et(e,h);if(a||m<=this.pixelTolerance_){const g={};if(g[M(c)]=!0,this.snapToPointer_||(this.delta_[0]=u[0]-s[0],this.delta_[1]=u[1]-s[1]),l.geometry.getType()==="Circle"&&l.index===ie)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);else{const p=t.getPixelFromCoordinate(c[0]),_=t.getPixelFromCoordinate(c[1]),w=je(h,p),F=je(h,_);m=Math.sqrt(Math.min(w,F)),this.snappedToVertex_=m<=this.pixelTolerance_,this.snappedToVertex_&&(u=w>F?c[1]:c[0]),this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);const O={};O[M(l.geometry)]=!0;for(let S=1,L=o.length;S=0;--l)o=e[l],g=o[0],p=M(g.feature),g.depth&&(p+="-"+g.depth.join("-")),p in t||(t[p]={}),o[1]===0?(t[p].right=g,t[p].index=g.index):o[1]==1&&(t[p].left=g,t[p].index=g.index+1);for(p in t){switch(m=t[p].right,u=t[p].left,c=t[p].index,h=c-1,u!==void 0?g=u:g=m,h<0&&(h=0),a=g.geometry,r=a.getCoordinates(),s=r,n=!1,a.getType()){case"MultiLineString":r[g.depth[0]].length>2&&(r[g.depth[0]].splice(c,1),n=!0);break;case"LineString":r.length>2&&(r.splice(c,1),n=!0);break;case"MultiPolygon":s=s[g.depth[1]];case"Polygon":s=s[g.depth[0]],s.length>4&&(c==s.length-1&&(c=0),s.splice(c,1),n=!0,c===0&&(s.pop(),s.push(s[0]),h=s.length-1));break}if(n){this.setGeometryCoordinates_(a,r);const _=[];if(u!==void 0&&(this.rBush_.remove(u),_.push(u.segment[0])),m!==void 0&&(this.rBush_.remove(m),_.push(m.segment[1])),u!==void 0&&m!==void 0){const w={depth:g.depth,feature:g.feature,geometry:g.geometry,index:h,segment:_};this.rBush_.insert(j(w.segment),w)}this.updateSegmentIndices_(a,c,g.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),e.length=0}}return n}setGeometryCoordinates_(e,t){this.changingFeature_=!0,e.setCoordinates(t),this.changingFeature_=!1}updateSegmentIndices_(e,t,n,s){this.rBush_.forEachInExtent(e.getExtent(),function(r){r.geometry===e&&(n===void 0||r.depth===void 0||Cn(r.depth,n))&&r.index>t&&(r.index+=s)})}}function ms(i,e){return i.index-e.index}function ut(i,e,t){const n=e.geometry;if(n.getType()==="Circle"){let r=n;if(e.index===ie){const o=je(r.getCenter(),k(i)),a=Math.sqrt(o)-r.getRadius();return a*a}}const s=k(i);return q[0]=k(e.segment[0]),q[1]=k(e.segment[1]),bn(s,q)}function dt(i,e,t){const n=e.geometry;if(n.getType()==="Circle"&&e.index===ie)return Oe(n.getClosestPoint(k(i)));const s=k(i);return q[0]=k(e.segment[0]),q[1]=k(e.segment[1]),Oe(wn(s,q))}function ps(){const i=xt();return function(e,t){return i.Point}}const ys={SELECT:"select"};class _s extends Ct{constructor(e,t,n,s){super(e),this.selected=t,this.deselected=n,this.mapBrowserEvent=s}}const me={};class Gt extends En{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.boundAddFeature_=this.addFeature_.bind(this),this.boundRemoveFeature_=this.removeFeature_.bind(this),this.condition_=e.condition?e.condition:St,this.addCondition_=e.addCondition?e.addCondition:tt,this.removeCondition_=e.removeCondition?e.removeCondition:tt,this.toggleCondition_=e.toggleCondition?e.toggleCondition:Mn,this.multi_=e.multi?e.multi:!1,this.filter_=e.filter?e.filter:nt,this.hitTolerance_=e.hitTolerance?e.hitTolerance:0,this.style_=e.style!==void 0?e.style:vs(),this.features_=e.features||new ye;let t;if(e.layers)if(typeof e.layers=="function")t=e.layers;else{const n=e.layers;t=function(s){return n.includes(s)}}else t=nt;this.layerFilter_=t,this.featureLayerAssociation_={}}addFeatureLayerAssociation_(e,t){this.featureLayerAssociation_[M(e)]=t}getFeatures(){return this.features_}getHitTolerance(){return this.hitTolerance_}getLayer(e){return this.featureLayerAssociation_[M(e)]}setHitTolerance(e){this.hitTolerance_=e}setMap(e){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),super.setMap(e),e?(this.features_.addEventListener(K.ADD,this.boundAddFeature_),this.features_.addEventListener(K.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(K.ADD,this.boundAddFeature_),this.features_.removeEventListener(K.REMOVE,this.boundRemoveFeature_))}addFeature_(e){const t=e.element;if(this.style_&&this.applySelectedStyle_(t),!this.getLayer(t)){const n=this.getMap().getAllLayers().find(function(s){if(s instanceof ee&&s.getSource()&&s.getSource().hasFeature(t))return s});n&&this.addFeatureLayerAssociation_(t,n)}}removeFeature_(e){this.style_&&this.restorePreviousStyle_(e.element)}getStyle(){return this.style_}applySelectedStyle_(e){const t=M(e);t in me||(me[t]=e.getStyle()),e.setStyle(this.style_)}restorePreviousStyle_(e){const t=this.getMap().getInteractions().getArray();for(let s=t.length-1;s>=0;--s){const r=t[s];if(r!==this&&r instanceof Gt&&r.getStyle()&&r.getFeatures().getArray().lastIndexOf(e)!==-1){e.setStyle(r.getStyle());return}}const n=M(e);e.setStyle(me[n]),delete me[n]}removeFeatureLayerAssociation_(e){delete this.featureLayerAssociation_[M(e)]}handleEvent(e){if(!this.condition_(e))return!0;const t=this.addCondition_(e),n=this.removeCondition_(e),s=this.toggleCondition_(e),r=!t&&!n&&!s,o=e.map,a=this.getFeatures(),l=[],c=[];if(r){Pn(this.featureLayerAssociation_),o.forEachFeatureAtPixel(e.pixel,(u,h)=>{if(!(!(u instanceof Z)||!this.filter_(u,h)))return this.addFeatureLayerAssociation_(u,h),c.push(u),!this.multi_},{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let u=a.getLength()-1;u>=0;--u){const h=a.item(u),m=c.indexOf(h);m>-1?c.splice(m,1):(a.remove(h),l.push(h))}c.length!==0&&a.extend(c)}else{o.forEachFeatureAtPixel(e.pixel,(u,h)=>{if(!(!(u instanceof Z)||!this.filter_(u,h)))return(t||s)&&!a.getArray().includes(u)?(this.addFeatureLayerAssociation_(u,h),c.push(u)):(n||s)&&a.getArray().includes(u)&&(l.push(u),this.removeFeatureLayerAssociation_(u)),!this.multi_},{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let u=l.length-1;u>=0;--u)a.remove(l[u]);a.extend(c)}return(c.length>0||l.length>0)&&this.dispatchEvent(new _s(ys.SELECT,c,l,e)),!0}}function vs(){const i=xt();return st(i.Polygon,i.LineString),st(i.GeometryCollection,i.LineString),function(e){return e.getGeometry()?i[e.getGeometry().getType()]:null}}async function Ss(i,e,t,n){const r=n.getCode().replace("EPSG:","http://www.opengis.net/def/crs/EPSG/0/"),o=await i.fetch(e,{method:"POST",body:JSON.stringify({type:"Feature",properties:{},geometry:t}),headers:{"Content-Type":"application/geo+json; charset=utf-8","Content-Crs":`<${r}>`}});if(!o||!o.ok||o.status!==201)throw new Error("Request failed: "+o.status);const a=o.headers.get("location");if(!a)throw new Error("Request failed: no Location response header");const l=a.substring(a.lastIndexOf("/")+1);return Promise.resolve(l)}async function xs(i,e,t,n,s){const o=s.getCode().replace("EPSG:","http://www.opengis.net/def/crs/EPSG/0/"),a=new URL(`${e.toString()}/${t}`),l=await i.fetch(a,{method:"PATCH",body:JSON.stringify({type:"Feature",properties:{},geometry:n}),headers:{"Content-Type":"application/geo+json; charset=utf-8","Content-Crs":`<${o}>`}});if(!l||!l.ok||l.status!==204)throw new Error("Request failed: "+l.status);return Promise.resolve(t)}function Vt(i,e){const t=document.createElement("div");t.className="editing-tooltip editing-tooltip-hidden",t.role="tooltip";const n=document.createElement("span");n.textContent=e,t.appendChild(n);const s=new Fe({element:t,offset:[15,0],positioning:"center-left"}),r=i.on("pointermove",o=>{o.dragging||s.setPosition(o.coordinate)});return i.addOverlay(s),{destroy(){A(r),i.removeOverlay(s)},setVisible(o){t.classList.toggle("editing-tooltip-hidden",!o)},setText(o){n.textContent=o}}}function Ht(i){let e=ht(i.polygon);Array.isArray(e)&&(e=e[0]);let t=ht(i.vertex);Array.isArray(t)&&(t=t[0]);const n=[];return e&&n.push(e),t&&(t.setGeometry(Cs),n.push(t)),n}const Cs=i=>{if(i){const e=i.getGeometry();if(e&&e.getType()==="Polygon"){const t=e.getCoordinates()[0];if(t)return new Un(t)}}},ht=i=>{const e=new Z,n=new ee({style:i}).getStyleFunction();if(!n)throw new Error("can't retrieve style function");const s=n(e,1);if(!s)throw new Error("can't retrieve styles from feature style function");return Array.isArray(s)&&s.length?s.length>1?s:s[0]:s},ws=ge("editing:EditingCreateWorkflowImpl");var R;class bs extends Be{constructor(t){super();x(this,R);y(this,"_httpService");y(this,"_intl");y(this,"_map");y(this,"_polygonStyle");y(this,"_vertexStyle");y(this,"_state");y(this,"_editLayerURL");y(this,"_featureId");y(this,"_editingSource");y(this,"_editingLayer");y(this,"_drawInteraction");y(this,"_olMap");y(this,"_mapContainer");y(this,"_tooltip");y(this,"_enterHandler");y(this,"_escapeHandler");y(this,"_error");y(this,"_interactionListener");y(this,"_mapListener");this._httpService=t.httpService,this._intl=t.intl,this._polygonStyle=t.polygonStyle,this._vertexStyle=t.vertexStyle,this._map=t.map,this._olMap=t.map.olMap,this._state="active:initialized",this._editLayerURL=t.ogcApiFeatureLayerUrl,this._editingSource=new Me,this._editingLayer=new ee({source:this._editingSource,zIndex:$e,properties:{name:"editing-layer"}}),this._drawInteraction=new kt({source:this._editingSource,type:"Polygon",style:Ht({polygon:this._polygonStyle,vertex:this._vertexStyle})}),this._tooltip=Vt(this._olMap,this._intl.formatMessage({id:"create.tooltip.begin"})),this._enterHandler=n=>{if((n.code==="Enter"||n.code==="NumpadEnter")&&n.target===this._olMap.getTargetElement()){const s=this._drawInteraction.getOverlay().getSource()?.getFeatures()??[];s[0]&&s[0].getGeometry().getCoordinates()[0].length>4&&this.triggerSave()}},this._escapeHandler=n=>{n.code==="Escape"&&n.target===this._olMap.getTargetElement()&&this.reset()},this._interactionListener=[],this._mapListener=[],this._start()}getDrawInteraction(){return this._drawInteraction}getState(){return this._state}_setState(t){this._state=t,this.emit(t)}_save(t){this._setState("active:saving");const n=this._editLayerURL,s=t.getGeometry();if(!s){this._destroy(),this._error=new Error("no geometry available"),v(this,R)?.reject(this._error);return}const r=this._olMap.getView().getProjection(),a=new It({dataProjection:r}).writeGeometryObject(s,{rightHanded:!0,decimals:10});Ss(this._httpService,n,a,r).then(l=>{this._featureId=l,this._destroy(),v(this,R)?.resolve({featureId:this._featureId})}).catch(l=>{ws.error(l),this._destroy(),this._error=new Error("Failed to save feature",{cause:l}),v(this,R)?.reject(this._error)})}_start(){this._olMap.addLayer(this._editingLayer),this._olMap.addInteraction(this._drawInteraction),this._mapContainer=this._olMap.getTargetElement()??void 0,this._mapContainer&&(this._mapContainer.addEventListener("keydown",this._enterHandler,!1),this._mapContainer.addEventListener("keydown",this._escapeHandler,!1)),this._tooltip.setVisible(!0);const t=this._drawInteraction.on("drawstart",()=>{this._setState("active:drawing"),this._tooltip.setText(this._intl.formatMessage({id:"create.tooltip.continue"}))}),n=this._drawInteraction.on("drawend",r=>{const o=r.feature;if(!o){this._destroy(),this._error=new Error("no feature available"),v(this,R)?.reject(this._error);return}this._save(o)}),s=this._map.on("changed:container",()=>{this._mapContainer?.removeEventListener("keydown",this._enterHandler),this._mapContainer?.removeEventListener("keydown",this._escapeHandler),this._mapContainer=this._olMap.getTargetElement()??void 0,this._mapContainer&&(this._mapContainer.addEventListener("keydown",this._enterHandler,!1),this._mapContainer.addEventListener("keydown",this._escapeHandler,!1))});this._interactionListener.push(t,n),this._mapListener.push(s)}reset(){this._drawInteraction.abortDrawing(),this._tooltip.setText(this._intl.formatMessage({id:"create.tooltip.begin"})),this._setState("active:initialized")}stop(){this._destroy(),v(this,R)?.resolve(void 0)}_destroy(){this._olMap.removeLayer(this._editingLayer),this._olMap.removeInteraction(this._drawInteraction),this._tooltip.destroy(),this._interactionListener.map(t=>{A(t)}),this._mapListener.map(t=>{t.destroy()}),this._mapContainer?.removeEventListener("keydown",this._enterHandler),this._mapContainer?.removeEventListener("keydown",this._escapeHandler),this._setState("destroyed")}triggerSave(){this._drawInteraction.finishDrawing()}whenComplete(){return this._state==="destroyed"?this._error?Promise.reject(this._error):this._featureId?Promise.resolve({featureId:this._featureId}):Promise.resolve(void 0):(v(this,R)??C(this,R,Mt())).promise}}R=new WeakMap;var I;class Es extends Be{constructor(t){super();x(this,I);y(this,"_httpService");y(this,"_intl");y(this,"_map");y(this,"_polygonStyle");y(this,"_vertexStyle");y(this,"_state");y(this,"_editLayerURL");y(this,"_featureId");y(this,"_initialFeature");y(this,"_editFeature");y(this,"_editingSource");y(this,"_editingLayer");y(this,"_modifyInteraction");y(this,"_olMap");y(this,"_mapContainer");y(this,"_tooltip");y(this,"_enterHandler");y(this,"_escapeHandler");y(this,"_error");y(this,"_interactionListener");y(this,"_mapListener");this._httpService=t.httpService,this._intl=t.intl,this._polygonStyle=t.polygonStyle,this._vertexStyle=t.vertexStyle,this._map=t.map,this._olMap=t.map.olMap,this._state="active:initialized",this._editLayerURL=t.ogcApiFeatureLayerUrl,this._initialFeature=t.feature.clone(),this._initialFeature.setId(t.feature.getId()),this._editFeature=t.feature.clone(),this._editFeature.setId(t.feature.getId()),this._editFeature.setStyle(Ht({polygon:this._polygonStyle,vertex:this._vertexStyle})),this._editingSource=new Me({features:new ye([this._editFeature])}),this._editingLayer=new ee({source:this._editingSource,zIndex:$e,properties:{name:"editing-layer"}}),this._modifyInteraction=new fs({source:this._editingSource}),this._tooltip=Vt(this._olMap,this._intl.formatMessage({id:"create.tooltip.deselect"})),this._enterHandler=n=>{if((n.code==="Enter"||n.code==="NumpadEnter")&&n.target===this._olMap.getTargetElement()){const s=this._editingSource.getFeatures()[0];if(!s)throw Error("no updated feature found");this._save(s)}},this._escapeHandler=n=>{n.code==="Escape"&&n.target===this._olMap.getTargetElement()&&this.reset()},this._interactionListener=[],this._mapListener=[],this._start()}getModifyInteraction(){return this._modifyInteraction}getState(){return this._state}_setState(t){this._state=t,this.emit(t)}_save(t){this._setState("active:saving");const n=this._editLayerURL;if(this._featureId=t.getId()?.toString(),!this._featureId){this._destroy(),this._error=new Error("no feature id available"),v(this,I)?.reject(this._error);return}const s=t?.getGeometry();if(!s){this._destroy(),this._error=new Error("no geometry available"),v(this,I)?.reject(this._error);return}const r=this._olMap.getView().getProjection(),a=new It({dataProjection:r}).writeGeometryObject(s,{rightHanded:!0,decimals:10});xs(this._httpService,n,this._featureId,a,r).then(l=>{this._destroy(),v(this,I)?.resolve({featureId:l})}).catch(l=>{this._destroy(),this._error=new Error("Failed to save feature",{cause:l}),v(this,I)?.reject(this._error)})}_start(){this._olMap.addLayer(this._editingLayer),this._olMap.addInteraction(this._modifyInteraction);const t=this._editingSource.getFeatures()[0];if(t&&!t.getId()?.toString()){this._destroy(),this._error=new Error("no feature id available"),v(this,I)?.reject(this._error);return}this._mapContainer=this._olMap.getTargetElement()??void 0,this._mapContainer&&(this._mapContainer.addEventListener("keydown",this._enterHandler,!1),this._mapContainer.addEventListener("keydown",this._escapeHandler,!1)),this._tooltip.setVisible(!0);const n=this._map.olMap.on("click",o=>{const a=o.coordinate,l=o.originalEvent.altKey,c=this._editingSource.getFeaturesAtCoordinate(a);l||c.length===0&&this.triggerSave()}),s=this._modifyInteraction.on("modifystart",()=>{this._setState("active:drawing")}),r=this._map.on("changed:container",()=>{this._mapContainer?.removeEventListener("keydown",this._enterHandler),this._mapContainer?.removeEventListener("keydown",this._escapeHandler),this._mapContainer=this._olMap.getTargetElement()??void 0,this._mapContainer&&(this._mapContainer.addEventListener("keydown",this._enterHandler,!1),this._mapContainer.addEventListener("keydown",this._escapeHandler,!1))});this._interactionListener.push(n,s),this._mapListener.push(r)}reset(){const t=this._initialFeature.getGeometry()?.clone(),n=this._editingSource.getFeatures()[0];if(!n)throw Error("no updated feature found");n.setGeometry(t),this._setState("active:initialized")}stop(){this._destroy(),v(this,I)?.resolve(void 0)}_destroy(){this._editingSource.clear(),this._olMap.removeLayer(this._editingLayer),this._olMap.removeInteraction(this._modifyInteraction),this._tooltip.destroy(),this._interactionListener.map(t=>{A(t)}),this._mapListener.map(t=>{t.destroy()}),this._mapContainer?.removeEventListener("keydown",this._enterHandler),this._mapContainer?.removeEventListener("keydown",this._escapeHandler),this._setState("destroyed")}triggerSave(){const t=this._editingSource.getFeatures()[0];if(!t)throw Error("no updated feature found");this._save(t)}whenComplete(){return this._state==="destroyed"?this._error?Promise.reject(this._error):this._featureId?Promise.resolve({featureId:this._featureId}):Promise.resolve(void 0):(v(this,I)??C(this,I,Mt())).promise}}I=new WeakMap;class cr{_serviceOptions;_workflows;constructor(e){this._serviceOptions=e,this._workflows=new Map}createFeature(e,t){if(!t||!e||!e.id)throw new Error("Map, mapId or url is undefined.");const n=e.id;let s=this._workflows.get(n);if(s)throw new Error("EditingWorkflow could not be started. EditingWorkflow already in progress for this map.");return s=new bs({map:e,ogcApiFeatureLayerUrl:t,polygonStyle:this._serviceOptions.properties.polygonStyle,vertexStyle:this._serviceOptions.properties.vertexStyle,httpService:this._serviceOptions.references.httpService,intl:this._serviceOptions.intl}),this._workflows.set(n,s),this._connectToWorkflowDestroyEvent(s,n),s}updateFeature(e,t,n){if(!t||!e||!e.id)throw new Error("Map, mapId or url is undefined.");const s=e.id;let r=this._workflows.get(s);if(r)throw new Error("EditingWorkflow could not be started. EditingWorkflow already in progress for this map.");return r=new Es({map:e,ogcApiFeatureLayerUrl:t,feature:n,polygonStyle:this._serviceOptions.properties.polygonStyle,vertexStyle:this._serviceOptions.properties.vertexStyle,httpService:this._serviceOptions.references.httpService,intl:this._serviceOptions.intl}),this._workflows.set(s,r),this._connectToWorkflowDestroyEvent(r,s),r}stop(e){const t=this._workflows.get(e);t&&t.stop()}reset(e){const t=this._workflows.get(e);if(t)t.reset();else throw new Error("No workflow found for mapId: "+e)}_connectToWorkflowDestroyEvent(e,t){e.on("destroyed",()=>{this._workflows.get(t)===e&&this._workflows.delete(t)})}}new _e([407354,5754673]),new _e([404740,5757893]);var W,G,re,oe,ae,Ve;class Ms extends Be{constructor(t,n,s){super();x(this,ae);y(this,"label");x(this,W,{kind:"available"});x(this,G);x(this,re);x(this,oe);this.label=n,C(this,G,t),C(this,oe,s),te(this,ae,Ve).call(this),C(this,re,v(this,G).on("change:visible",()=>{te(this,ae,Ve).call(this)}))}destroy(){A(v(this,re))}get status(){return v(this,W)}async select(t,n){if(t.type!=="extent")throw new Error(`Unsupported selection kind: ${t.type}`);if(v(this,W).kind!=="available"||v(this,G).getSource()===null)return[];const s=[];v(this,G).getSource().forEachFeatureIntersectingExtent(t.extent,a=>{if(!a.getGeometry())return;const l={...a.getProperties()};delete l.geometries;const c={id:a.getId()?.toString()||Fn(),geometry:a.getGeometry(),properties:l};s.push(c)});const r=s.filter(a=>a!=null);return r.length>n.maxResults?r.slice(0,n.maxResults):r}}W=new WeakMap,G=new WeakMap,re=new WeakMap,oe=new WeakMap,ae=new WeakSet,Ve=function(){const n=v(this,G).getVisible()?{kind:"available"}:{kind:"unavailable",reason:v(this,oe)};n.kind!==v(this,W).kind&&(C(this,W,n),this.emit("changed:status"))};var le;class ur{constructor({intl:e}){x(this,le);C(this,le,e)}createSelectionSource(e){return new Ms(e.vectorLayer,e.label,v(this,le).formatMessage({id:"layerNotVisibleReason"}))}}le=new WeakMap;const Ps="@open-pioneer/notifier",Fs=Ue.bind(void 0,Ps);var Bt=At({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"}),Ls=At({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});const Is=!1;function dr(i){const{position:e="top-right"}=i,t=Qn(),n=Fs("notifier.NotificationService"),[s,r]=f.useState(!Is),o=V(l=>{const c=l.level==="error"?d.jsx(Bt,{h:"100%",w:"100%"}):void 0;t({position:e,title:l.title,description:l.message||null,status:l.level,isClosable:!0,duration:l.displayDuration??null,icon:c})}),a=V(()=>{t.closeAll()});return f.useEffect(()=>{const l=n.registerHandler({showNotification:o,closeAll:a});return()=>l.destroy()},[s,n,o,a]),d.jsx(d.Fragment,{})}const Ts="@open-pioneer/coordinate-viewer",ks=z.bind(void 0,Ts),As=4,Ns="decimal",hr=i=>{const{precision:e,displayProjectionCode:t,format:n}=i,{containerProps:s}=H("coordinate-viewer",i),{map:r}=B(i),o=r?.olMap,a=Dt(o)?.getCode()??"";let{coordinates:l}=js(o);l=l&&t?Ds(l,a,t):l;const c=Os(l,e,n),u=t||a,h=c?c+" "+u:"";return d.jsx(P,{...s,children:d.jsx(Q,{className:"coordinate-viewer-text",children:h})})};function Os(i,e,t){const n=ks();return i?Rs(i,e,n,t):""}function js(i){const[e,t]=f.useState();return f.useEffect(()=>{if(!i)return;const n=i.on("pointermove",s=>{t(s.coordinate)});return()=>A(n)},[i]),{coordinates:e}}function Rs(i,e,t,n){if(i[0]==null||i[1]==null)return"";const s=e??As,r=n??Ns,[o,a]=i;let l;if(r==="degree"&&isFinite(o)&&isFinite(a)){const[c,u,h]=gt(o,t,s),[m,g,p]=gt(a,t,s),_=`${Math.abs(c)}°${u}'${h}"${0<=c?"(E)":"(W)"}`,w=`${Math.abs(m)}°${g}'${p}"${0<=m?"(N)":"(S)"}`;l=_+" "+w}else{const c=t.formatNumber(o,{maximumFractionDigits:s,minimumFractionDigits:s}),u=t.formatNumber(a,{maximumFractionDigits:s,minimumFractionDigits:s});l=c+" "+u}return l}function gt(i,e,t){const n=Math.floor(i),s=i-n,r=Math.floor(60*s),a=60*(60*s-r),l=e.formatNumber(a,{maximumFractionDigits:t,minimumFractionDigits:t});return[n,r,l]}function Ds(i,e,t){return Ln(i,e,t)}const gr=i=>{const{displayMode:e="line"}=i,{containerProps:t}=H("scale-bar",i),{map:n}=B(i),s=f.useRef(null);return f.useEffect(()=>{if(s.current&&n){const r=n.olMap,o=new Wn({units:"metric",target:s.current,bar:e==="bar"});return r.addControl(o),()=>{r.removeControl(o)}}},[e,n]),d.jsx(P,{...t,ref:s})},Gs="@open-pioneer/scale-viewer",Vs=z.bind(void 0,Gs),fr=i=>{const{containerProps:e}=H("scale-viewer",i),{map:t}=B(i),n=Vs(),s=gs(t?.olMap),r=s?n.formatNumber(s):void 0;return d.jsx(P,{...e,children:r&&d.jsxs(Q,{children:["1:",r]})})},Hs="@open-pioneer/legend",$t=z.bind(void 0,Hs),mr=i=>{const{showBaseLayers:e=!1}=i,{containerProps:t}=H("legend",i),{map:n}=B(i);return d.jsx(P,{...t,children:n?d.jsx(Bs,{map:n,showBaseLayers:e}):null})};function Bs(i){const{map:e,showBaseLayers:t}=i,s=Ws(e).map(r=>d.jsx(Ut,{layer:r,showBaseLayers:t},r.id));return d.jsx(Yn,{as:"ul",className:"legend-layer-list",listStyleType:"none",spacing:2,children:s})}function Ut(i){const{layer:e,showBaseLayers:t}=i,{isVisible:n}=Ks(e),s=zs(e);if(!n||!t&&Tt(e)&&e.isBaseLayer)return;const r=[];return s?.length&&s.forEach(o=>{r.push(d.jsx(Ut,{layer:o,showBaseLayers:t},o.id))}),d.jsxs(d.Fragment,{children:[d.jsx($s,{layer:e,showBaseLayers:t}),r]})}function $s(i){const e=$t(),{layer:t,showBaseLayers:n}=i,s=qs(t),r=Us(t);let o;s?.Component?o=d.jsx(s.Component,{layer:t}):s?.imageUrl?o=d.jsx(ft,{layer:t,imageUrl:s.imageUrl}):r&&(o=d.jsx(ft,{layer:t,imageUrl:r}));const a=Tt(t)&&t.isBaseLayer;return o?d.jsxs(P,{as:"li",className:Pe("legend-item",`layer-${Ys(t.id)}`),children:[n&&a?d.jsx(Q,{as:"b",children:e.formatMessage({id:"basemapLabel"})}):null,o]}):void 0}function ft(i){const e=$t(),{layer:t,imageUrl:n}=i;return d.jsxs(P,{children:[d.jsx(Q,{children:t.title}),d.jsx(zn,{maxW:"none",maxH:"none",src:n,alt:e.formatMessage({id:"altLabel"},{layerName:t.title}),className:"legend-item__image",fallbackStrategy:"onError",fallback:d.jsx(P,{children:d.jsxs(Q,{children:[d.jsx(Bt,{me:2}),e.formatMessage({id:"fallbackLabel"})]})})})]})}function Us(i){const e=f.useCallback(()=>i.legend,[i]),t=f.useCallback(n=>{const s=i.on("changed:legend",n);return()=>s.destroy()},[i]);return f.useSyncExternalStore(t,e)}function Ws(i){const e=f.useCallback(n=>{const s=i.layers.on("changed",n);return()=>s.destroy()},[i]),t=f.useCallback(()=>{let n=i.layers.getAllLayers({sortByDisplayOrder:!0})??[];return n=n.reverse(),n},[i]);return Wt(e,t)}function zs(i){const e=f.useCallback(n=>{const s=i.sublayers?.on("changed",n);return()=>s?.destroy()},[i]),t=f.useCallback(()=>{if(!i.sublayers)return;let s=i.sublayers?.getSublayers({sortByDisplayOrder:!0});return s=s.reverse(),s},[i]);return Wt(e,t)}function Wt(i,e){const t=f.useRef(),n=f.useCallback(r=>{const o=i(()=>{t.current=void 0,r()});return()=>{t.current=void 0,o()}},[i]),s=f.useCallback(()=>{if(t.current)return t.current.value;const r=e();return t.current={value:r},r},[e]);return f.useSyncExternalStore(n,s)}function Ks(i){const e=f.useCallback(()=>i.visible,[i]),t=f.useCallback(s=>{const r=i.on("changed:visible",s);return()=>r.destroy()},[i]);return{isVisible:f.useSyncExternalStore(t,e)}}function qs(i){const[e,t]=f.useState(void 0);return f.useEffect(()=>{t(i.attributes.legend);const n=i.on("changed:attributes",()=>{t(i.attributes.legend)});return()=>n.destroy()},[i]),e}function Ys(i){return i.toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}const Js="@open-pioneer/measurement",Xs=z.bind(void 0,Js);class Zs{olMap;messages;activeFeatureStyle;layer;source;draw=void 0;activeMeasurement;predefinedMeasurements=new Map;finishedMeasurements=new Set;helpTooltip;resources=[];measurementChangedHandler;constructor(e,t){this.olMap=e,this.messages=t;const n=this.source=new Me;this.layer=new ee({source:n,zIndex:$e,properties:{name:"measurement-layer"}}),e.addLayer(this.layer);const s=e.on("pointermove",this.handlePointerMove.bind(this));this.resources.push({destroy(){A(s)}});const r=()=>{this.helpTooltip.element.classList.add("hidden")};e.getViewport().addEventListener("mouseout",r),this.resources.push({destroy(){e.getViewport().removeEventListener("mouseout",r)}}),this.helpTooltip=ei(this.olMap)}destroy(){this.stopMeasurement();for(const e of this.resources)e.destroy();this.resources=[],this.activeMeasurement=at(this.activeMeasurement);for(const e of this.finishedMeasurements)e.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(e){this.layer.setStyle(e)}setMeasurementSourceChangedHandler(e){this.measurementChangedHandler=e}setPredefinedMeasurements(e){this.updatePredefinedMeasurements(e)}setActiveFeatureStyle(e){const t=In(e);this.activeFeatureStyle=(n,...s)=>{const r=n?.getGeometry()?.getType();if(r==="Polygon"||r==="LineString"||r==="Point")return t(n,...s)},this.draw?.getOverlay().setStyle(this.activeFeatureStyle)}clearMeasurements(){const e=this.source.getFeatures();this.source.clear(),e.forEach(t=>{this.raiseMeasurementsChangeEvent("remove-measurement",t)}),this.predefinedMeasurements.clear();for(const t of this.finishedMeasurements)t.destroy();this.finishedMeasurements.clear()}startMeasurement(e){if(this.draw)throw new Error("Internal error: another measurement interaction is still active.");const t=e==="area"?"Polygon":"LineString",n=this.draw=new kt({source:this.source,type:t,style:this.activeFeatureStyle});this.olMap.addInteraction(n);let s,r;n.on("drawstart",o=>{const a=o.feature;a&&(s=this.activeMeasurement=new mt("active",a,this),r=a.getGeometry()?.on("change",()=>{s?.updateTooltipContent(),s?.updateTooltipPosition()}))}),n.on("drawend",()=>{if(s&&s===this.activeMeasurement){const o=s;o.updateState("finished"),this.finishedMeasurements.add(o),this.raiseMeasurementsChangeEvent("add-measurement",o.feature),this.activeMeasurement=s=void 0}s=void 0,r&&A(r)}),n.on("drawabort",()=>{s&&(s.destroy(),s===this.activeMeasurement&&(this.activeMeasurement=void 0),s=void 0),r&&A(r)})}stopMeasurement(){this.draw&&(this.olMap.removeInteraction(this.draw),this.draw.abortDrawing(),this.draw.dispose(),this.draw=void 0),this.activeMeasurement=at(this.activeMeasurement)}handlePointerMove(e){if(e.dragging)return;const t=this.helpTooltip,n=ni(this.messages,this.activeMeasurement);t.setText(n),t.overlay.setPosition(e.coordinate),t.element.classList.remove("hidden")}updatePredefinedMeasurements(e){const t=e.filter(s=>!this.predefinedMeasurements.has(s)),n=[];for(const s of this.predefinedMeasurements.keys())e.includes(s)||n.push(s);t.forEach(s=>{const r=new Z(s);this.source.addFeature(r);const o=new mt("finished",r,this);this.finishedMeasurements.add(o),this.predefinedMeasurements.set(s,o),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(e,t){const n=t.getGeometry();this.measurementChangedHandler&&n&&this.measurementChangedHandler({kind:e,geometry:(n instanceof ve,n)})}}class mt{controller;feature;_state;tooltip;constructor(e,t,n){this.controller=n,this._state=e,this.feature=t,this.tooltip=ti(this.olMap),this.updateTooltipContent(),this.updateTooltipPosition(),this.tooltip.setActive(e==="active")}destroy(){this.tooltip.destroy()}get state(){return this._state}updateState(e){this._state!==e&&(this._state=e,this.tooltip.setActive(e==="active"))}updateTooltipContent(){const e=this.feature.getGeometry();if(!e)return;const t=this.olMap.getView().getProjection();let n;e instanceof ve?n=si(e,t,this.messages):e instanceof De&&(n=ii(e,t,this.messages)),n&&this.tooltip.setHtml(n)}updateTooltipPosition(){const e=this.feature.getGeometry();if(!e)return;let t;if(e instanceof ve)t=e.getInteriorPoint().getCoordinates()||null;else if(e instanceof De)t=e.getLastCoordinate()||null;else return;this.tooltip.overlay.setPosition(t)}get olMap(){return this.controller.olMap}get messages(){return this.controller.messages}}const pt=[0,-15],Qs=[0,-7];function ei(i){const e=document.createElement("div");e.className="measurement-tooltip printing-hide hidden",e.role="tooltip";const t=document.createElement("span");e.appendChild(t);const n=new Fe({element:e,offset:[15,0],positioning:"center-left"});return i.addOverlay(n),{overlay:n,element:e,destroy(){i.removeOverlay(n)},setText(s){t.textContent=s},setHtml(s){t.innerHTML=s}}}function ti(i){const e=document.createElement("div");e.role="tooltip",e.className="measurement-tooltip measurement-active-tooltip printing-hide";const t=document.createElement("span");e.appendChild(t);const n=new Fe({element:e,offset:pt,positioning:"bottom-center",stopEvent:!1,insertFirst:!1});return i.addOverlay(n),{overlay:n,element:e,destroy(){i.removeOverlay(n)},setActive(s){s?(e.className="measurement-tooltip measurement-active-tooltip printing-hide",n.setOffset(pt)):(e.className="measurement-tooltip measurement-finished-tooltip",n.setOffset(Qs))},setText(s){t.textContent=s},setHtml(s){t.innerHTML=s}}}function ni(i,e){if(e){const t=e.feature.getGeometry();if(t instanceof ve||t instanceof De)return i.getContinueMessage()}return i.getHelpMessage()}function si(i,e,t){const n=Tn(i,{projection:e});let s;return n>=1e6?s=`${t.formatNumber(n/1e6)} km2`:s=`${t.formatNumber(n)} m2`,s}function ii(i,e,t){const n=kn(i,{projection:e});let s;return n>=1e3?s=`${t.formatNumber(n/1e3)} km`:s=`${t.formatNumber(n)} m`,s}const pr=i=>{const e=Xs(),{containerProps:t}=H("measurement",i),[n,s]=f.useState("distance"),r=u=>e.formatMessage({id:u}),o=B(i),a=ri(o.map,i,e);f.useEffect(()=>{if(a)return a.startMeasurement(n),()=>{a.stopMeasurement()}},[a,n]);function l(u){if(u==="distance"||u==="area")s(u);else throw new Error(`Unexpected measurement type: '${u}'.`)}function c(){a?.clearMeasurements()}return d.jsxs(P,{...t,children:[d.jsx(Q,{mb:3,children:e.formatMessage({id:"measurementInfoText"})}),d.jsx(xe,{mb:4,alignItems:"center",children:d.jsxs(Ge,{mb:2,children:[d.jsx(Ce,{mb:1,children:r("measurementLabel")}),d.jsxs(Ke,{value:n,onChange:u=>l(u.target.value),className:"measurement-select",children:[d.jsx("option",{value:"distance",children:r("distance")}),d.jsx("option",{value:"area",children:r("area")})]})]})}),d.jsx(Pt,{padding:2,className:"measurement-delete-button",onClick:c,width:"100%",children:r("deleteMeasurementLabel")})]})};function ri(i,e,t){const{activeFeatureStyle:n,finishedFeatureStyle:s,onMeasurementsChange:r,predefinedMeasurements:o}=e,[a,l]=f.useState(void 0);return f.useEffect(()=>{if(!i)return;const c=new Zs(i.olMap,{getContinueMessage(){return t.formatMessage({id:"tooltips.continue"})},getHelpMessage(){return t.formatMessage({id:"tooltips.help"})},formatNumber(u){return t.formatNumber(u,{maximumFractionDigits:2})}});return l(c),()=>{c.destroy(),l(void 0)}},[i,t]),f.useEffect(()=>{a?.setActiveFeatureStyle(n??oi())},[a,n]),f.useEffect(()=>{a?.setFinishedFeatureStyle(s??ai())},[a,s]),f.useEffect(()=>{a?.setMeasurementSourceChangedHandler(r)},[a,r]),f.useEffect(()=>{a?.setPredefinedMeasurements(o??[])},[a,o]),a}function oi(){return[new Se({stroke:new se({color:"#fff",lineDash:[10,10],width:5})}),new Se({fill:new Re({color:"rgba(0,0,0,0.15)"}),stroke:new se({color:"rgba(0, 0, 0, 0.7)",lineDash:[10,10],width:3}),image:new An({radius:5,stroke:new se({color:"rgba(0, 0, 0, 0.7)",width:2}),fill:new Re({color:"rgba(255, 255, 255, 0.2)"})})})]}function ai(){return[new Se({stroke:new se({color:"#fff",width:5})}),new Se({stroke:new se({color:"#0b96fc",width:3}),fill:new Re({color:"rgba(11,150,252,0.15)"})})]}const li="@open-pioneer/search",Le=z.bind(void 0,li);function ci(i){const e=i.selectProps.inputValue.length>0,t={...i,className:Pe(i.className,{"search-invisible":!e})};return d.jsx(N.Menu,{...t,children:i.children})}function ui(i){const e=i.data.label,t={...i.innerProps,"aria-label":e,role:"group"};return d.jsx(N.Group,{...i,innerProps:t})}function di(i){const t=Le().formatMessage({id:"noOptionsText"});return d.jsx(N.NoOptionsMessage,{...i,children:d.jsx(D.span,{className:"search-no-match",children:t})})}function hi(i){const t=Le().formatMessage({id:"loadingText"});return d.jsx(N.LoadingMessage,{...i,children:d.jsx(D.span,{className:"search-loading-text",children:t})})}function gi({children:i,...e}){const t={...e,className:Pe(e.className,"search-value-container")};return d.jsxs(N.ValueContainer,{...t,children:[!!i&&d.jsx(Ls,{style:{position:"absolute",left:8}}),i]})}function fi(i){const e={...i,isHidden:!1};return d.jsx(N.Input,{...e})}function mi(i){return null}function pi(i){return d.jsxs(N.IndicatorsContainer,{...i,children:[i.children,!i.selectProps.isLoading&&i.selectProps.inputValue&&d.jsx(yi,{selectProps:i.selectProps,clearValue:i.clearValue})]})}function yi(i){const t=Le().formatMessage({id:"ariaLabel.clearButton"}),n=s=>{s.preventDefault(),s.stopPropagation(),i.clearValue()};return d.jsx(Vn,{role:"button",size:"md",mr:1,"aria-label":t,onClick:n,onTouchEnd:n,onMouseDown:s=>s.preventDefault()})}function _i(i){return null}function vi(i){const e=i.selectProps.inputValue,t=i.data.label,n={...i,className:Pe(i.className,"search-option")};return d.jsx(N.Option,{...n,children:d.jsx(D.div,{className:"search-option-label",children:e.trim().length>0?Si(t,e):t})})}function Si(i,e){const t=i.toLowerCase().indexOf(e.toLowerCase());return t>=0?d.jsxs(d.Fragment,{children:[i.substring(0,t),d.jsx(D.span,{className:"search-highlighted-match",children:i.substring(t,t+e.length)},"highlighted"),i.substring(t+e.length)]}):i}const yt=ge("search:SearchController"),_t=200,vt=5;var ce,Y,J,X,T,be,zt;class xi{constructor(e,t){x(this,be);x(this,ce);x(this,Y,[]);x(this,J,vt);x(this,X,_t);x(this,T);C(this,ce,e),C(this,Y,t)}destroy(){v(this,T)?.abort(),C(this,T,void 0)}async search(e){if(v(this,T)?.abort(),C(this,T,void 0),!e)return[];const t=C(this,T,new AbortController);try{return await Ci(t.signal,v(this,X)),t.signal.aborted&&(yt.debug(`search canceled with ${e}`),Hn()),(await Promise.all(v(this,Y).map(s=>te(this,be,zt).call(this,s,e,t.signal)))).filter(s=>s!=null)}finally{v(this,T)===t&&C(this,T,void 0)}}get searchTypingDelay(){return v(this,X)}set searchTypingDelay(e){C(this,X,e??_t)}get maxResultsPerSource(){return v(this,J)}set maxResultsPerSource(e){C(this,J,e??vt)}get sources(){return v(this,Y)}}ce=new WeakMap,Y=new WeakMap,J=new WeakMap,X=new WeakMap,T=new WeakMap,be=new WeakSet,zt=async function(e,t,n){const s=e.label,r=v(this,ce).olMap.getView().getProjection();try{const o=v(this,J);let a=await e.search(t,{maxResults:o,signal:n,mapProjection:r});return a.length>o&&(a=a.slice(0,o)),{label:s,source:e,results:a}}catch(o){Ft(o)||yt.error(`search for source ${s} failed`,o);return}};async function Ci(i,e){i.aborted||await new Promise(t=>{const n=()=>{i.removeEventListener("abort",n),clearTimeout(s),t()};i.addEventListener("abort",n);const s=setTimeout(n,e)})}const we=ge("search:Search"),yr=i=>{const{sources:e,searchTypingDelay:t,maxResultsPerGroup:n,onSelect:s,onClear:r}=i,{containerProps:o}=H("search",i),{map:a}=B(i),l=Le(),c=Mi(e,t,n,a),{input:u,search:h,selectedOption:m,onInputChanged:g,onResultConfirmed:p}=Pi(c),_=Ei(),w=wi(l),F=bi(),O=V((E,$)=>{$.action==="input-change"&&g(E)}),S=V((E,$)=>{switch($.action){case"select-option":E&&(p(E),s?.({source:E.source,result:E.result}));break;case"clear":g(""),L.current?.blur(),L.current?.focus(),r?.();break;default:we.debug(`Unhandled action type '${$.action}'.`);break}}),L=f.useRef(null);return d.jsx(P,{...o,children:d.jsx(Ot,{className:"search-component",classNamePrefix:"react-select",ref:L,inputValue:u,onInputChange:O,"aria-label":l.formatMessage({id:"ariaLabel.search"}),ariaLiveMessages:w,colorScheme:"trails",selectedOptionStyle:"color",selectedOptionColorScheme:"trails",chakraStyles:_,isClearable:!0,placeholder:l.formatMessage({id:"searchPlaceholder"}),closeMenuOnSelect:!0,isLoading:h.kind==="loading",options:h.kind==="ready"?h.results:void 0,filterOption:()=>!0,tabSelectsValue:!1,components:F,onChange:S,value:m,menuPosition:"fixed"})})};function wi(i){return f.useMemo(()=>({onFocus:()=>"",onChange:()=>"",guidance:()=>`${i.formatMessage({id:"ariaLabel.instructions"})}`,onFilter:()=>""}),[i])}function bi(){return f.useMemo(()=>({Menu:ci,Input:fi,SingleValue:mi,Option:vi,NoOptionsMessage:di,LoadingMessage:hi,ValueContainer:gi,IndicatorsContainer:pi,ClearIndicator:_i,Group:ui}),[])}function Ei(){const[i,e]=Lt("colors",["trails.100","trails.50"],["#d5e5ec","#eaf2f5"]);return f.useMemo(()=>({groupHeading:n=>({...n,backgroundColor:i,padding:"8px 12px",fontSize:"inherit",fontWeight:"inherit"}),option:n=>({...n,backgroundColor:"inherit",_focus:{backgroundColor:e}}),dropdownIndicator:n=>({...n,display:"none"})}),[i,e])}function Mi(i,e,t,n){const[s,r]=f.useState(void 0);return f.useEffect(()=>{if(!n)return;const o=new xi(n,i);return r(o),()=>{o.destroy(),r(void 0)}},[n,i]),f.useEffect(()=>{s&&(s.searchTypingDelay=e)},[s,e]),f.useEffect(()=>{s&&(s.maxResultsPerSource=t)},[s,t]),s}function Pi(i){const[e,t]=f.useReducer((a,l)=>{switch(l.kind){case"input":return{...a,query:l.query,selectedOption:null};case"select-option":return{...a,selectedOption:l.option,query:l.option.label};case"load-results":return{...a,search:{kind:"loading"}};case"accept-results":return{...a,search:{kind:"ready",results:l.results}}}},void 0,()=>({query:"",selectedOption:null,search:{kind:"ready",results:[]}})),n=f.useRef(),s=V(a=>{if(!i){n.current=void 0,t({kind:"accept-results",results:[]});return}we.isDebug()&&we.debug(`Starting new search for query ${JSON.stringify(a)}.`),t({kind:"load-results"});const l=n.current=Fi(i,a).then(c=>{n.current===l&&t({kind:"accept-results",results:c})})}),r=f.useCallback(a=>{t({kind:"select-option",option:a})},[]),o=f.useCallback(a=>{t({kind:"input",query:a}),s(a)},[s]);return{input:e.query,search:e.search,selectedOption:e.selectedOption,onResultConfirmed:r,onInputChanged:o}}async function Fi(i,e){let t;try{t=await i.search(e)}catch(n){Ft(n)||we.error("Search failed",n),t=[]}return Li(t)}function Li(i){return i.map((t,n)=>({label:t.label,options:t.results.map(s=>({value:`${n}-${s.id}`,label:s.label,source:t.source,result:s}))}))}const Kt="@open-pioneer/selection",Ii=Ue.bind(void 0,Kt),Je=z.bind(void 0,Kt),ne="selection-active",pe="selection-inactive";class Ti{tooltip;interactionResources=[];olMap;isActive=!0;tooltipMessage;tooltipDisabledMessage;constructor(e,t,n,s){const r=this.initViewport(e);this.interactionResources.push(this.createDragBox(e,s,r,this.interactionResources)),this.interactionResources.push(this.createDrag(e,r,this.interactionResources)),this.tooltip=this.createHelpTooltip(e,t),this.olMap=e,this.tooltipMessage=t,this.tooltipDisabledMessage=n}initViewport(e){const t=e.getViewport();return t.classList.add(ne),t.oncontextmenu=n=>(n.preventDefault(),!1),t}destroy(){this.tooltip.destroy(),this.interactionResources.forEach(e=>{e.destroy()})}setActive(e){if(this.isActive===e)return;const t=this.olMap.getViewport();e?(this.interactionResources.forEach(n=>this.olMap.addInteraction(n.interaction)),this.tooltip.setText(this.tooltipMessage),t.classList.remove(pe),t.classList.add(ne),this.isActive=!0):(this.interactionResources.forEach(n=>this.olMap.removeInteraction(n.interaction)),this.tooltip.setText(this.tooltipDisabledMessage),t.classList.remove(ne),t.classList.add(pe),this.isActive=!1)}createDragBox(e,t,n,s){const r=new it({className:"selection-drag-box",condition:Nn});return e.addInteraction(r),r.on("boxend",function(){t(r.getGeometry())}),{interaction:r,destroy(){e.removeInteraction(r),s.splice(s.indexOf(this)),r.dispose(),n.classList.remove(ne),n.classList.remove(pe),n.oncontextmenu=null}}}createDrag(e,t,n){const s=function(a){return a.originalEvent.button==2},r=new rt({condition:s});return e.addInteraction(r),{interaction:r,destroy(){e.removeInteraction(r),n.splice(n.indexOf(this)),r.dispose(),t.classList.remove(ne),t.classList.remove(pe),t.oncontextmenu=null}}}createHelpTooltip(e,t){const n=document.createElement("div");n.className="selection-tooltip printing-hide",n.role="tooltip";const s=document.createElement("span");s.textContent=t,n.appendChild(s);const r=new Fe({element:n,offset:[15,0],positioning:"center-left"}),o=e.on("pointermove",a=>{r.setPosition(a.coordinate)});return e.addOverlay(r),{overlay:r,element:n,destroy(){e.removeOverlay(r),r.dispose(),A(o)},setText(a){s.textContent=a}}}getDragboxInteraction(){return this.interactionResources.find(e=>e.interaction instanceof it)}getDragPanInteraction(){return this.interactionResources.find(e=>e.interaction instanceof rt)}}const Ne=ge("selection:SelectionController"),ki=1e4;var ue,de,he,Ee,qt;class Ai{constructor(e){x(this,Ee);x(this,ue);x(this,de);x(this,he);const{mapModel:t,onError:n,maxResults:s=ki}=e;C(this,ue,t),C(this,de,s),C(this,he,n)}destroy(){}async select(e,t){if(t)return await te(this,Ee,qt).call(this,e,t)}}ue=new WeakMap,de=new WeakMap,he=new WeakMap,Ee=new WeakSet,qt=async function(e,t){const n=v(this,ue).olMap.getView().getProjection();try{Ne.debug(`Starting selection on source '${e.label}'`);const s=v(this,de);let r=await e.select({type:"extent",extent:t},{maxResults:s,mapProjection:n,signal:new AbortController().signal});return r.length>s&&(r=r.slice(0,s)),Ne.debug(`Found ${r.length} results on source '${e.label}'`),{source:e,results:r}}catch(s){Ne.error(`selection from source ${e.label} failed`,s),v(this,he).call(this);return}};const Ni={classNamePrefix:"react-select",menuPosition:"fixed",isSearchable:!1,isClearable:!1},_r=i=>{const e=Je(),{sources:t,onSelectionComplete:n,onSelectionSourceChanged:s}=i,{containerProps:r}=H("selection",i),o=e.formatMessage({id:"sourceNotAvailable"}),[a,l]=Ri(t,s),c=Jt(a,o),u=B(i),{onExtentSelected:h}=Di(u.map,t,a,n),m=Vi(),[g,p]=f.useState(!1);Gi(u.map,e,h,c.kind==="available",!!a);const _=f.useMemo(()=>t.map(S=>({label:S.label,value:S})),[t]),w=f.useMemo(()=>_.find(L=>L.value===a)||null,[_,a]),F=V(S=>{l(S?.value)}),O=V(S=>{!g&&S.key==="Enter"&&p(!0)});return d.jsx(Jn,{...r,spacing:2,children:d.jsxs(xe,{children:[d.jsx(Ce,{children:e.formatMessage({id:"selectSource"})}),d.jsx(Ot,{className:"selection-source react-select",...Ni,options:_,placeholder:e.formatMessage({id:"selectionPlaceholder"}),value:w,onChange:F,components:{Option:Oi,SingleValue:ji},isOptionDisabled:()=>!1,getOptionLabel:S=>{const L=S.label,E=He(S.value,o);return E.kind=="available"?L:L+" "+E.reason},ariaLiveMessages:{guidance:()=>"",onChange:S=>S.action=="select-option"||S.action=="initial-input-focus"?S.label+" "+e.formatMessage({id:"selected"}):"",onFilter:()=>"",onFocus:()=>""},chakraStyles:m,onKeyDown:O,menuIsOpen:g,onMenuOpen:()=>p(!0),onMenuClose:()=>p(!1)})]})})};function Oi(i){const{value:e}=i.data,{isAvailable:t,content:n}=Yt(e,!1);return d.jsx(N.Option,{...i,isDisabled:!t,className:"selection-source-option",children:n})}function ji(i){const{value:e}=i.data,{isAvailable:t,content:n}=Yt(e,!0),s=t?"selection-source-value":"selection-source-value selection-source-value--disabled";return d.jsx(N.SingleValue,{...i,isDisabled:!t,className:s,children:n})}function Ri(i,e){const[t,n]=f.useState(()=>i[0]);f.useEffect(()=>{t&&!i.includes(t)&&n(void 0)},[i,t]);const s=f.useRef(void 0);return f.useEffect(()=>{t!==s.current&&(s.current=t,e?.({source:t}))},[t,e]),[t,n]}function Yt(i,e){const t=Je(),n=i?.label,s=t.formatMessage({id:"sourceNotAvailable"}),r=Jt(i,s);return{isAvailable:r.kind==="available",content:d.jsxs(ot,{direction:"row",alignItems:"center",grow:1,children:[!e&&d.jsx(ot,{grow:1,children:n}),r.kind==="unavailable"&&d.jsx(P,{ml:2,children:d.jsx(Bn,{label:r.reason,placement:"right",openDelay:500,children:d.jsx(D.span,{children:d.jsx($n,{as:Xn,color:"red",className:"warning-icon","aria-label":r.reason})})})}),e&&n]})}}function Di(i,e,t,n){const s=Ii("notifier.NotificationService"),r=Je(),[o,a]=f.useState(void 0);f.useEffect(()=>{if(!i)return;const c=new Ai({mapModel:i,onError(){s.notify({level:"error",message:r.formatMessage({id:"selectionFailed"})})}});return a(c),()=>{c.destroy()}},[i,s,e,r]);const l=V(async c=>{if(!o||!t)return;const u=await o.select(t,c.getExtent());u&&n?.(u)});return{controller:o,onExtentSelected:l}}function He(i,e){const t=i.status??"available",n=typeof t=="string"?{kind:t}:t;return n.kind==="available"?n:{kind:"unavailable",reason:n.reason??e}}function Jt(i,e){const[t,n]=f.useState(()=>({kind:"unavailable",reason:e}));return f.useEffect(()=>{if(!i){n({kind:"unavailable",reason:e});return}n(He(i,e));const s=i.on?.("changed:status",()=>{n(He(i,e))});return()=>s?.destroy()},[i,e]),t}function Gi(i,e,t,n,s){f.useEffect(()=>{if(!i)return;const r=s?e.formatMessage({id:"disabledTooltip"}):e.formatMessage({id:"noSourceTooltip"}),o=new Ti(i.olMap,e.formatMessage({id:"tooltip"}),r,t);return o.setActive(n),()=>{o?.destroy()}},[i,e,t,n,s])}function Vi(){const[i,e]=Lt("colors",["background_body","border"],["#ffffff","#ffffff"]);return f.useMemo(()=>({control:n=>({...n,cursor:"pointer"}),indicatorSeparator:n=>({...n,borderColor:e}),dropdownIndicator:n=>({...n,backgroundColor:i})}),[i,e])}const Xt="@open-pioneer/printing",Zt=Ue.bind(void 0,Xt),Hi=z.bind(void 0,Xt),Bi="map";class $i{olMap;i18n;printingService;viewPadding;printMap=void 0;overlay=void 0;constructor(e,t,n){this.olMap=e,this.printingService=t,this.i18n=n}destroy(){this.reset()}setViewPadding(e){this.viewPadding=e}async handleMapExport(e){if(this.olMap)try{this.begin(),this.printMap=await this.printingService.printMap(this.olMap,{blockUserInteraction:!1,viewPadding:this.viewPadding});const t=this.printMap.getCanvas();if(t)e.fileFormat=="png"?await this.exportMapInPNG(t,e):await this.exportMapInPDF(t,e);else throw new Error("Canvas export failed")}finally{this.reset()}}begin(){const e=this.olMap.getTargetElement();e&&(this.overlay=Kn(e,this.i18n.overlayText))}reset(){this.overlay?.destroy(),this.overlay=void 0}getTitleAndFileName(e){const t=e.title||"",n=e.title||Bi;return{title:t,fileName:n}}async exportMapInPNG(e,t){const n=document.createElement("canvas");n.width=e.width,n.height=e.height+50,n.style.backgroundColor="#fff";const s=n.getContext("2d");if(!s)throw new Error("2d canvas rendering context not available");const{title:r,fileName:o}=this.getTitleAndFileName(t);s.fillStyle="#fff",s.fillRect(0,0,n.width,n.height),s.font="20px bold sans-serif",s.textAlign="center",s.fillStyle="#000";const a=n.width/2;s.fillText(r,a,20),s.drawImage(e,0,50);const l=document.createElement("a");l.setAttribute("download",o+".png");const c=qn(n);if(!c)throw new Error("Failed to get image data URL");l.href=c,l.click()}async exportMapInPDF(e,t){const{jsPDF:n}=await Zn(async()=>{const{jsPDF:F}=await import("./QpsqTuY2Z5jc.js");return{jsPDF:F}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),s=new n({orientation:"landscape",unit:"mm",format:"a4"}),r=s.internal.pageSize.getWidth(),o=s.internal.pageSize.getHeight(),a=15,l=20,c=o-l;s.setFontSize(20);const{title:u,fileName:h}=this.getTitleAndFileName(t);s.text(u,r/2,a,{align:"center"});const m=e.width/e.height;let g=c,p=g*m;p>=r&&(p=r,g=p/m);const _=(r-p)/2,w=l+(c-g)/2;s.addImage(e,"",_,w,p,g),s.save(h+".pdf")}}const Ui=ge("printing"),vr=i=>{const e=Hi(),{viewPadding:t="auto"}=i,{containerProps:n}=H("printing",i),[s,r]=f.useState("pdf"),[o,a]=f.useState(""),[l,c]=f.useState(!1),u=Zt("notifier.NotificationService"),{map:h}=B(i),m=Wi(h,e,t);function g(_){(_==="png"||_==="pdf")&&r(_)}function p(){l||!m||(c(!0),m.handleMapExport({title:o,fileFormat:s}).catch(_=>{const w=e.formatMessage({id:"printingFailed"});u.notify({level:"error",message:w}),Ui.error("Failed to print the map",_)}).finally(()=>{c(!1)}))}return d.jsx(P,{...n,children:d.jsxs(P,{as:"form",m:2,alignItems:"center",onSubmit:_=>{_.preventDefault(),p()},children:[d.jsxs(xe,{as:Ge,mb:2,children:[d.jsx(Ce,{minWidth:"82",mb:1,children:e.formatMessage({id:"title"})}),d.jsx(ze,{placeholder:e.formatMessage({id:"input.placeholder"}),value:o,onChange:_=>{a(_.target.value)},autoFocus:!0})]}),d.jsxs(xe,{as:Ge,mb:2,children:[d.jsx(Ce,{minWidth:"82",mb:1,children:e.formatMessage({id:"fileFormat"})}),d.jsxs(Ke,{value:s,onChange:_=>g(_.target.value),className:"printing-select",children:[d.jsx("option",{value:"png",children:"PNG"}),d.jsx("option",{value:"pdf",children:"PDF"})]})]}),d.jsx(Pt,{isLoading:l,loadingText:e.formatMessage({id:"printingMap"}),disabled:l,mt:2,p:2,className:"printing-export-button",type:"submit",width:"100%",children:e.formatMessage({id:"export"})})]})})};function Wi(i,e,t){const n=Zt("printing.PrintingService"),[s,r]=f.useState(void 0);return f.useEffect(()=>{if(!i)return;const o=new $i(i.olMap,n,{overlayText:e.formatMessage({id:"printingMap"})});return r(o),()=>{o.destroy(),r(void 0)}},[i,e,n]),f.useEffect(()=>{s?.setViewPadding(t)},[s,t]),s}export{hr as C,cr as E,ze as I,mr as L,pr as M,dr as N,Fe as O,vr as P,Gt as S,ur as V,lr as W,gr as a,fr as b,yr as c,_r as d,Dt as e,Ke as f,gs as u}; diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/DWXpGWYm5O7q.js b/openlayers-base-packages/pr-previews/pr-355/assets/DWXpGWYm5O7q.js new file mode 100644 index 0000000..9eabd76 --- /dev/null +++ b/openlayers-base-packages/pr-previews/pr-355/assets/DWXpGWYm5O7q.js @@ -0,0 +1,4 @@ +var z=a=>{throw TypeError(a)};var j=(a,e,t)=>e.has(a)||z("Cannot "+t);var C=(a,e,t)=>(j(a,e,"read from private field"),t?t.call(a):e.get(a)),D=(a,e,t)=>e.has(a)?z("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),T=(a,e,t,i)=>(j(a,e,"write to private field"),i?i.call(a,t):e.set(a,t),t),W=(a,e,t)=>(j(a,e,"access private method"),t);import{h as ie,j as X,r as I,a0 as de,l as J,c as ue,b as fe}from"./CzUo6bX8-UUU.js";import{_ as ge}from"./CmsKOCeNyeyo.js";import{bY as _e,bZ as me,v as pe,b_ as ye,b$ as Ce,c0 as we,be as ke,c1 as xe,bC as Te,bp as Q,bu as ve,a as Pe,b as Se,c2 as Le,bi as Z,bB as De,c3 as be,E as Ee,bn as w,c4 as Me,$ as Ie,bo as se,a$ as b,ao as V,c5 as ee,bx as Fe,ap as Re,an as ne,bA as Ne,c6 as Oe,c7 as re,c8 as Ge,aL as Ue,aN as Ae,b1 as te,ar as je}from"./B36mctiVgF5V.js";import{a as We,b as oe,M as ae,G as Ve}from"./DNaBv0QziP17.js";import{L as U}from"./Di-_YM5QvGet.js";var Y=ie(function(e,t){const{htmlWidth:i,htmlHeight:s,alt:r,...n}=e;return X.jsx("img",{width:i,height:s,ref:t,alt:r,...n})});Y.displayName="NativeImage";function Be(a){const{loading:e,src:t,srcSet:i,onLoad:s,onError:r,crossOrigin:n,sizes:o,ignoreFallback:h}=a,[l,c]=I.useState("pending");I.useEffect(()=>{c(t?"loading":"pending")},[t]);const d=I.useRef(),u=I.useCallback(()=>{if(!t)return;f();const g=new Image;g.src=t,n&&(g.crossOrigin=n),i&&(g.srcset=i),o&&(g.sizes=o),e&&(g.loading=e),g.onload=_=>{f(),c("loaded"),s?.(_)},g.onerror=_=>{f(),c("failed"),r?.(_)},d.current=g},[t,n,i,o,s,r,e]),f=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return de(()=>{if(!h)return l==="loading"&&u(),()=>{f()}},[l,u,h]),h?"loaded":l}var qe=(a,e)=>a!=="loaded"&&e==="beforeLoadOrError"||a==="failed"&&e==="onError";function He(a,e=[]){const t=Object.assign({},a);for(const i of e)i in t&&delete t[i];return t}var $e=ie(function(e,t){const{fallbackSrc:i,fallback:s,src:r,srcSet:n,align:o,fit:h,loading:l,ignoreFallback:c,crossOrigin:d,fallbackStrategy:u="beforeLoadOrError",referrerPolicy:f,...g}=e,_=i!==void 0||s!==void 0,m=l!=null||c||!_,x=Be({...e,crossOrigin:d,ignoreFallback:m}),k=qe(x,u),p={ref:t,objectFit:h,objectPosition:o,...m?g:He(g,["onError","onLoad"])};return k?s||X.jsx(J.img,{as:Y,className:"chakra-image__placeholder",src:i,...p}):X.jsx(J.img,{as:Y,src:r,srcSet:n,crossOrigin:d,loading:l,referrerPolicy:f,className:"chakra-image",...p})});$e.displayName="Image";class A extends _e{constructor(e,t,i){super(),i!==void 0&&t===void 0?this.setFlatCoordinates(i,e):(t=t||0,this.setCenterAndRadius(e,t,i))}clone(){const e=new A(this.flatCoordinates.slice(),void 0,this.layout);return e.applyProperties(this),e}closestPointXY(e,t,i,s){const r=this.flatCoordinates,n=e-r[0],o=t-r[1],h=n*n+o*o;if(h=i[0]||e[1]<=i[1]&&e[3]>=i[1]?!0:ye(e,this.intersectsCoordinate.bind(this))}return!1}setCenter(e){const t=this.stride,i=this.flatCoordinates[t]-this.flatCoordinates[0],s=e.slice();s[t]=s[0]+i;for(let r=1;r=t?a[e-t]:a[e]}function O(a,e,t){let i,s;en){const h=P(a,i),l=P(a,s);return N(h,l)}let o=0;if(iu.startIndex?_u.startIndex&&(_-=f.length)),h=_,o=d)}const l=e.targets[o];let c=l.ring;if(e.targetIndex===o&&c){const d=P(l.coordinates,h),u=t.getPixelFromCoordinate(d);se(u,e.startPx)>i&&(c=!1)}if(c){const d=l.coordinates,u=d.length,f=l.startIndex,g=h;if(f=t?i-=t:i<0&&(i+=t);let r=i+1;r>=t&&(r-=t);const n=a[i],o=n[0],h=n[1],l=a[r],c=l[0]-o,d=l[1]-h;return[o+c*s,h+d*s]}class Ke extends ke{constructor(e){const t=e;t.stopDown||(t.stopDown=xe),super(t),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=e.source?e.source:null,this.features_=e.features?e.features:null,this.snapTolerance_=e.snapTolerance?e.snapTolerance:12,this.type_=e.type,this.mode_=Je(this.type_),this.stopClick_=!!e.stopClick,this.minPoints_=e.minPoints?e.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:e.maxPoints?e.maxPoints:1/0,this.finishCondition_=e.finishCondition?e.finishCondition:Te,this.geometryLayout_=e.geometryLayout?e.geometryLayout:"XY";let i=e.geometryFunction;if(!i){const s=this.mode_;if(s==="Circle")i=function(r,n,o){const h=n||new A([NaN,NaN]),l=Q(r[0]),c=ve(l,Q(r[r.length-1]));return h.setCenterAndRadius(l,Math.sqrt(c),this.geometryLayout_),h};else{let r;s==="Point"?r=V:s==="LineString"?r=U:s==="Polygon"&&(r=ne),i=function(n,o,h){return o?s==="Polygon"?n[0].length?o.setCoordinates([n[0].concat([n[0][0]])],this.geometryLayout_):o.setCoordinates([],this.geometryLayout_):o.setCoordinates(n,this.geometryLayout_):o=new r(n,this.geometryLayout_),o}}}this.geometryFunction_=i,this.dragVertexDelay_=e.dragVertexDelay!==void 0?e.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,this.overlay_=new Pe({source:new Se({useSpatialIndex:!1,wrapX:e.wrapX?e.wrapX:!1}),style:e.style?e.style:ze(),updateWhileInteracting:!0}),this.geometryName_=e.geometryName,this.condition_=e.condition?e.condition:Le,this.freehandCondition_,e.freehand?this.freehandCondition_=Z:this.freehandCondition_=e.freehandCondition?e.freehandCondition:De,this.traceCondition_,this.setTrace(e.trace||!1),this.traceState_={active:!1},this.traceSource_=e.traceSource||e.source||null,this.addChangeListener(be.ACTIVE,this.updateState_)}setTrace(e){let t;e?e===!0?t=Z:t=e:t=Ne,this.traceCondition_=t}setMap(e){super.setMap(e),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(e){e.originalEvent.type===Ee.CONTEXTMENU&&e.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(e);let t=e.type===w.POINTERMOVE,i=!0;return!this.freehand_&&this.lastDragTime_&&e.type===w.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,t=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&e.type===w.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(e.coordinate),i=!1):this.freehand_&&e.type===w.POINTERDOWN?i=!1:t&&this.getPointerCount()<2?(i=e.type===w.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):(e.originalEvent.pointerType==="mouse"||e.type===w.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(e)):e.type===w.DBLCLICK&&(i=!1),super.handleEvent(e)&&i}handleDownEvent(e){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=e.pixel,this.finishCoordinate_||this.startDrawing_(e.coordinate),!0):this.condition_(e)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(()=>{this.handlePointerMove_(new Me(w.POINTERMOVE,e.map,e.originalEvent,!1,e.frameState))},this.dragVertexDelay_),this.downPx_=e.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(e){if(!this.traceSource_||!this.traceCondition_(e))return;if(this.traceState_.active){this.deactivateTrace_();return}const t=this.getMap(),i=t.getCoordinateFromPixel([e.pixel[0]-this.snapTolerance_,e.pixel[1]+this.snapTolerance_]),s=t.getCoordinateFromPixel([e.pixel[0]+this.snapTolerance_,e.pixel[1]-this.snapTolerance_]),r=Ie([i,s]),n=this.traceSource_.getFeaturesInExtent(r);if(n.length===0)return;const o=Xe(e.coordinate,n);o.length&&(this.traceState_={active:!0,startPx:e.pixel.slice(),targets:o,targetIndex:-1})}addOrRemoveTracedCoordinates_(e,t){const i=e.startIndex<=e.endIndex,s=e.startIndex<=t;i===s?i&&t>e.endIndex||!i&&te.endIndex)&&this.removeTracedCoordinates_(t,e.endIndex):(this.removeTracedCoordinates_(e.startIndex,e.endIndex),this.addTracedCoordinates_(e,e.startIndex,t))}removeTracedCoordinates_(e,t){if(e===t)return;let i=0;if(e0&&this.removeLastPoints_(i)}addTracedCoordinates_(e,t,i){if(t===i)return;const s=[];if(t=n;--o)s.push(v(e.coordinates,o))}s.length&&this.appendCoordinates(s)}updateTrace_(e){const t=this.traceState_;if(!t.active||t.targetIndex===-1&&se(t.startPx,e.pixel)this.squaredClickTolerance_:n<=this.squaredClickTolerance_,!this.shouldHandle_)return}if(!this.finishCoordinate_){this.createOrUpdateSketchPoint_(e.coordinate.slice());return}this.updateTrace_(e),this.modifyDrawing_(e.coordinate)}atFinish_(e,t){let i=!1;if(this.sketchFeature_){let s=!1,r=[this.finishCoordinate_];const n=this.mode_;if(n==="Point")i=!0;else if(n==="Circle")i=this.sketchCoords_.length===2;else if(n==="LineString")s=!t&&this.sketchCoords_.length>this.minPoints_;else if(n==="Polygon"){const o=this.sketchCoords_;s=o[0].length>this.minPoints_,r=[o[0][0],o[0][o[0].length-2]],t?r=[o[0][0]]:r=[o[0][0],o[0][o[0].length-2]]}if(s){const o=this.getMap();for(let h=0,l=r.length;h=this.maxPoints_&&(this.freehand_?r.pop():s=!0),r.push(e.slice()),this.geometryFunction_(r,t,i)):n==="Polygon"&&(r=this.sketchCoords_[0],r.length>=this.maxPoints_&&(this.freehand_?r.pop():s=!0),r.push(e.slice()),s&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,t,i)),this.createOrUpdateSketchPoint_(e.slice()),this.updateSketchFeatures_(),s?this.finishDrawing():this.sketchFeature_}removeLastPoints_(e){if(!this.sketchFeature_)return;const t=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),s=this.mode_;for(let r=0;r=2){this.finishCoordinate_=n[n.length-2].slice();const o=this.finishCoordinate_.slice();n[n.length-1]=o,this.createOrUpdateSketchPoint_(o)}this.geometryFunction_(n,t,i),t.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(s==="Polygon"){n=this.sketchCoords_[0],n.splice(-2,1);const o=this.sketchLine_.getGeometry();if(n.length>=2){const h=n[n.length-2].slice();n[n.length-1]=h,this.createOrUpdateSketchPoint_(h)}o.setCoordinates(n),this.geometryFunction_(this.sketchCoords_,t,i)}if(n.length===1){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const e=this.abortDrawing_();if(!e)return null;let t=this.sketchCoords_;const i=e.getGeometry(),s=this.getMap().getView().getProjection();return this.mode_==="LineString"?(t.pop(),this.geometryFunction_(t,i,s)):this.mode_==="Polygon"&&(t[0].pop(),this.geometryFunction_(t,i,s),t=i.getCoordinates()),this.type_==="MultiPoint"?e.setGeometry(new We([t])):this.type_==="MultiLineString"?e.setGeometry(new oe([t])):this.type_==="MultiPolygon"&&e.setGeometry(new ae([t])),this.dispatchEvent(new R(F.DRAWEND,e)),this.features_&&this.features_.push(e),this.source_&&this.source_.addFeature(e),e}abortDrawing_(){this.finishCoordinate_=null;const e=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),e}abortDrawing(){const e=this.abortDrawing_();e&&this.dispatchEvent(new R(F.DRAWABORT,e))}appendCoordinates(e){const t=this.mode_,i=!this.sketchFeature_;i&&this.startDrawing_(e[0]);let s;if(t==="LineString"||t==="Circle")s=this.sketchCoords_;else if(t==="Polygon")s=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;i&&s.shift(),s.pop();for(let n=0;n component has likely been used twice in your application.`),{destroy(){}};T(this,y,e);const t=C(this,S);if(T(this,S,void 0),t)for(const[s,...r]of t)e[s](...r);let i=!1;return{destroy:()=>{i||(i=!0,C(this,y)===e&&T(this,y,void 0))}}}}y=new WeakMap,S=new WeakMap,M=new WeakMap,L=new WeakSet,K=function(e,...t){if(C(this,y))C(this,y)[e](...t);else{const i=C(this,S)??T(this,S,[]);if(i.length>=1024){H.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:e,args:t});return}i.push([e,...t])}},Qe=function(){C(this,y)||H.warn(`No notification handler has been registered: notifications will not be visible. +Make sure that your app contains the component.`)};const $="units",Ze=[1,2,5],E=25.4/.28;class et extends Ue{constructor(e){e=e||{};const t=document.createElement("div");t.style.pointerEvents="none",super({element:t,render:e.render,target:e.target}),this.on,this.once,this.un;const i=e.className!==void 0?e.className:e.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=i+"-inner",this.element.className=i+" "+Ae,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=e.minWidth!==void 0?e.minWidth:64,this.maxWidth_=e.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener($,this.handleUnitsChanged_),this.setUnits(e.units||"metric"),this.scaleBar_=e.bar||!1,this.scaleBarSteps_=e.steps||4,this.scaleBarText_=e.text||!1,this.dpi_=e.dpi||void 0}getUnits(){return this.get($)}handleUnitsChanged_(){this.updateElement_()}setUnits(e){this.set($,e)}setDpi(e){this.dpi_=e}updateElement_(){const e=this.viewState_;if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const t=e.center,i=e.projection,s=this.getUnits(),r=s=="degrees"?"degrees":"m";let n=te(i,e.resolution,t,r);const o=this.minWidth_*(this.dpi_||E)/E,h=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||E)/E:void 0;let l=o*n,c="";if(s=="degrees"){const p=je.degrees;l*=p,l

=h){u=_,f=m,g=x;break}else if(f>=o)break;_=u,m=f,x=g,++d}const k=this.scaleBar_?this.createScaleBar(f,u,c):u.toFixed(g<0?-g:0)+" "+c;this.renderedHTML_!=k&&(this.innerElement_.innerHTML=k,this.renderedHTML_=k),this.renderedWidth_!=f&&(this.innerElement_.style.width=f+"px",this.renderedWidth_=f),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(e,t,i){const s=this.getScaleForResolution(),r=s<1?Math.round(1/s).toLocaleString()+" : 1":"1 : "+Math.round(s).toLocaleString(),n=this.scaleBarSteps_,o=e/n,h=[this.createMarker("absolute")];for(let c=0;c

`+this.createMarker("relative")+(c%2===0||n===2?this.createStepText(c,e,!1,t,i):"")+"")}return h.push(this.createStepText(n,e,!0,t,i)),(this.scaleBarText_?`
`+r+"
":"")+h.join("")}createMarker(e){return`
`}createStepText(e,t,i,s,r){const o=(e===0?0:Math.round(s/this.scaleBarSteps_*e*100)/100)+(e===0?"":" "+r),h=e===0?-3:t/this.scaleBarSteps_*-1,l=e===0?0:t/this.scaleBarSteps_*2;return`
`+o+"
"}getScaleForResolution(){const e=te(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),t=this.dpi_||E,i=1e3/25.4;return e*i*t}render(e){const t=e.frameState;t?this.viewState_=t.viewState:this.viewState_=null,this.updateElement_()}}const tt=.8,ce="printing-hide";function it(a,e){return a.toDataURL("image/png",e??tt)}function st(a,e){const t=document.createElement("div");t.classList.add("printing-overlay",ce),a.appendChild(t);const i=document.createElement("div");return i.classList.add("printing-overlay-status"),i.textContent=e,t.appendChild(i),{destroy(){t.remove()}}}class ft{defaultOverlayText;constructor(e){this.defaultOverlayText=e.intl.formatMessage({id:"printingMap"})}async printMap(e,t){return await new nt(e,{blockUserInteraction:!0,overlayText:this.defaultOverlayText,viewPadding:"auto",...t}).printMap()}}class nt{olMap;blockUserInteraction=!1;overlayText;viewPadding;running=!1;drawInformation=[];scaleLine=void 0;overlay=void 0;constructor(e,t){this.olMap=e,this.blockUserInteraction=t.blockUserInteraction,this.overlayText=t.overlayText,this.viewPadding=t.viewPadding}async printMap(){if(this.running)throw new Error("Printing already running.");try{await this.beginExport();let e=await this.printToCanvas(this.olMap.getViewport());if(!e)throw new Error("Canvas export failed");return this.viewPadding==="auto"&&(e=this.removePadding(e,this.getViewPadding())),new rt(e)}finally{this.reset()}}async beginExport(){this.running=!0;const e=this.olMap.getInteractions().getArray().filter(t=>t.getActive()&&t instanceof Ke);if(this.drawInformation=[],e?.forEach(t=>{const i=t,s=i.getOverlay().getStyle();i.getOverlay().setStyle(null),this.drawInformation?.push({draw:i,style:s})}),this.blockUserInteraction){const t=this.olMap?.getTargetElement();t&&(this.overlay=st(t,this.overlayText))}await this.addScaleLine()}async addScaleLine(){const t=(this.scaleLine=new et({className:"printing-scale-bar ol-scale-bar",bar:!0,text:!0,minWidth:125})).element;if(!t)throw new Error("Scale line does not have an element");let i=50,s=8;if(this.viewPadding==="auto"){const{bottom:h,left:l}=this.getViewPadding();i=Math.max(h+8,i),s+=l}t.style.setProperty("--printing-scale-bar-bottom",`${i}px`),t.style.setProperty("--printing-scale-bar-left",`${s}px`);const r=fe(),n=setTimeout(()=>{r.reject(new Error("Scale line did not render"))},3e3),o=this.scaleLine.render;this.scaleLine.render=(...h)=>{o.apply(this.scaleLine,h),r.resolve()},this.olMap?.addControl(this.scaleLine);try{await r.promise,await new Promise(h=>{requestAnimationFrame(h)})}finally{clearTimeout(n)}}async printToCanvas(e){const t={useCORS:!0,ignoreElements:function(r){if(r.classList&&typeof r.classList=="object"){const n=r.classList;return n.contains("map-anchors")||n.contains(ce)}return!1}},i=(await ge(async()=>{const{default:r}=await import("./BfxBtG_Oxhhm.js");return{default:r}},[],import.meta.url)).default;return await i(e,t)}reset(){this.scaleLine&&(this.olMap?.removeControl(this.scaleLine),this.scaleLine=void 0),this.overlay&&(this.overlay.destroy(),this.overlay=void 0),this.running=!1,this.drawInformation?.length&&this.drawInformation.forEach(e=>{e.draw.getOverlay().setStyle(e.style)})}removePadding(e,t){const i=window.devicePixelRatio||1,s={top:t.top*i,right:t.right*i,bottom:t.bottom*i,left:t.left*i};if(s.left===0&&s.right===0&&s.top===0&&s.bottom===0)return e;const{width:r,height:n}=e,o=document.createElement("canvas");o.width=r-s.left-s.right,o.height=n-s.top-s.bottom;const h=o.getContext("2d");if(!h)throw new Error("Failed to get a canvas context");return h.drawImage(e,s.left,s.top,o.width,o.height,0,0,o.width,o.height),o}getViewPadding(){const t=this.olMap.getView().padding??[0,0,0,0];return{top:t[0]??0,right:t[1]??0,bottom:t[2]??0,left:t[3]??0}}}class rt{canvas;constructor(e){this.canvas=e}getCanvas(){return this.canvas}getPNGDataURL(e){return it(this.canvas,e)}}export{Ke as D,$e as I,ut as N,ft as P,et as S,it as a,st as c}; diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/CwEDlz3FFp0l.js b/openlayers-base-packages/pr-previews/pr-355/assets/Dq5NOIDwoIu6.js similarity index 79% rename from openlayers-base-packages/pr-previews/pr-355/assets/CwEDlz3FFp0l.js rename to openlayers-base-packages/pr-previews/pr-355/assets/Dq5NOIDwoIu6.js index 04b14f9..18b5539 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/CwEDlz3FFp0l.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/Dq5NOIDwoIu6.js @@ -1 +1 @@ -import{j as t,c as q,a as U,r as p,B as I,i as K,b as $,d as A,F as Z,e as Y}from"./CzUo6bX8-UUU.js";import{B as d,V as J,S as j,T as X,O as Q,a as C,b as N,c as ee,C as te,F as oe,H as re,M as ie,u as ne,d as ae,e as v,f as x,g as L,h as M,i as y,D as se,j as le,k as ce}from"./B36mctiVgF5V.js";import{W as V,P as pe,a as de,b as ue,c as me,d as ge,e as he,f as fe,g as be,h as ve}from"./kPJ9UZ8lVIau.js";import{W as T,E as xe,V as we,S as Se,O as ye,C as ke,a as Me,b as je,L as Ce,M as Le,c as ze,d as _e,P as Pe,N as Ie}from"./CtkSqPB4B2ET.js";import{G as O,u as Ae,T as h,P as Te,a as De,b as Re,c as Ee,d as Fe,e as qe}from"./C1o_VwAkx5Nm.js";import{T as z}from"./CovJx79h1x39.js";import{r as D,a as R,b as Ne,V as Ve,S as Oe,u as b,I as He,Z as Ge,c as Be}from"./BUCtgDDw782G.js";import{N as We,P as Ue}from"./BZqu8ZKsC5y7.js";import{_ as E}from"./CmsKOCeNyeyo.js";import{H}from"./_YjaCHRtWzU8.js";import{G}from"./CkG3hRXjrvfc.js";import{R as Ke}from"./K_sKz2BiM23b.js";import{C as $e}from"./CdXIVWNpc0nj.js";import{D as Ze}from"./_05fvbTuDT_t.js";import"./DNaBv0QziP17.js";import"./Di-_YM5QvGet.js";import"./E5Cg9XwqIVqj.js";import"./SSUBJAaBGB7g.js";import"./0jkoYKtubXoE.js";import"./DAtS2L2h2gmX.js";import"./BSX9fy8BsUsv.js";import"./C41Ku2EWcQEd.js";import"./DXNMkmWkGPwJ.js";import"./DgJGd2MHfhXI.js";const Ye={height:"25px",width:"25px",borderColor:"#4cb3ff",borderWidth:"3px",borderRadius:"50%",display:"inline-block "};function Je(r){return t.jsxs(d,{children:[t.jsx(z,{children:r.layer.title}),t.jsx(d,{style:Ye})]})}const _="main";class Xe{mapId=_;vectorSourceFactory;constructor(e){this.vectorSourceFactory=e.references.vectorSourceFactory}async getMapConfig(){return{advanced:{view:new J({center:[404747,5757920],zoom:13,constrainResolution:!0,projection:"EPSG:25832"})},layers:[...Qe(),ot(),et(this.vectorSourceFactory),tt(),rt()]}}}function Qe(){return[new T({isBaseLayer:!0,title:"Topplus grau",url:"https://www.wmts.nrw.de/topplus_open/1.0.0/WMTSCapabilities.xml",name:"topplus_grau",matrixSet:"EPSG_25832_14",visible:!1,sourceOptions:{attributions:`Kartendarstellung und Präsentationsgraphiken: © Bundesamt für Kartographie und Geodäsie ${new Date().getFullYear()}, Datenquellen`}}),new T({isBaseLayer:!0,title:"Topplus farbig",url:"https://www.wmts.nrw.de/topplus_open/1.0.0/WMTSCapabilities.xml",name:"topplus_col",matrixSet:"EPSG_25832_14",visible:!0,sourceOptions:{attributions:`Kartendarstellung und Präsentationsgraphiken: © Bundesamt für Kartographie und Geodäsie ${new Date().getFullYear()}, Datenquellen`}}),new j({title:"OpenStreetMaps",visible:!1,isBaseLayer:!0,olLayer:new X({source:new Q})})]}function et(r){const e="https://ogc-api-test.nrw.de/inspire-us-krankenhaus/v1",o="governmentalservice",i=r.createVectorSource({strategy:"next",baseUrl:e,collectionId:o,limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/25832",attributions:`Land NRW (${new Date().getFullYear()}), Datenlizenz Deutschland - Namensnennung - Version 2.0, Datenquelle`}),n=new C({source:i});return new j({id:"krankenhaus",title:"Krankenhäuser",visible:!1,olLayer:n,attributes:{collectionURL:e+"/collections/"+o}})}function tt(){return new V({title:"Schulstandorte",description:"Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.",visible:!0,url:"https://www.wms.nrw.de/wms/wms_nw_inspire-schulen",sublayers:[{name:"US.education",title:"INSPIRE - WMS Schulstandorte NRW",attributes:{legend:{}}}],sourceOptions:{ratio:1}})}function ot(){return new V({title:"Straßennetz Landesbetrieb Straßenbau NRW",url:"https://www.wms.nrw.de/wms/strassen_nrw_wms",visible:!0,sublayers:[{name:"1",title:"Verwaltungen",attributes:{legend:{imageUrl:"https://www.wms.nrw.de/legends/wms/strassen_nrw_wms/1.png"}}},{name:"4",title:"Abschnitte und Äste"},{name:"6",title:"Unfälle"}]})}function rt(){const r={Component:Je},e=new N({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new O,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'}),o=new C({source:e,style:new ee({image:new te({fill:new oe({color:"blue"}),radius:4})})});return new j({id:"ogc_kitas",title:"Kindertagesstätten",visible:!0,olLayer:o,attributes:{legend:r,resultListMetadata:[{id:"id",displayName:"ID",width:100,getPropertyValue(i){return i.id}},{propertyName:"pointOfContact.address.postCode",displayName:"PLZ",width:120},{propertyName:"name",displayName:"Name"},{propertyName:"inspireId",displayName:"inspireID"},{displayName:"Gefördert",width:160,getPropertyValue(i){switch(i.properties?.gefoerdert){case"ja":return!0;case"nein":return!1;default:return i.properties?.gefoerdert}}}]}})}class it{label;filteredTypes;httpService;constructor(e,o,i){this.label=e,this.filteredTypes=o,this.httpService=i}async search(e,{mapProjection:o,signal:i}){const n=await this.request(e,100,i),a=new O({dataProjection:"EPSG:4326",featureProjection:o});return n.features.filter(s=>this.filteredTypes.includes(s.properties.type)).map((s,l)=>{const c=a.readGeometry(s.geometry);return{id:s.properties.osm_id||l,label:this.createLabel(s),geometry:c,properties:s.properties}})}async request(e,o,i){const n=new URL("https://photon.komoot.io/api?");n.searchParams.set("q",e),n.searchParams.set("lang","de"),n.searchParams.set("lat","51.961563"),n.searchParams.set("lon","7.628202"),n.searchParams.set("limit",o.toString());const a=await this.httpService.fetch(n,{signal:i});if(!a.ok)throw new Error("Request failed: "+a.status);return await a.json()}createLabel(e){return`${e.properties.name} (${e.properties.osm_value?e.properties.osm_value+", ":""}${e.properties.postcode?e.properties.postcode+", ":""}${e.properties.city?e.properties.city+", ":""}${e.properties.country?e.properties.country+")":")"}`}}const nt=q("ol-app:AppModel");function k(r){return r==="selection"||r==="measurement"||r.startsWith("editing-")}class at{_mapRegistry;_vectorSelectionSourceFactory;_httpService;_resources=[];_featureHighlight=void 0;_mainContent=D(["toc"]);_searchSources=R();_selectionSources=R();_sourceMetadata=Ne();_resultListState=D({key:0,open:!1,input:void 0});constructor({references:e}){this._mapRegistry=e.mapRegistry,this._vectorSelectionSourceFactory=e.vectorSelectionSourceFactory,this._httpService=e.httpService,this.initSearchSources(),this.initSelectionSources().catch(o=>{nt.error("Failed to initialize selection sources",o)})}destroy(){this.clearHighlight(),this._resources.forEach(e=>e.destroy())}get mainContent(){return this._mainContent.value}get searchSources(){return this._searchSources}get selectionSources(){return this._selectionSources}get sourceMetadata(){return this._sourceMetadata}get resultListState(){return this._resultListState.value}toggleMainContent(e){const o=this._mainContent.value;if(o.includes(e)){this._mainContent.value=o.filter(n=>n!==e);return}let i;k(e)?(i=[e],this.clearHighlight()):(i=o.filter(n=>!k(n)),i.push(e)),this._mainContent.value=i}hideContent(e){this._mainContent.value=this._mainContent.value.filter(o=>o!==e)}clearInteractions(){this._mainContent.value=this._mainContent.value.filter(e=>!k(e))}setResultListInput(e){const o=this._resultListState.value;this._resultListState.value={open:!0,key:o.key+1,input:e}}setResultListVisibility(e){this._resultListState.value={...this._resultListState.value,open:e}}highlightAndZoom(e,o){const i=e.olMap.getViewport();this.clearHighlight(),this._featureHighlight=e.highlightAndZoom(o,{viewPadding:i&&i.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}zoom(e,o){const i=e.olMap.getViewport();e.zoom(o,{viewPadding:i&&i.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}clearHighlight(){this._featureHighlight&&(this._featureHighlight.destroy(),this._featureHighlight=void 0)}initSearchSources(){const e=new it("Photon Geocoder",["city","street"],this._httpService);this._searchSources.push(e)}async initSelectionSources(){const e=["ogc_kitas","ogc_kataster"],i=(await this._mapRegistry.expectMapModel(_)).layers.getOperationalLayers({sortByDisplayOrder:!0});for(const n of i){if(!e.includes(n.id)||!st(n.olLayer))continue;const a=this._vectorSelectionSourceFactory.createSelectionSource({vectorLayer:n.olLayer,label:n.title}),s=a.on("changed:status",()=>{a.status!=="available"&&(a.status==="unavailable"||a.status?.kind==="unavailable")&&this.clearHighlight()});this._resources.push(s,a),this._selectionSources.unshift(a),this._sourceMetadata.set(a,n.attributes.resultListMetadata)}}}function st(r){return r instanceof C&&r.getSource()instanceof N}const lt={"ol-map":{name:"ol-map",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:Xe,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},AppModel:{name:"AppModel",clazz:at,provides:[{name:"ol-app.AppModel",qualifier:void 0}],references:{vectorSelectionSourceFactory:{name:"selection.VectorSelectionSourceFactory",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1},mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1},{name:"ol-app.AppModel",qualifier:void 0,all:!1},{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"editing.EditingService",qualifier:void 0,all:!1}]},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/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:re,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:We,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:ie,provides:[{name:"map.MapRegistry",qualifier:void 0}],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/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:Ve,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:Oe,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},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/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:Ue,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/editing":{name:"@open-pioneer/editing",services:{EditingServiceImpl:{name:"EditingServiceImpl",clazz:xe,provides:[{name:"editing.EditingService",qualifier:void 0}],references:{mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{polygonStyle:{value:{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"red","stroke-width":1.25,"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1},vertexStyle:{value:{"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1}}},"@open-pioneer/legend":{name:"@open-pioneer/legend",services:{},ui:{references:[]},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/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/selection":{name:"@open-pioneer/selection",services:{VectorSelectionSourceFactory:{name:"VectorSelectionSourceFactory",clazz:we,provides:[{name:"selection.VectorSelectionSourceFactory",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}}},ct='.search-box{position:absolute;width:500px;max-width:100%;z-index:1}: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)}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}.editing-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}.editing-tooltip-hidden{visibility:hidden}.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}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}.selection-drag-box{background-color:#ffffff4d!important;border:3px solid var(--chakra-colors-background_primary)!important}.selection-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}.selection .react-select{cursor:default}.map-container .selection-active{cursor:crosshair}.map-container .selection-inactive{cursor:no-drop}.selection-source-value.selection-source-value--disabled{opacity:.4}.selection-source-value.selection-source-value--disabled span{margin:0 6px 0 0}.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)}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',pt=["en","de"];function dt(r){switch(r){case"en":return E(()=>import("./BYGrfKr5WBJ9.js"),[],import.meta.url).then(e=>e.default);case"de":return E(()=>import("./C-s9YzO5rJEK.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${r}'`)}const ut=U(ct),mt=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:dt,locales:pt,packages:lt,styles:ut},Symbol.toStringTag,{value:"Module"})),B="ol-map",g=ae.bind(void 0,B),u=ne.bind(void 0,B),gt=q("ol-app:Editing");function F(r){const e=ht(r.kind),o=p.useId(),i=u();return t.jsx(d,{role:"dialog","aria-labelledby":o,children:t.jsx(v,{title:t.jsx(x,{id:o,size:"md",mb:2,children:i.formatMessage({id:"editing.title"})}),children:t.jsxs(d,{overflowY:"auto",maxHeight:300,children:[t.jsx(z,{textAlign:"center",children:i.formatMessage({id:"editing.active"})}),t.jsxs(H,{mt:4,align:"center",justify:"center",children:[t.jsx(I,{onClick:()=>{e?.reset()},children:i.formatMessage({id:"editing.resetGeometry"})}),t.jsx(I,{onClick:()=>{e?.destroy()},children:i.formatMessage({id:"editing.abort"})})]})]})})})}function ht(r){const e=g("notifier.NotificationService"),o=g("editing.EditingService"),i=u(),n=g("ol-app.AppModel"),{map:a}=L(),[s,l]=p.useState();return p.useEffect(()=>{if(!a)return;const c=new ft(e,o,a,i,n,r);return l(c),()=>{c.destroy(),l(void 0)}},[n,o,i,a,e,r]),s}class ft{notificationService;editingService;map;intl;appModel;kind;job;constructor(e,o,i,n,a,s){this.notificationService=e,this.editingService=o,this.map=i,this.intl=n,this.appModel=a,this.kind=s;let l;switch(s){case"create":l=this.createJob();break;case"update":l=this.updateJob();break}this.job=l,this.job.run().catch(c=>{K(c)||(gt.error("Edit operation failed",c),this.notificationService.notify({level:"error",message:this.intl.formatMessage({id:"editing.error"})}))}).finally(()=>{this.destroy()})}destroy(){this.job?.destroy(),this.job=void 0,this.appModel.hideContent(`editing-${this.kind}`)}reset(){this.job?.reset()}createJob(){let e;return{destroy(){e?.stop(),e=void 0},reset(){e?.reset()},run:async()=>{const o=this.findLayer(),i=new URL(o.attributes.collectionURL+"/items");e=this.editingService.createFeature(this.map,i);const n=await e.whenComplete();if(e=void 0,!n)return;this.notificationService.notify({level:"info",message:this.intl.formatMessage({id:"editing.create.featureCreated"},{featureId:n.featureId})}),(o?.olLayer).getSource()?.refresh()}}}updateJob(){const e=this.map,o=new AbortController,i=o.signal;let n,a,s;function l(){a&&e.olMap.removeInteraction(a),a&&a.dispose(),n&&n.destroy(),o.abort(),a=void 0,n=void 0}return{destroy(){l(),s?.stop(),s=void 0},reset(){s?.reset()},run:async()=>{const c=this.findLayer(),m=c.olLayer,w=new URL(c.attributes.collectionURL+"/items");a=new Se({layers:[m]}),e.olMap.addInteraction(a),n=bt(this.intl,e.olMap),n.element.classList.remove("editing-tooltip-hidden");let f;for(;;){const{selected:P,deselected:W}=await vt(a,i);if(P.length===1&&W.length===0){l(),f=P[0];break}}if(!f)throw Error("Feature is undefined");s=this.editingService.updateFeature(e,w,f);const S=await s.whenComplete();S&&(this.notificationService.notify({level:"info",message:this.intl.formatMessage({id:"editing.update.featureModified"},{featureId:S.featureId})}),m.getSource()?.refresh())}}}findLayer(){const e=this.map.layers.getLayerById("krankenhaus");if(!e)throw new Error("Layer not found");return e}}function bt(r,e){const o=document.createElement("div");o.className="editing-tooltip editing-tooltip-hidden",o.textContent=r.formatMessage({id:"editing.update.tooltip.select"});const i=new ye({element:o,offset:[15,0],positioning:"center-left"}),n=e.on("pointermove",a=>{a.dragging||i.setPosition(a.coordinate)});return e.addOverlay(i),{overlay:i,element:o,destroy(){M(n),e.removeOverlay(i)}}}function vt(r,e){let o;const{promise:i,resolve:n,reject:a}=$();if(e.aborted)return a(A()),i;const s=()=>{o&&M(o),o=void 0,a(A())};return e.addEventListener("abort",s),o=r.on("select",l=>{e.removeEventListener("abort",s),o&&M(o),o=void 0,n(l)}),i}function xt(){const r=u();return t.jsxs(y,{role:"region","aria-label":r.formatMessage({id:"ariaLabel.footer"}),gap:3,alignItems:"center",justifyContent:"center",children:[t.jsx(ke,{precision:2,displayProjectionCode:"EPSG:4326"}),t.jsx(Me,{}),t.jsx(je,{})]})}function wt(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"legendTitle"})}),children:t.jsx(d,{overflowY:"auto",maxHeight:300,children:t.jsx(Ce,{showBaseLayers:!0})})})})}function St(r){return G({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6.5 9.5l1.546 -1.311"},child:[]},{tag:"path",attr:{d:"M14 5.5l3 1.5"},child:[]},{tag:"path",attr:{d:"M18.5 10l-1.185 3.318m-1.062 2.972l-.253 .71"},child:[]},{tag:"path",attr:{d:"M13.5 17.5l-7 -5"},child:[]},{tag:"path",attr:{d:"M3 3l18 18"},child:[]}]})(r)}function yt(r){return G({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6.5 9.5l3.5 -3"},child:[]},{tag:"path",attr:{d:"M14 5.5l3 1.5"},child:[]},{tag:"path",attr:{d:"M18.5 10l-2.5 7"},child:[]},{tag:"path",attr:{d:"M13.5 17.5l-7 -5"},child:[]}]})(r)}function kt(){const r=u(),e=g("ol-app.AppModel"),o=b(()=>e.resultListState,[e]),i=o.open,{isTocActive:n,isLegendActive:a,isPrintingActive:s}=b(()=>({isTocActive:e.mainContent.includes("toc"),isLegendActive:e.mainContent.includes("legend"),isPrintingActive:e.mainContent.includes("printing")}),[e]);return t.jsxs(y,{role:"toolbar","aria-label":r.formatMessage({id:"ariaLabel.toolbar"}),direction:"column",gap:1,padding:1,children:[t.jsx(Mt,{}),o.input&&t.jsx(h,{label:r.formatMessage({id:"resultListTitle"}),icon:t.jsx(de,{}),isActive:o.open,onClick:()=>e.setResultListVisibility(!i)}),t.jsx(h,{label:r.formatMessage({id:"tocTitle"}),icon:t.jsx(ue,{}),isActive:n,onClick:()=>e.toggleMainContent("toc")}),t.jsx(h,{label:r.formatMessage({id:"legendTitle"}),icon:t.jsx(me,{}),isActive:a,onClick:()=>e.toggleMainContent("legend")}),t.jsx(h,{label:r.formatMessage({id:"printingTitle"}),icon:t.jsx(ge,{}),isActive:s,onClick:()=>e.toggleMainContent("printing")}),t.jsx(He,{}),t.jsx(Ge,{}),t.jsx(Be,{})]})}function Mt(){const r=u(),e=g("ol-app.AppModel"),[o,i]=p.useState(!1),{isSelectionActive:n,isMeasurementActive:a,isEditingCreateActive:s,isEditingUpdateActive:l}=b(()=>({isSelectionActive:e.mainContent.includes("selection"),isMeasurementActive:e.mainContent.includes("measurement"),isEditingCreateActive:e.mainContent.includes("editing-create"),isEditingUpdateActive:e.mainContent.includes("editing-update")}),[e]),c=f=>()=>{f(),i(!1)},m={placement:"top"},w=t.jsxs(t.Fragment,{children:[t.jsx(h,{label:s?r.formatMessage({id:"editing.stopTitle"}):r.formatMessage({id:"editing.create.startTitle"}),icon:s?t.jsx(St,{}):t.jsx(yt,{}),isActive:s,onClick:c(()=>e.toggleMainContent("editing-create")),tooltipProps:m}),t.jsx(h,{label:l?r.formatMessage({id:"editing.stopTitle"}):r.formatMessage({id:"editing.update.startTitle"}),icon:l?t.jsx(he,{}):t.jsx(fe,{}),isActive:l,onClick:c(()=>e.toggleMainContent("editing-update")),tooltipProps:m}),t.jsx(h,{label:r.formatMessage({id:"measurementTitle"}),icon:t.jsx(be,{}),isActive:a,onClick:c(()=>e.toggleMainContent("measurement")),tooltipProps:m}),t.jsx(h,{label:r.formatMessage({id:"selectionTitle"}),icon:t.jsx(ve,{}),isActive:n,onClick:c(()=>e.toggleMainContent("selection")),tooltipProps:m})]});return t.jsxs(Te,{placement:"left",isLazy:!0,onOpen:()=>i(!0),onClose:()=>i(!1),isOpen:o,children:[t.jsx(De,{children:t.jsx(jt,{})}),t.jsx(Z,{children:t.jsxs(Re,{width:"auto",children:[t.jsx(Ee,{}),t.jsx(Fe,{children:t.jsx(H,{spacing:2,children:w})})]})})]})}const jt=p.forwardRef(function(e,o){const i=u(),n=Ae(),{onClick:a,...s}=n.getTriggerProps();return t.jsx(h,{ref:o,label:i.formatMessage({id:"mapInteractions.title"}),icon:t.jsx(pe,{}),onClick:a,buttonProps:s})});function Ct(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"measurementTitle"})}),children:t.jsx(Le,{})})})}function Lt(){const r=g("ol-app.AppModel"),e=b(()=>r.resultListState,[r]),[o,i]=p.useState([]),[n,a]=p.useState([]),s=p.useCallback(l=>{i(l.features),a(l.getFeatureIds())},[]);return p.useEffect(()=>{console.log("Anzahl Features: "+o.length),console.log("SelectedIds: "+n.toString())},[o,n]),e.input&&t.jsx(d,{className:"result-list-container",position:"absolute",visibility:e.open?"visible":"hidden",bottom:"0",backgroundColor:"white",width:"100%",height:"400px",zIndex:1,borderTop:"2px solid",borderBottom:"2px solid",borderColor:"trails.100",children:t.jsx(Ke,{input:e.input,onSelectionChange:s},e.key)})}function zt(){const{map:r}=L(),e=g("ol-app.AppModel"),o=b(()=>e.searchSources.getItems(),[e]);function i(a){if(console.debug("The user selected the following item: ",a.result),!r)return;const s=a.result.geometry;s&&e.highlightAndZoom(r,[s])}function n(){console.debug("The user cleared the search"),e.clearHighlight()}return t.jsx(d,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",mt:5,className:"search-box",children:t.jsx(ze,{sources:o,maxResultsPerGroup:10,onSelect:i,onClear:n})})}function _t(){const r=u(),e=g("notifier.NotificationService"),o=p.useId(),{map:i}=L(),n=g("ol-app.AppModel"),a=b(()=>n.selectionSources.getItems(),[n]),s={numberOptions:{maximumFractionDigits:3},dateOptions:{dateStyle:"medium",timeStyle:"medium",timeZone:"UTC"}};function l(m){const{source:w,results:f}=m;if(!i){console.debug("Map not ready");return}const S=n.sourceMetadata.get(w);if(!S){console.warn("Can not show results because no metadata could be found");return}n.setResultListInput({columns:S,data:f,formatOptions:s}),e.notify({level:"info",message:r.formatMessage({id:"foundResults"},{resultsCount:f.length}),displayDuration:4e3})}function c(m){n.clearHighlight()}return t.jsx(d,{role:"dialog","aria-labelledby":o,children:t.jsx(v,{title:t.jsx(x,{id:o,size:"md",mb:2,children:r.formatMessage({id:"selectionTitle"})}),children:t.jsx(_e,{sources:a,onSelectionComplete:l,onSelectionSourceChanged:c})})})}function Pt(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:t.jsx(z,{children:e.formatMessage({id:"tocTitle"})})}),children:t.jsx(d,{overflowY:"auto",maxHeight:300,children:t.jsx(qe,{showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})})}function It(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"printingTitle"})}),children:t.jsx(Pe,{})})})}function At(){const r=u(),e=g("ol-app.AppModel"),{resultListState:o,mainContent:i}=b(()=>({resultListState:e.resultListState,mainContent:e.mainContent}),[e]),n=o.input&&o.open;return t.jsx(se,{mapId:_,children:t.jsxs(y,{height:"100%",direction:"column",overflow:"hidden",children:[t.jsx(Ie,{position:"top-right"}),t.jsxs(v,{title:t.jsx(d,{role:"region","aria-label":r.formatMessage({id:"ariaLabel.header"}),textAlign:"center",py:1,children:t.jsx(x,{size:"md",children:"Sample Application"})}),children:[t.jsx(y,{flex:"1",direction:"column",position:"relative",children:t.jsxs(le,{role:"main","aria-label":r.formatMessage({id:"ariaLabel.map"}),viewPadding:n?{bottom:400}:void 0,children:[t.jsx($e,{centerContent:!0,children:t.jsx(zt,{})}),t.jsx(Tt,{mainContent:i}),t.jsx(ce,{position:"bottom-right",horizontalGap:10,verticalGap:45,children:t.jsx(kt,{})}),t.jsx(Lt,{})]})}),t.jsx(xt,{})]})]})})}function Tt(r){const{mainContent:e}=r,o=p.useMemo(()=>{const i=n=>{switch(n){case"toc":return t.jsx(Pt,{},n);case"legend":return t.jsx(wt,{},n);case"printing":return t.jsx(It,{},n);case"selection":return t.jsx(_t,{},n);case"measurement":return t.jsx(Ct,{},n);case"editing-create":return t.jsx(F,{kind:"create"},n);case"editing-update":return t.jsx(F,{kind:"update"},n)}};return e.map(n=>i(n))},[e]);return t.jsx(Dt,{children:o})}function Dt(r){const e=r.children,o=[];for(const i of e)i&&(o.length&&o.push(t.jsx(Ze,{mt:4,mb:4},o.length)),o.push(i));if(o.length!==0)return t.jsx(d,{position:"absolute",top:"100px",left:4,maxHeight:"calc(100% - 140px)",width:350,maxWidth:350,zIndex:1,backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",overflow:"auto",children:o})}const Rt=new URLSearchParams(window.location.search),Et=Rt.get("lang")||void 0,Ft=Y({component:At,appMetadata:mt,config:{locale:Et,properties:{"@open-pioneer/local-storage":{storageId:"ol-app-state"}}}});customElements.define("ol-map-app",Ft); +import{j as t,c as q,a as U,r as p,B as I,i as K,b as $,d as A,F as Z,e as Y}from"./CzUo6bX8-UUU.js";import{B as d,V as J,S as j,T as X,O as Q,a as C,b as N,c as ee,C as te,F as oe,H as re,M as ie,u as ne,d as ae,e as v,f as x,g as L,h as M,i as y,D as se,j as le,k as ce}from"./B36mctiVgF5V.js";import{W as V,P as pe,a as de,b as ue,c as me,d as ge,e as he,f as fe,g as be,h as ve}from"./kPJ9UZ8lVIau.js";import{W as T,E as xe,V as we,S as Se,O as ye,C as ke,a as Me,b as je,L as Ce,M as Le,c as ze,d as _e,P as Pe,N as Ie}from"./DIiS5B7_zqGr.js";import{G as O,u as Ae,T as h,P as Te,a as De,b as Re,c as Ee,d as Fe,e as qe}from"./C1o_VwAkx5Nm.js";import{T as z}from"./CovJx79h1x39.js";import{r as D,a as R,b as Ne,V as Ve,S as Oe,u as b,I as He,Z as Ge,c as Be}from"./BUCtgDDw782G.js";import{N as We,P as Ue}from"./DWXpGWYm5O7q.js";import{_ as E}from"./CmsKOCeNyeyo.js";import{H}from"./_YjaCHRtWzU8.js";import{G}from"./CkG3hRXjrvfc.js";import{R as Ke}from"./K_sKz2BiM23b.js";import{C as $e}from"./CdXIVWNpc0nj.js";import{D as Ze}from"./_05fvbTuDT_t.js";import"./DNaBv0QziP17.js";import"./Di-_YM5QvGet.js";import"./E5Cg9XwqIVqj.js";import"./SSUBJAaBGB7g.js";import"./0jkoYKtubXoE.js";import"./DAtS2L2h2gmX.js";import"./BSX9fy8BsUsv.js";import"./C41Ku2EWcQEd.js";import"./DXNMkmWkGPwJ.js";import"./DgJGd2MHfhXI.js";const Ye={height:"25px",width:"25px",borderColor:"#4cb3ff",borderWidth:"3px",borderRadius:"50%",display:"inline-block "};function Je(r){return t.jsxs(d,{children:[t.jsx(z,{children:r.layer.title}),t.jsx(d,{style:Ye})]})}const _="main";class Xe{mapId=_;vectorSourceFactory;constructor(e){this.vectorSourceFactory=e.references.vectorSourceFactory}async getMapConfig(){return{advanced:{view:new J({center:[404747,5757920],zoom:13,constrainResolution:!0,projection:"EPSG:25832"})},layers:[...Qe(),ot(),et(this.vectorSourceFactory),tt(),rt()]}}}function Qe(){return[new T({isBaseLayer:!0,title:"Topplus grau",url:"https://www.wmts.nrw.de/topplus_open/1.0.0/WMTSCapabilities.xml",name:"topplus_grau",matrixSet:"EPSG_25832_14",visible:!1,sourceOptions:{attributions:`Kartendarstellung und Präsentationsgraphiken: © Bundesamt für Kartographie und Geodäsie ${new Date().getFullYear()}, Datenquellen`}}),new T({isBaseLayer:!0,title:"Topplus farbig",url:"https://www.wmts.nrw.de/topplus_open/1.0.0/WMTSCapabilities.xml",name:"topplus_col",matrixSet:"EPSG_25832_14",visible:!0,sourceOptions:{attributions:`Kartendarstellung und Präsentationsgraphiken: © Bundesamt für Kartographie und Geodäsie ${new Date().getFullYear()}, Datenquellen`}}),new j({title:"OpenStreetMaps",visible:!1,isBaseLayer:!0,olLayer:new X({source:new Q})})]}function et(r){const e="https://ogc-api-test.nrw.de/inspire-us-krankenhaus/v1",o="governmentalservice",i=r.createVectorSource({strategy:"next",baseUrl:e,collectionId:o,limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/25832",attributions:`Land NRW (${new Date().getFullYear()}), Datenlizenz Deutschland - Namensnennung - Version 2.0, Datenquelle`}),n=new C({source:i});return new j({id:"krankenhaus",title:"Krankenhäuser",visible:!1,olLayer:n,attributes:{collectionURL:e+"/collections/"+o}})}function tt(){return new V({title:"Schulstandorte",description:"Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.",visible:!0,url:"https://www.wms.nrw.de/wms/wms_nw_inspire-schulen",sublayers:[{name:"US.education",title:"INSPIRE - WMS Schulstandorte NRW",attributes:{legend:{}}}],sourceOptions:{ratio:1}})}function ot(){return new V({title:"Straßennetz Landesbetrieb Straßenbau NRW",url:"https://www.wms.nrw.de/wms/strassen_nrw_wms",visible:!0,sublayers:[{name:"1",title:"Verwaltungen",attributes:{legend:{imageUrl:"https://www.wms.nrw.de/legends/wms/strassen_nrw_wms/1.png"}}},{name:"4",title:"Abschnitte und Äste"},{name:"6",title:"Unfälle"}]})}function rt(){const r={Component:Je},e=new N({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new O,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'}),o=new C({source:e,style:new ee({image:new te({fill:new oe({color:"blue"}),radius:4})})});return new j({id:"ogc_kitas",title:"Kindertagesstätten",visible:!0,olLayer:o,attributes:{legend:r,resultListMetadata:[{id:"id",displayName:"ID",width:100,getPropertyValue(i){return i.id}},{propertyName:"pointOfContact.address.postCode",displayName:"PLZ",width:120},{propertyName:"name",displayName:"Name"},{propertyName:"inspireId",displayName:"inspireID"},{displayName:"Gefördert",width:160,getPropertyValue(i){switch(i.properties?.gefoerdert){case"ja":return!0;case"nein":return!1;default:return i.properties?.gefoerdert}}}]}})}class it{label;filteredTypes;httpService;constructor(e,o,i){this.label=e,this.filteredTypes=o,this.httpService=i}async search(e,{mapProjection:o,signal:i}){const n=await this.request(e,100,i),a=new O({dataProjection:"EPSG:4326",featureProjection:o});return n.features.filter(s=>this.filteredTypes.includes(s.properties.type)).map((s,l)=>{const c=a.readGeometry(s.geometry);return{id:s.properties.osm_id||l,label:this.createLabel(s),geometry:c,properties:s.properties}})}async request(e,o,i){const n=new URL("https://photon.komoot.io/api?");n.searchParams.set("q",e),n.searchParams.set("lang","de"),n.searchParams.set("lat","51.961563"),n.searchParams.set("lon","7.628202"),n.searchParams.set("limit",o.toString());const a=await this.httpService.fetch(n,{signal:i});if(!a.ok)throw new Error("Request failed: "+a.status);return await a.json()}createLabel(e){return`${e.properties.name} (${e.properties.osm_value?e.properties.osm_value+", ":""}${e.properties.postcode?e.properties.postcode+", ":""}${e.properties.city?e.properties.city+", ":""}${e.properties.country?e.properties.country+")":")"}`}}const nt=q("ol-app:AppModel");function k(r){return r==="selection"||r==="measurement"||r.startsWith("editing-")}class at{_mapRegistry;_vectorSelectionSourceFactory;_httpService;_resources=[];_featureHighlight=void 0;_mainContent=D(["toc"]);_searchSources=R();_selectionSources=R();_sourceMetadata=Ne();_resultListState=D({key:0,open:!1,input:void 0});constructor({references:e}){this._mapRegistry=e.mapRegistry,this._vectorSelectionSourceFactory=e.vectorSelectionSourceFactory,this._httpService=e.httpService,this.initSearchSources(),this.initSelectionSources().catch(o=>{nt.error("Failed to initialize selection sources",o)})}destroy(){this.clearHighlight(),this._resources.forEach(e=>e.destroy())}get mainContent(){return this._mainContent.value}get searchSources(){return this._searchSources}get selectionSources(){return this._selectionSources}get sourceMetadata(){return this._sourceMetadata}get resultListState(){return this._resultListState.value}toggleMainContent(e){const o=this._mainContent.value;if(o.includes(e)){this._mainContent.value=o.filter(n=>n!==e);return}let i;k(e)?(i=[e],this.clearHighlight()):(i=o.filter(n=>!k(n)),i.push(e)),this._mainContent.value=i}hideContent(e){this._mainContent.value=this._mainContent.value.filter(o=>o!==e)}clearInteractions(){this._mainContent.value=this._mainContent.value.filter(e=>!k(e))}setResultListInput(e){const o=this._resultListState.value;this._resultListState.value={open:!0,key:o.key+1,input:e}}setResultListVisibility(e){this._resultListState.value={...this._resultListState.value,open:e}}highlightAndZoom(e,o){const i=e.olMap.getViewport();this.clearHighlight(),this._featureHighlight=e.highlightAndZoom(o,{viewPadding:i&&i.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}zoom(e,o){const i=e.olMap.getViewport();e.zoom(o,{viewPadding:i&&i.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}clearHighlight(){this._featureHighlight&&(this._featureHighlight.destroy(),this._featureHighlight=void 0)}initSearchSources(){const e=new it("Photon Geocoder",["city","street"],this._httpService);this._searchSources.push(e)}async initSelectionSources(){const e=["ogc_kitas","ogc_kataster"],i=(await this._mapRegistry.expectMapModel(_)).layers.getOperationalLayers({sortByDisplayOrder:!0});for(const n of i){if(!e.includes(n.id)||!st(n.olLayer))continue;const a=this._vectorSelectionSourceFactory.createSelectionSource({vectorLayer:n.olLayer,label:n.title}),s=a.on("changed:status",()=>{a.status!=="available"&&(a.status==="unavailable"||a.status?.kind==="unavailable")&&this.clearHighlight()});this._resources.push(s,a),this._selectionSources.unshift(a),this._sourceMetadata.set(a,n.attributes.resultListMetadata)}}}function st(r){return r instanceof C&&r.getSource()instanceof N}const lt={"ol-map":{name:"ol-map",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:Xe,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},AppModel:{name:"AppModel",clazz:at,provides:[{name:"ol-app.AppModel",qualifier:void 0}],references:{vectorSelectionSourceFactory:{name:"selection.VectorSelectionSourceFactory",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1},mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1},{name:"ol-app.AppModel",qualifier:void 0,all:!1},{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"editing.EditingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/editing":{name:"@open-pioneer/editing",services:{EditingServiceImpl:{name:"EditingServiceImpl",clazz:xe,provides:[{name:"editing.EditingService",qualifier:void 0}],references:{mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{polygonStyle:{value:{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"red","stroke-width":1.25,"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1},vertexStyle:{value:{"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1}}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:re,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/legend":{name:"@open-pioneer/legend",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:ie,provides:[{name:"map.MapRegistry",qualifier:void 0}],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-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:We,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:Ve,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:Oe,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:Ue,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",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/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/selection":{name:"@open-pioneer/selection",services:{VectorSelectionSourceFactory:{name:"VectorSelectionSourceFactory",clazz:we,provides:[{name:"selection.VectorSelectionSourceFactory",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},ct='.search-box{position:absolute;width:500px;max-width:100%;z-index:1}.editing-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}.editing-tooltip-hidden{visibility:hidden}: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)}.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}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}.selection-drag-box{background-color:#ffffff4d!important;border:3px solid var(--chakra-colors-background_primary)!important}.selection-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}.selection .react-select{cursor:default}.map-container .selection-active{cursor:crosshair}.map-container .selection-inactive{cursor:no-drop}.selection-source-value.selection-source-value--disabled{opacity:.4}.selection-source-value.selection-source-value--disabled span{margin:0 6px 0 0}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}.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)}',pt=["en","de"];function dt(r){switch(r){case"en":return E(()=>import("./BYGrfKr5WBJ9.js"),[],import.meta.url).then(e=>e.default);case"de":return E(()=>import("./C-s9YzO5rJEK.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${r}'`)}const ut=U(ct),mt=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:dt,locales:pt,packages:lt,styles:ut},Symbol.toStringTag,{value:"Module"})),B="ol-map",g=ae.bind(void 0,B),u=ne.bind(void 0,B),gt=q("ol-app:Editing");function F(r){const e=ht(r.kind),o=p.useId(),i=u();return t.jsx(d,{role:"dialog","aria-labelledby":o,children:t.jsx(v,{title:t.jsx(x,{id:o,size:"md",mb:2,children:i.formatMessage({id:"editing.title"})}),children:t.jsxs(d,{overflowY:"auto",maxHeight:300,children:[t.jsx(z,{textAlign:"center",children:i.formatMessage({id:"editing.active"})}),t.jsxs(H,{mt:4,align:"center",justify:"center",children:[t.jsx(I,{onClick:()=>{e?.reset()},children:i.formatMessage({id:"editing.resetGeometry"})}),t.jsx(I,{onClick:()=>{e?.destroy()},children:i.formatMessage({id:"editing.abort"})})]})]})})})}function ht(r){const e=g("notifier.NotificationService"),o=g("editing.EditingService"),i=u(),n=g("ol-app.AppModel"),{map:a}=L(),[s,l]=p.useState();return p.useEffect(()=>{if(!a)return;const c=new ft(e,o,a,i,n,r);return l(c),()=>{c.destroy(),l(void 0)}},[n,o,i,a,e,r]),s}class ft{notificationService;editingService;map;intl;appModel;kind;job;constructor(e,o,i,n,a,s){this.notificationService=e,this.editingService=o,this.map=i,this.intl=n,this.appModel=a,this.kind=s;let l;switch(s){case"create":l=this.createJob();break;case"update":l=this.updateJob();break}this.job=l,this.job.run().catch(c=>{K(c)||(gt.error("Edit operation failed",c),this.notificationService.notify({level:"error",message:this.intl.formatMessage({id:"editing.error"})}))}).finally(()=>{this.destroy()})}destroy(){this.job?.destroy(),this.job=void 0,this.appModel.hideContent(`editing-${this.kind}`)}reset(){this.job?.reset()}createJob(){let e;return{destroy(){e?.stop(),e=void 0},reset(){e?.reset()},run:async()=>{const o=this.findLayer(),i=new URL(o.attributes.collectionURL+"/items");e=this.editingService.createFeature(this.map,i);const n=await e.whenComplete();if(e=void 0,!n)return;this.notificationService.notify({level:"info",message:this.intl.formatMessage({id:"editing.create.featureCreated"},{featureId:n.featureId})}),(o?.olLayer).getSource()?.refresh()}}}updateJob(){const e=this.map,o=new AbortController,i=o.signal;let n,a,s;function l(){a&&e.olMap.removeInteraction(a),a&&a.dispose(),n&&n.destroy(),o.abort(),a=void 0,n=void 0}return{destroy(){l(),s?.stop(),s=void 0},reset(){s?.reset()},run:async()=>{const c=this.findLayer(),m=c.olLayer,w=new URL(c.attributes.collectionURL+"/items");a=new Se({layers:[m]}),e.olMap.addInteraction(a),n=bt(this.intl,e.olMap),n.element.classList.remove("editing-tooltip-hidden");let f;for(;;){const{selected:P,deselected:W}=await vt(a,i);if(P.length===1&&W.length===0){l(),f=P[0];break}}if(!f)throw Error("Feature is undefined");s=this.editingService.updateFeature(e,w,f);const S=await s.whenComplete();S&&(this.notificationService.notify({level:"info",message:this.intl.formatMessage({id:"editing.update.featureModified"},{featureId:S.featureId})}),m.getSource()?.refresh())}}}findLayer(){const e=this.map.layers.getLayerById("krankenhaus");if(!e)throw new Error("Layer not found");return e}}function bt(r,e){const o=document.createElement("div");o.className="editing-tooltip editing-tooltip-hidden",o.textContent=r.formatMessage({id:"editing.update.tooltip.select"});const i=new ye({element:o,offset:[15,0],positioning:"center-left"}),n=e.on("pointermove",a=>{a.dragging||i.setPosition(a.coordinate)});return e.addOverlay(i),{overlay:i,element:o,destroy(){M(n),e.removeOverlay(i)}}}function vt(r,e){let o;const{promise:i,resolve:n,reject:a}=$();if(e.aborted)return a(A()),i;const s=()=>{o&&M(o),o=void 0,a(A())};return e.addEventListener("abort",s),o=r.on("select",l=>{e.removeEventListener("abort",s),o&&M(o),o=void 0,n(l)}),i}function xt(){const r=u();return t.jsxs(y,{role:"region","aria-label":r.formatMessage({id:"ariaLabel.footer"}),gap:3,alignItems:"center",justifyContent:"center",children:[t.jsx(ke,{precision:2,displayProjectionCode:"EPSG:4326"}),t.jsx(Me,{}),t.jsx(je,{})]})}function wt(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"legendTitle"})}),children:t.jsx(d,{overflowY:"auto",maxHeight:300,children:t.jsx(Ce,{showBaseLayers:!0})})})})}function St(r){return G({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6.5 9.5l1.546 -1.311"},child:[]},{tag:"path",attr:{d:"M14 5.5l3 1.5"},child:[]},{tag:"path",attr:{d:"M18.5 10l-1.185 3.318m-1.062 2.972l-.253 .71"},child:[]},{tag:"path",attr:{d:"M13.5 17.5l-7 -5"},child:[]},{tag:"path",attr:{d:"M3 3l18 18"},child:[]}]})(r)}function yt(r){return G({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6.5 9.5l3.5 -3"},child:[]},{tag:"path",attr:{d:"M14 5.5l3 1.5"},child:[]},{tag:"path",attr:{d:"M18.5 10l-2.5 7"},child:[]},{tag:"path",attr:{d:"M13.5 17.5l-7 -5"},child:[]}]})(r)}function kt(){const r=u(),e=g("ol-app.AppModel"),o=b(()=>e.resultListState,[e]),i=o.open,{isTocActive:n,isLegendActive:a,isPrintingActive:s}=b(()=>({isTocActive:e.mainContent.includes("toc"),isLegendActive:e.mainContent.includes("legend"),isPrintingActive:e.mainContent.includes("printing")}),[e]);return t.jsxs(y,{role:"toolbar","aria-label":r.formatMessage({id:"ariaLabel.toolbar"}),direction:"column",gap:1,padding:1,children:[t.jsx(Mt,{}),o.input&&t.jsx(h,{label:r.formatMessage({id:"resultListTitle"}),icon:t.jsx(de,{}),isActive:o.open,onClick:()=>e.setResultListVisibility(!i)}),t.jsx(h,{label:r.formatMessage({id:"tocTitle"}),icon:t.jsx(ue,{}),isActive:n,onClick:()=>e.toggleMainContent("toc")}),t.jsx(h,{label:r.formatMessage({id:"legendTitle"}),icon:t.jsx(me,{}),isActive:a,onClick:()=>e.toggleMainContent("legend")}),t.jsx(h,{label:r.formatMessage({id:"printingTitle"}),icon:t.jsx(ge,{}),isActive:s,onClick:()=>e.toggleMainContent("printing")}),t.jsx(He,{}),t.jsx(Ge,{}),t.jsx(Be,{})]})}function Mt(){const r=u(),e=g("ol-app.AppModel"),[o,i]=p.useState(!1),{isSelectionActive:n,isMeasurementActive:a,isEditingCreateActive:s,isEditingUpdateActive:l}=b(()=>({isSelectionActive:e.mainContent.includes("selection"),isMeasurementActive:e.mainContent.includes("measurement"),isEditingCreateActive:e.mainContent.includes("editing-create"),isEditingUpdateActive:e.mainContent.includes("editing-update")}),[e]),c=f=>()=>{f(),i(!1)},m={placement:"top"},w=t.jsxs(t.Fragment,{children:[t.jsx(h,{label:s?r.formatMessage({id:"editing.stopTitle"}):r.formatMessage({id:"editing.create.startTitle"}),icon:s?t.jsx(St,{}):t.jsx(yt,{}),isActive:s,onClick:c(()=>e.toggleMainContent("editing-create")),tooltipProps:m}),t.jsx(h,{label:l?r.formatMessage({id:"editing.stopTitle"}):r.formatMessage({id:"editing.update.startTitle"}),icon:l?t.jsx(he,{}):t.jsx(fe,{}),isActive:l,onClick:c(()=>e.toggleMainContent("editing-update")),tooltipProps:m}),t.jsx(h,{label:r.formatMessage({id:"measurementTitle"}),icon:t.jsx(be,{}),isActive:a,onClick:c(()=>e.toggleMainContent("measurement")),tooltipProps:m}),t.jsx(h,{label:r.formatMessage({id:"selectionTitle"}),icon:t.jsx(ve,{}),isActive:n,onClick:c(()=>e.toggleMainContent("selection")),tooltipProps:m})]});return t.jsxs(Te,{placement:"left",isLazy:!0,onOpen:()=>i(!0),onClose:()=>i(!1),isOpen:o,children:[t.jsx(De,{children:t.jsx(jt,{})}),t.jsx(Z,{children:t.jsxs(Re,{width:"auto",children:[t.jsx(Ee,{}),t.jsx(Fe,{children:t.jsx(H,{spacing:2,children:w})})]})})]})}const jt=p.forwardRef(function(e,o){const i=u(),n=Ae(),{onClick:a,...s}=n.getTriggerProps();return t.jsx(h,{ref:o,label:i.formatMessage({id:"mapInteractions.title"}),icon:t.jsx(pe,{}),onClick:a,buttonProps:s})});function Ct(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"measurementTitle"})}),children:t.jsx(Le,{})})})}function Lt(){const r=g("ol-app.AppModel"),e=b(()=>r.resultListState,[r]),[o,i]=p.useState([]),[n,a]=p.useState([]),s=p.useCallback(l=>{i(l.features),a(l.getFeatureIds())},[]);return p.useEffect(()=>{console.log("Anzahl Features: "+o.length),console.log("SelectedIds: "+n.toString())},[o,n]),e.input&&t.jsx(d,{className:"result-list-container",position:"absolute",visibility:e.open?"visible":"hidden",bottom:"0",backgroundColor:"white",width:"100%",height:"400px",zIndex:1,borderTop:"2px solid",borderBottom:"2px solid",borderColor:"trails.100",children:t.jsx(Ke,{input:e.input,onSelectionChange:s},e.key)})}function zt(){const{map:r}=L(),e=g("ol-app.AppModel"),o=b(()=>e.searchSources.getItems(),[e]);function i(a){if(console.debug("The user selected the following item: ",a.result),!r)return;const s=a.result.geometry;s&&e.highlightAndZoom(r,[s])}function n(){console.debug("The user cleared the search"),e.clearHighlight()}return t.jsx(d,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",mt:5,className:"search-box",children:t.jsx(ze,{sources:o,maxResultsPerGroup:10,onSelect:i,onClear:n})})}function _t(){const r=u(),e=g("notifier.NotificationService"),o=p.useId(),{map:i}=L(),n=g("ol-app.AppModel"),a=b(()=>n.selectionSources.getItems(),[n]),s={numberOptions:{maximumFractionDigits:3},dateOptions:{dateStyle:"medium",timeStyle:"medium",timeZone:"UTC"}};function l(m){const{source:w,results:f}=m;if(!i){console.debug("Map not ready");return}const S=n.sourceMetadata.get(w);if(!S){console.warn("Can not show results because no metadata could be found");return}n.setResultListInput({columns:S,data:f,formatOptions:s}),e.notify({level:"info",message:r.formatMessage({id:"foundResults"},{resultsCount:f.length}),displayDuration:4e3})}function c(m){n.clearHighlight()}return t.jsx(d,{role:"dialog","aria-labelledby":o,children:t.jsx(v,{title:t.jsx(x,{id:o,size:"md",mb:2,children:r.formatMessage({id:"selectionTitle"})}),children:t.jsx(_e,{sources:a,onSelectionComplete:l,onSelectionSourceChanged:c})})})}function Pt(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:t.jsx(z,{children:e.formatMessage({id:"tocTitle"})})}),children:t.jsx(d,{overflowY:"auto",maxHeight:300,children:t.jsx(qe,{showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})})}function It(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"printingTitle"})}),children:t.jsx(Pe,{})})})}function At(){const r=u(),e=g("ol-app.AppModel"),{resultListState:o,mainContent:i}=b(()=>({resultListState:e.resultListState,mainContent:e.mainContent}),[e]),n=o.input&&o.open;return t.jsx(se,{mapId:_,children:t.jsxs(y,{height:"100%",direction:"column",overflow:"hidden",children:[t.jsx(Ie,{position:"top-right"}),t.jsxs(v,{title:t.jsx(d,{role:"region","aria-label":r.formatMessage({id:"ariaLabel.header"}),textAlign:"center",py:1,children:t.jsx(x,{size:"md",children:"Sample Application"})}),children:[t.jsx(y,{flex:"1",direction:"column",position:"relative",children:t.jsxs(le,{role:"main","aria-label":r.formatMessage({id:"ariaLabel.map"}),viewPadding:n?{bottom:400}:void 0,children:[t.jsx($e,{centerContent:!0,children:t.jsx(zt,{})}),t.jsx(Tt,{mainContent:i}),t.jsx(ce,{position:"bottom-right",horizontalGap:10,verticalGap:45,children:t.jsx(kt,{})}),t.jsx(Lt,{})]})}),t.jsx(xt,{})]})]})})}function Tt(r){const{mainContent:e}=r,o=p.useMemo(()=>{const i=n=>{switch(n){case"toc":return t.jsx(Pt,{},n);case"legend":return t.jsx(wt,{},n);case"printing":return t.jsx(It,{},n);case"selection":return t.jsx(_t,{},n);case"measurement":return t.jsx(Ct,{},n);case"editing-create":return t.jsx(F,{kind:"create"},n);case"editing-update":return t.jsx(F,{kind:"update"},n)}};return e.map(n=>i(n))},[e]);return t.jsx(Dt,{children:o})}function Dt(r){const e=r.children,o=[];for(const i of e)i&&(o.length&&o.push(t.jsx(Ze,{mt:4,mb:4},o.length)),o.push(i));if(o.length!==0)return t.jsx(d,{position:"absolute",top:"100px",left:4,maxHeight:"calc(100% - 140px)",width:350,maxWidth:350,zIndex:1,backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",overflow:"auto",children:o})}const Rt=new URLSearchParams(window.location.search),Et=Rt.get("lang")||void 0,Ft=Y({component:At,appMetadata:mt,config:{locale:Et,properties:{"@open-pioneer/local-storage":{storageId:"ol-app-state"}}}});customElements.define("ol-map-app",Ft); diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/B2JeDJc3u--N.js b/openlayers-base-packages/pr-previews/pr-355/assets/H7VhUBOXt34K.js similarity index 92% rename from openlayers-base-packages/pr-previews/pr-355/assets/B2JeDJc3u--N.js rename to openlayers-base-packages/pr-previews/pr-355/assets/H7VhUBOXt34K.js index 3865b1b..0fe00b7 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/B2JeDJc3u--N.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/H7VhUBOXt34K.js @@ -1 +1 @@ -import{j as o,l as I,a as O,r as v,B as t,e as W}from"./CzUo6bX8-UUU.js";import{S as F,T as U,O as G,M as T,H as B,c as i,aC as f,ay as l,F as w,g as N,ao as h,an as m,i as k,e as Q,B as y,f as E,j as V,k as A}from"./B36mctiVgF5V.js";import{L as z}from"./Di-_YM5QvGet.js";import{T as u,S as j,V as K,U as q,a}from"./CovJx79h1x39.js";import{H as d}from"./_YjaCHRtWzU8.js";import{C as Y}from"./DXNMkmWkGPwJ.js";import"./0jkoYKtubXoE.js";var M=r=>o.jsx(I.div,{className:"chakra-stack__divider",...r,__css:{...r.__css,borderWidth:0,alignSelf:"stretch",borderColor:"inherit",width:"auto",height:"auto"}});M.displayName="StackDivider";const b="main";class J{mapId=b;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new F({title:"OSM",isBaseLayer:!0,olLayer:new U({source:new G})})]}}}const X={"highlight-and-zoom-app":{name:"highlight-and-zoom-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:J,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/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:T,provides:[{name:"map.MapRegistry",qualifier:void 0}],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/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:B,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},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:{}}},_=':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)}',$=[];function oo(r){throw new Error(`Unsupported locale: '${r}'`)}const eo=O(_),ro=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:oo,locales:$,packages:X,styles:eo},Symbol.toStringTag,{value:"Module"})),C="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAM6SURBVGhD7Zn7TtRAFMZn2l2MRuWuBg2aGEX/MMLCC5iUx/UJ6CNw0WiiRBFBJaLAilyMbNvxO8tpgkDbM9MxarK/ZNPvdJfpt6dnznQW1aOHDM1Hb1x9PrvYSEx/YNQlijOtDpOG3v3+eK7V/YAnvBgfWozeKKPGYbCPT51LMzE/8UXW2634Pp9yppbxgaXZl4ExE0moG3xKRCM1nSzQy98m5x7xKWucjQ8vRO87DX2bQydwB9a2p+M7HFrhZHxkPto8auprHNair2O+bs3E1mMFfBSDTH/wZZrAWKMYc41DMVbGBxejZZTHLQ69gTHHB5eiVxyKsDKOCXWPpXeM1hMsRYiN02Q02n/fz0Gb1HQNDisRG88CZVUiYWYyenEoAubF1xBlkFZDHKaOo3KaHbOxPRPf5LDL8Hz0qdPUYxyWghVW5EmUcZgZZVkKlvp3p00TdI56NoelDC1EqyxLERlHCgZYFoLVMNmZju9yeAZaaMLUpBwWgmecIZaliIwblCzLQoJMHbIsJMzUD5aFSK5FiCengA4fyzjiYxn+ahwjVZpCq7zMshB0jcrP4FoJy1KkGa+8xVj9LrAspOqxl0CpHLAsRWQczxMbLEtBRygsBTyzS8pEoW1+ZlmKqJ4I9HIkQwae+DbTULUhdZiqAXzx68fvVOO1jxO0e2FZCRlNA/0Arwkb01gvKksyR2wck+8jyz9GFqp1lpWIS4WwKRcXpGVCiDNOoHb3WHoHY++wFGFlHPW6wtI72L4NsxRhZRy3cgqZ2efQGxhzi6UYqxrP8V3rNrWdY5XxHGToC8vaoM2KO8lJnDJO9D+bzepu5fCYm7RbcZNDK5wyTgSZecvSmTTUL1haUytj2JId4tniIodWUPuz7SQnqWWccJmo2iizOznnfLeJWn9M0D6TpRhtjNWPP+dRO+PEyHy0h8WpcpNAoEQ2USI3OHTGi3FCUjLdDbVjFzlN7VLJCTPzmmUhT1ux00Q+D2/G21PxQyoDDs+AubDyRLiflOCtVHLQIg/QIrv//8nBF3L6DbwM78aJwaUowe6n+/sITO/D9JXuG/8DNFmxeRZv9/4ZNsbGfiuXHj3+Ckr9AhPaF/aBpAV7AAAAAElFTkSuQmCC";function io(){const{map:r}=N(b),n=v.useRef(new Map),[S,R]=v.useState(!1),H=[new h([852011.307424,6788511322702e-6]),new h([829800.379064,6809086916672e-6])],P=[new z([[851890.680238,6788133616293e-6],[851298.293269,6790235634571e-6],[853419.420804,6790407617885e-6]]),new z([[848107.047338,6790579601198e-6],[849081.619449,6793197569417e-6]])],L=[new m([[[851728.251553,6788384425292e-6],[851518.049725,6788651954891e-6],[852182.096409,6788881265976e-6],[851728.251553,6788384425292e-6]]]),new m([[[845183.331006,6794496998898e-6],[850132.628588,6794764528497e-6],[850629.469272,6791707047365e-6],[844399.851466,6791229315939e-6],[845183.331006,6794496998898e-6]]])],D=[new h([852011.307424,6788511322702e-6]),new m([[[845183.331006,6794496998898e-6],[850132.628588,6794764528497e-6],[850629.469272,6791707047365e-6],[844399.851466,6791229315939e-6],[845183.331006,6794496998898e-6]]])];function c(e,x,g){if(e&&!n.current.has(g))if(S){const s=e.highlightAndZoom(x,{highlightStyle:to});s&&n.current.set(g,s)}else{const s=e.highlightAndZoom(x,{});s&&n.current.set(g,s)}}function p(e){n.current.has(e)&&(n.current.get(e)?.destroy(),n.current.delete(e))}function Z(e){e&&(e.removeHighlights(),n.current=new Map)}return o.jsx(k,{height:"100%",direction:"column",overflow:"hidden",children:o.jsx(Q,{title:o.jsx(y,{textAlign:"center",py:1,children:o.jsx(E,{size:"md",children:"OpenLayers Base Packages - Highlight and Zoom"})}),children:o.jsx(k,{flex:"1",direction:"column",position:"relative",children:o.jsxs(V,{mapId:b,children:[o.jsx(A,{position:"top-left",horizontalGap:10,verticalGap:10,children:o.jsxs(y,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:[o.jsx(u,{align:"center",children:"Test Controls:"}),o.jsx(j,{align:"center",divider:o.jsx(M,{borderColor:"gray.200"}),pt:5,children:o.jsx(Y,{onChange:e=>{R(e.target.checked)},children:"Own Style"})}),o.jsxs(j,{pt:5,children:[o.jsxs(d,{align:"center",children:[o.jsx(t,{width:105,onClick:()=>c(r,H,"point"),children:"Points"}),o.jsx(t,{onClick:()=>p("point"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,P,"line"),children:"LineString"}),o.jsx(t,{onClick:()=>p("line"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,L,"polygon"),children:"Polygons"}),o.jsx(t,{onClick:()=>p("polygon"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,D,"mix"),children:"Mixed"}),o.jsx(t,{onClick:()=>p("mix"),children:"Remove"})]}),o.jsx(t,{onClick:()=>Z(r),children:"Reset All"})]})]})}),o.jsx(A,{position:"top-right",horizontalGap:10,verticalGap:10,children:o.jsxs(K,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[o.jsx(u,{as:"b",children:"Description"}),o.jsx(u,{children:"This application can be used to test adding highlight or marker, zoom to their extent, and removing highlight and marker. The highlight and zoom for point, line string and polygon geometries in two different styles can be tested."}),o.jsxs(q,{children:[o.jsxs(a,{children:["Clicking on ","'Points'"," adds markers for point geometries."]}),o.jsxs(a,{children:["Clicking on ","'LineString'"," adds highlight for linestring geometries."]}),o.jsxs(a,{children:["Clicking on ","'Polygon'"," adds highlight for polygon geometries."]}),o.jsxs(a,{children:["Clicking on ","'Mixed'"," adds highlight for geometries of different types."]}),o.jsxs(a,{children:["Clicking on ","'Remove'"," will remove the marker or highlight added by the button on the left."]}),o.jsxs(a,{children:["Clicking on ","'Reset All'"," removes all highlights and markers from the map."]}),o.jsxs(a,{children:["Clicking on ","'Own Style'"," activates highlighting with customstyle."]})]})]})})]})})})})}const to={Point:new i({image:new f({anchor:[.5,1],src:C})}),MultiPoint:new i({image:new f({anchor:[.5,1],src:C})}),LineString:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3})})],MultiLineString:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3})})],Polygon:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3}),fill:new w({color:"rgba(51, 171, 71,0.35)"})})],MultiPolygon:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3}),fill:new w({color:"rgba(51, 171, 71,0.35)"})})]},lo=W({component:io,appMetadata:ro});customElements.define("highlight-and-zoom-app",lo); +import{j as o,l as I,a as O,r as v,B as t,e as W}from"./CzUo6bX8-UUU.js";import{S as F,T as U,O as G,M as T,H as B,c as i,aC as f,ay as l,F as w,g as N,ao as h,an as m,i as k,e as Q,B as y,f as E,j as V,k as A}from"./B36mctiVgF5V.js";import{L as z}from"./Di-_YM5QvGet.js";import{T as u,S as j,V as K,U as q,a}from"./CovJx79h1x39.js";import{H as d}from"./_YjaCHRtWzU8.js";import{C as Y}from"./DXNMkmWkGPwJ.js";import"./0jkoYKtubXoE.js";var M=r=>o.jsx(I.div,{className:"chakra-stack__divider",...r,__css:{...r.__css,borderWidth:0,alignSelf:"stretch",borderColor:"inherit",width:"auto",height:"auto"}});M.displayName="StackDivider";const b="main";class J{mapId=b;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new F({title:"OSM",isBaseLayer:!0,olLayer:new U({source:new G})})]}}}const X={"highlight-and-zoom-app":{name:"highlight-and-zoom-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:J,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/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:T,provides:[{name:"map.MapRegistry",qualifier:void 0}],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/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:B,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},_=':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)}',$=[];function oo(r){throw new Error(`Unsupported locale: '${r}'`)}const eo=O(_),ro=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:oo,locales:$,packages:X,styles:eo},Symbol.toStringTag,{value:"Module"})),C="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAM6SURBVGhD7Zn7TtRAFMZn2l2MRuWuBg2aGEX/MMLCC5iUx/UJ6CNw0WiiRBFBJaLAilyMbNvxO8tpgkDbM9MxarK/ZNPvdJfpt6dnznQW1aOHDM1Hb1x9PrvYSEx/YNQlijOtDpOG3v3+eK7V/YAnvBgfWozeKKPGYbCPT51LMzE/8UXW2634Pp9yppbxgaXZl4ExE0moG3xKRCM1nSzQy98m5x7xKWucjQ8vRO87DX2bQydwB9a2p+M7HFrhZHxkPto8auprHNair2O+bs3E1mMFfBSDTH/wZZrAWKMYc41DMVbGBxejZZTHLQ69gTHHB5eiVxyKsDKOCXWPpXeM1hMsRYiN02Q02n/fz0Gb1HQNDisRG88CZVUiYWYyenEoAubF1xBlkFZDHKaOo3KaHbOxPRPf5LDL8Hz0qdPUYxyWghVW5EmUcZgZZVkKlvp3p00TdI56NoelDC1EqyxLERlHCgZYFoLVMNmZju9yeAZaaMLUpBwWgmecIZaliIwblCzLQoJMHbIsJMzUD5aFSK5FiCengA4fyzjiYxn+ahwjVZpCq7zMshB0jcrP4FoJy1KkGa+8xVj9LrAspOqxl0CpHLAsRWQczxMbLEtBRygsBTyzS8pEoW1+ZlmKqJ4I9HIkQwae+DbTULUhdZiqAXzx68fvVOO1jxO0e2FZCRlNA/0Arwkb01gvKksyR2wck+8jyz9GFqp1lpWIS4WwKRcXpGVCiDNOoHb3WHoHY++wFGFlHPW6wtI72L4NsxRhZRy3cgqZ2efQGxhzi6UYqxrP8V3rNrWdY5XxHGToC8vaoM2KO8lJnDJO9D+bzepu5fCYm7RbcZNDK5wyTgSZecvSmTTUL1haUytj2JId4tniIodWUPuz7SQnqWWccJmo2iizOznnfLeJWn9M0D6TpRhtjNWPP+dRO+PEyHy0h8WpcpNAoEQ2USI3OHTGi3FCUjLdDbVjFzlN7VLJCTPzmmUhT1ux00Q+D2/G21PxQyoDDs+AubDyRLiflOCtVHLQIg/QIrv//8nBF3L6DbwM78aJwaUowe6n+/sITO/D9JXuG/8DNFmxeRZv9/4ZNsbGfiuXHj3+Ckr9AhPaF/aBpAV7AAAAAElFTkSuQmCC";function io(){const{map:r}=N(b),n=v.useRef(new Map),[S,R]=v.useState(!1),H=[new h([852011.307424,6788511322702e-6]),new h([829800.379064,6809086916672e-6])],P=[new z([[851890.680238,6788133616293e-6],[851298.293269,6790235634571e-6],[853419.420804,6790407617885e-6]]),new z([[848107.047338,6790579601198e-6],[849081.619449,6793197569417e-6]])],L=[new m([[[851728.251553,6788384425292e-6],[851518.049725,6788651954891e-6],[852182.096409,6788881265976e-6],[851728.251553,6788384425292e-6]]]),new m([[[845183.331006,6794496998898e-6],[850132.628588,6794764528497e-6],[850629.469272,6791707047365e-6],[844399.851466,6791229315939e-6],[845183.331006,6794496998898e-6]]])],D=[new h([852011.307424,6788511322702e-6]),new m([[[845183.331006,6794496998898e-6],[850132.628588,6794764528497e-6],[850629.469272,6791707047365e-6],[844399.851466,6791229315939e-6],[845183.331006,6794496998898e-6]]])];function c(e,x,g){if(e&&!n.current.has(g))if(S){const s=e.highlightAndZoom(x,{highlightStyle:to});s&&n.current.set(g,s)}else{const s=e.highlightAndZoom(x,{});s&&n.current.set(g,s)}}function p(e){n.current.has(e)&&(n.current.get(e)?.destroy(),n.current.delete(e))}function Z(e){e&&(e.removeHighlights(),n.current=new Map)}return o.jsx(k,{height:"100%",direction:"column",overflow:"hidden",children:o.jsx(Q,{title:o.jsx(y,{textAlign:"center",py:1,children:o.jsx(E,{size:"md",children:"OpenLayers Base Packages - Highlight and Zoom"})}),children:o.jsx(k,{flex:"1",direction:"column",position:"relative",children:o.jsxs(V,{mapId:b,children:[o.jsx(A,{position:"top-left",horizontalGap:10,verticalGap:10,children:o.jsxs(y,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:[o.jsx(u,{align:"center",children:"Test Controls:"}),o.jsx(j,{align:"center",divider:o.jsx(M,{borderColor:"gray.200"}),pt:5,children:o.jsx(Y,{onChange:e=>{R(e.target.checked)},children:"Own Style"})}),o.jsxs(j,{pt:5,children:[o.jsxs(d,{align:"center",children:[o.jsx(t,{width:105,onClick:()=>c(r,H,"point"),children:"Points"}),o.jsx(t,{onClick:()=>p("point"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,P,"line"),children:"LineString"}),o.jsx(t,{onClick:()=>p("line"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,L,"polygon"),children:"Polygons"}),o.jsx(t,{onClick:()=>p("polygon"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,D,"mix"),children:"Mixed"}),o.jsx(t,{onClick:()=>p("mix"),children:"Remove"})]}),o.jsx(t,{onClick:()=>Z(r),children:"Reset All"})]})]})}),o.jsx(A,{position:"top-right",horizontalGap:10,verticalGap:10,children:o.jsxs(K,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[o.jsx(u,{as:"b",children:"Description"}),o.jsx(u,{children:"This application can be used to test adding highlight or marker, zoom to their extent, and removing highlight and marker. The highlight and zoom for point, line string and polygon geometries in two different styles can be tested."}),o.jsxs(q,{children:[o.jsxs(a,{children:["Clicking on ","'Points'"," adds markers for point geometries."]}),o.jsxs(a,{children:["Clicking on ","'LineString'"," adds highlight for linestring geometries."]}),o.jsxs(a,{children:["Clicking on ","'Polygon'"," adds highlight for polygon geometries."]}),o.jsxs(a,{children:["Clicking on ","'Mixed'"," adds highlight for geometries of different types."]}),o.jsxs(a,{children:["Clicking on ","'Remove'"," will remove the marker or highlight added by the button on the left."]}),o.jsxs(a,{children:["Clicking on ","'Reset All'"," removes all highlights and markers from the map."]}),o.jsxs(a,{children:["Clicking on ","'Own Style'"," activates highlighting with customstyle."]})]})]})})]})})})})}const to={Point:new i({image:new f({anchor:[.5,1],src:C})}),MultiPoint:new i({image:new f({anchor:[.5,1],src:C})}),LineString:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3})})],MultiLineString:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3})})],Polygon:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3}),fill:new w({color:"rgba(51, 171, 71,0.35)"})})],MultiPolygon:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3}),fill:new w({color:"rgba(51, 171, 71,0.35)"})})]},lo=W({component:io,appMetadata:ro});customElements.define("highlight-and-zoom-app",lo); diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/CGddQzaLUNKL.js b/openlayers-base-packages/pr-previews/pr-355/assets/HTd2VoWp6VZs.js similarity index 87% rename from openlayers-base-packages/pr-previews/pr-355/assets/CGddQzaLUNKL.js rename to openlayers-base-packages/pr-previews/pr-355/assets/HTd2VoWp6VZs.js index 9b12cfe..02a554b 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/CGddQzaLUNKL.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/HTd2VoWp6VZs.js @@ -1 +1 @@ -import{r as l,a5 as B,j as e,a as R,B as P,n as C,C as _,e as T}from"./CzUo6bX8-UUU.js";import{t as H}from"./CWtAa_vMA4rU.js";import{S as N,T as F,O as q,M as D,H as Z,u as $,i as v,B as f,g as V,e as W,f as G,j as U,k as K}from"./B36mctiVgF5V.js";import{_ as J}from"./CmsKOCeNyeyo.js";import{c as E}from"./SSUBJAaBGB7g.js";import{I as j}from"./XuMECp8BqZmI.js";import{S}from"./BSX9fy8BsUsv.js";import{g as Q}from"./CkG3hRXjrvfc.js";function X(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Y=X(),ee=Y?l.useLayoutEffect:l.useEffect;function z(r,a=[]){const t=l.useRef(r);return ee(()=>{t.current=r}),l.useCallback((...p)=>{var s;return(s=t.current)==null?void 0:s.call(t,...p)},a)}function oe(r,a){const t=l.useId();return l.useMemo(()=>r||[a,t].filter(Boolean).join("-"),[r,a,t])}function re(r,a){const t=r!==void 0;return[t,t&&typeof r<"u"?r:a]}function I(r={}){const{onClose:a,onOpen:t,isOpen:p,id:s}=r,c=z(t),i=z(a),[n,b]=l.useState(r.defaultIsOpen||!1),[d,u]=re(p,n),m=oe(s,"disclosure"),g=l.useCallback(()=>{d||b(!1),i?.()},[d,i]),h=l.useCallback(()=>{d||b(!0),c?.()},[d,c]),x=l.useCallback(()=>{(u?g:h)()},[u,h,g]);return{isOpen:!!u,onOpen:h,onClose:g,onToggle:x,isControlled:d,getButtonProps:(o={})=>({...o,"aria-expanded":u,"aria-controls":m,onClick:B(o.onClick,x)}),getDisclosureProps:(o={})=>({...o,hidden:!u,id:m})}}var te=E({displayName:"ArrowLeftIcon",path:e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),e.jsx("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})}),ne=E({displayName:"ArrowRightIcon",path:e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),e.jsx("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});const w="main";class ae{mapId=w;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new N({title:"OSM",isBaseLayer:!0,olLayer:new F({source:new q})})]}}}const le={"sidebar-app":{name:"sidebar-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:ae,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/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:D,provides:[{name:"map.MapRegistry",qualifier:void 0}],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/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/experimental-layout-sidebar":{name:"@open-pioneer/experimental-layout-sidebar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:Z,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},ie='.layout-sidebar{z-index:99}: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)}.layout-sidebar{height:100%;position:absolute;top:0}.layout-sidebar[data-theme=light]{background-color:var(--chakra-colors-whiteAlpha-700)}.layout-sidebar[data-theme=dark]{background-color:var(--chakra-colors-blackAlpha-700)}.layout-sidebar .layout-sidebar-main{transition:width .3s ease-out 0s;border-right:1px solid var(--chakra-colors-chakra-border-color)}.layout-sidebar .layout-sidebar-content{overflow:auto;transition:width .3s ease-out 0s}.layout-sidebar .layout-sidebar-content .content-section .content-header{font-size:1.5em;background-color:var(--chakra-colors-blackAlpha-500);padding:.5rem 1rem}.layout-sidebar .layout-sidebar-content .content-section .content-body{padding:1rem}',se=["en"];function ce(r){switch(r){case"en":return J(()=>import("./BIbDu0DJPL_e.js"),[],import.meta.url).then(a=>a.default)}throw new Error(`Unsupported locale: '${r}'`)}const pe=R(ie),de=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:ce,locales:se,packages:le,styles:pe},Symbol.toStringTag,{value:"Module"})),ue="@open-pioneer/experimental-layout-sidebar",be=$.bind(void 0,ue),M=60,A=180,O=300;function me({defaultExpanded:r,expandedChanged:a,sidebarWidthChanged:t,items:p}){const s=be(),[c,{toggle:i}]=ge(p),{isOpen:n,onToggle:b}=I({defaultIsOpen:r,onOpen(){a?.(!0)},onClose(){a?.(!1)}}),{isOpen:d,onToggle:u}=I(),m=c.size>0;l.useEffect(()=>{m&&!d&&u(),!m&&d&&u()},[m]),l.useEffect(()=>{if(t){let o=M;n&&(o=A),d&&(o+=O),t(o)}},[n,d]);const g=p?.map((o,L)=>{const k="white",y=c.has(o.id)?"outline":"ghost";return e.jsx("div",{children:n?e.jsx(P,{leftIcon:o.icon,variant:y,colorScheme:k,onClick:()=>i(o),children:o.label},o.id):e.jsx(C,{hasArrow:!0,label:o.label,placement:"right",children:e.jsx(j,{"aria-label":o.label,variant:y,colorScheme:k,icon:o.icon,onClick:()=>i(o)})},o.id)},L)}),h=p?.filter(o=>c.has(o.id)).map(o=>e.jsxs("div",{className:"content-section",children:[e.jsxs(v,{className:"content-header",alignItems:"center",children:[e.jsx(f,{children:o.label}),e.jsx(S,{}),e.jsx(_,{onClick:()=>i(o)})]}),e.jsx("div",{className:"content-body",children:o.content})]},o.id)),x=s.formatMessage({id:n?"toggle.collapse":"toggle.expand"});return e.jsxs(v,{className:"layout-sidebar",children:[e.jsxs(f,{className:"layout-sidebar-main",display:"flex",flexDirection:"column",width:n?`${A}px`:`${M}px`,padding:"10px",gap:"10px",children:[g,e.jsx(S,{}),e.jsx(C,{label:x,hasArrow:!0,placement:"right",children:e.jsx(j,{"aria-label":x,variant:"ghost",icon:n?e.jsx(te,{}):e.jsx(ne,{}),onClick:b})})]}),e.jsx(f,{className:"layout-sidebar-content",width:d?`${O}px`:"0px",children:h})]})}function ge(r){const[a,t]=l.useReducer((s,c)=>{switch(c.type){case"toggle":{const i=new Set(s);return i.has(c.id)?i.delete(c.id):i.add(c.id),i}case"retain":{const i=new Set(c.ids),n=new Set(s);for(const b of n)i.has(b)||n.delete(b);return n}}},void 0,()=>new Set),p=l.useCallback(s=>{t({type:"toggle",id:s.id})},[t]);return l.useEffect(()=>{t({type:"retain",ids:r?.map(s=>s.id)??[]})},[r,t]),[a,{toggle:p}]}const he=[796987,5827477,796987,5827477];function xe(){const[r,a]=l.useState(),[t,p]=l.useState(!0),s=V(w),c=()=>{const n=s.map?.olMap;n&&n?.getView().fit(he,{maxZoom:13})},i=[{id:"sandbox",icon:e.jsx(Q,{}),label:"Sandbox",content:e.jsx(P,{onClick:c,children:"Center Berlin"})}];return e.jsx(v,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(W,{title:e.jsx(f,{textAlign:"center",py:1,px:1,children:e.jsx(G,{size:"md",children:"Sidebar sample"})}),children:e.jsxs(v,{flex:"1",direction:"column",position:"relative",children:[e.jsx(me,{defaultExpanded:t,expandedChanged:n=>p(n),sidebarWidthChanged:n=>a({left:n}),items:i}),e.jsx(U,{mapId:w,viewPadding:r,viewPaddingChangeBehavior:"preserve-extent",children:e.jsx(K,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(f,{backgroundColor:"whiteAlpha.800",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:"This is a sample for a sidebar component."})})})]})})})}const fe=T({component:xe,theme:H,appMetadata:de});customElements.define("sidebar-app",fe); +import{r as l,a5 as B,j as e,a as R,B as P,n as C,C as _,e as T}from"./CzUo6bX8-UUU.js";import{t as H}from"./CWtAa_vMA4rU.js";import{S as N,T as F,O as q,M as D,H as Z,u as $,i as v,B as f,g as V,e as W,f as G,j as U,k as K}from"./B36mctiVgF5V.js";import{_ as J}from"./CmsKOCeNyeyo.js";import{c as E}from"./SSUBJAaBGB7g.js";import{I as j}from"./XuMECp8BqZmI.js";import{S}from"./BSX9fy8BsUsv.js";import{g as Q}from"./CkG3hRXjrvfc.js";function X(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Y=X(),ee=Y?l.useLayoutEffect:l.useEffect;function z(r,a=[]){const t=l.useRef(r);return ee(()=>{t.current=r}),l.useCallback((...p)=>{var s;return(s=t.current)==null?void 0:s.call(t,...p)},a)}function oe(r,a){const t=l.useId();return l.useMemo(()=>r||[a,t].filter(Boolean).join("-"),[r,a,t])}function re(r,a){const t=r!==void 0;return[t,t&&typeof r<"u"?r:a]}function I(r={}){const{onClose:a,onOpen:t,isOpen:p,id:s}=r,c=z(t),i=z(a),[n,b]=l.useState(r.defaultIsOpen||!1),[d,u]=re(p,n),m=oe(s,"disclosure"),g=l.useCallback(()=>{d||b(!1),i?.()},[d,i]),h=l.useCallback(()=>{d||b(!0),c?.()},[d,c]),x=l.useCallback(()=>{(u?g:h)()},[u,h,g]);return{isOpen:!!u,onOpen:h,onClose:g,onToggle:x,isControlled:d,getButtonProps:(o={})=>({...o,"aria-expanded":u,"aria-controls":m,onClick:B(o.onClick,x)}),getDisclosureProps:(o={})=>({...o,hidden:!u,id:m})}}var te=E({displayName:"ArrowLeftIcon",path:e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),e.jsx("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})}),ne=E({displayName:"ArrowRightIcon",path:e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),e.jsx("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});const w="main";class ae{mapId=w;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new N({title:"OSM",isBaseLayer:!0,olLayer:new F({source:new q})})]}}}const le={"sidebar-app":{name:"sidebar-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:ae,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:D,provides:[{name:"map.MapRegistry",qualifier:void 0}],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/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:Z,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},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/experimental-layout-sidebar":{name:"@open-pioneer/experimental-layout-sidebar",services:{},ui:{references:[]},properties:{}}},ie='.layout-sidebar{z-index:99}: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)}.layout-sidebar{height:100%;position:absolute;top:0}.layout-sidebar[data-theme=light]{background-color:var(--chakra-colors-whiteAlpha-700)}.layout-sidebar[data-theme=dark]{background-color:var(--chakra-colors-blackAlpha-700)}.layout-sidebar .layout-sidebar-main{transition:width .3s ease-out 0s;border-right:1px solid var(--chakra-colors-chakra-border-color)}.layout-sidebar .layout-sidebar-content{overflow:auto;transition:width .3s ease-out 0s}.layout-sidebar .layout-sidebar-content .content-section .content-header{font-size:1.5em;background-color:var(--chakra-colors-blackAlpha-500);padding:.5rem 1rem}.layout-sidebar .layout-sidebar-content .content-section .content-body{padding:1rem}',se=["en"];function ce(r){switch(r){case"en":return J(()=>import("./BIbDu0DJPL_e.js"),[],import.meta.url).then(a=>a.default)}throw new Error(`Unsupported locale: '${r}'`)}const pe=R(ie),de=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:ce,locales:se,packages:le,styles:pe},Symbol.toStringTag,{value:"Module"})),ue="@open-pioneer/experimental-layout-sidebar",be=$.bind(void 0,ue),M=60,A=180,O=300;function me({defaultExpanded:r,expandedChanged:a,sidebarWidthChanged:t,items:p}){const s=be(),[c,{toggle:i}]=ge(p),{isOpen:n,onToggle:b}=I({defaultIsOpen:r,onOpen(){a?.(!0)},onClose(){a?.(!1)}}),{isOpen:d,onToggle:u}=I(),m=c.size>0;l.useEffect(()=>{m&&!d&&u(),!m&&d&&u()},[m]),l.useEffect(()=>{if(t){let o=M;n&&(o=A),d&&(o+=O),t(o)}},[n,d]);const g=p?.map((o,L)=>{const k="white",y=c.has(o.id)?"outline":"ghost";return e.jsx("div",{children:n?e.jsx(P,{leftIcon:o.icon,variant:y,colorScheme:k,onClick:()=>i(o),children:o.label},o.id):e.jsx(C,{hasArrow:!0,label:o.label,placement:"right",children:e.jsx(j,{"aria-label":o.label,variant:y,colorScheme:k,icon:o.icon,onClick:()=>i(o)})},o.id)},L)}),h=p?.filter(o=>c.has(o.id)).map(o=>e.jsxs("div",{className:"content-section",children:[e.jsxs(v,{className:"content-header",alignItems:"center",children:[e.jsx(f,{children:o.label}),e.jsx(S,{}),e.jsx(_,{onClick:()=>i(o)})]}),e.jsx("div",{className:"content-body",children:o.content})]},o.id)),x=s.formatMessage({id:n?"toggle.collapse":"toggle.expand"});return e.jsxs(v,{className:"layout-sidebar",children:[e.jsxs(f,{className:"layout-sidebar-main",display:"flex",flexDirection:"column",width:n?`${A}px`:`${M}px`,padding:"10px",gap:"10px",children:[g,e.jsx(S,{}),e.jsx(C,{label:x,hasArrow:!0,placement:"right",children:e.jsx(j,{"aria-label":x,variant:"ghost",icon:n?e.jsx(te,{}):e.jsx(ne,{}),onClick:b})})]}),e.jsx(f,{className:"layout-sidebar-content",width:d?`${O}px`:"0px",children:h})]})}function ge(r){const[a,t]=l.useReducer((s,c)=>{switch(c.type){case"toggle":{const i=new Set(s);return i.has(c.id)?i.delete(c.id):i.add(c.id),i}case"retain":{const i=new Set(c.ids),n=new Set(s);for(const b of n)i.has(b)||n.delete(b);return n}}},void 0,()=>new Set),p=l.useCallback(s=>{t({type:"toggle",id:s.id})},[t]);return l.useEffect(()=>{t({type:"retain",ids:r?.map(s=>s.id)??[]})},[r,t]),[a,{toggle:p}]}const he=[796987,5827477,796987,5827477];function xe(){const[r,a]=l.useState(),[t,p]=l.useState(!0),s=V(w),c=()=>{const n=s.map?.olMap;n&&n?.getView().fit(he,{maxZoom:13})},i=[{id:"sandbox",icon:e.jsx(Q,{}),label:"Sandbox",content:e.jsx(P,{onClick:c,children:"Center Berlin"})}];return e.jsx(v,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(W,{title:e.jsx(f,{textAlign:"center",py:1,px:1,children:e.jsx(G,{size:"md",children:"Sidebar sample"})}),children:e.jsxs(v,{flex:"1",direction:"column",position:"relative",children:[e.jsx(me,{defaultExpanded:t,expandedChanged:n=>p(n),sidebarWidthChanged:n=>a({left:n}),items:i}),e.jsx(U,{mapId:w,viewPadding:r,viewPaddingChangeBehavior:"preserve-extent",children:e.jsx(K,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(f,{backgroundColor:"whiteAlpha.800",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:"This is a sample for a sidebar component."})})})]})})})}const fe=T({component:xe,theme:H,appMetadata:de});customElements.define("sidebar-app",fe); diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/B4hDpVmLHQcX.js b/openlayers-base-packages/pr-previews/pr-355/assets/oPANC7vcIaRt.js similarity index 99% rename from openlayers-base-packages/pr-previews/pr-355/assets/B4hDpVmLHQcX.js rename to openlayers-base-packages/pr-previews/pr-355/assets/oPANC7vcIaRt.js index 5fb1edf..e6cb6c5 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/B4hDpVmLHQcX.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/oPANC7vcIaRt.js @@ -16,4 +16,4 @@ ${s}`)!==100){const l=e.replace("{font-family}",s.replace(/ /g,"-").toLowerCase( `)return B.push(` `,""),B;if(N==2){B.push(Ar(Y,ot),K);return}Y=Dr(Y,K,tr,ot).split(` `);for(let fe=0,ue=Y.length;fe0&&B.push(` -`,""),B.push(Y[fe],K);return B},[]):te=Tr(W,j).trim(),Te=z(v,"paint","text-opacity",b,T,m,x)}if(te&&Te&&!er){kt||(++U,w=S[U],(!w||!w.getText()||w.getFill()||w.getStroke())&&(w=new Ie,S[U]=w),w.setImage(void 0),w.setGeometry(void 0));const H=ti(v,b,T,"text",m);w.getText()||w.setText(q),q=w.getText(),(!q||"getDeclutterMode"in q&&q.getDeclutterMode()!==H)&&(q=new Jo({padding:[2,2,2,2],declutterMode:H}),w.setText(q));const W=z(v,"layout","text-transform",b,T,m,x);W=="uppercase"?te=Array.isArray(te)?te.map((ne,at)=>at%2?ne:ne.toUpperCase()):te.toUpperCase():W=="lowercase"&&(te=Array.isArray(te)?te.map((ne,at)=>at%2?ne:ne.toLowerCase()):te.toLowerCase());const B=Array.isArray(te)?te:N==2?Ar(te,ot):Dr(te,nt,tr,ot);q.setText(B),q.setFont(nt),q.setRotation(xr(z(v,"layout","text-rotate",b,T,m,x)));const X=z(v,"layout","text-anchor",b,T,m,x),D=kt||N==1?"point":z(v,"layout","symbol-placement",b,T,m,x);let O;if(D==="line-center"?(q.setPlacement("line"),O="center"):q.setPlacement(D),D==="line"&&typeof q.setRepeat=="function"){const ne=z(v,"layout","symbol-spacing",b,T,m,x);q.setRepeat(ne*2)}q.setOverflow(D==="point");let K=z(v,"paint","text-halo-width",b,T,m,x);const Y=z(v,"layout","text-offset",b,T,m,x),fe=z(v,"paint","text-translate",b,T,m,x);let ue=0,oe=0;if(D=="point"){O="center",X.indexOf("left")!==-1?(O="left",oe=K):X.indexOf("right")!==-1&&(O="right",oe=-K);const ne=z(v,"layout","text-rotation-alignment",b,T,m,x);q.setRotateWithView(ne=="map")}else q.setMaxAngle(xr(z(v,"layout","text-max-angle",b,T,m,x))*te.length/B.length),q.setRotateWithView(!1);q.setTextAlign(O);let ae="middle";X.indexOf("bottom")==0?(ae="bottom",ue=-K-.5*(it-1)*Ce):X.indexOf("top")==0&&(ae="top",ue=K+.5*(it-1)*Ce),q.setTextBaseline(ae);const J=z(v,"layout","text-justify",b,T,m,x);q.setJustify(J==="auto"?void 0:J),q.setOffsetX(Y[0]*Ce+oe+fe[0]),q.setOffsetY(Y[1]*Ce+ue+fe[1]),F.setColor(Ee(z(v,"paint","text-color",b,T,m,x),Te)),q.setFill(F);const he=Ee(z(v,"paint","text-halo-color",b,T,m,x),Te);if(he&&K>0){E.setColor(he),K*=2;const ne=.5*Ce;E.setWidth(K<=ne?K:ne),q.setStroke(E)}else q.setStroke(void 0);const me=z(v,"layout","text-padding",b,T,m,x),ye=q.getPadding();me!==ye[0]&&(ye[0]=me,ye[1]=me,ye[2]=me,ye[3]=me),w.setZIndex($e)}}}if(U>-1)return S.length=U+1,S};return t.setStyle($),t.set("mapbox-source",C),t.set("mapbox-layers",f),t.set("mapbox-featurestate",t.get("mapbox-featurestate")||{}),$}function Ul(t,e=512){return t.getExtent()?$r({extent:t.getExtent(),tileSize:e,maxZoom:22}).getResolutions():Yt}function Zl(t,e){return e.accessToken||(e=Object.assign({},e),new URL(t).searchParams.forEach((n,i)=>{e.accessToken=n,e.accessTokenParam=i})),e}function Hl(t,e,r="",n={},i=void 0){let o,a,s,l,u=!0;return typeof r!="string"&&!Array.isArray(r)?(s=r,l=s.source||s.layers,n=s):l=r,typeof n=="string"?(o=n,s={}):(o=n.styleUrl,s=n),s.updateSource===!1&&(u=!1),i||(i=s.resolutions),!o&&typeof e=="string"&&!e.trim().startsWith("{")&&(o=e),o&&(o=o.startsWith("data:")?location.href:Ui(o,s.accessToken),s=Zl(o,s)),new Promise(function(c,p){Hi(e,s).then(function(d){if(d.version!=8)return p(new Error("glStyle version 8 required."));if(!(t instanceof Fr||t instanceof pt))return p(new Error("Can only apply to VectorLayer or VectorTileLayer"));const f=t instanceof pt?"vector":"geojson";if(l?Array.isArray(l)?a=d.layers.find(function(F){return F.id===l[0]}).source:a=l:(a=Object.keys(d.sources).find(function(F){return d.sources[F].type===f}),l=a),!a)return p(new Error(`No ${f} source found in the glStyle.`));function h(){if(!u)return Promise.resolve();if(t instanceof pt)return Ql(d.sources[a],o,s).then(function(k){const I=t.getSource();I?k!==I&&(I.setTileUrlFunction(k.getTileUrlFunction()),typeof I.setUrls=="function"&&typeof k.getUrls=="function"&&I.setUrls(k.getUrls()),I.format_||(I.format_=k.format_),I.getAttributions()||I.setAttributions(k.getAttributions()),I.getTileLoadFunction()===di&&I.setTileLoadFunction(k.getTileLoadFunction()),Ho(I.getProjection(),k.getProjection())&&(I.tileGrid=k.getTileGrid())):t.setSource(k);const A=t.getSource().getTileGrid();!isFinite(t.getMaxResolution())&&!isFinite(t.getMinZoom())&&A.getMinZoom()>0&&t.setMaxResolution(Ml(Math.max(0,A.getMinZoom()-1e-12),A.getResolutions()))});const F=d.sources[a];let S=t.getSource();(!S||S.get("mapbox-source")!==F)&&(S=tu(F,o,s));const $=t.getSource();return $?S!==$&&($.getAttributions()||$.setAttributions(S.getAttributions()),$.format_||($.format_=S.getFormat()),$.url_=S.getUrl()):t.setSource(S),Promise.resolve()}let g,m,_,C;function E(){if(!C&&(!d.sprite||m)){if(s.projection&&!i){const S=Ke(s.projection).getUnits();S!=="m"&&(i=Yt.map($=>$/Go[S]))}C=Bl(t,d,l,i,m,_,(F,S=s.webfonts)=>$l(F,S),s.getImage),t.getStyle()?h().then(c).catch(p):p(new Error(`Nothing to show for source [${a}]`))}else C?(t.setStyle(C),h().then(c).catch(p)):p(new Error("Something went wrong trying to apply style."))}if(d.sprite){const F=new URL(Fl(d.sprite,s.accessToken,o||location.href));g=window.devicePixelRatio>=1.5?.5:1;const S=g==.5?"@2x":"";let $=F.origin+F.pathname+S+".json"+F.search;new Promise(function(k,I){Ye("Sprite",$,s).then(k).catch(function(A){$=F.origin+F.pathname+".json"+F.search,Ye("Sprite",$,s).then(k).catch(I)})}).then(function(k){if(k===void 0&&p(new Error("No sprites found.")),m=k,_=F.origin+F.pathname+S+".png"+F.search,s.transformRequest){const I=s.transformRequest(_,"SpriteImage")||_;(I instanceof Request||I instanceof Promise)&&(_=I)}E()}).catch(function(k){p(new Error(`Sprites cannot be loaded: ${$}: ${k.message}`))})}else E()}).catch(p)})}const ri={};function Wl(t,e,r){e.layers.some(function(n){if(n.type==="background"){if(t instanceof ui)return t.setBackground(function(i){return Xi(n,i,r,{})}),!0;if(t instanceof No||t instanceof Vo)return t.getLayers().insertAt(0,Yl(n,r,{})),!0}})}function Xl(t,e,r={}){return Hi(e,r).then(function(n){Wl(t,n,r)})}function Jl(t,e){const r=t.bounds;if(r){const n=Tn([r[0],r[1]],e),i=Tn([r[2],r[3]],e);return[n[0],n[1],i[0],i[1]]}return Ke(e).getExtent()}function Kl(t,e,r){const n=new xa({tileJSON:e,tileSize:t.tileSize||e.tileSize||512}),i=n.getTileJSON(),o=n.getTileGrid(),a=Ke(r.projection||"EPSG:3857"),s=Jl(i,a),l=a.getExtent(),u=i.minzoom||0,c=i.maxzoom||22,p={attributions:n.getAttributions(),projection:a,tileGrid:new ai({origin:l?li(l):o.getOrigin(0),extent:s||o.getExtent(),minZoom:u,resolutions:Ul(a,e.tileSize).slice(0,c+1),tileSize:o.getTileSize(0)})};return Array.isArray(i.tiles)?p.urls=i.tiles:p.url=i.tiles,p}function Xi(t,e,r,n){const i={id:t.id,type:t.type},o=t.layout||{},a=t.paint||{};i.paint=a;const s=Zi(e,r.resolutions||Yt);let l;const u=z(i,"paint","background-color",s,ri,n);return a["background-opacity"]!==void 0&&(l=z(i,"paint","background-opacity",s,ri,n)),o.visibility=="none"?void 0:Ee(u,l)}function Yl(t,e,r){const n=document.createElement("div");return n.className="ol-mapbox-style-background",n.style.position="absolute",n.style.width="100%",n.style.height="100%",new ui({source:new Bo({}),render(i){const o=Xi(t,i.viewState.resolution,e,r);return n.style.backgroundColor=o,n}})}function Ql(t,e,r){return new Promise(function(n,i){Rl(t,e,r).then(function({tileJson:o,tileLoadFunction:a}){const s=Kl(t,o,r);s.tileLoadFunction=a,s.format=new qr,n(new Lr(s))}).catch(i)})}function eu(t){return`{bbox-${(t?t.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")}}`}function tu(t,e,r){const n=r.projection?new Sn({dataProjection:r.projection}):new Sn,i=t.data,o={};if(typeof i=="string"){const s=At(i,r.accessToken,r.accessTokenParam||"access_token",e||location.href);if(/\{bbox-[0-9a-z-]+\}/.test(s)){const u=(p,d,f)=>{const h=eu(f);return s.replace(h,`${p.join(",")}`)},c=new ir({attributions:t.attribution,format:n,loader:(p,d,f,h,g)=>{const m=typeof u=="function"?u(p,d,f):u;Ye("GeoJSON",m,r).then(_=>{const C=c.getFormat().readFeatures(_,{featureProjection:f});c.addFeatures(C),h(C)}).catch(_=>{c.removeLoadedExtent(p),g()})},strategy:Wo});return c.set("mapbox-source",t),c}const l=new ir({attributions:t.attribution,format:n,url:s,loader:(u,c,p,d,f)=>{Ye("GeoJSON",s,r).then(h=>{const g=l.getFormat().readFeatures(h,{featureProjection:p});l.addFeatures(g),d(g)}).catch(h=>{l.removeLoadedExtent(u),f()})}});return l}o.features=n.readFeatures(i,{featureProjection:"EPSG:3857"});const a=new ir(Object.assign({attributions:t.attribution,format:n},o));return a.set("mapbox-source",t),a}class ru extends qo{constructor(e){super(kr.ERROR),this.error=e}}class nu extends pt{constructor(e){const r="declutter"in e?e.declutter:!0,n=new Lr({state:"loading",format:new qr});super({source:n,background:e.background===!1?null:e.background,declutter:r,className:e.className,opacity:e.opacity,visible:e.visible,zIndex:e.zIndex,minResolution:e.minResolution,maxResolution:e.maxResolution,minZoom:e.minZoom,maxZoom:e.maxZoom,renderOrder:e.renderOrder,renderBuffer:e.renderBuffer,renderMode:e.renderMode,map:e.map,updateWhileAnimating:e.updateWhileAnimating,updateWhileInteracting:e.updateWhileInteracting,preload:e.preload,useInterimTilesOnError:e.useInterimTilesOnError,properties:e.properties}),e.accessToken&&(this.accessToken=e.accessToken);const i=e.styleUrl,o=[Hl(this,i,e.layers||e.source,{accessToken:this.accessToken})];this.getBackground()===void 0&&o.push(Xl(this,e.styleUrl,{accessToken:this.accessToken})),Promise.all(o).then(()=>{n.setState("ready")}).catch(a=>{this.dispatchEvent(new ru(a)),this.getSource().setState("error")})}}const Ve="main";class iu{mapId=Ve;vectorSourceFactory;constructor({references:e}){this.vectorSourceFactory=e.vectorSourceFactory}async getMapConfig(){return{projection:"EPSG:3857",initialView:{kind:"position",center:{x:848890,y:6793350},zoom:13},layers:[new st({title:"OSM",visible:!0,isBaseLayer:!0,olLayer:new Ko({source:new Yo})}),new st({id:"inspire-us-kindergarten",title:"Kindertageseinrichtungen in NRW",visible:!0,olLayer:new Fr({style:new Ie({image:new ci({fill:new Be({color:"blue"}),radius:5})}),source:this.vectorSourceFactory.createVectorSource({baseUrl:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1",collectionId:"governmentalservice",crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:"Datenlizenz Deutschland - Namensnennung - Version 2.0"})})}),new st({id:"ogc_katasterbezirk",title:"Liegenschaftskatasterbezirke in NRW (viele Daten)",visible:!1,olLayer:new Fr({source:this.vectorSourceFactory.createVectorSource({baseUrl:"https://ogc-api.nrw.de/lika/v1",collectionId:"katasterbezirk",limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:"Datenlizenz Deutschland - Namensnennung - Version 2.0"})})}),new st({title:"Abschnitte / Äste mit Unfällen (Mapbox Style)",visible:!1,olLayer:new nu({styleUrl:"https://demo.ldproxy.net/strassen/styles/default?f=mbs"})}),new st({title:"Pendleratlas",visible:!0,olLayer:new pt({source:new Lr({url:"https://pendleratlas.statistikportal.de/_vector_tiles/2022/vg250/{z}/{x}/{y}.pbf",format:new qr,projection:"EPSG:3857",attributions:`© Statistische Ämter der Länder ${new Date().getFullYear()} | GeoBasis-DE/BKG ${new Date().getFullYear()}`}),style:new Ie({fill:new Be({color:"rgba(173, 209, 158, 0.6)"}),stroke:new ut({color:"#2d7d9f",width:3})})})})]}}}class ou{beforeRequest({target:e,options:r}){e.protocol==="https:"&&e.hostname==="ogc-api.nrw.de"&&r.headers.set("Authorization","Bearer 12345")}}const au={"ogc-api-app":{name:"ogc-api-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:iu,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},SampleTokenInterceptor:{name:"SampleTokenInterceptor",clazz:ou,provides:[{name:"http.Interceptor",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:Qo,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:ea,provides:[{name:"map.MapRegistry",qualifier:void 0}],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/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:ca,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:pa,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}}},su=':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)}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}',lu=["en","de"];function uu(t){switch(t){case"en":return Cn(()=>import("./DBP_-rsMB4Hw.js"),[],import.meta.url).then(e=>e.default);case"de":return Cn(()=>import("./DsBi5dvhCBBO.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${t}'`)}const cu=eo(su),pu=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:uu,locales:lu,packages:au,styles:cu},Symbol.toStringTag,{value:"Module"})),du="ogc-api-app",fu=ta.bind(void 0,du);function hu(){const t=fu();return Q.jsx(or,{height:"100%",direction:"column",overflow:"hidden",children:Q.jsx(kn,{title:Q.jsx(zn,{textAlign:"center",py:1,children:Q.jsx(Fn,{size:"md",children:"Open Pioneer - OGC API Features and OGC API Tiles Sample"})}),children:Q.jsx(or,{flex:"1",direction:"column",position:"relative",children:Q.jsxs(ra,{mapId:Ve,children:[Q.jsx(ar,{position:"top-left",horizontalGap:20,verticalGap:20,children:Q.jsx(zn,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:Q.jsx(kn,{title:Q.jsx(Fn,{size:"md",children:t.formatMessage({id:"tocTitle"})}),children:Q.jsx(oa,{mapId:Ve,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})}),Q.jsx(ar,{position:"top-right",horizontalGap:10,verticalGap:10,children:Q.jsxs(ma,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[Q.jsx(sr,{as:"b",children:"Description"}),Q.jsx(sr,{children:"This application can be used to test OGC API Features and OGC API Tiles."}),Q.jsx(sr,{children:"Vector Tiles cannot be reprojected and require the map to use the same projection. Currently all known MVT vector tile sets are using WebMercator, making them unusable in the Default Sample App which uses ETRS89/UTM zone 32N. This Sample App uses WebMercator."})]})}),Q.jsx(ar,{position:"bottom-right",horizontalGap:10,verticalGap:30,children:Q.jsxs(or,{direction:"column",gap:1,padding:1,children:[Q.jsx(da,{mapId:Ve}),Q.jsx(fa,{mapId:Ve}),Q.jsx(ha,{mapId:Ve})]})})]})})})})}const mu=to({component:hu,theme:ro,appMetadata:pu,async resolveConfig(t){const e=t.getAttribute("forced-locale");if(e)return{locale:e}}});customElements.define("ogc-api-app",mu);const yu=document.getElementsByTagName("body")[0];gu();function gu(){const t=window.location.search,r=new URLSearchParams(t).get("lang"),n=document.createElement("ogc-api-app");n.classList.add("full-height"),n.setAttribute("id","test"),r&&n.setAttribute("forced-locale",r),yu.appendChild(n)} +`,""),B.push(Y[fe],K);return B},[]):te=Tr(W,j).trim(),Te=z(v,"paint","text-opacity",b,T,m,x)}if(te&&Te&&!er){kt||(++U,w=S[U],(!w||!w.getText()||w.getFill()||w.getStroke())&&(w=new Ie,S[U]=w),w.setImage(void 0),w.setGeometry(void 0));const H=ti(v,b,T,"text",m);w.getText()||w.setText(q),q=w.getText(),(!q||"getDeclutterMode"in q&&q.getDeclutterMode()!==H)&&(q=new Jo({padding:[2,2,2,2],declutterMode:H}),w.setText(q));const W=z(v,"layout","text-transform",b,T,m,x);W=="uppercase"?te=Array.isArray(te)?te.map((ne,at)=>at%2?ne:ne.toUpperCase()):te.toUpperCase():W=="lowercase"&&(te=Array.isArray(te)?te.map((ne,at)=>at%2?ne:ne.toLowerCase()):te.toLowerCase());const B=Array.isArray(te)?te:N==2?Ar(te,ot):Dr(te,nt,tr,ot);q.setText(B),q.setFont(nt),q.setRotation(xr(z(v,"layout","text-rotate",b,T,m,x)));const X=z(v,"layout","text-anchor",b,T,m,x),D=kt||N==1?"point":z(v,"layout","symbol-placement",b,T,m,x);let O;if(D==="line-center"?(q.setPlacement("line"),O="center"):q.setPlacement(D),D==="line"&&typeof q.setRepeat=="function"){const ne=z(v,"layout","symbol-spacing",b,T,m,x);q.setRepeat(ne*2)}q.setOverflow(D==="point");let K=z(v,"paint","text-halo-width",b,T,m,x);const Y=z(v,"layout","text-offset",b,T,m,x),fe=z(v,"paint","text-translate",b,T,m,x);let ue=0,oe=0;if(D=="point"){O="center",X.indexOf("left")!==-1?(O="left",oe=K):X.indexOf("right")!==-1&&(O="right",oe=-K);const ne=z(v,"layout","text-rotation-alignment",b,T,m,x);q.setRotateWithView(ne=="map")}else q.setMaxAngle(xr(z(v,"layout","text-max-angle",b,T,m,x))*te.length/B.length),q.setRotateWithView(!1);q.setTextAlign(O);let ae="middle";X.indexOf("bottom")==0?(ae="bottom",ue=-K-.5*(it-1)*Ce):X.indexOf("top")==0&&(ae="top",ue=K+.5*(it-1)*Ce),q.setTextBaseline(ae);const J=z(v,"layout","text-justify",b,T,m,x);q.setJustify(J==="auto"?void 0:J),q.setOffsetX(Y[0]*Ce+oe+fe[0]),q.setOffsetY(Y[1]*Ce+ue+fe[1]),F.setColor(Ee(z(v,"paint","text-color",b,T,m,x),Te)),q.setFill(F);const he=Ee(z(v,"paint","text-halo-color",b,T,m,x),Te);if(he&&K>0){E.setColor(he),K*=2;const ne=.5*Ce;E.setWidth(K<=ne?K:ne),q.setStroke(E)}else q.setStroke(void 0);const me=z(v,"layout","text-padding",b,T,m,x),ye=q.getPadding();me!==ye[0]&&(ye[0]=me,ye[1]=me,ye[2]=me,ye[3]=me),w.setZIndex($e)}}}if(U>-1)return S.length=U+1,S};return t.setStyle($),t.set("mapbox-source",C),t.set("mapbox-layers",f),t.set("mapbox-featurestate",t.get("mapbox-featurestate")||{}),$}function Ul(t,e=512){return t.getExtent()?$r({extent:t.getExtent(),tileSize:e,maxZoom:22}).getResolutions():Yt}function Zl(t,e){return e.accessToken||(e=Object.assign({},e),new URL(t).searchParams.forEach((n,i)=>{e.accessToken=n,e.accessTokenParam=i})),e}function Hl(t,e,r="",n={},i=void 0){let o,a,s,l,u=!0;return typeof r!="string"&&!Array.isArray(r)?(s=r,l=s.source||s.layers,n=s):l=r,typeof n=="string"?(o=n,s={}):(o=n.styleUrl,s=n),s.updateSource===!1&&(u=!1),i||(i=s.resolutions),!o&&typeof e=="string"&&!e.trim().startsWith("{")&&(o=e),o&&(o=o.startsWith("data:")?location.href:Ui(o,s.accessToken),s=Zl(o,s)),new Promise(function(c,p){Hi(e,s).then(function(d){if(d.version!=8)return p(new Error("glStyle version 8 required."));if(!(t instanceof Fr||t instanceof pt))return p(new Error("Can only apply to VectorLayer or VectorTileLayer"));const f=t instanceof pt?"vector":"geojson";if(l?Array.isArray(l)?a=d.layers.find(function(F){return F.id===l[0]}).source:a=l:(a=Object.keys(d.sources).find(function(F){return d.sources[F].type===f}),l=a),!a)return p(new Error(`No ${f} source found in the glStyle.`));function h(){if(!u)return Promise.resolve();if(t instanceof pt)return Ql(d.sources[a],o,s).then(function(k){const I=t.getSource();I?k!==I&&(I.setTileUrlFunction(k.getTileUrlFunction()),typeof I.setUrls=="function"&&typeof k.getUrls=="function"&&I.setUrls(k.getUrls()),I.format_||(I.format_=k.format_),I.getAttributions()||I.setAttributions(k.getAttributions()),I.getTileLoadFunction()===di&&I.setTileLoadFunction(k.getTileLoadFunction()),Ho(I.getProjection(),k.getProjection())&&(I.tileGrid=k.getTileGrid())):t.setSource(k);const A=t.getSource().getTileGrid();!isFinite(t.getMaxResolution())&&!isFinite(t.getMinZoom())&&A.getMinZoom()>0&&t.setMaxResolution(Ml(Math.max(0,A.getMinZoom()-1e-12),A.getResolutions()))});const F=d.sources[a];let S=t.getSource();(!S||S.get("mapbox-source")!==F)&&(S=tu(F,o,s));const $=t.getSource();return $?S!==$&&($.getAttributions()||$.setAttributions(S.getAttributions()),$.format_||($.format_=S.getFormat()),$.url_=S.getUrl()):t.setSource(S),Promise.resolve()}let g,m,_,C;function E(){if(!C&&(!d.sprite||m)){if(s.projection&&!i){const S=Ke(s.projection).getUnits();S!=="m"&&(i=Yt.map($=>$/Go[S]))}C=Bl(t,d,l,i,m,_,(F,S=s.webfonts)=>$l(F,S),s.getImage),t.getStyle()?h().then(c).catch(p):p(new Error(`Nothing to show for source [${a}]`))}else C?(t.setStyle(C),h().then(c).catch(p)):p(new Error("Something went wrong trying to apply style."))}if(d.sprite){const F=new URL(Fl(d.sprite,s.accessToken,o||location.href));g=window.devicePixelRatio>=1.5?.5:1;const S=g==.5?"@2x":"";let $=F.origin+F.pathname+S+".json"+F.search;new Promise(function(k,I){Ye("Sprite",$,s).then(k).catch(function(A){$=F.origin+F.pathname+".json"+F.search,Ye("Sprite",$,s).then(k).catch(I)})}).then(function(k){if(k===void 0&&p(new Error("No sprites found.")),m=k,_=F.origin+F.pathname+S+".png"+F.search,s.transformRequest){const I=s.transformRequest(_,"SpriteImage")||_;(I instanceof Request||I instanceof Promise)&&(_=I)}E()}).catch(function(k){p(new Error(`Sprites cannot be loaded: ${$}: ${k.message}`))})}else E()}).catch(p)})}const ri={};function Wl(t,e,r){e.layers.some(function(n){if(n.type==="background"){if(t instanceof ui)return t.setBackground(function(i){return Xi(n,i,r,{})}),!0;if(t instanceof No||t instanceof Vo)return t.getLayers().insertAt(0,Yl(n,r,{})),!0}})}function Xl(t,e,r={}){return Hi(e,r).then(function(n){Wl(t,n,r)})}function Jl(t,e){const r=t.bounds;if(r){const n=Tn([r[0],r[1]],e),i=Tn([r[2],r[3]],e);return[n[0],n[1],i[0],i[1]]}return Ke(e).getExtent()}function Kl(t,e,r){const n=new xa({tileJSON:e,tileSize:t.tileSize||e.tileSize||512}),i=n.getTileJSON(),o=n.getTileGrid(),a=Ke(r.projection||"EPSG:3857"),s=Jl(i,a),l=a.getExtent(),u=i.minzoom||0,c=i.maxzoom||22,p={attributions:n.getAttributions(),projection:a,tileGrid:new ai({origin:l?li(l):o.getOrigin(0),extent:s||o.getExtent(),minZoom:u,resolutions:Ul(a,e.tileSize).slice(0,c+1),tileSize:o.getTileSize(0)})};return Array.isArray(i.tiles)?p.urls=i.tiles:p.url=i.tiles,p}function Xi(t,e,r,n){const i={id:t.id,type:t.type},o=t.layout||{},a=t.paint||{};i.paint=a;const s=Zi(e,r.resolutions||Yt);let l;const u=z(i,"paint","background-color",s,ri,n);return a["background-opacity"]!==void 0&&(l=z(i,"paint","background-opacity",s,ri,n)),o.visibility=="none"?void 0:Ee(u,l)}function Yl(t,e,r){const n=document.createElement("div");return n.className="ol-mapbox-style-background",n.style.position="absolute",n.style.width="100%",n.style.height="100%",new ui({source:new Bo({}),render(i){const o=Xi(t,i.viewState.resolution,e,r);return n.style.backgroundColor=o,n}})}function Ql(t,e,r){return new Promise(function(n,i){Rl(t,e,r).then(function({tileJson:o,tileLoadFunction:a}){const s=Kl(t,o,r);s.tileLoadFunction=a,s.format=new qr,n(new Lr(s))}).catch(i)})}function eu(t){return`{bbox-${(t?t.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")}}`}function tu(t,e,r){const n=r.projection?new Sn({dataProjection:r.projection}):new Sn,i=t.data,o={};if(typeof i=="string"){const s=At(i,r.accessToken,r.accessTokenParam||"access_token",e||location.href);if(/\{bbox-[0-9a-z-]+\}/.test(s)){const u=(p,d,f)=>{const h=eu(f);return s.replace(h,`${p.join(",")}`)},c=new ir({attributions:t.attribution,format:n,loader:(p,d,f,h,g)=>{const m=typeof u=="function"?u(p,d,f):u;Ye("GeoJSON",m,r).then(_=>{const C=c.getFormat().readFeatures(_,{featureProjection:f});c.addFeatures(C),h(C)}).catch(_=>{c.removeLoadedExtent(p),g()})},strategy:Wo});return c.set("mapbox-source",t),c}const l=new ir({attributions:t.attribution,format:n,url:s,loader:(u,c,p,d,f)=>{Ye("GeoJSON",s,r).then(h=>{const g=l.getFormat().readFeatures(h,{featureProjection:p});l.addFeatures(g),d(g)}).catch(h=>{l.removeLoadedExtent(u),f()})}});return l}o.features=n.readFeatures(i,{featureProjection:"EPSG:3857"});const a=new ir(Object.assign({attributions:t.attribution,format:n},o));return a.set("mapbox-source",t),a}class ru extends qo{constructor(e){super(kr.ERROR),this.error=e}}class nu extends pt{constructor(e){const r="declutter"in e?e.declutter:!0,n=new Lr({state:"loading",format:new qr});super({source:n,background:e.background===!1?null:e.background,declutter:r,className:e.className,opacity:e.opacity,visible:e.visible,zIndex:e.zIndex,minResolution:e.minResolution,maxResolution:e.maxResolution,minZoom:e.minZoom,maxZoom:e.maxZoom,renderOrder:e.renderOrder,renderBuffer:e.renderBuffer,renderMode:e.renderMode,map:e.map,updateWhileAnimating:e.updateWhileAnimating,updateWhileInteracting:e.updateWhileInteracting,preload:e.preload,useInterimTilesOnError:e.useInterimTilesOnError,properties:e.properties}),e.accessToken&&(this.accessToken=e.accessToken);const i=e.styleUrl,o=[Hl(this,i,e.layers||e.source,{accessToken:this.accessToken})];this.getBackground()===void 0&&o.push(Xl(this,e.styleUrl,{accessToken:this.accessToken})),Promise.all(o).then(()=>{n.setState("ready")}).catch(a=>{this.dispatchEvent(new ru(a)),this.getSource().setState("error")})}}const Ve="main";class iu{mapId=Ve;vectorSourceFactory;constructor({references:e}){this.vectorSourceFactory=e.vectorSourceFactory}async getMapConfig(){return{projection:"EPSG:3857",initialView:{kind:"position",center:{x:848890,y:6793350},zoom:13},layers:[new st({title:"OSM",visible:!0,isBaseLayer:!0,olLayer:new Ko({source:new Yo})}),new st({id:"inspire-us-kindergarten",title:"Kindertageseinrichtungen in NRW",visible:!0,olLayer:new Fr({style:new Ie({image:new ci({fill:new Be({color:"blue"}),radius:5})}),source:this.vectorSourceFactory.createVectorSource({baseUrl:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1",collectionId:"governmentalservice",crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:"Datenlizenz Deutschland - Namensnennung - Version 2.0"})})}),new st({id:"ogc_katasterbezirk",title:"Liegenschaftskatasterbezirke in NRW (viele Daten)",visible:!1,olLayer:new Fr({source:this.vectorSourceFactory.createVectorSource({baseUrl:"https://ogc-api.nrw.de/lika/v1",collectionId:"katasterbezirk",limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:"Datenlizenz Deutschland - Namensnennung - Version 2.0"})})}),new st({title:"Abschnitte / Äste mit Unfällen (Mapbox Style)",visible:!1,olLayer:new nu({styleUrl:"https://demo.ldproxy.net/strassen/styles/default?f=mbs"})}),new st({title:"Pendleratlas",visible:!0,olLayer:new pt({source:new Lr({url:"https://pendleratlas.statistikportal.de/_vector_tiles/2022/vg250/{z}/{x}/{y}.pbf",format:new qr,projection:"EPSG:3857",attributions:`© Statistische Ämter der Länder ${new Date().getFullYear()} | GeoBasis-DE/BKG ${new Date().getFullYear()}`}),style:new Ie({fill:new Be({color:"rgba(173, 209, 158, 0.6)"}),stroke:new ut({color:"#2d7d9f",width:3})})})})]}}}class ou{beforeRequest({target:e,options:r}){e.protocol==="https:"&&e.hostname==="ogc-api.nrw.de"&&r.headers.set("Authorization","Bearer 12345")}}const au={"ogc-api-app":{name:"ogc-api-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:iu,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},SampleTokenInterceptor:{name:"SampleTokenInterceptor",clazz:ou,provides:[{name:"http.Interceptor",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/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:Qo,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:ea,provides:[{name:"map.MapRegistry",qualifier:void 0}],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/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:ca,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:pa,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}}},su=':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)}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}',lu=["en","de"];function uu(t){switch(t){case"en":return Cn(()=>import("./DBP_-rsMB4Hw.js"),[],import.meta.url).then(e=>e.default);case"de":return Cn(()=>import("./DsBi5dvhCBBO.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${t}'`)}const cu=eo(su),pu=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:uu,locales:lu,packages:au,styles:cu},Symbol.toStringTag,{value:"Module"})),du="ogc-api-app",fu=ta.bind(void 0,du);function hu(){const t=fu();return Q.jsx(or,{height:"100%",direction:"column",overflow:"hidden",children:Q.jsx(kn,{title:Q.jsx(zn,{textAlign:"center",py:1,children:Q.jsx(Fn,{size:"md",children:"Open Pioneer - OGC API Features and OGC API Tiles Sample"})}),children:Q.jsx(or,{flex:"1",direction:"column",position:"relative",children:Q.jsxs(ra,{mapId:Ve,children:[Q.jsx(ar,{position:"top-left",horizontalGap:20,verticalGap:20,children:Q.jsx(zn,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:Q.jsx(kn,{title:Q.jsx(Fn,{size:"md",children:t.formatMessage({id:"tocTitle"})}),children:Q.jsx(oa,{mapId:Ve,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})}),Q.jsx(ar,{position:"top-right",horizontalGap:10,verticalGap:10,children:Q.jsxs(ma,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[Q.jsx(sr,{as:"b",children:"Description"}),Q.jsx(sr,{children:"This application can be used to test OGC API Features and OGC API Tiles."}),Q.jsx(sr,{children:"Vector Tiles cannot be reprojected and require the map to use the same projection. Currently all known MVT vector tile sets are using WebMercator, making them unusable in the Default Sample App which uses ETRS89/UTM zone 32N. This Sample App uses WebMercator."})]})}),Q.jsx(ar,{position:"bottom-right",horizontalGap:10,verticalGap:30,children:Q.jsxs(or,{direction:"column",gap:1,padding:1,children:[Q.jsx(da,{mapId:Ve}),Q.jsx(fa,{mapId:Ve}),Q.jsx(ha,{mapId:Ve})]})})]})})})})}const mu=to({component:hu,theme:ro,appMetadata:pu,async resolveConfig(t){const e=t.getAttribute("forced-locale");if(e)return{locale:e}}});customElements.define("ogc-api-app",mu);const yu=document.getElementsByTagName("body")[0];gu();function gu(){const t=window.location.search,r=new URLSearchParams(t).get("lang"),n=document.createElement("ogc-api-app");n.classList.add("full-height"),n.setAttribute("id","test"),r&&n.setAttribute("forced-locale",r),yu.appendChild(n)} diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/experimental-sidebar/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/experimental-sidebar/index.html index 7c305a7..dc37b32 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/experimental-sidebar/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/experimental-sidebar/index.html @@ -16,7 +16,7 @@ max-height: 100%; } - + diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/map-sample/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/map-sample/index.html index 6d095ff..0f051f8 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/map-sample/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/map-sample/index.html @@ -17,7 +17,7 @@ overflow: hidden; } - + @@ -34,11 +34,11 @@ - + - + diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/ogc-api-sample/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/ogc-api-sample/index.html index 4ff0d1f..d426d71 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/ogc-api-sample/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/ogc-api-sample/index.html @@ -16,7 +16,7 @@ max-height: 100%; } - + diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/showcase/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/showcase/index.html index bbaf3a1..3380563 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/showcase/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/showcase/index.html @@ -17,7 +17,7 @@ overflow: hidden; } - + @@ -34,11 +34,11 @@ - + - + diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/test-highlight-and-zoom/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/test-highlight-and-zoom/index.html index a123325..16b01c8 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/test-highlight-and-zoom/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/test-highlight-and-zoom/index.html @@ -16,7 +16,7 @@ max-height: 100%; } - + diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/test-printing-api/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/test-printing-api/index.html index 3541d10..b859406 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/test-printing-api/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/test-printing-api/index.html @@ -16,14 +16,14 @@ max-height: 100%; } - + - + diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/test-result-list/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/test-result-list/index.html index 3d5f0c6..e9fe63c 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/test-result-list/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/test-result-list/index.html @@ -16,7 +16,7 @@ max-height: 100%; } - + diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/test-toc/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/test-toc/index.html index cf4b50e..9df055d 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/test-toc/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/test-toc/index.html @@ -17,7 +17,7 @@ overflow: hidden; } - +