import{B as Fe,M as Ue,C as ae,u as j,i as Xe,V as Y,a as je,T as be,I as ze,H as Ke,t as Ee,g as ie,S as re,b as N,L as D,c as Se,P as R,d as Q,e as ve,f as ne,h as U,j as F,F as z,k as ee,l as me,m as Z,n as x,o as I,p as J,R as ue,q as fe,r as te,s as de,v as Ne,w as Ce,x as Je,y as Ye,z as Ze,A as ge,D as K,E as ke,G as We,J as $e,O as Qe,K as et,N as tt}from"./openlayers-CvK8xBSr.js";var it=class extends Fe{constructor(e){e=e||{},super();var t=this.input=e.input;t||(t=this.input=document.createElement("input"),e.type&&t.setAttribute("type",e.type),e.min!==void 0&&t.setAttribute("min",e.min),e.max!==void 0&&t.setAttribute("max",e.max),e.step!==void 0&&t.setAttribute("step",e.step),e.parent&&e.parent.appendChild(t)),e.disabled&&(t.disabled=!0),e.checked!==void 0&&(t.checked=!!e.checked),e.val!==void 0&&(t.value=e.val),e.hidden&&t.classList.add("ol-input-hidden"),t.addEventListener("focus",function(){this.element&&this.element.classList.add("ol-focus")}.bind(this));var i;t.addEventListener("focusout",function(){this.element&&(i&&clearTimeout(i),i=setTimeout(function(){this.element.classList.remove("ol-focus")}.bind(this),0))}.bind(this))}_listenDrag(e,t){var i=function(r){this.moving=!0,this.element.classList.add("ol-moving");var s=function(a){a.type==="pointerup"&&(document.removeEventListener("pointermove",s),document.removeEventListener("pointerup",s),document.removeEventListener("pointercancel",s),setTimeout(function(){this.moving=!1,this.element.classList.remove("ol-moving")}.bind(this))),a.target===e&&t(a),a.stopPropagation(),a.preventDefault()}.bind(this);document.addEventListener("pointermove",s,!1),document.addEventListener("pointerup",s,!1),document.addEventListener("pointercancel",s,!1),r.stopPropagation(),r.preventDefault()}.bind(this);e.addEventListener("mousedown",i,!1),e.addEventListener("touchstart",i,!1)}setValue(e){e!==void 0&&(this.input.value=e),this.input.dispatchEvent(new Event("change"))}getValue(){return this.input.value}getInputElement(){return this.input}},pe=class extends it{constructor(e){e=e||{},super(e);var t=this.element=document.createElement("label");e.html instanceof Element?t.appendChild(e.html):e.html!==void 0&&(t.innerHTML=e.html),t.className=("ol-ext-check ol-ext-checkbox "+(e.className||"")).trim(),this.input.parentNode&&this.input.parentNode.insertBefore(t,this.input),t.appendChild(this.input),t.appendChild(document.createElement("span")),e.after&&t.appendChild(document.createTextNode(e.after)),this.input.addEventListener("change",function(){this.dispatchEvent({type:"check",checked:this.input.checked,value:this.input.value})}.bind(this))}isChecked(){return this.input.checked}},rt=class extends pe{constructor(e){e=e||{},super(e),this.element.className=("ol-ext-toggle-switch "+(e.className||"")).trim()}},st=class extends pe{constructor(e){e=e||{},super(e),this.element.className=("ol-ext-check ol-ext-radio "+(e.className||"")).trim()}},f={};f.create=function(o,e){e=e||{};var t;if(o==="TEXT")t=document.createTextNode(e.html||""),e.parent&&e.parent.appendChild(t);else{t=document.createElement(o.toLowerCase()),/button/i.test(o)&&t.setAttribute("type","button");for(var i in e)switch(i){case"className":{e.className&&e.className.trim&&t.setAttribute("class",e.className.trim());break}case"text":{t.innerText=e.text;break}case"html":{e.html instanceof Element?t.appendChild(e.html):e.html!==void 0&&(t.innerHTML=e.html);break}case"parent":{e.parent&&e.parent.appendChild(t);break}case"options":{if(/select/i.test(o))for(var r in e.options)f.create("OPTION",{html:r,value:e.options[r],parent:t});break}case"style":{f.setStyle(t,e.style);break}case"change":case"click":{f.addListener(t,i,e[i]);break}case"on":{for(var s in e.on)f.addListener(t,s,e.on[s]);break}case"checked":{t.checked=!!e.checked;break}default:{t.setAttribute(i,e[i]);break}}}return t};f.createSwitch=function(o){var e=f.create("INPUT",{type:"checkbox",on:o.on,click:o.click,change:o.change,parent:o.parent}),t=Object.assign({input:e},o||{});return new rt(t),e};f.createCheck=function(o){var e=f.create("INPUT",{name:o.name,type:o.type==="radio"?"radio":"checkbox",on:o.on,parent:o.parent}),t=Object.assign({input:e},o||{});return o.type==="radio"?new st(t):new pe(t),e};f.setHTML=function(o,e){e instanceof Element?o.appendChild(e):e!==void 0&&(o.innerHTML=e)};f.appendText=function(o,e){o.appendChild(document.createTextNode(e||""))};f.addListener=function(o,e,t,i){typeof e=="string"&&(e=e.split(" ")),e.forEach(function(r){o.addEventListener(r,t,i)})};f.removeListener=function(o,e,t){typeof e=="string"&&(e=e.split(" ")),e.forEach(function(i){o.removeEventListener(i,t)})};f.show=function(o){o.style.display=""};f.hide=function(o){o.style.display="none"};f.hidden=function(o){return f.getStyle(o,"display")==="none"};f.toggle=function(o){o.style.display=o.style.display==="none"?"":"none"};f.setStyle=function(o,e){for(var t in e)switch(t){case"top":case"left":case"bottom":case"right":case"minWidth":case"maxWidth":case"width":case"height":{typeof e[t]=="number"?o.style[t]=e[t]+"px":o.style[t]=e[t];break}default:o.style[t]=e[t]}};f.getStyle=function(o,e){var t,i=(o.ownerDocument||document).defaultView;if(i&&i.getComputedStyle)e=e.replace(/([A-Z])/g,"-$1").toLowerCase(),t=i.getComputedStyle(o,null).getPropertyValue(e);else if(o.currentStyle&&(e=e.replace(/-(\w)/g,function(r,s){return s.toUpperCase()}),t=o.currentStyle[e],/^\d+(em|pt|%|ex)?$/i.test(t)))return(function(r){var s=o.style.left,a=o.runtimeStyle.left;return o.runtimeStyle.left=o.currentStyle.left,o.style.left=r||0,r=o.style.pixelLeft+"px",o.style.left=s,o.runtimeStyle.left=a,r})(t);return/px$/.test(t)?parseInt(t):t};f.outerHeight=function(o){return o.offsetHeight+f.getStyle(o,"marginBottom")};f.outerWidth=function(o){return o.offsetWidth+f.getStyle(o,"marginLeft")};f.offsetRect=function(o){var e=o.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0),height:e.height||e.bottom-e.top,width:e.width||e.right-e.left}};f.getFixedOffset=function(o){var e={left:0,top:0},t=function(i){if(!i)return e;if(f.getStyle(i,"position")==="absolute"&&f.getStyle(i,"transform")!=="none"){var r=i.getBoundingClientRect();return e.left+=r.left,e.top+=r.top,e}return t(i.offsetParent)};return t(o.offsetParent)};f.positionRect=function(o,e){var t=0,i=0,r=function(s){if(s)return t+=s.offsetLeft,i+=s.offsetTop,r(s.offsetParent);var a={top:o.offsetTop+i,left:o.offsetLeft+t};return e&&(a.top-=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,a.left-=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0),a.bottom=a.top+o.offsetHeight,a.right=a.top+o.offsetWidth,a};return r(o.offsetParent)};f.scrollDiv=function(o,e){e=e||{};var t=!1,i=0,r,s=0,a=typeof e.onmove=="function"?e.onmove:function(){},n=e.vertical?"screenY":"screenX",l=e.vertical?"scrollTop":"scrollLeft",c=!1,g,h,u=0,d=function(){E&&(u++,setTimeout(v))},v=function(){if(E){if(u--,u)return;var m=o.clientHeight,C=o.scrollHeight;g=m/C,E.style.height=g*100+"%",E.style.top=o.scrollTop/C*100+"%",L.style.height=m+"px",m>C-.5?L.classList.add("ol-100pc"):L.classList.remove("ol-100pc")}},_=function(m){m.target.classList.contains("ol-noscroll")||(c=!1,t=m[n],s=new Date,o.classList.add("ol-move"),m.preventDefault(),window.addEventListener("pointermove",y),f.addListener(window,["pointerup","pointercancel"],T))},y=function(m){if(t!==!1){var C=(h?-1/g:1)*(t-m[n]);c=c||Math.round(C),o[l]+=C,r=new Date,r-s&&(i=(i+C/(r-s))/2),t=m[n],s=r,C&&a(!0)}else c=!0},w=function(m){var C=m>0?Math.min(100,m/2):Math.max(-100,m/2);m-=C,o[l]+=C,-1100||h?i=0:s>0&&(i=((i||0)+(t-m[n])/s)/2),w(e.animate===!1?0:i*200),t=!1,i=0,s=0,o.classList.contains("ol-move")?o.classList.remove("ol-hasClick"):(o.classList.add("ol-hasClick"),setTimeout(function(){o.classList.remove("ol-hasClick")},500)),h=!1,window.removeEventListener("pointermove",y),f.removeListener(window,["pointerup","pointercancel"],T)},p=function(m){var C=Math.max(-1,Math.min(1,m.wheelDelta||-m.detail));return o.classList.add("ol-move"),o[l]-=C*30,o.classList.remove("ol-move"),!1};return e.mousewheel&&f.addListener(o,["mousewheel","DOMMouseScroll","onmousewheel"],p),{refresh:d}};f.dispatchEvent=function(o,e){var t;try{t=new CustomEvent(o)}catch{t=document.createEvent("CustomEvent"),t.initCustomEvent(o,!0,!0,{})}e.dispatchEvent(t)};f.setCursor=function(o,e){o instanceof Ue&&(o=o.getTargetElement()),!("ontouchstart"in window)&&o instanceof Element&&(o.style.cursor=e)};var at=class extends ae{constructor(e){e=e||{};var t=f.create("DIV",{className:e.switcherClass||"ol-layerswitcher"});super({element:t,target:e.target});var i=this;this.dcount=0,this.show_progress=e.show_progress,this.oninfo=typeof e.oninfo=="function"?e.oninfo:null,this.onextent=typeof e.onextent=="function"?e.onextent:null,this.hasextent=e.extent||e.onextent,this.hastrash=e.trash,this.reordering=e.reordering!==!1,this._layers=[],this._layerGroup=e.layerGroup&&e.layerGroup.getLayers?e.layerGroup:null,this.onchangeCheck=typeof e.onchangeCheck=="function"?e.onchangeCheck:null,typeof e.displayInLayerSwitcher=="function"&&(this.displayInLayerSwitcher=e.displayInLayerSwitcher),e.target||(t.classList.add("ol-unselectable"),t.classList.add("ol-control"),t.classList.add(e.collapsed!==!1?"ol-collapsed":"ol-forceopen"),e.counter&&t.classList.add("ol-counter"),this.counter=f.create("SPAN",{class:"ol-counter",text:0,parent:t}),this.button=f.create("BUTTON",{type:"button",parent:t}),this.button.addEventListener("touchstart",function(r){t.classList.toggle("ol-forceopen"),t.classList.add("ol-collapsed"),i.dispatchEvent({type:"toggle",collapsed:t.classList.contains("ol-collapsed")}),r.preventDefault(),i.overflow()}),this.button.addEventListener("click",function(){t.classList.toggle("ol-forceopen"),t.classList.add("ol-collapsed"),i.dispatchEvent({type:"toggle",collapsed:!t.classList.contains("ol-forceopen")}),i.overflow()}),e.mouseover&&(t.addEventListener("mouseleave",function(){t.classList.add("ol-collapsed"),i.dispatchEvent({type:"toggle",collapsed:!0})}),t.addEventListener("mouseover",function(){t.classList.remove("ol-collapsed"),i.dispatchEvent({type:"toggle",collapsed:!1})})),e.minibar&&(e.noScroll=!0),e.noScroll||(this.topv=f.create("DIV",{className:"ol-switchertopdiv",parent:t,click:function(){i.overflow("+50%")}}),this.botv=f.create("DIV",{className:"ol-switcherbottomdiv",parent:t,click:function(){i.overflow("-50%")}})),this._noScroll=e.noScroll),this.panel_=f.create("UL",{className:"panel"}),this.panelContainer_=f.create("DIV",{className:"panel-container",html:this.panel_,parent:t}),!e.target&&!e.noScroll&&f.addListener(this.panel_,"mousewheel DOMMouseScroll onmousewheel",function(r){i.overflow(Math.max(-1,Math.min(1,r.wheelDelta||-r.detail)))&&(r.stopPropagation(),r.preventDefault())}),this.header_=f.create("LI",{className:"ol-header",parent:this.panel_}),this.set("drawDelay",e.drawDelay||0),this.set("selection",e.selection),e.minibar&&setTimeout(function(){var r=f.scrollDiv(this.panelContainer_,{mousewheel:!0,vertical:!0,minibar:!0});this.on(["drawlist","toggle"],function(){r.refresh()})}.bind(this))}displayInLayerSwitcher(e){return e.get("displayInLayerSwitcher")!==!1}setMap(e){if(super.setMap(e),this.drawPanel(),this._listener)for(var t in this._listener)j(this._listener[t]);this._listener=null,e&&(this._listener={moveend:e.on("moveend",this.viewChange.bind(this)),size:e.on("change:size",this.overflow.bind(this))},this._layerGroup?this._listener.change=this._layerGroup.getLayers().on("change:length",this.drawPanel.bind(this)):this._listener.change=e.getLayerGroup().getLayers().on("change:length",this.drawPanel.bind(this)))}show(){this.element.classList.add("ol-forceopen"),this.overflow(),this.dispatchEvent({type:"toggle",collapsed:!1})}hide(){this.element.classList.remove("ol-forceopen"),this.overflow(),this.dispatchEvent({type:"toggle",collapsed:!0})}toggle(){this.element.classList.toggle("ol-forceopen"),this.overflow(),this.dispatchEvent({type:"toggle",collapsed:!this.isOpen()})}isOpen(){return this.element.classList.contains("ol-forceopen")}setHeader(e){f.setHTML(this.header_,e)}overflow(e){if(this.button&&!this._noScroll){if(f.hidden(this.panel_)){f.setStyle(this.element,{height:"auto"});return}var t=f.outerHeight(this.element),i=f.outerHeight(this.panel_),r=this.button.offsetTop+f.outerHeight(this.button),s=this.panel_.offsetTop-r;if(i>t-r){f.setStyle(this.element,{height:"100%"});var a=this.panel_.querySelectorAll("li.ol-visible .li-content")[0],n=a?2*f.getStyle(a,"height"):0;switch(e){case 1:s+=n;break;case-1:s-=n;break;case"+50%":s+=Math.round(t/2);break;case"-50%":s-=Math.round(t/2);break}return s+i<=t-3*r/2?(s=t-3*r/2-i,f.hide(this.botv)):f.show(this.botv),s>=0?(s=0,f.hide(this.topv)):f.show(this.topv),f.setStyle(this.panel_,{top:s+"px"}),!0}else return f.setStyle(this.element,{height:"auto"}),f.setStyle(this.panel_,{top:0}),f.hide(this.botv),f.hide(this.topv),!1}else return!1}_setLayerForLI(e,t){var i=[];t.getLayers&&i.push(t.getLayers().on("change:length",this.drawPanel.bind(this))),e&&(i.push(t.on("change:opacity",(function(){this.setLayerOpacity(t,e)}).bind(this))),i.push(t.on("change:visible",(function(){this.setLayerVisibility(t,e)}).bind(this)))),i.push(t.on("propertychange",(function(r){(r.key==="displayInLayerSwitcher"||r.key==="openInLayerSwitcher"||r.key==="title"||r.key==="name")&&this.drawPanel(r)}).bind(this))),this._layers.push({li:e,layer:t,listeners:i})}setLayerOpacity(e,t){var i=t.querySelector(".layerswitcher-opacity-cursor");i&&(i.style.left=e.getOpacity()*100+"%"),this.dispatchEvent({type:"layer:opacity",layer:e})}setLayerVisibility(e,t){var i=t.querySelector(".ol-visibility");i&&(i.checked=e.getVisible()),e.getVisible()?t.classList.add("ol-visible"):t.classList.remove("ol-visible"),this.dispatchEvent({type:"layer:visible",layer:e})}_clearLayerForLI(){this._layers.forEach(function(e){e.listeners.forEach(function(t){j(t)})}),this._layers=[]}_getLayerForLI(e){for(var t=0,i;i=this._layers[t];t++)if(i.li===e)return i.layer;return null}viewChange(){this.panel_.querySelectorAll("li").forEach(function(e){var t=this._getLayerForLI(e);t&&(this.testLayerVisibility(t)?e.classList.remove("ol-layer-hidden"):e.classList.add("ol-layer-hidden"))}.bind(this))}getPanel(){return this.panelContainer_}drawPanel(){if(this.getMap()){var e=this;this.dcount++,setTimeout(function(){e.drawPanel_()},this.get("drawDelay")||0)}}drawPanel_(){if(!(--this.dcount||this.dragging_)){var e=this.panelContainer_.scrollTop;this._clearLayerForLI(),this.panel_.querySelectorAll("li").forEach(function(t){t.classList.contains("ol-header")||t.remove()}.bind(this)),this._layerGroup?this.drawList(this.panel_,this._layerGroup.getLayers()):this.getMap()&&this.drawList(this.panel_,this.getMap().getLayers()),this.panelContainer_.scrollTop=e,this.counter&&(this.counter.innerHTML=this.panel_.parentNode.querySelectorAll("ul.panel > li:not(.ol-header)").length)}}switchLayerVisibility(e,t){e.get("baseLayer")?(e.getVisible()||e.setVisible(!0),t.forEach(function(i){e!==i&&i.get("baseLayer")&&i.getVisible()&&i.setVisible(!1)})):e.setVisible(!e.getVisible())}testLayerVisibility(e){if(!this.getMap())return!0;var t=this.getMap().getView().getResolution(),i=this.getMap().getView().getZoom();if(e.getMaxResolution()<=t||e.getMinResolution()>=t)return!1;if(e.getMinZoom&&(e.getMinZoom()>=i||e.getMaxZoom()E?y.insertAt(E,v):y.insertAt(E+1,v);break}}_&&t.selectLayer(v),t.dispatchEvent({type:"reorder-end",layer:v,group:h})}i.parentNode.querySelectorAll("li").forEach(function(k){k.classList.remove("dropover"),k.classList.remove("dropover-after"),k.classList.remove("dropover-before")}),i.classList.remove("drag"),i.parentNode.classList.remove("drag"),t.element.classList.remove("drag"),c&&c.remove(),f.removeListener(document,"mousemove touchmove",d),f.removeListener(document,"mouseup touchend touchcancel",u)}function d(v){if(a=v.pageY||v.touches&&v.touches.length&&v.touches[0].pageY||v.changedTouches&&v.changedTouches.length&&v.changedTouches[0].pageY,r&&Math.abs(n-a)>2&&(r=!1,i.classList.add("drag"),g=t._getLayerForLI(i),l=!1,h=t._getLayerForLI(i.parentNode.parentNode),c=f.create("LI",{className:"ol-dragover",html:i.innerHTML,style:{position:"absolute","z-index":1e4,left:i.offsetLeft,opacity:.5,width:f.outerWidth(i),height:f.getStyle(i,"height")},parent:s}),t.element.classList.add("drag"),t.dispatchEvent({type:"reorder-start",layer:g,group:h})),!r){v.preventDefault(),v.stopPropagation(),f.setStyle(c,{top:a-f.offsetRect(s).top+s.scrollTop+5});var _;if(!v.touches)_=v.target,v.target.shadowRoot&&(_=v.composedPath()[0]);else for(_=document.elementFromPoint(v.touches[0].clientX,v.touches[0].clientY);_.shadowRoot;)_=_.shadowRoot.elementFromPoint(v.touches[0].clientX,v.touches[0].clientY);for(_.classList.contains("ol-switcherbottomdiv")?t.overflow(-1):_.classList.contains("ol-switchertopdiv")&&t.overflow(1);_&&_.tagName!=="LI";)_=_.parentNode;(!_||!_.classList.contains("dropover"))&&i.parentNode.querySelectorAll("li").forEach(function(y){y.classList.remove("dropover"),y.classList.remove("dropover-after"),y.classList.remove("dropover-before")}),_&&_.parentNode.classList.contains("drag")&&_!==i?(l=t._getLayerForLI(_),l&&!l.get("allwaysOnTop")==!g.get("allwaysOnTop")?(_.classList.add("dropover"),_.classList.add(i.offsetTop<_.offsetTop?"dropover-after":"dropover-before")):l=!1,f.show(c)):(l=!1,_===i?f.hide(c):f.show(c)),l?c.classList.remove("forbidden"):c.classList.add("forbidden")}}f.addListener(document,"mousemove touchmove",d),f.addListener(document,"mouseup touchend touchcancel",u)}dragOpacity_(e){e.stopPropagation(),e.preventDefault();var t=this,i=e.target,r=this._getLayerForLI(i.parentNode.parentNode.parentNode);if(!r)return;var s=e.pageX||e.touches&&e.touches.length&&e.touches[0].pageX||e.changedTouches&&e.changedTouches.length&&e.changedTouches[0].pageX,a=f.getStyle(i,"left")-s;t.dragging_=!0;function n(){f.removeListener(document,"mouseup touchend touchcancel",n),f.removeListener(document,"mousemove touchmove",l),t.dragging_=!1}function l(c){var g=c.pageX||c.touches&&c.touches.length&&c.touches[0].pageX||c.changedTouches&&c.changedTouches.length&&c.changedTouches[0].pageX,h=(a+g)/f.getStyle(i.parentNode,"width"),u=Math.max(0,Math.min(1,h));f.setStyle(i,{left:u*100+"%"}),i.parentNode.nextElementSibling.innerHTML=Math.round(u*100),r.setOpacity(u)}f.addListener(document,"mouseup touchend touchcancel",n),f.addListener(document,"mousemove touchmove",l)}drawList(e,t){var i=this,r=t.getArray(),s=function(h){h.stopPropagation(),h.preventDefault();var u=i._getLayerForLI(this.parentNode.parentNode);i.switchLayerVisibility(u,t),i.get("selection")&&u.getVisible()&&i.selectLayer(u),i.onchangeCheck&&i.onchangeCheck(u)};function a(h){h.stopPropagation(),h.preventDefault();var u=i._getLayerForLI(this.parentNode.parentNode);i.oninfo(u),i.dispatchEvent({type:"info",layer:u})}function n(h){h.stopPropagation(),h.preventDefault();var u=i._getLayerForLI(this.parentNode.parentNode);i.onextent?i.onextent(u):i.getMap().getView().fit(u.getExtent(),i.getMap().getSize()),i.dispatchEvent({type:"extent",layer:u})}function l(h){h.stopPropagation(),h.preventDefault();var u=this.parentNode.parentNode.parentNode.parentNode,d,v=i._getLayerForLI(u);v?(d=i._getLayerForLI(this.parentNode.parentNode),v.getLayers().remove(d),v.getLayers().getLength()==0&&!v.get("noSwitcherDelete")&&l.call(u.querySelectorAll(".layerTrash")[0],h)):(u=this.parentNode.parentNode,i.getMap().removeLayer(i._getLayerForLI(u)))}function c(h){if(!this.displayInLayerSwitcher(h)){this._setLayerForLI(null,h);return}var u=f.create("LI",{className:(h.getVisible()?"ol-visible ":" ")+(h.get("baseLayer")?"baselayer":""),parent:e});this._setLayerForLI(u,h),this._selectedLayer===h&&u.classList.add("ol-layer-select");var d=f.create("DIV",{className:"ol-layerswitcher-buttons",parent:u}),v=f.create("DIV",{className:"li-content",parent:u}),_=f.create("INPUT",{type:h.get("baseLayer")?"radio":"checkbox",className:"ol-visibility",checked:h.getVisible(),click:function(p){s.bind(this)(p),setTimeout(function(){p.target.checked=h.getVisible()})},on:{keydown:function(p){switch(p.key){case"ArrowLeft":case"ArrowRight":{p.preventDefault(),p.stopPropagation();var m=p.key==="ArrowLeft"?-.1:.1,C=Math.min(1,Math.max(0,h.getOpacity()+m));h.setOpacity(C);break}case"Enter":{i.get("selection")&&(p.preventDefault(),p.stopPropagation(),i.selectLayer(h));break}case"-":case"+":h.getLayers&&(this._focus=h,h.set("openInLayerSwitcher",!h.get("openInLayerSwitcher")));case"ArrowUp":case"ArrowDown":{if(p.ctrlKey&&this.reordering){p.preventDefault(),p.stopPropagation();var S=t.getArray().indexOf(h);S>-1&&(p.key==="ArrowDown"?S>0&&(t.remove(h),t.insertAt(S-1,h),i._focus=h,i.dispatchEvent({type:"reorder-end",layer:h})):S0&&(!h.get("allwaysOnTop")||r[g-1].get("allwaysOnTop")))&&f.create("DIV",{className:"layerup ol-noscroll",title:this.tip.up,on:{"mousedown touchstart":function(p){i.dragOrdering_(p)}},parent:d}),h.getLayers){var w=0;h.getLayers().forEach(function(p){i.displayInLayerSwitcher(p)&&w++}),w&&f.create("DIV",{className:h.get("openInLayerSwitcher")?"collapse-layers":"expend-layers",title:this.tip.plus,click:function(){var p=i._getLayerForLI(this.parentNode.parentNode);p.set("openInLayerSwitcher",!p.get("openInLayerSwitcher"))},parent:d})}if(this.oninfo&&f.create("DIV",{className:"layerInfo",title:this.tip.info,click:a,parent:d}),this.hastrash&&!h.get("noSwitcherDelete")&&f.create("DIV",{className:"layerTrash",title:this.tip.trash,click:l,parent:d}),this.hasextent&&r[g].getExtent()){var L=r[g].getExtent();L.length==4&&L[0]=0;g--)c.call(this,r[g]);this.viewChange(),e===this.panel_&&(this.overflow(""),this._focus=null)}getLayerClass(e){return e?e.getLayers?"ol-layer-group":e instanceof Y?"ol-layer-vector":e instanceof je?"ol-layer-vectortile":e instanceof be?"ol-layer-tile":e instanceof ze?"ol-layer-image":e instanceof Ke?"ol-layer-heatmap":e.getFeatures?"ol-layer-vectorimage":"unknown":"none"}selectLayer(e,t){if(!e){if(!this.getMap())return;e=this.getMap().getLayers().item(this.getMap().getLayers().getLength()-1)}this._selectedLayer=e,this.element.querySelector("input.ol-visibility:focus")&&(this._focus=e),this.drawPanel(),t||this.dispatchEvent({type:"select",layer:e})}getSelection(){return this._selectedLayer}setprogress_(e){if(!e.layerswitcher_progress){var t=0,i=0,r=function(){i===t?(i=t=0,f.setStyle(e.layerswitcher_progress,{width:0})):f.setStyle(e.layerswitcher_progress,{width:(t/i*100).toFixed(1)+"%"})};e.getSource().on("tileloadstart",function(){i++,r()}),e.getSource().on("tileloadend",function(){t++,r()}),e.getSource().on("tileloaderror",function(){t++,r()})}}};at.prototype.tip={up:"up/down",down:"down",info:"informations...",extent:"zoom to extent",trash:"remove layer",plus:"expand/shrink"};var Oe=class extends ae{constructor(e){e=e||{};var t=(e.className||"")+" ol-search"+(e.target?"":" ol-unselectable ol-control"),i=f.create("DIV",{className:t});super({element:i,target:e.target});var r=this;if(e.typing==null&&(e.typing=300),this._classname=e.className||"search",e.collapsed!==!1&&i.classList.add("ol-collapsed"),e.target||(this.button=document.createElement("button"),this.button.setAttribute("type","button"),this.button.setAttribute("title",e.title||e.label||"Search"),this.button.addEventListener("click",function(){if(i.classList.toggle("ol-collapsed"),!i.classList.contains("ol-collapsed")){i.querySelector("input.search").focus();for(var u=i.querySelectorAll("li"),d=0;d=0)if(n=v,n){a&&clearTimeout(a);var y=r.get("minLength");a=setTimeout(function(){if(n.length>=y){var w=r.autocomplete(n,function(L){r.drawList_(L)});w&&r.drawList_(w)}else r.drawList_()},e.typing)}else r.drawList_();else d=i.querySelector("ul.autocomplete li"),d&&d.classList.remove("select")};if(l.addEventListener("keyup",c),l.addEventListener("search",c),l.addEventListener("cut",c),l.addEventListener("paste",c),l.addEventListener("input",c),e.noCollapse||(l.addEventListener("blur",function(){setTimeout(function(){l!==document.activeElement&&(i.classList.add("ol-collapsed"),this.set("reverse",!1),i.classList.remove("ol-revers"))}.bind(this),200)}.bind(this)),l.addEventListener("focus",function(){this.get("reverse")||(i.classList.remove("ol-collapsed"),i.classList.remove("ol-revers"))}.bind(this)),l.addEventListener("keydown",function(){this.set("reverse",!1),i.classList.remove("ol-collapsed"),i.classList.remove("ol-revers")}.bind(this))),i.appendChild(l),e.reverse){var g=f.create("BUTTON",{type:"button",class:"ol-revers",title:e.reverseTitle||"click on the map",on:{focus:function(){this.get("reverse")?this.set("reverse",!1):(this.set("reverse",!this.get("reverse")),l.focus(),i.classList.add("ol-revers"))}.bind(this)}});i.appendChild(g)}var h=document.createElement("ul");h.classList.add("autocomplete"),i.appendChild(h),typeof e.getTitle=="function"&&(this.getTitle=e.getTitle),typeof e.autocomplete=="function"&&(this.autocomplete=e.autocomplete),this.set("copy",e.copy),this.set("minLength",e.minLength||1),this.set("maxItems",e.maxItems||10),this.set("maxHistory",e.maxHistory||e.maxItems||10),e.onselect&&this.on("select",e.onselect),e.centerOnSelect&&this.on("select",function(u){var d=this.getMap();d&&d.getView().setCenter(u.coordinate)}.bind(this)),e.zoomOnSelect&&this.on("select",function(u){var d=this.getMap();d&&(d.getView().setCenter(u.coordinate),d.getView().getZoom()=0;s--)(!r[s]||JSON.stringify(r[s])===a)&&r.splice(s,1)}catch{for(s=r.length-1;s>=0;s--)r[s]===e&&r.splice(s,1)}r.unshift(e);for(var n=Math.max(0,this.get("maxHistory")||10)||0;r.length>n;)r.pop();this.saveHistory(),this.select(e,t,null,i),t&&(this.setInput(this._getTitleTxt(e)),this.drawList_(),setTimeout(function(){this.collapse(!1)}.bind(this),300))}}saveHistory(){try{this.get("maxHistory")>=0?localStorage["ol@search-"+this._classname]=JSON.stringify(this.get("history")):localStorage.removeItem("ol@search-"+this._classname)}catch{console.warn("Failed to access localStorage...")}}restoreHistory(){if(this._history[this._classname])this.set("history",this._history[this._classname]);else try{this._history[this._classname]=JSON.parse(localStorage["ol@search-"+this._classname]),this.set("history",this._history[this._classname])}catch{this.set("history",[])}}clearHistory(){this.set("history",[]),this.saveHistory(),this.drawList_()}getHistory(){return this.get("history")}autocomplete(e,t){return t([]),!1}drawList_(e){var t=this,i=this.element.querySelector("ul.autocomplete");if(i.innerHTML="",this._list=[],e)i.setAttribute("class","autocomplete");else{var r=this.element.querySelector("input.search"),s=r.value;if(!s)e=this.get("history");else return;i.setAttribute("class","autocomplete history")}for(var a,n=Math.min(t.get("maxItems"),e.length),l=0;l=200&&this.status<400){var c;try{switch(r.get("dataType")){case"JSON":{c=JSON.parse(this.response);break}default:c=this.response}}catch(g){r.dispatchEvent({type:"error",status:0,statusText:"parsererror",error:g,options:i,jqXHR:this});return}r.dispatchEvent({type:"success",response:c,status:this.status,statusText:this.statusText,options:i,jqXHR:this})}else r.dispatchEvent({type:"error",status:this.status,statusText:this.statusText,options:i,jqXHR:this})},l.ontimeout=function(){r._request=null,r.dispatchEvent({type:"loadend"}),r.dispatchEvent({type:"error",status:this.status,statusText:"Timeout",options:i,jqXHR:this})},l.onerror=function(){r._request=null,r.dispatchEvent({type:"loadend"}),r.dispatchEvent({type:"error",status:this.status,statusText:this.statusText,options:i,jqXHR:this})},l.send()}},nt=class extends Oe{constructor(e){e=e||{},e.className=e.className||"JSON",delete e.autocomplete,e.minLength=e.minLength||3,e.typing=e.typing||800,super(e);var t=e.url||"";if(window.location.protocol==="https:"){var i=document.createElement("a");i.href=t,i.protocol=window.location.protocol,t=i.href}this.set("url",t),this._ajax=new Ge({dataType:"JSON",auth:e.authentication}),this._ajax.on("success",function(r){r.status>=200&&r.status<400?typeof this._callback=="function"&&this._callback(r.response):(typeof this._callback=="function"&&this._callback(!1,"error"),console.log("AJAX ERROR",arguments))}.bind(this)),this._ajax.on("error",function(){typeof this._callback=="function"&&this._callback(!1,"error"),console.log("AJAX ERROR",arguments)}.bind(this)),this._ajax.on("loadstart",function(){this.element.classList.add("searching")}.bind(this)),this._ajax.on("loadend",function(){this.element.classList.remove("searching")}.bind(this)),typeof e.handleResponse=="function"&&(this.handleResponse=e.handleResponse)}ajax(e,t,i,r){r=r||{},this._callback=i,this._ajax.set("dataType",r.dataType||"JSON"),this._ajax.send(e,t,r)}autocomplete(e,t){var i=this.requestData(e),r=encodeURI(this.get("url"));this.ajax(r,i,function(s){typeof t=="function"&&t(this.handleResponse(s))})}requestData(e){return{q:e}}handleResponse(e){return e}},mt=class extends nt{constructor(e){e=e||{},e.className=e.className||"nominatim",e.typing=e.typing||-1,e.url=e.url||"https://nominatim.openstreetmap.org/search",e.copy='© OpenStreetMap contributors',super(e),this.set("polygon",e.polygon),this.set("viewbox",e.viewbox),this.set("bounded",e.bounded)}getTitle(e){var t=[];e.class&&t.push(e.class),e.type&&t.push(e.type);var i=e.display_name+(t.length?""+t.join(" - ")+"":"");return e.icon&&(i=""+i),i}requestData(e){var t={format:"json",addressdetails:1,q:e,polygon_geojson:this.get("polygon")?1:0,bounded:this.get("bounded")?1:0,limit:this.get("maxItems")};return this.get("viewbox")&&(t.viewbox=this.get("viewbox")),t}select(e){var t=[Number(e.lon),Number(e.lat)];try{t=Ee(t,"EPSG:4326",this.getMap().getView().getProjection())}catch{}this.dispatchEvent({type:"select",search:e,coordinate:t})}reverseGeocode(e,t){var i=Ee(e,this.getMap().getView().getProjection(),"EPSG:4326");this.ajax(this.get("url").replace("search","reverse"),{lon:i[0],lat:i[1],format:"json"},function(r){t?t.call(this,[r]):r&&!r.error&&this._handleSelect(r,!0)}.bind(this))}handleResponse(e){return e.results||e}},W=class extends ae{constructor(e){e=e||{};var t=document.createElement("div");if(t.classList.add("ol-unselectable","ol-control","ol-bar"),e.className){var i=e.className.split(" ").filter(function(a){return a.length>0});t.classList.add.apply(t.classList,i)}if(e.group&&t.classList.add("ol-group"),super({element:t,target:e.target}),e.id?this.element.setAttribute("id",e.id):this.element.setAttribute("id","ol-bar-"+ie(this)),this.set("toggleOne",e.toggleOne),this.set("autoDeactivate",e.autoDeactivate),this.controls_=[],e.controls instanceof Array)for(var r=0;r-1&&(this.controls_.splice(t,1),this.getMap()&&this.getMap().removeControl(e),e._activateBar&&e.un("change:active",e._activateBar),delete e._activateBar)}deactivateControls(e){for(var t=0;t1e-10&&(n=Math.sqrt((y[0]-_[0])*(y[0]-_[0])+(y[1]-_[1])*(y[1]-_[1])),l=Math.sqrt((w[0]-y[0])*(w[0]-y[0])+(w[1]-y[1])*(w[1]-y[1])),c=_[0]+e*(y[1]-_[1])/n,g=y[0]+e*(w[1]-y[1])/l,h=_[1]-e*(y[0]-_[0])/n,u=y[1]-e*(w[0]-y[0])/l,d=(a*g-s*c+h-u)/(a-s),v=(s*a*(g-c)+a*h-s*u)/(a-s),y[0]-_[0]==0&&(d=y[0]+e*(y[1]-_[1])/Math.abs(y[1]-_[1]),v=a*d-a*g+u),w[0]-y[0]==0&&(d=w[0]+e*(w[1]-y[1])/Math.abs(w[1]-y[1]),v=s*d-s*c+h),t.push([d,v]));return L?t.push(t[0]):(o.pop(),_=o[o.length-1],y=o[o.length-2],w=[_[0]-(y[1]-_[1])/M(_,y)*e,_[1]+(y[0]-_[0])/M(_,y)*e],t.push(w)),t},Te=function(o,e){for(var t=0;t0;s--)(t[s][0]>i&&t[s-1][0]i)&&(r=[i,(i-t[s][0])/(t[s-1][0]-t[s][0])*(t[s-1][1]-t[s][1])+t[s][1]],t.splice(s,0,r))}function e(t,i){var r;for(let s=t.length-1;s>0;s--)(t[s][1]>i&&t[s-1][1]i)&&(r=[(i-t[s][1])/(t[s-1][1]-t[s][1])*(t[s-1][0]-t[s][0])+t[s][0],i],t.splice(s,0,r))}Re=function(t,i){var r=i.getType()==="Polygon";if(!r&&i.getType()!=="MultiPolygon")return null;var s=i.getCoordinates();return r&&(s=[s]),s.forEach(function(a){a.forEach(function(n){o(n,t[0]),o(n,t[2]),e(n,t[1]),e(n,t[3])})}),s.forEach(function(a){a.forEach(function(n){n.forEach(function(l){l[0]t[2]&&(l[0]=t[2]),l[1]t[3]&&(l[1]=t[3])})})}),r?new R(s[0]):new Q(s)}})();var oe=function(o,e,t,i){var r=[];i!==!1&&r.push(o);var s=M(o,e);if(s){var a=Math.round(s/t);if(a>1)for(var n=(e[0]-o[0])/a,l=(e[1]-o[1])/a,c=1;cr?(a=!0,h.push([i[0]+r/d*(u[0]-i[0]),i[1]+r/d*(u[1]-i[1])])):h.push(u)})})}),a?o.getType()==="Polygon"?new R(n[0]):new Q(n):o}}}else console.warn("[ol/geom/Circle~intersection] Unsupported geometry type: "+o.getType());return o};var Ve;(function(){var o=[255,255,255,1],e=[0,153,255,1],t=3,i=[new U({stroke:new F({color:o,width:t+2})}),new U({image:new ee({radius:t*2,fill:new z({color:e}),stroke:new F({color:o,width:t/2})}),stroke:new F({color:e,width:t}),fill:new z({color:[255,255,255,.5]})})];Ve=function(r){if(r===!0)return i;r=r||{};var s=new z({color:r.fillColor||"rgba(255,255,255,0.4)"}),a=new F({color:r.color||"#3399CC",width:1.25}),n=new U({image:new ee({fill:s,stroke:a,radius:5}),fill:s,stroke:a});return[n]}})();const qe=Ve;var Pe=class extends me{constructor(e){e=e||{},super({handleDownEvent:function(i){return t.handleDownEvent_(i)},handleDragEvent:function(i){return t.handleDragEvent_(i)},handleMoveEvent:function(i){return t.handleMoveEvent_(i)},handleUpEvent:function(i){return t.handleUpEvent_(i)}});var t=this;this._filter=e.filter,this.features_=e.features,this.layers_=e.layers?e.layers instanceof Array?e.layers:[e.layers]:null,this.set("duplicate",e.duplicate),this.source_=e.source,this._style=typeof e.style=="function"?e.style:function(){return e.style?e.style:qe(!0)},this.previousCursor_=!1}getFeatureAtPixel_(e){var t=this;return this.getMap().forEachFeatureAtPixel(e.pixel,function(i,r){var s;if(t._filter&&!t._filter(i,r))return!1;if(t.layers_){for(var a=0;a1)return!1;var l=s.getGeometry().getClosestPoint(e.coordinate),c=l[0]-e.coordinate[0],g=l[1]-e.coordinate[1],h=Math.sqrt(c*c+g*g)/e.frameState.viewState.resolution;return h<5?{feature:s,hit:l,coordinates:s.getGeometry().getCoordinates(),geom:s.getGeometry().clone(),geomType:n}:!1}else return!1},{hitTolerance:5})}handleDownEvent_(e){return this.current_=this.getFeatureAtPixel_(e),this.current_?(this.currentStyle_=this.current_.feature.getStyle(),this.source_&&(this.get("duplicate")||e.originalEvent.ctrlKey)?(this.current_.feature=this.current_.feature.clone(),this.current_.feature.setStyle(this._style(this.current_.feature)),this.source_.addFeature(this.current_.feature)):(this.current_.feature.setStyle(this._style(this.current_.feature)),this._modifystart=!0),this.dispatchEvent({type:"offsetstart",feature:this.current_.feature,offset:0}),!0):!1}handleDragEvent_(e){this._modifystart&&(this.dispatchEvent({type:"modifystart",features:[this.current_.feature]}),this._modifystart=!1);var t=this.current_.geom.getClosestPoint(e.coordinate),i=M(t,e.coordinate),r,s,a,n;switch(this.current_.geomType){case"Polygon":{if(r=Te(t,this.current_.coordinates[0]).segment,r){s=[r[1][0]-r[0][0],r[1][1]-r[0][1]],a=[e.coordinate[0]-t[0],e.coordinate[1]-t[1]],s[0]*a[1]-s[1]*a[0]>0&&(i=-i),n=[];for(var l=0;l0&&(i=-i),n=xe(this.current_.coordinates,i),this.current_.feature.setGeometry(new D(n)));break}}this.dispatchEvent({type:"offsetting",feature:this.current_.feature,offset:i,segment:[t,e.coordinate],coordinate:e.coordinate})}handleUpEvent_(e){this._modifystart||this.dispatchEvent({type:"offsetend",feature:this.current_.feature,coordinate:e.coordinate}),this.current_.feature.setStyle(this.currentStyle_),this.current_=!1}handleMoveEvent_(e){var t=this.getFeatureAtPixel_(e);t?(this.previousCursor_===!1&&(this.previousCursor_=e.map.getTargetElement().style.cursor),f.setCursor(e.map,"pointer")):(f.setCursor(e.map,this.previousCursor_),this.previousCursor_=!1)}};D.prototype.splitAt=function(o,e){var t;if(!o)return[this];if(e||(e=1e-10),o.length&&o[0].length){var i=[this];for(t=0;t1&&c.push(new D(l)),c.length?c:[this]};var De=class extends Z{constructor(e){e||(e={}),super({handleEvent:function(c){switch(c.type){case"singleclick":return this.handleDownEvent(c);case"pointermove":return this.handleMoveEvent(c);default:return!0}}}),this.snapDistance_=e.snapDistance||25,this.tolerance_=e.tolerance||1e-10,this.cursor_=e.cursor,this.setSources(e.sources),e.features&&(this.sources_||(this.sources_=[]),this.sources_.push(new N({features:e.features}))),this.filterSplit_=e.filter||function(){return!0};var t=[255,255,255,1],i=[0,153,255,1],r=3,s=new z({color:"rgba(255,255,255,0.4)"}),a=new F({color:"#3399CC",width:1.25}),n=[new U({image:new ee({fill:s,stroke:a,radius:5}),fill:s,stroke:a})],l=[new U({stroke:new F({color:t,width:r+2})}),new U({image:new ee({radius:2*r,fill:new z({color:i}),stroke:new F({color:t,width:r/2})}),stroke:new F({color:i,width:r})})];e.sketchStyle&&(n=e.sketchStyle instanceof Array?e.sketchStyle:[e.sketchStyle]),e.featureStyle&&(l=e.featureStyle instanceof Array?e.featureStyle:[e.featureStyle]),this.overlayLayer_=new Y({source:new N({useSpatialIndex:!1}),name:"Split overlay",displayInLayerSwitcher:!1,style:function(c){return c._sketch_?n:l}})}setMap(e){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),super.setMap(e),this.overlayLayer_.setMap(e)}getSources(){if(!this.sources_&&this.getMap()){var e=[],t=function(i){i.forEach(function(r){r.getVisible()&&(r.getSource&&r.getSource()instanceof N?e.unshift(r.getSource()):r.getLayers&&t(r.getLayers()))})};return t(this.getMap().getLayers()),e}return this.sources_||[]}setSources(e){this.sources_=e?e instanceof Array?e||!1:[e]:!1}getClosestFeature(e){var t,i,r,s,a=this.snapDistance_+1;if(this.getSources().forEach(function(c){var g=c.getClosestFeatureToCoordinate(e.coordinate);if(g&&g.getGeometry().splitAt){var h=g.getGeometry().getClosestPoint(e.coordinate),u=new D([e.coordinate,h]),d=u.getLength()/e.frameState.viewState.resolution;dthis.snapDistance_)return!1;var n=this.getNearestCoord(r,i.getGeometry().getCoordinates()),l=this.getMap().getPixelFromCoordinate(n);return M(e.pixel,l)1){var a=[];for(s=0;s=0&&(this.ispt_&&this.get("translate")||this.get("translateFeature"))&&(t.handle="translate"),t.handle){this.mode_=t.handle,this.opt_=t.option,this.constraint_=t.constraint;var r=this.getMap().getView().getRotation();this.coordinate_=i.get("handle")?i.getGeometry().getCoordinates():e.coordinate,this.pixel_=this.getMap().getCoordinateFromPixel(this.coordinate_),this.geoms_=[],this.rotatedGeoms_=[];var s=Ce(),a=Ce();this.hasChanged_=!1;for(var n=0,l;l=this.selection_.item(n);n++)if(this.geoms_.push(l.getGeometry().clone()),s=fe(s,l.getGeometry().getExtent()),this.get("enableRotatedTransform")&&r!==0){var c=this.getGeometryRotateToZero_(l,!0);this.rotatedGeoms_.push(c),a=fe(a,c.getExtent())}if(this.extent_=te(s).getCoordinates()[0],this.get("enableRotatedTransform")&&r!==0&&(this.rotatedExtent_=te(a).getCoordinates()[0]),this.mode_==="rotate"){this.center_=this.getCenter()||de(s);var g=e.map.getTargetElement();f.setCursor(g,this.Cursors.rotate0),this.previousCursor_=g.style.cursor}else this.center_=de(s);return this.angle_=Math.atan2(this.center_[1]-e.coordinate[1],this.center_[0]-e.coordinate[0]),this.dispatchEvent({type:this.mode_+"start",feature:this.selection_.item(0),features:this.selection_,pixel:e.pixel,coordinate:e.coordinate}),!0}else if(this.get("selection")){if(i){this.addFn_(e)||this.selection_.clear();var h=this.selection_.getArray().indexOf(i);h<0?this.selection_.push(i):this.selection_.removeAt(h)}else this.selection_.clear();return this.ispt_=this.selection_.getLength()===1?this.selection_.item(0).getGeometry().getType()=="Point":!1,this.iscircle_=this.selection_.getLength()===1?this.selection_.item(0).getGeometry().getType()=="Circle":!1,this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",feature:i,features:this.selection_,pixel:e.pixel,coordinate:e.coordinate}),!1}}}getCenter(){return this.get("center")}setCenter(e){return this.set("center",e)}handleDragEvent_(e){if(this._handleEvent(e,this.features_)){var t=this.getMap().getView().getRotation(),i,r,s,a,n=[this.coordinate_[0],this.coordinate_[1]],l=[e.coordinate[0],e.coordinate[1]];switch(this.isUpdating_=!0,this.hasChanged_=!0,this.mode_){case"rotate":{var c=Math.atan2(this.center_[1]-l[1],this.center_[0]-l[0]);if(!this.ispt)for(i=0,s;s=this.selection_.item(i);i++)a=this.geoms_[i].clone(),a.rotate(c-this.angle_,this.center_),a.getType()=="Circle"&&a.setCenterAndRadius(a.getCenter(),a.getRadius()),s.setGeometry(a);this.drawSketch_(!0),this.dispatchEvent({type:"rotating",feature:this.selection_.item(0),features:this.selection_,angle:c-this.angle_,pixel:e.pixel,coordinate:e.coordinate});break}case"translate":{var g=l[0]-n[0],h=l[1]-n[1];for(i=0,s;s=this.selection_.item(i);i++)s.getGeometry().translate(g,h);this.handles_.forEach(function(S){S.getGeometry().translate(g,h)}),this.coordinate_=e.coordinate,this.dispatchEvent({type:"translating",feature:this.selection_.item(0),features:this.selection_,delta:[g,h],pixel:e.pixel,coordinate:e.coordinate});break}case"scale":{var u=this.center_;if(this.get("modifyCenter")(e)){var d=this.extent_;this.get("enableRotatedTransform")&&t!==0&&(d=this.rotatedExtent_),u=d[(Number(this.opt_)+2)%4]}var v=this.geoms_.length==1&&this._isRectangle(this.geoms_[0]),_=this.constraint_,y=this.opt_,w=this.coordinate_,L=e.coordinate;if(this.get("enableRotatedTransform")&&t!==0){var E=new I(this.coordinate_);E.rotate(t*-1,u),w=E.getCoordinates();var k=new I(e.coordinate);k.rotate(t*-1,u),L=k.getCoordinates()}var T=(L[0]-u[0])/(w[0]-u[0]),p=(L[1]-u[1])/(w[1]-u[1]),m=[L[0]-w[0],L[1]-w[1]];if(this.get("enableRotatedTransform")&&t!==0){var C=new I(u);C.rotate(t*-1,this.getMap().getView().getCenter()),u=C.getCoordinates()}for(this.get("noFlip")&&(T<0&&(T=-T),p<0&&(p=-p)),this.constraint_?this.constraint_=="h"?T=1:p=1:this.get("keepAspectRatio")(e)&&(T=p=Math.min(T,p)),i=0,s;s=this.selection_.item(i);i++)a=t===0||!this.get("enableRotatedTransform")?this.geoms_[i].clone():this.rotatedGeoms_[i].clone(),a.applyTransform(function(S,b,le){if(le<2)return b;if(v){var ce=[[6],[0,8],[2],[4]],O=[S[0],S[1]],V=[S[2],S[3]],X=[S[4],S[5]],q=[S[6],S[7]],he=[S[8],S[9]];if(_){var He=y%2===0?this._countVector(O,V):this._countVector(q,O),we=this._projectVectorOnVector(m,He),Be=y+1this.snapDistance_)return this.currentFeature&&this.dispatchEvent({type:"select",selected:[],deselected:[this.currentFeature]}),this.currentFeature=null,!1;var c=this.getNearestCoord(i,t.getGeometry());if(c){c=c.coord;var g=this.getMap().getPixelFromCoordinate(c);return M(e.pixel,g)2){for(r=g[1].getCoordinates(),s=2;a=g[s];s++){var h=a.getCoordinates();h.shift(),r=r.concat(h)}g=[g[0],new D(r)]}if(g.length===2){var u=g[0].getCoordinates(),d=g[1].getCoordinates(),v=u.length+d.length-1;u.pop(),d.shift(),i={geom:e,type:e.getType(),coord1:u,coord2:d,node:e.getCoordinates().length===v,closed:!1}}else if(g.length===1){a=g[0].getCoordinates();var _=P(a[0],t),y=P(a[a.length-1],t);_?(a.shift(),y&&a.pop(),i={geom:e,type:e.getType(),coord1:[],coord2:a,node:!0,closed:y}):y&&(a.pop(),i={geom:e,type:e.getType(),coord1:a,coord2:[],node:!0,closed:!1})}}break}case"MultiLineString":{var w=e.getLineStrings();for(s=0;n=w[s];s++)if(i=this.getArcs(n,t),i){i.geom=e,i.type=e.getType(),i.lstring=s;break}break}case"Polygon":{var L=e.getLinearRings();for(s=0;n=L[s];s++)if(i=this.getArcs(n,t),i){i.geom=e,i.type=e.getType(),i.index=s;break}break}case"MultiPolygon":{var E=e.getPolygons();for(s=0;n=E[s];s++)if(i=this.getArcs(n,t),i){i.geom=e,i.type=e.getType(),i.poly=s;break}break}case"GeometryCollection":{for(l=e.getGeometries(),s=0;n=l[s];s++)if(i=this.getArcs(n,t),i){i.geom=e,i.g=s,i.typeg=i.type,i.type=e.getType();break}break}default:{console.error("ol/interaction/ModifyFeature "+e.getType()+" not supported!");break}}return i}handleDownEvent(e){if(!this.getActive())return!1;var t=this.getClosestFeature(e);if(t&&(this._condition(e)||this._deleteCondition(e))){var i=[];return this.arcs=[],this.sources_.forEach(function(r){var s=ne(Ne([t.coord]),this.tolerance_);i=i.concat(i,r.getFeaturesInExtent(s))}.bind(this)),this._modifiedFeatures=[],i.forEach(function(r){var s=this.getArcs(r.getGeometry(),t.coord);s&&(this._insertVertexCondition(e)||s.node)&&(s.feature=r,this._modifiedFeatures.push(r),this.arcs.push(s))}.bind(this)),this._modifiedFeatures.length?this._deleteCondition(e)?!this._removePoint(t,e):(this.dispatchEvent({type:"modifystart",coordinate:t.coord,originalEvent:e.originalEvent,features:this._modifiedFeatures}),this.handleDragEvent({coordinate:t.coord,originalEvent:e.originalEvent}),!0):!0}else return!1}getModifiedFeatures(){return this._modifiedFeatures||[]}removePoint(){this._removePoint({},{})}_getModification(e){var t=e.coord1.concat(e.coord2);switch(e.type){case"LineString":{if(e.closed&&t.push(t[0]),t.length>1&&e.geom.getCoordinates().length!=t.length)return e.coords=t,!0;break}case"MultiLineString":{if(e.closed&&t.push(t[0]),t.length>1){var i=e.geom.getCoordinates();if(i[e.lstring].length!=t.length)return i[e.lstring]=t,e.coords=i,!0}break}case"Polygon":{if(e.closed&&t.push(t[0]),t.length>3&&(i=e.geom.getCoordinates(),i[e.index].length!=t.length))return i[e.index]=t,e.coords=i,!0;break}case"MultiPolygon":{if(e.closed&&t.push(t[0]),t.length>3&&(i=e.geom.getCoordinates(),i[e.poly][e.index].length!=t.length))return i[e.poly][e.index]=t,e.coords=i,!0;break}case"GeometryCollection":{e.type=e.typeg;var r=e.geom,s=r.getGeometries();e.geom=s[e.g];var a=this._getModification(e);return r.setGeometries(s),e.geom=r,e.type="GeometryCollection",a}}return!1}_removePoint(e,t){if(!this.arcs)return!1;this.overlayLayer_.getSource().clear();var i=!1;return this.arcs.forEach(function(r){i=i||this._getModification(r)}.bind(this)),i&&(this.dispatchEvent({type:"modifystart",coordinate:e.coord,originalEvent:t.originalEvent,features:this._modifiedFeatures}),this.arcs.forEach(function(r){if(r.geom.getType()==="GeometryCollection"){if(r.coords){var s=r.geom.getGeometries();s[r.g].setCoordinates(r.coords),r.geom.setGeometries(s)}}else r.coords&&r.geom.setCoordinates(r.coords)}.bind(this)),this.dispatchEvent({type:"modifyend",coordinate:e.coord,originalEvent:t.originalEvent,features:this._modifiedFeatures})),this.arcs=[],i}handleUpEvent(e){return this.getActive()?(!this.arcs||!this.arcs.length||(this.overlayLayer_.getSource().clear(),this.dispatchEvent({type:"modifyend",coordinate:e.coordinate,originalEvent:e.originalEvent,features:this._modifiedFeatures}),this.arcs=[]),!0):!1}setArcCoordinates(e,t){var i;switch(e.type){case"Point":{e.geom.setCoordinates(t[0]);break}case"MultiPoint":{i=e.geom.getCoordinates(),i[e.index]=t[0],e.geom.setCoordinates(i);break}case"LineString":{e.geom.setCoordinates(t);break}case"MultiLineString":{i=e.geom.getCoordinates(),i[e.lstring]=t,e.geom.setCoordinates(i);break}case"Polygon":{i=e.geom.getCoordinates(),i[e.index]=t,e.geom.setCoordinates(i);break}case"MultiPolygon":{i=e.geom.getCoordinates(),i[e.poly][e.index]=t,e.geom.setCoordinates(i);break}case"GeometryCollection":{e.type=e.typeg;var r=e.geom,s=r.getGeometries();e.geom=s[e.g],this.setArcCoordinates(e,t),r.setGeometries(s),e.geom=r,e.type="GeometryCollection";break}}}handleDragEvent(e){if(!this.getActive())return!1;if(!this.arcs)return!0;this.overlayLayer_.getSource().clear();var t=new x(new I(e.coordinate));return this.overlayLayer_.getSource().addFeature(t),this.arcs.length&&(this.arcs.forEach(function(i){var r=i.coord1.concat([e.coordinate],i.coord2);i.closed&&r.push(e.coordinate),this.setArcCoordinates(i,r)}.bind(this)),this.dispatchEvent({type:"modifying",coordinate:e.coordinate,originalEvent:e.originalEvent,features:this._modifiedFeatures})),!0}handleMoveEvent(e){if(!this.getActive())return!0;this.overlayLayer_.getSource().clear();var t=this.getClosestFeature(e);if(t){var i=new x(new I(t.coord));this.overlayLayer_.getSource().addFeature(i)}var r=e.map.getTargetElement();return this.cursor_&&(t?r.style.cursor!=this.cursor_&&(this.previousCursor_=r.style.cursor,f.setCursor(r,this.cursor_)):this.previousCursor_!==void 0&&(f.setCursor(r,this.previousCursor_),this.previousCursor_=void 0)),!0}getCurrentFeature(){return this.currentFeature}},ye=class extends Z{constructor(e){e=e||{},super({handleEvent:function(r){return t.handleEvent_(r)}});var t=this;this.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,this.maxCircleCoordinates_=e.maxCircleCoordinates||100,this.features_=e.features,this.source_=e.source,this.conditionFn_=e.condition,this.squareFn_=e.squareCondition,this.centeredFn_=e.centerCondition,this.canRotate_=e.canRotate!==!1,this.geometryName_=e.geometryName||"geometry",this.setSides(e.sides);var i=qe(!0);this.sketch_=new J,this.overlayLayer_=new Y({source:new N({features:this.sketch_,useSpatialIndex:!1}),name:"DrawRegular overlay",displayInLayerSwitcher:!1,style:e.style||i})}setMap(e){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),super.setMap(e),this.overlayLayer_.setMap(e)}setActive(e){this.reset(),super.setActive(e)}reset(){this.overlayLayer_&&this.overlayLayer_.getSource().clear(),this.started_=!1}setSides(e){e=parseInt(e),this.sides_=e>2?e:0}canRotate(e){return(e===!0||e===!1)&&(this.canRotate_=e),this.canRotate_}getSides(){return this.sides_}getGeom_(){if(this.overlayLayer_.getSource().clear(),!this.center_)return!1;var e;if(this.coord_){var t=this.center_,i=this.coord_,r,s,a,n,l;if(!this.sides_&&this.square_&&!this.centered_)return t=[(i[0]+t[0])/2,(i[1]+t[1])/2],r=[i[0]-t[0],i[1]-t[1]],a=Math.sqrt(r[0]*r[0]+r[1]*r[1]),n=new ve(t,a,"XY"),l=this.getMap().getPixelFromCoordinate(t),s=Math.max(100,Math.abs(l[0]-this.coordPx_[0]),Math.abs(l[1]-this.coordPx_[1])),s=Math.min(this.maxCircleCoordinates_,Math.round(s/3)),ge(n,s,0);var c=this.canRotate_&&this.centered_&&this.square_;if(r=[i[0]-t[0],i[1]-t[1]],this.square_&&!c){var g=Math.max(Math.abs(r[0]),Math.abs(r[1]));i=[t[0]+(r[0]>0?g:-g),t[1]+(r[1]>0?g:-g)]}if(a=Math.sqrt(r[0]*r[0]+r[1]*r[1]),a>0){n=new ve(t,a,"XY");var h;if(c?h=Math.atan2(r[1],r[0]):h=this.startAngle[this.sides_]||this.startAngle.default,this.sides_?e=ge(n,this.sides_,h):(l=this.getMap().getPixelFromCoordinate(this.center_),s=Math.max(100,Math.abs(l[0]-this.coordPx_[0]),Math.abs(l[1]-this.coordPx_[1])),s=Math.min(this.maxCircleCoordinates_,Math.round(s/(this.centered_?3:5))),e=ge(n,s,0)),c)return e;var u=e.getExtent();this.centered_?t=[2*this.center_[0]-this.coord_[0],2*this.center_[1]-this.coord_[1]]:t=this.center_;var d=(t[0]-i[0])/(u[0]-u[2]),v=(t[1]-i[1])/(u[1]-u[3]);if(this.square_){var _=Math.min(Math.abs(d),Math.abs(v));d=Math.sign(d)*_,v=Math.sign(v)*_}var y=[t[0]-u[0]*d,t[1]-u[1]*v];return e.applyTransform(function(w,L,E){for(var k=0;k.9*r,this._longTouch&&this.handleMoveEvent_(e)}.bind(this),r),this.lastEvent=e.type;break}case"pointerup":{this.started_&&this.coord_&&(t=this.downPx_[0]-e.pixel[0],i=this.downPx_[1]-e.pixel[1],t*t+i*i<=this.squaredClickTolerance_&&(this.lastEvent=="pointerdown"||this.lastEvent=="pointermove"||this.lastEvent=="keydown"?this.end_(e):(t=this.upPx_[0]-e.pixel[0],i=this.upPx_[1]-e.pixel[1],t*t+i*i<=this.squaredClickTolerance_?this.end_(e):(this.handleMoveEvent_(e),this.drawPoint_(e.coordinate,!0))))),this.upPx_=e.pixel;break}case"pointerdrag":{if(this.started_){var s=this.getMap().getPixelFromCoordinate(this.center_);t=s[0]-e.pixel[0],i=s[1]-e.pixel[1],t*t+i*i<=this.squaredClickTolerance_&&this.reset()}return!this._longTouch}case"pointermove":{this.started_?(t=this.downPx_[0]-e.pixel[0],i=this.downPx_[1]-e.pixel[1],t*t+i*i>this.squaredClickTolerance_&&(this.handleMoveEvent_(e),this.lastEvent=e.type)):this.drawPoint_(e.coordinate);break}default:{if(this.started_&&(e.type==="click"||e.type==="singleclick"||e.type==="dblclick"))return!1;this.lastEvent=e.type;break}}return!0}finishDrawing(){this.started_&&this.coord_&&this.end_({pixel:this.upPx_,coordinate:this.coord_})}handleMoveEvent_(e){if(this.started_){this.coord_=e.coordinate,this.coordPx_=e.pixel;var t=this.drawSketch_(e);this.dispatchEvent({type:"drawing",feature:t,pixel:e.pixel,startCoordinate:this.center_,coordinate:e.coordinate,square:this.square_,centered:this.centered_})}else this.drawPoint_(e.coordinate)}start_(e){if(this.started_)this.coord_=e.coordinate;else{this.started_=!0,this.center_=e.coordinate,this.coord_=null;var t=this.feature_=new x({});t.setGeometryName(this.geometryName_||"geometry"),t.setGeometry(new R([[e.coordinate,e.coordinate,e.coordinate]])),this.drawSketch_(e),this.dispatchEvent({type:"drawstart",feature:t,pixel:e.pixel,coordinate:e.coordinate})}}end_(e){if(this.coord_=e.coordinate,this.started_=!1,this.coord_&&(this.center_[0]!==this.coord_[0]||this.center_[1]!==this.coord_[1])){var t=this.feature_;t.setGeometry(this.getGeom_()),this.source_?this.source_.addFeature(t):this.features_&&this.features_.push(t),this.dispatchEvent({type:"drawend",feature:t,pixel:e.pixel,coordinate:e.coordinate,square:this.square_,centered:this.centered_})}else this.dispatchEvent({type:"drawcancel",feature:null,pixel:e.pixel,coordinate:e.coordinate,square:this.square_,centered:this.centered_});this.center_=this.coord_=null,this.drawSketch_()}};ye.prototype.startAngle={default:Math.PI/2,3:-Math.PI/2,4:Math.PI/4};var Ie=class extends K{constructor(e){e=e||{};var t=function(s,a){var n=s[0].pop();return(!this.getPolygon()||this.getPolygon().intersectsCoordinate(n))&&(this.lastOKCoord=[n[0],n[1]]),s[0].push([this.lastOKCoord[0],this.lastOKCoord[1]]),a?a.setCoordinates([s[0].concat([s[0][0]])]):a=new R(s),a},i=e.geometryFunction;if(i?e.geometryFunction=function(s,a,n){return a=t.bind(this)(s,a),i.bind(this)(s,a,n)}:e.geometryFunction=t,e.type="Polygon",super(e),this._select=new re({style:e.style}),this._select.setActive(!1),e.layers&&(typeof e.layers=="function"?this.layers_=e.layers:e.layers.indexOf&&(this.layers_=function(s){return e.layers.indexOf(s)>=0})),typeof e.featureFilter=="function")this._features=e.featureFilter;else if(e.featureFilter){var r=e.featureFilter;this._features=function(s){return r.indexOf?!!r[r.indexOf(s)]:!!r.item(r.getArray().indexOf(s))}}else this._features=function(){return!0};this.on("drawstart",this._startDrawing.bind(this)),this.on("drawend",this._finishDrawing.bind(this))}setMap(e){this.getMap()&&this.getMap().removeInteraction(this._select),e&&e.addInteraction(this._select),super.setMap.call(this,e)}setActive(e){this._select&&this._select.getFeatures().clear(),super.setActive.call(this,e)}removeLastPoint(){this._feature&&this._feature.getGeometry().getCoordinates()[0].length>2&&super.removeLastPoint.call(this)}getPolygon(){return this._polygon}_startDrawing(e){var t=this.getMap();this._feature=e.feature;var i=e.feature.getGeometry().getCoordinates()[0][0];this._current=null,t.forEachFeatureAtPixel(t.getPixelFromCoordinate(i),function(r,s){if(!this._current&&this._features(r,s)){var a=r.getGeometry();if(a.getType()==="Polygon"&&a.intersectsCoordinate(i))this._polygonIndex=!1,this._polygon=a,this._current=r;else if(a.getType()==="MultiPolygon"&&a.intersectsCoordinate(i)){for(var n=0,l;l=a.getPolygon(n);n++)if(l.intersectsCoordinate(i)){this._polygonIndex=n,this._polygon=l,this._current=r;break}}}}.bind(this),{layerFilter:this.layers_}),this._select.getFeatures().clear(),this._current?this._select.getFeatures().push(this._current):(this.setActive(!1),this.setActive(!0))}_finishDrawing(e){e.hole=e.feature,e.feature=this._select.getFeatures().item(0),this.dispatchEvent({type:"modifystart",features:[this._current]});var t=e.hole.getGeometry().getCoordinates()[0];if(t.length>3)if(this._polygonIndex!==!1){for(var i=e.feature.getGeometry(),r=new Q([]),s=0,a;a=i.getPolygon(s);s++)s===this._polygonIndex&&a.appendLinearRing(new ke(t)),r.appendPolygon(a);e.feature.setGeometry(r)}else this.getPolygon().appendLinearRing(new ke(t));this.dispatchEvent({type:"modifyend",features:[this._current]}),this._feature=null,this._select.getFeatures().clear()}_geometryFn(e,t){var i=e[0].pop();return(!this.getPolygon()||this.getPolygon().intersectsCoordinate(i))&&(this.lastOKCoord=[i[0],i[1]]),e[0].push([this.lastOKCoord[0],this.lastOKCoord[1]]),t?t.setCoordinates([e[0].concat([e[0][0]])]):t=new R(e),t}},Dt=class extends W{constructor(e){e=e||{},e.interactions=e.interactions||{},super({className:(e.className?e.className+" ":"")+"ol-editbar",toggleOne:!0,target:e.target}),this._source=e.source,this._interactions={},this._setSelectInteraction(e),e.edition!==!1&&this._setEditInteraction(e),this._setModifyInteraction(e)}setMap(e){this.getMap()&&(this._interactions.Delete&&this.getMap().removeInteraction(this._interactions.Delete),this._interactions.ModifySelect&&this.getMap().removeInteraction(this._interactions.ModifySelect)),super.setMap(e),this.getMap()&&(this._interactions.Delete&&this.getMap().addInteraction(this._interactions.Delete),this._interactions.ModifySelect&&this.getMap().addInteraction(this._interactions.ModifySelect))}getInteraction(e){return this._interactions[e]}_getTitle(e){if(e)return e.get?e.get("title"):typeof e=="string"?e:e.title}_setSelectInteraction(e){var t=this,i=new W,r;if(e.interactions.Delete!==!1){e.interactions.Delete instanceof Me?this._interactions.Delete=e.interactions.Delete:this._interactions.Delete=new Me;var s=this._interactions.Delete;s.setActive(!1),this.getMap()&&this.getMap().addInteraction(s),i.addControl(new se({className:"ol-delete",title:this._getTitle(e.interactions.Delete)||"Delete",name:"Delete",handleClick:function(n){s.delete(r.getInteraction().getFeatures());var l={type:"select",selected:[],deselected:r.getInteraction().getFeatures().getArray().slice(),mapBrowserEvent:n.mapBrowserEvent};r.getInteraction().getFeatures().clear(),r.getInteraction().dispatchEvent(l)}}))}if(e.interactions.Info!==!1&&i.addControl(new se({className:"ol-info",name:"Info",title:this._getTitle(e.interactions.Info)||"Show informations",handleClick:function(){t.dispatchEvent({type:"info",features:r.getInteraction().getFeatures()})}})),e.interactions.Select!==!1){e.interactions.Select instanceof re?this._interactions.Select=e.interactions.Select:this._interactions.Select=new re({condition:We});var a=this._interactions.Select;r=new G({className:"ol-selection",name:"Select",title:this._getTitle(e.interactions.Select)||"Select",interaction:a,bar:i.getControls().length?i:void 0,autoActivate:!0,active:!0}),this.addControl(r),a.on("change:active",function(){a.getActive()||a.getFeatures().clear()}.bind(this))}}_setEditInteraction(e){if(e.interactions.DrawPoint!==!1){e.interactions.DrawPoint instanceof K?this._interactions.DrawPoint=e.interactions.DrawPoint:this._interactions.DrawPoint=new K({type:"Point",source:this._source});var t=new G({className:"ol-drawpoint",name:"DrawPoint",title:this._getTitle(e.interactions.DrawPoint)||"Point",interaction:this._interactions.DrawPoint});this.addControl(t)}if(e.interactions.DrawLine!==!1){e.interactions.DrawLine instanceof K?this._interactions.DrawLine=e.interactions.DrawLine:this._interactions.DrawLine=new K({type:"LineString",source:this._source,geometryFunction:function(h,u){return u?u.setCoordinates(h):u=new D(h),this.nbpts=u.getCoordinates().length,u}});var i;e.drawOptions!==!1?i=new G({className:"ol-drawline",title:this._getTitle(e.interactions.DrawLine)||"LineString",name:"DrawLine",interaction:this._interactions.DrawLine,bar:new W({controls:[new $({html:this._getTitle(e.interactions.UndoDraw)||"undo",title:this._getTitle(e.interactions.UndoDraw)||"delete last point",handleClick:function(){i.getInteraction().nbpts>1&&i.getInteraction().removeLastPoint()}}),new $({html:this._getTitle(e.interactions.FinishDraw)||"finish",title:this._getTitle(e.interactions.FinishDraw)||"finish",handleClick:function(){i.getInteraction().nbpts>2&&i.getInteraction().finishDrawing()}})]})}):i=new G({className:"ol-drawline",title:this._getTitle(e.interactions.DrawLine)||"LineString",name:"DrawLine",interaction:this._interactions.DrawLine}),this.addControl(i)}if(e.interactions.DrawPolygon!==!1&&(e.interactions.DrawPolygon instanceof K?this._interactions.DrawPolygon=e.interactions.DrawPolygon:this._interactions.DrawPolygon=new K({type:"Polygon",source:this._source,geometryFunction:function(h,u){return this.nbpts=h[0].length,u?u.setCoordinates([h[0].concat([h[0][0]])]):u=new R(h),u}}),this._setDrawPolygon("ol-drawpolygon",this._interactions.DrawPolygon,this._getTitle(e.interactions.DrawPolygon)||"Polygon","DrawPolygon",e)),e.interactions.DrawHole!==!1&&(e.interactions.DrawHole instanceof Ie?this._interactions.DrawHole=e.interactions.DrawHole:this._interactions.DrawHole=new Ie,this._setDrawPolygon("ol-drawhole",this._interactions.DrawHole,this._getTitle(e.interactions.DrawHole)||"Hole","DrawHole",e)),e.interactions.DrawRegular!==!1){var r={pts:"pts",circle:"circle"};e.interactions.DrawRegular instanceof ye?(this._interactions.DrawRegular=e.interactions.DrawRegular,r.pts=this._interactions.DrawRegular.get("ptsLabel")||r.pts,r.circle=this._interactions.DrawRegular.get("circleLabel")||r.circle):(this._interactions.DrawRegular=new ye({source:this._source,sides:4}),e.interactions.DrawRegular&&(r.pts=e.interactions.DrawRegular.ptsLabel||r.pts,r.circle=e.interactions.DrawRegular.circleLabel||r.circle));var s=this._interactions.DrawRegular,a=document.createElement("div"),n=f.create("DIV",{parent:a});f.addListener(n,["click","touchstart"],function(){var h=s.getSides()-1;h<2&&(h=2),s.setSides(h),l.textContent=h>2?h+" "+r.pts:r.circle}.bind(this));var l=f.create("TEXT",{html:"4 "+r.pts,parent:a}),c=f.create("DIV",{parent:a});f.addListener(c,["click","touchstart"],function(){var h=s.getSides()+1;h<3&&(h=3),s.setSides(h),l.textContent=h+" "+r.pts}.bind(this));var g=new G({className:"ol-drawregular",title:this._getTitle(e.interactions.DrawRegular)||"Regular",name:"DrawRegular",interaction:this._interactions.DrawRegular,bar:new W({controls:[new $({html:a})]})});this.addControl(g)}}_setDrawPolygon(e,t,i,r,s){var a;return s.drawOptions!==!1?a=new G({className:e,name:r,title:i,interaction:t,bar:new W({controls:[new $({html:this._getTitle(s.interactions.UndoDraw)||"undo",title:this._getTitle(s.interactions.UndoDraw)||"undo last point",handleClick:function(){a.getInteraction().nbpts>1&&a.getInteraction().removeLastPoint()}}),new $({html:this._getTitle(s.interactions.FinishDraw)||"finish",title:this._getTitle(s.interactions.FinishDraw)||"finish",handleClick:function(){a.getInteraction().nbpts>3&&a.getInteraction().finishDrawing()}})]})}):a=new G({className:e,name:r,title:i,interaction:t}),this.addControl(a),a}_setModifyInteraction(e){if(e.interactions.ModifySelect!==!1&&e.interactions.Select!==!1&&(e.interactions.ModifySelect instanceof Ae?this._interactions.ModifySelect=e.interactions.ModifySelect:this._interactions.ModifySelect=new Ae({features:this.getInteraction("Select").getFeatures()}),this.getMap()&&this.getMap().addInteraction(this._interactions.ModifySelect),this._interactions.ModifySelect.setActive(this._interactions.Select.getActive()),this._interactions.Select.on("change:active",function(){this._interactions.ModifySelect.setActive(this._interactions.Select.getActive())}.bind(this))),e.interactions.Transform!==!1){e.interactions.Transform instanceof _e?this._interactions.Transform=e.interactions.Transform:(this._interactions.Transform=new _e({select:this._interactions.Select,addCondition:$e}),this._interactions.Select&&this._interactions.Transform.on("change:active",function(){this._interactions.Select.getActive()||this._interactions.Select.getFeatures().clear()}.bind(this)));var t=new G({html:"",className:"ol-transform",title:this._getTitle(e.interactions.Transform)||"Transform",name:"Transform",interaction:this._interactions.Transform});this.addControl(t)}if(e.interactions.Split!==!1){e.interactions.Split instanceof De?this._interactions.Split=e.interactions.Split:this._interactions.Split=new De({sources:this._source});var i=new G({className:"ol-split",title:this._getTitle(e.interactions.Split)||"Split",name:"Split",interaction:this._interactions.Split});this.addControl(i)}if(e.interactions.Offset!==!1){e.interactions.Offset instanceof Pe?this._interactions.Offset=e.interactions.Offset:this._interactions.Offset=new Pe({source:this._source});var r=new G({html:"",className:"ol-offset",title:this._getTitle(e.interactions.Offset)||"Offset",name:"Offset",interaction:this._interactions.Offset});this.addControl(r)}}},ot=class extends me{constructor(e){e=e||{};var t=e.offset||[0,0],i=e.centerOnClick||!1;super({handleDownEvent:function(r){var s=r.frameState.viewState.resolution,a=[r.coordinate[0]+t[0]*s,r.coordinate[1]-t[1]*s];if(/^(BUTTON|A)$/.test(r.originalEvent.target.tagName))return this._dragging=!1,!0;if(this._dragging){i&&this._dragging.setPosition(a,!0);var n=this._dragging.getPosition();return this._dragging.offsetClick=[a[0]-n[0],a[1]-n[1]],this.dispatchEvent({type:"dragstart",overlay:this._dragging,originalEvent:r.originalEvent,frameState:r.frameState,coordinate:n}),!0}return!1},handleDragEvent:function(r){var s=r.frameState.viewState.resolution,a=[r.coordinate[0]+t[0]*s,r.coordinate[1]-t[1]*s];this._dragging&&(a=[a[0]-this._dragging.offsetClick[0],a[1]-this._dragging.offsetClick[1]],this._dragging.setPosition(a,!0),this.dispatchEvent({type:"dragging",overlay:this._dragging,originalEvent:r.originalEvent,frameState:r.frameState,coordinate:a}))},handleUpEvent:function(r){var s=r.frameState.viewState.resolution,a=[r.coordinate[0]+t[0]*s,r.coordinate[1]-t[1]*s];return this._dragging?(a=[a[0]-this._dragging.offsetClick[0],a[1]-this._dragging.offsetClick[1]],this.dispatchEvent({type:"dragend",overlay:this._dragging,originalEvent:r.originalEvent,frameState:r.frameState,coordinate:a}),this._dragging=!1,!0):!1}}),this._overlays=[],e.overlays instanceof Array||(e.overlays=[e.overlays]),e.overlays.forEach(this.addOverlay.bind(this))}addOverlay(e){for(var t=0,i;i=this._overlays[t];t++)if(i===e)return;var r=e.getElement();if(r.parentElement&&r.parentElement.classList.contains("ol-overlaycontainer-stopevent")){console.warn("[DragOverlay.addOverlay] overlay must be created with stopEvent set to false!");return}var s=function(){this.getMap()===e.getMap()&&(this._dragging=e)}.bind(this);this._overlays.push({overlay:e,listener:s}),r.parentNode.addEventListener("pointerdown",s)}removeOverlay(e){for(var t=0,i;i=this._overlays[t];t++)if(i.overlay===e){var r=this._overlays.splice(t,1)[0];e.getElement().parentNode.removeEventListener("pointerdown",r.listener);break}}},lt=class extends Qe{constructor(e){super(e)}setPosition(e,t){this.getMap()&&e&&(this._pixel=this.getMap().getPixelFromCoordinate(e)),super.setPosition(e),t&&super.updatePixelPosition()}updatePixelPosition(){if(this.getMap()&&this._pixel&&this.getPosition()){var e=this.getMap().getPixelFromCoordinate(this.getPosition());(Math.round(e[0]*1e3)!==Math.round(this._pixel[0]*1e3)||Math.round(e[0]*1e3)!==Math.round(this._pixel[0]*1e3))&&this.setPosition(this.getMap().getCoordinateFromPixel(this._pixel))}}},Nt=class extends ot{constructor(e){e=e||{};var t=new lt({className:("ol-touch-cursor "+(e.className||"")).trim(),positioning:"top-left",element:f.create("DIV",{}),stopEvent:!1});if(super({centerOnClick:!1,overlays:t}),this.overlay=t,this.setAnchor(e.anchor||"left"),this._listeners={},this.ctouch=new Z({handleEvent:function(n){if(!/drag/.test(n.type)&&this.getMap())n.coordinate=this.overlay.getPosition(),n.pixel=this.getMap().getPixelFromCoordinate(n.coordinate),this._lastEvent=n;else{var l=n.frameState.viewState.resolution,c=Math.cos(n.frameState.viewState.rotation),g=Math.sin(n.frameState.viewState.rotation),h=this.getOverlayElement().clientWidth/2,u=getComputedStyle(this.getOverlayElement()),d=[-h-parseInt(u.marginLeft),-h-parseInt(u.marginTop)];this._anchor==="center"&&(d[0]=0),n.coordinate=[n.coordinate[0]+c*d[0]*l+g*d[1]*l,n.coordinate[1]+g*d[0]*l-c*d[1]*l],n.pixel=this.getMap().getPixelFromCoordinate(n.coordinate)}return!0}.bind(this)}),this.ctouch.set("onTop",!0),this.setPosition(e.coordinate,!0),this.set("maxButtons",e.maxButtons||5),e.buttons){e.buttons.length>this.get("maxButtons")&&this.set("maxButtons",e.buttons.length);var i=this.overlay.element,r=e.buttons.length>4?0:1;e.buttons.forEach((function(n,l){l<5&&f.create("DIV",{className:((n.className||"")+" ol-button ol-button-"+(l+r)).trim(),html:f.create("DIV",{html:n.html}),click:n.click,on:n.on,parent:i})}))}var s=!1,a=!1;this.on("dragstart",function(n){return this._pixel=this.getMap().getPixelFromCoordinate(this.overlay.getPosition()),a=n,!n.overlay}),this.on("dragend",function(n){return this._pixel=this.getMap().getPixelFromCoordinate(this.overlay.getPosition()),n.overlay?(s?(this.dispatchEvent({type:"dragend",dragging:s,originalEvent:n.originalEvent,frameState:n.frameState,pixel:this._pixel,coordinate:this.overlay.getPosition()}),s=!1):n.originalEvent.target===this.overlay.element&&this.dispatchEvent({type:"click",dragging:s,originalEvent:n.originalEvent,frameState:n.frameState,pixel:this._pixel,coordinate:this.overlay.getPosition()}),!1):!0}.bind(this)),this.on("dragging",function(n){return this._pixel=this.getMap().getPixelFromCoordinate(this.overlay.getPosition()),n.overlay?(s=!0,a&&(this.dispatchEvent({type:"dragstart",dragging:s,originalEvent:a.originalEvent,frameState:n.frameState,pixel:this._pixel,coordinate:a.coordinate}),a=!1),this.dispatchEvent({type:"dragging",dragging:s,originalEvent:n.originalEvent,frameState:n.frameState,pixel:this._pixel,coordinate:this.overlay.getPosition()}),!1):!0}.bind(this))}setMap(e){this.getMap()&&(this.getMap().removeInteraction(this.ctouch),this.getActive()&&this.getMap().removeOverlay(this.overlay));for(let t in this._listeners)j(this._listeners[t]);this._listeners={},super.setMap(e),e&&(this.getActive()&&(e.addOverlay(this.overlay),setTimeout(function(){this.setPosition(this.getPosition()||e.getView().getCenter())}.bind(this))),e.addInteraction(this.ctouch),this._listeners.addInteraction=e.getInteractions().on("add",function(t){t.element.get("onTop")||(e.removeInteraction(this.ctouch),e.addInteraction(this.ctouch))}.bind(this)))}setAnchor(e){var t=["left","right","center"];t.indexOf(e)>=0&&(t.forEach(function(i){this.getOverlayElement().classList.remove("ol-touch-cursor-"+i)}.bind(this)),this.getOverlayElement().classList.add("ol-touch-cursor-"+e),this._anchor=e)}setActive(e,t){e!==this.getActive()?(this.ctouch&&this.ctouch.setActive(e),e?(this.getMap()&&this.getMap().addOverlay(this.overlay),t?this.setPosition(t):this.getMap()&&this.setPosition(this.getMap().getView().getCenter()),this._activate=setTimeout(function(){this.overlay.element.classList.add("active")}.bind(this),100)):(this.setPosition(),this.overlay.element.classList.remove("active"),this._activate&&clearTimeout(this._activate),this.getMap()&&this.getMap().removeOverlay(this.overlay)),super.setActive(e)):t?this.setPosition(t):this.getMap()&&this.setPosition(this.getMap().getView().getCenter())}setPosition(e){this.overlay.setPosition(e,!0),this.getMap()&&e&&(this._pixel=this.getMap().getPixelFromCoordinate(e))}offsetPosition(e){var t=this.overlay.getPosition();t&&this.overlay.setPosition([t[0]+e[0],t[1]+e[1]])}getPosition(){return this.overlay.getPosition()}getPixel(){if(this.getMap())return this.getMap().getPixelFromCoordinate(this.getPosition())}getOverlay(){return this.overlay}getOverlayElement(){return this.overlay.element}getButtonElement(e){return typeof e=="number"?this.getOverlayElement().getElementsByClassName("ol-button")[e]:this.getOverlayElement().getElementsByClassName(e)[0]}removeButton(e){if(e===void 0)for(var t=this.getOverlayElement().getElementsByClassName("ol-button"),i=t.length-1;i>=0;i--)this.getOverlayElement().removeChild(t[i]);else{var r=this.getButtonElement(e);r&&this.getOverlayElement().removeChild(r)}}addButton(e){var t=this.getOverlayElement().getElementsByClassName("ol-button"),i=this.get("maxButtons")||5;if(t.length>=i){console.error("[ol/interaction/TouchCursor~addButton] too many button on the cursor (max="+i+")...");return}var r=f.create("DIV",{className:((e.className||"")+" ol-button").trim(),html:f.create("DIV",{html:e.html}),click:e.click,on:e.on});!e.before||t.length===0?this.getOverlayElement().appendChild(r):this.getOverlayElement().insertBefore(r,t[0]);var s=t.length>=i?0:1;for(let a=0;athis.get("maxLength");)this.shift();if(this.get("maxSize"))for(;this.length()>1&&this.size()>this.get("maxSize");)this.shift()}getStack(e){return e==="redo"?this._redo:this._undo}push(e,t,i){return this._defs[e]?(this._undoStack.push({type:e,name:i,custom:!0,prop:t}),!0):(console.warn('[UndoRedoInteraction]: "'+e+'" is not defined.'),!1)}shift(){this._doShift=!0;var e=this._undoStack.removeAt(0);if(this._doShift=!1,e.type==="blockstart")for(e=this._undoStack.item(0);this._undoStack.getLength()&&e.level>0;)this._undoStack.removeAt(0),e=this._undoStack.item(0)}setActive(e){super.setActive(e),this._record=e}setMap(e){this._mapListener&&this._mapListener.forEach(function(t){j(t)}),this._mapListener=[],super.setMap(e),e&&(this._mapListener.push(e.on("undoblockstart",this.blockStart.bind(this))),this._mapListener.push(e.on("undoblockend",this.blockEnd.bind(this)))),this._watchSources(),this._watchInteractions()}_watchSources(){var e=this.getMap();this._sourceListener&&this._sourceListener.forEach(function(s){j(s)}),this._sourceListener=[];var t=this;function i(s,a){return a||(a=[]),s.forEach(function(n){n.getSource&&n.getSource()instanceof N?(!t._layers||t._layers.indexOf(n)>=0)&&a.push(n):n.getLayers&&i(n.getLayers(),a)}),a}if(e){var r=i(e.getLayers());r.forEach((function(s){var a=s.getSource();this._sourceListener.push(a.on(["addfeature","removefeature"],this._onAddRemove.bind(this))),this._sourceListener.push(a.on("clearstart",function(){this.blockStart("clear")}.bind(this))),this._sourceListener.push(a.on("clearend",this.blockEnd.bind(this)))}).bind(this)),this._sourceListener.push(e.getLayers().on(["add","remove"],this._watchSources.bind(this)))}}_watchInteractions(){var e=this.getMap();this._interactionListener&&this._interactionListener.forEach(function(t){j(t)}),this._interactionListener=[],e&&(e.getInteractions().forEach((function(t){this._interactionListener.push(t.on(["setattributestart","modifystart","modifyend","rotatestart","rotateend","translatestart","translateend","scalestart","scaleend","deletestart","deleteend","beforesplit","aftersplit"],this._onInteraction.bind(this)))}).bind(this)),this._interactionListener.push(e.getInteractions().on(["add","remove"],this._watchInteractions.bind(this))))}_onAddRemove(e){this._record&&(this._redoStack.clear(),this._redo.length=0,this._undoStack.push({type:e.type,source:e.target,feature:e.feature}))}_onInteraction(e){var t=this._onInteraction[e.type];t&&t.call(this,e)}blockStart(e){this._redoStack.clear(),this._redo.length=0,this._undoStack.push({type:"blockstart",name:e}),this._level++}blockEnd(){this._undoStack.push({type:"blockend"}),this._level--}_handleDo(e,t){if(this.getActive()){if(this._record=!1,e.custom)this._defs[e.type]?t?this._defs[e.type].undo(e.prop):this._defs[e.type].redo(e.prop):console.warn('[UndoRedoInteraction]: "'+e.type+'" is not defined.');else switch(e.type){case"addfeature":{t?e.source.removeFeature(e.feature):e.source.addFeature(e.feature);break}case"removefeature":{t?e.source.addFeature(e.feature):e.source.removeFeature(e.feature);break}case"changegeometry":{var i=e.feature.getGeometry();e.feature.setGeometry(e.oldGeom),e.oldGeom=i;break}case"changeattribute":{var r=e.newProperties,s=e.oldProperties;for(var a in s)s===void 0?e.feature.unset(a):e.feature.set(a,s[a]);e.oldProperties=r,e.newProperties=s;break}case"blockstart":{this._block+=t?-1:1;break}case"blockend":{this._block+=t?1:-1;break}default:console.warn('[UndoRedoInteraction]: "'+e.type+'" is not defined.')}this._block<0&&(this._block=0),this._block&&(t?this.undo():this.redo()),this._record=!0,this.dispatchEvent({type:t?"undo":"redo",action:e})}}undo(){var e=this._undoStack.item(this._undoStack.getLength()-1);e&&(this._redoStack.push(e),this._undoStack.pop(),this._handleDo(e,!0))}abort(){var e=this._undoStack.item(this._undoStack.getLength()-1);if(e){this._abort=!0;for(var t=this._undoStack.pop();t.level!==0;)t=this._undoStack.pop();this._abort=!1}}redo(){var e=this._redoStack.item(this._redoStack.getLength()-1);e&&(this._undoStack.push(e),this._redoStack.pop(),this._handleDo(e,!1))}clear(){this._doClear=!0,this._undo.length=this._redo.length=0,this._undoStack.clear(),this._redoStack.clear(),this._doClear=!1,this.dispatchEvent({type:"stack:clear"})}hasUndo(){return this._undoStack.getLength()}hasRedo(){return this._redoStack.getLength()}};A.prototype._onInteraction.setattributestart=function(o){this.blockStart(o.target.get("name")||"setattribute");var e=Object.assign({},o.properties);o.features.forEach(function(t){var i={};for(var r in e)i[r]=t.get(r);this._undoStack.push({type:"changeattribute",feature:t,newProperties:e,oldProperties:i})}.bind(this)),this.blockEnd()};A.prototype._onInteraction.rotatestart=A.prototype._onInteraction.translatestart=A.prototype._onInteraction.scalestart=A.prototype._onInteraction.modifystart=function(o){this._modify={coordinate:o.coordinate,blockStart:o.type.replace(/start$/,""),modify:[]},o.features.forEach(function(e){this._modify.modify.push({type:"changegeometry",feature:e,oldGeom:e.getGeometry().clone()})}.bind(this))};A.prototype._onInteraction.translateend=A.prototype._onInteraction.rotateend=A.prototype._onInteraction.scaleend=A.prototype._onInteraction.modifyend=function(o){this._modify&&(o.type==="modifyend"&&(o.transformed=!o.coordinate||!P(this._modify.coordinate,o.coordinate),o.transformed||this._modify.modify.forEach(function(e){e.feature.getGeometry().getFlatCoordinates().length!==e.oldGeom.getFlatCoordinates().length&&(o.transformed=!0),console.log(e.feature.getGeometry().getFlatCoordinates().length,e.oldGeom.getFlatCoordinates().length)})),o.type==="translateend"&&o.coordinate&&(o.transformed=!P(this._modify.coordinate,o.coordinate)),o.transformed&&(this.blockStart(this._modify.blockStart),this._modify.modify.forEach(function(e){this._undoStack.push(e)}.bind(this)),this.blockEnd()),this._modify=null)};A.prototype._onInteraction.beforesplit=function(){var o=this._undoStack.getLength();o>2&&this._undoStack.item(o-1).type==="blockend"&&this._undoStack.item(o-2).type==="changegeometry"?this._undoStack.pop():this.blockStart("split")};A.prototype._onInteraction.deletestart=function(){this.blockStart("delete")};A.prototype._onInteraction.aftersplit=A.prototype._onInteraction.deleteend=A.prototype.blockEnd;et.prototype.getModifiedFeatures=function(){var o={};this.dragSegments_.forEach(function(i){var r=i[0].feature;window&&window.ol&&window.ol.util?o[ie(r)]=r:o[ie(r)]=r});var e=[];for(var t in o)e.push(o[t]);return e};var Rt=class extends Z{constructor(e){e=e||{};function t(a,n){var l=a[1][0]-a[0][0],c=a[1][1]-a[0][1],g=n[1][0]-n[0][0],h=n[1][1]-n[0][1],u=l*h-c*g;if(u!=0){var d=(l*a[0][1]-l*n[0][1]-c*a[0][0]+c*n[0][0])/u;return[n[0][0]+d*g,n[0][1]+d*h]}else return!1}function i(a,n){var l=a[0]-n[0],c=a[1]-n[1];return Math.sqrt(l*l+c*c)}super({handleEvent:function(a){if(this.getActive()){for(var n=this.overlaySource_.getFeatures(),l=null,c=null,g=a.frameState.viewState.resolution,h=0,u;u=n[h];h++){var d=u.getGeometry().getClosestPoint(a.coordinate);if(i(d,a.coordinate)/gthis.projExtent_[2]&&(r[2]=this.projExtent_[2]),r[3]>this.projExtent_[3]&&(r[3]=this.projExtent_[3]);var a=e[0][0]-e[1][0],n=e[0][1]-e[1][1],l=1/Math.sqrt(a*a+n*n),c=function(u){for(var d,v=[],_=s*u*2,y=0;(u>0?y<_:y>_)&&(t?d=[e[0][0]+n*l*y,e[0][1]-a*l*y]:d=[e[0][0]+a*l*y,e[0][1]+n*l*y],tt(r,d));y+=s*u/100)v.push(d);return new x(new D([v[0],v[v.length-1]]))},g=c(1),h=c(-1);return this.overlaySource_.addFeature(g),this.overlaySource_.addFeature(h),[g,h]}}addOrthoGuide(e){return this.addGuide(e,!0)}setDrawInteraction(e){var t=this,i=0,r=[];function s(a){var n=a.target.getCoordinates(),l=2;switch(a.target.getType()){case"Point":return;case"Polygon":n=n[0].slice(0,-1);break}var c=n.length;if(c===l&&t.enableInitialGuides_){var g=n[0][0],h=n[0][1];n=[[g,h],[g,h-1]]}if(c!=i&&(t.enableInitialGuides_?c>=l:c>l)){t.clearGuides(r);try{var u=n[c-l],d=n[c-l-1];c>l&&!(u[0]===d[0]&&u[1]===d[1])&&(r=t.addOrthoGuide([n[c-l],n[c-l-1]])),r=r.concat(t.addGuide([n[0],n[1]])),r=r.concat(t.addOrthoGuide([n[0],n[1]])),i=c}catch{}}}e.on("drawstart",function(a){a.feature.getGeometry().on("change",s)}),e.on(["drawend","change:active"],function(a){t.clearGuides(r),a.feature&&a.feature.getGeometry().un("change",s),i=0,r=[]})}setModifyInteraction(e){function t(l,c){return(l%c+c)%c}var i=this,r=[];function s(l){var c=l.coordinate;if(!c){var g=l.target.vertexFeature_;if(!g)return;c=g.getGeometry().getCoordinates()}var h=l.target.getModifiedFeatures()[0],u=h.getGeometry(),d=u.getCoordinates();switch(u.getType()){case"Point":return;case"Polygon":d=d[0].slice(0,-1);break}var v=d.findIndex(function(y){return y[0]===c[0]&&y[1]===c[1]}),_=d.length;i.clearGuides(r),r=i.addOrthoGuide([d[t(v-1,_)],d[t(v-2,_)]]),r=r.concat(i.addGuide([d[t(v-1,_)],d[t(v-2,_)]])),r=r.concat(i.addGuide([d[t(v+1,_)],d[t(v+2,_)]])),r=r.concat(i.addOrthoGuide([d[t(v+1,_)],d[t(v+2,_)]]))}function a(l){setTimeout(s,0,l)}function n(){i.clearGuides(r),r=[]}e.on("modifystart",a),e.on("modifyend",n)}};export{mt as a,Ae as b,A as c,Dt as d,W as e,se as f,De as g,G as h,Rt as i,Nt as j,at as o}; //# sourceMappingURL=ol-ext-BR0zF6aa.js.map