@maptiler/geocoding-control 1.3.0-rc2 → 1.3.0-rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/leaflet.js +843 -850
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +8 -8
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.js +1 -1
- package/maplibregl.umd.js +1 -1
- package/maptilersdk.js +848 -855
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +8 -8
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +1 -1
- package/openlayers.umd.js +1 -1
- package/package.json +2 -2
- package/react.js +1 -1
- package/react.umd.js +1 -1
- package/svelte/GeocodingControl.svelte +1 -1
- package/vanilla.js +1 -1
- package/vanilla.umd.js +1 -1
package/openlayers.umd.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`+y.weight+`
|
|
4
4
|
`+S;_i.get(b)===void 0&&(_i.set(b,100,!0),f(y.style,y.weight,S)||(_i.set(b,0,!0),u===void 0&&(u=setInterval(g,32))))}}}(),x_=function(){let n;return function(t){let e=qu[t];if(e==null){if(Kh){const i=Qh(t),s=Hc(t,"Žg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(s.actualBoundingBoxAscent+s.actualBoundingBoxDescent)}else n||(n=document.createElement("div"),n.innerHTML="M",n.style.minHeight="0",n.style.maxHeight="none",n.style.height="auto",n.style.padding="0",n.style.border="none",n.style.position="absolute",n.style.display="block",n.style.left="-99999px"),n.style.font=t,document.body.appendChild(n),e=n.offsetHeight,document.body.removeChild(n);qu[t]=e}return e}}();function Hc(n,t){return Pr||(Pr=Ge(1,1)),n!=Xu&&(Pr.font=n,Xu=Pr.font),Pr.measureText(t)}function Xo(n,t){return Hc(n,t).width}function Kc(n,t,e){if(t in e)return e[t];const i=t.split(`
|
|
5
5
|
`).reduce((s,u)=>Math.max(s,Xo(n,u)),0);return e[t]=i,i}function S_(n,t){const e=[],i=[],s=[];let u=0,l=0,f=0,g=0;for(let m=0,y=t.length;m<=y;m+=2){const p=t[m];if(p===`
|
|
6
|
-
`||m===y){u=Math.max(u,l),s.push(l),l=0,f+=g;continue}const _=t[m+1]||n.font,E=Xo(_,p);e.push(E),l+=E;const S=x_(_);i.push(S),g=Math.max(g,S)}return{width:u,height:f,widths:e,heights:i,lineWidths:s}}function w_(n,t,e,i,s,u,l,f,g,m,y){n.save(),e!==1&&(n.globalAlpha===void 0?n.globalAlpha=p=>p.globalAlpha*=e:n.globalAlpha*=e),t&&n.transform.apply(n,t),i.contextInstructions?(n.translate(g,m),n.scale(y[0],y[1]),I_(i,n)):y[0]<0||y[1]<0?(n.translate(g,m),n.scale(y[0],y[1]),n.drawImage(i,s,u,l,f,0,0,l,f)):n.drawImage(i,s,u,l,f,g,m,l*y[0],f*y[1]),n.restore()}function I_(n,t){const e=n.contextInstructions;for(let i=0,s=e.length;i<s;i+=2)Array.isArray(e[i+1])?t[e[i]].apply(t,e[i+1]):t[e[i]]=e[i+1]}class qo extends Yo{constructor(t){super({opacity:1,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?wt.LOADING:wt.LOADED,this.imageState_===wt.LOADING&&this.ready().then(()=>this.imageState_=wt.LOADED),this.render()}clone(){const t=this.getScale(),e=new qo({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const i=this.renderOptions_,s=Ge(i.size*t,i.size*t);this.draw_(i,s,t),e=s.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let s=this.radius_,u=this.radius2_===void 0?s:this.radius2_;if(s<u){const G=s;s=u,u=G}const l=this.radius2_===void 0?this.points_:this.points_*2,f=2*Math.PI/l,g=u*Math.sin(f),m=Math.sqrt(u*u-g*g),y=s-m,p=Math.sqrt(g*g+y*y),_=p/g;if(t==="miter"&&_<=i)return _*e;const E=e/2/_,S=e/2*(y/p),k=Math.sqrt((s+E)*(s+E)+S*S)-s;if(this.radius2_===void 0||t==="bevel")return k*2;const C=s*Math.sin(f),R=Math.sqrt(s*s-C*C),M=u-R,T=Math.sqrt(C*C+M*M)/C;if(T<=i){const G=T*e/2-u-s;return 2*Math.max(k,G)}return k*2}createRenderOptions(){let t=Or,e=Ar,i=0,s=null,u=0,l,f=0;this.stroke_&&(l=Cn(this.stroke_.getColor()??Ds),f=this.stroke_.getWidth()??Gs,s=this.stroke_.getLineDash(),u=this.stroke_.getLineDashOffset()??0,e=this.stroke_.getLineJoin()??Ar,t=this.stroke_.getLineCap()??Or,i=this.stroke_.getMiterLimit()??Ps);const g=this.calculateLineJoinSize_(e,f,i),m=Math.max(this.radius_,this.radius2_||0),y=Math.ceil(2*m+g);return{strokeStyle:l,strokeWidth:f,size:y,lineCap:t,lineDash:s,lineDashOffset:u,lineJoin:e,miterLimit:i}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvases_={},this.hitDetectionCanvas_=null,this.size_=[t,t]}draw_(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let s=this.fill_.getColor();s===null&&(s=Pe),e.fillStyle=Cn(s),e.fill()}t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){let e;if(this.fill_){let i=this.fill_.getColor(),s=0;typeof i=="string"&&(i=Os(i)),i===null?s=1:Array.isArray(i)&&(s=i.length===4?i[3]:1),s===0&&(e=Ge(t.size,t.size),this.drawHitDetectionCanvas_(t,e))}return e?e.canvas:this.getImage(1)}createPath_(t){let e=this.points_;const i=this.radius_;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{const s=this.radius2_===void 0?i:this.radius2_;this.radius2_!==void 0&&(e*=2);const u=this.angle_-Math.PI/2,l=2*Math.PI/e;for(let f=0;f<e;f++){const g=u+f*l,m=f%2===0?i:s;t.lineTo(m*Math.cos(g),m*Math.sin(g))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=Pe,e.fill(),t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}}class Uo extends qo{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:t.scale!==void 0?t.scale:1,rotation:t.rotation!==void 0?t.rotation:0,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new Uo({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}class ir{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,t.color!==void 0&&this.setColor(t.color)}clone(){const t=this.getColor();return new ir({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(t!==null&&typeof t=="object"&&"src"in t){const e=Wu(null,t.src,"anonymous",void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then(()=>{this.patternImage_=null}),e.getImageState()===wt.IDLE&&e.load(),e.getImageState()===wt.LOADING&&(this.patternImage_=e)}this.color_=t}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}class Dr{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new Dr({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}class Ei{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=Jc,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new Ei({geometry:t??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=Jc,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function k_(n){let t;if(typeof n=="function")t=n;else{let e;Array.isArray(n)?e=n:(me(typeof n.getZIndex=="function","Expected an `Style` or an array of `Style`"),e=[n]),t=function(){return e}}return t}let Uu=null;function b_(n,t){if(!Uu){const e=new ir({color:"rgba(255,255,255,0.4)"}),i=new Dr({color:"#3399CC",width:1.25});Uu=[new Ei({image:new Uo({fill:e,stroke:i,radius:5}),fill:e,stroke:i})]}return Uu}function Jc(n){return n.getGeometry()}function $c(n,t,e,i){return e!==void 0&&i!==void 0?[e/n,i/t]:e!==void 0?e/n:i!==void 0?i/t:1}class Bs extends Yo{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,i=t.rotation!==void 0?t.rotation:0,s=t.scale!==void 0?t.scale:1,u=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:i,scale:s,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:u,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const l=t.img!==void 0?t.img:null;let f=t.src;me(!(f!==void 0&&l),"`image` and `src` cannot be provided at the same time"),(f===void 0||f.length===0)&&l&&(f=l.src||de(l)),me(f!==void 0&&f.length>0,"A defined and non-empty `src` or `image` must be provided"),me(!((t.width!==void 0||t.height!==void 0)&&t.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let g;if(t.src!==void 0?g=wt.IDLE:l!==void 0&&(l instanceof HTMLImageElement?l.complete?g=l.src?wt.LOADED:wt.IDLE:g=wt.LOADING:g=wt.LOADED),this.color_=t.color!==void 0?Os(t.color):null,this.iconImage_=Wu(l,f,this.crossOrigin_,g,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null,t.width!==void 0||t.height!==void 0){let m,y;if(t.size)[m,y]=t.size;else{const p=this.getImage(1);if(p.width&&p.height)m=p.width,y=p.height;else if(p instanceof HTMLImageElement){this.initialOptions_=t;const _=()=>{if(this.unlistenImageChange(_),!this.initialOptions_)return;const E=this.iconImage_.getSize();this.setScale($c(E[0],E[1],t.width,t.height))};this.listenImageChange(_);return}}m!==void 0&&this.setScale($c(m,y,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new Bs({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const s=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!s)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=s[0]),this.anchorYUnits_=="fraction"&&(t[1]*=s[1])}if(this.anchorOrigin_!="top-left"){if(!s)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+s[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+s[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=i[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();if(this.size_)return this.size_[0]*t[0];if(this.iconImage_.getImageState()==wt.LOADED)return this.iconImage_.getSize()[0]*t[0]}getHeight(){const t=this.getScaleArray();if(this.size_)return this.size_[1]*t[1];if(this.iconImage_.getImageState()==wt.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(He.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(He.CHANGE,t)}ready(){return this.iconImage_.ready()}}const C_="#333";class jo{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=Ns(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new ir({color:C_}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new jo({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Ns(t!==void 0?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}let Fr=0;const Gr=0,ee=1<<Fr++,rt=1<<Fr++,ze=1<<Fr++,ae=1<<Fr++,jn=1<<Fr++,Se=Math.pow(2,Fr)-1,Qc={[ee]:"boolean",[rt]:"number",[ze]:"string",[ae]:"color",[jn]:"number[]"},R_=Object.keys(Qc).map(Number).sort(Xi);function we(n){const t=[];for(const e of R_)L_(n,e)&&t.push(Qc[e]);return t.length===0?"untyped":t.length<3?t.join(" or "):t.slice(0,-1).join(", ")+", or "+t[t.length-1]}function L_(n,t){return(n&t)===t}function Rn(n,t){return!!(n&t)}function Vo(n,t){return n===t}class xi{constructor(t,e){this.type=t,this.value=e}}class N_{constructor(t,e,...i){this.type=t,this.operator=e,this.args=i}}function tf(){return{variables:new Set,properties:new Set,featureId:!1,geometryType:!1,style:{}}}function T_(n){switch(n){case"string":return ze;case"color":return ae;case"number":return rt;case"boolean":return ee;case"number[]":return jn;default:throw new Error(`Unrecognized type hint: ${n}`)}}function Pt(n,t,e){switch(typeof n){case"boolean":return new xi(ee,n);case"number":return new xi(rt,n);case"string":{let s=ze;return d_(n)&&(s|=ae),Vo(s&e,Gr)||(s&=e),new xi(s,n)}}if(!Array.isArray(n))throw new Error("Expression must be an array or a primitive value");if(n.length===0)throw new Error("Empty expression");if(typeof n[0]=="string")return X_(n,t,e);for(const s of n)if(typeof s!="number")throw new Error("Expected an array of numbers");let i=jn;return(n.length===3||n.length===4)&&(i|=ae),e&&(i&=e),new xi(i,n)}const q={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string"},M_={[q.Get]:pt(([n,t])=>t!==void 0?T_(t.value):Se,xt(1,2),O_),[q.Var]:pt(([n])=>n.type,xt(1,1),A_),[q.Id]:pt(rt|ze,zs,P_),[q.Concat]:pt(ze,xt(2,1/0),Tt(Se)),[q.GeometryType]:pt(ze,zs,D_),[q.Resolution]:pt(rt,zs),[q.Zoom]:pt(rt,zs),[q.Time]:pt(rt,zs),[q.Any]:pt(ee,xt(2,1/0),Tt(ee)),[q.All]:pt(ee,xt(2,1/0),Tt(ee)),[q.Not]:pt(ee,xt(1,1),Tt(ee)),[q.Equal]:pt(ee,xt(2,2),Tt(Se),Si),[q.NotEqual]:pt(ee,xt(2,2),Tt(Se),Si),[q.GreaterThan]:pt(ee,xt(2,2),Tt(Se),Si),[q.GreaterThanOrEqualTo]:pt(ee,xt(2,2),Tt(Se),Si),[q.LessThan]:pt(ee,xt(2,2),Tt(Se),Si),[q.LessThanOrEqualTo]:pt(ee,xt(2,2),Tt(Se),Si),[q.Multiply]:pt(n=>{let t=rt|ae;for(let e=0;e<n.length;e++)t&=n[e].type;return t},xt(2,1/0),Tt(rt|ae),Si),[q.Coalesce]:pt(n=>{let t=Se;for(let e=1;e<n.length;e+=2)t&=n[e].type;return t&=n[n.length-1].type,t},xt(2,1/0),Tt(Se),Si),[q.Divide]:pt(rt,xt(2,2),Tt(rt)),[q.Add]:pt(rt,xt(2,1/0),Tt(rt)),[q.Subtract]:pt(rt,xt(2,2),Tt(rt)),[q.Clamp]:pt(rt,xt(3,3),Tt(rt)),[q.Mod]:pt(rt,xt(2,2),Tt(rt)),[q.Pow]:pt(rt,xt(2,2),Tt(rt)),[q.Abs]:pt(rt,xt(1,1),Tt(rt)),[q.Floor]:pt(rt,xt(1,1),Tt(rt)),[q.Ceil]:pt(rt,xt(1,1),Tt(rt)),[q.Round]:pt(rt,xt(1,1),Tt(rt)),[q.Sin]:pt(rt,xt(1,1),Tt(rt)),[q.Cos]:pt(rt,xt(1,1),Tt(rt)),[q.Atan]:pt(rt,xt(1,2),Tt(rt)),[q.Sqrt]:pt(rt,xt(1,1),Tt(rt)),[q.Match]:pt(n=>{let t=Se;for(let e=2;e<n.length;e+=2)t&=n[e].type;return t&=n[n.length-1].type,t},xt(4,1/0),ef,G_),[q.Between]:pt(ee,xt(3,3),Tt(rt)),[q.Interpolate]:pt(n=>{let t=ae|rt;for(let e=3;e<n.length;e+=2)t&=n[e].type;return t},xt(6,1/0),ef,B_),[q.Case]:pt(n=>{let t=Se;for(let e=1;e<n.length;e+=2)t&=n[e].type;return t&=n[n.length-1].type,t},xt(3,1/0),F_,z_),[q.In]:pt(ee,xt(2,2),Y_),[q.Number]:pt(rt,xt(1,1/0),Tt(Se)),[q.String]:pt(ze,xt(1,1/0),Tt(Se)),[q.Array]:pt(n=>n.length===3||n.length===4?jn|ae:jn,xt(1,1/0),Tt(rt)),[q.Color]:pt(ae,xt(1,4),Tt(rt)),[q.Band]:pt(rt,xt(1,3),Tt(rt)),[q.Palette]:pt(ae,xt(2,2),W_),[q.ToString]:pt(ze,xt(1,1),Tt(ee|rt|ze|ae))};function O_(n,t){const e=Pt(n[1],t);if(!(e instanceof xi))throw new Error("Expected a literal argument for get operation");if(typeof e.value!="string")throw new Error("Expected a string argument for get operation");if(t.properties.add(e.value),n.length===3){const i=Pt(n[2],t);return[e,i]}return[e]}function A_(n,t,e,i){const s=n[1];if(typeof s!="string")throw new Error("Expected a string argument for var operation");if(t.variables.add(s),!("variables"in t.style)||t.style.variables[s]===void 0)return[new xi(Se,s)];const u=t.style.variables[s],l=Pt(u,t);if(l.value=s,i&&!Rn(i,l.type))throw new Error(`The variable ${s} has type ${we(l.type)} but the following type was expected: ${we(i)}`);return[l]}function P_(n,t){t.featureId=!0}function D_(n,t){t.geometryType=!0}function zs(n,t){const e=n[0];if(n.length!==1)throw new Error(`Expected no arguments for ${e} operation`);return[]}function xt(n,t){return function(e,i){const s=e[0],u=e.length-1;if(n===t){if(u!==n){const l=n===1?"":"s";throw new Error(`Expected ${n} argument${l} for ${s}, got ${u}`)}}else if(u<n||u>t){const l=t===1/0?`${n} or more`:`${n} to ${t}`;throw new Error(`Expected ${l} arguments for ${s}, got ${u}`)}}}function Tt(n){return function(t,e){const i=t[0],s=t.length-1,u=new Array(s);for(let l=0;l<s;++l){const f=Pt(t[l+1],e);if(!Rn(n,f.type)){const g=we(n),m=we(f.type);throw new Error(`Unexpected type for argument ${l} of ${i} operation, got ${g} but expected ${m}`)}f.type&=n,u[l]=f}return u}}function Si(n,t,e){const i=n[0],s=n.length-1;let u=Se;for(let f=0;f<e.length;++f)u&=e[f].type;if(u===Gr)throw new Error(`No common type could be found for arguments of ${i} operation`);const l=new Array(s);for(let f=0;f<s;++f)l[f]=Pt(n[f+1],t,u);return l}function F_(n,t){const e=n[0],i=n.length-1;if(i%2===0)throw new Error(`An odd amount of arguments was expected for operation ${e}, got ${JSON.stringify(i)} instead`)}function ef(n,t){const e=n[0],i=n.length-1;if(i%2===1)throw new Error(`An even amount of arguments was expected for operation ${e}, got ${JSON.stringify(i)} instead`)}function G_(n,t,e,i){const s=n.length-1;let l=Pt(n[1],t).type;const f=Pt(n[n.length-1],t);let g=i!==void 0?i&f.type:f.type;const m=new Array(s-2);for(let p=0;p<s-2;p+=2){const _=Pt(n[p+2],t),E=Pt(n[p+3],t);l&=_.type,g&=E.type,m[p]=_,m[p+1]=E}const y=ze|rt|ee;if(!Rn(y,l))throw new Error(`Expected an input of type ${we(y)} for the interpolate operation, got ${we(l)} instead`);if(Vo(g,Gr))throw new Error("Could not find a common output type for the following match operation: "+JSON.stringify(n));for(let p=0;p<s-2;p+=2){const _=Pt(n[p+2],t,l),E=Pt(n[p+3],t,g);m[p]=_,m[p+1]=E}return[Pt(n[1],t,l),...m,Pt(n[n.length-1],t,g)]}function B_(n,t,e,i){const s=n[1];let u;switch(s[0]){case"linear":u=1;break;case"exponential":if(u=s[1],typeof u!="number")throw new Error(`Expected a number base for exponential interpolation, got ${JSON.stringify(u)} instead`);break;default:u=null}if(!u)throw new Error(`Invalid interpolation type: ${JSON.stringify(s)}`);u=Pt(u,t);let l=Pt(n[2],t);if(!Rn(rt,l.type))throw new Error(`Expected an input of type number for the interpolate operation, got ${we(l.type)} instead`);l=Pt(n[2],t,rt);const f=new Array(n.length-3);for(let g=0;g<f.length;g+=2){let m=Pt(n[g+3],t);if(!Rn(rt,m.type))throw new Error(`Expected all stop input values in the interpolate operation to be of type number, got ${we(m.type)} at position ${g+2} instead`);let y=Pt(n[g+4],t);if(!Rn(rt|ae,y.type))throw new Error(`Expected all stop output values in the interpolate operation to be a number or color, got ${we(y.type)} at position ${g+3} instead`);m=Pt(n[g+3],t,rt),y=Pt(n[g+4],t,rt|ae),f[g]=m,f[g+1]=y}return[u,l,...f]}function z_(n,t,e,i){const s=Pt(n[n.length-1],t);let u=i!==void 0?i&s.type:s.type;const l=new Array(n.length-1);for(let f=0;f<l.length-1;f+=2){const g=Pt(n[f+1],t),m=Pt(n[f+2],t);if(!Rn(ee,g.type))throw new Error(`Expected all conditions in the case operation to be of type boolean, got ${we(g.type)} at position ${f} instead`);u&=m.type,l[f]=g,l[f+1]=m}if(Vo(u,Gr))throw new Error("Could not find a common output type for the following case operation: "+JSON.stringify(n));for(let f=0;f<l.length-1;f+=2)l[f+1]=Pt(n[f+2],t,u);return l[l.length-1]=Pt(n[n.length-1],t,u),l}function Y_(n,t){let e=n[2];if(!Array.isArray(e))throw new Error('The "in" operator was provided a literal value which was not an array as second argument.');if(typeof e[0]=="string"){if(e[0]!=="literal")throw new Error('For the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions.');if(!Array.isArray(e[1]))throw new Error('The "in" operator was provided a literal value which was not an array as second argument.');e=e[1]}let i=ze|rt;const s=new Array(e.length);for(let l=0;l<s.length;l++){const f=Pt(e[l],t);i&=f.type,s[l]=f}if(Vo(i,Gr))throw new Error("Could not find a common type for the following in operation: "+JSON.stringify(n));return[Pt(n[1],t,i),...s]}function W_(n,t){const e=Pt(n[1],t,rt);if(e.type!==rt)throw new Error(`The first argument of palette must be an number, got ${we(e.type)} instead`);const i=n[2];if(!Array.isArray(i))throw new Error("The second argument of palette must be an array");const s=new Array(i.length);for(let u=0;u<s.length;u++){const l=Pt(i[u],t,ae);if(!(l instanceof xi))throw new Error(`The palette color at index ${u} must be a literal value`);if(!Rn(l.type,ae))throw new Error(`The palette color at index ${u} should be of type color, got ${we(l.type)} instead`);s[u]=l}return[e,...s]}function pt(n,...t){return function(e,i,s){const u=e[0];let l=[];for(let g=0;g<t.length;g++)l=t[g](e,i,l,s)||l;let f=typeof n=="function"?n(l):n;if(s!==void 0){if(!Rn(f,s))throw new Error(`The following expression was expected to return ${we(s)}, but returns ${we(f)} instead: ${JSON.stringify(e)}`);f&=s}if(f===Gr)throw new Error(`No matching type was found for the following expression: ${JSON.stringify(e)}`);return new N_(f,u,...l)}}function X_(n,t,e){const i=n[0],s=M_[i];if(!s)throw new Error(`Unknown operator: ${i}`);return s(n,t,e)}function nf(n){if(!n)return"";const t=n.getType();switch(t){case"Point":case"LineString":case"Polygon":return t;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return t.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return nf(n.getGeometries()[0]);default:return""}}function rf(){return{variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""}}function Vn(n,t,e){const i=Pt(n,e);if(!Rn(t,i.type)){const s=we(t),u=we(i.type);throw new Error(`Expected expression to be of type ${s}, got ${u}`)}return gn(i)}function gn(n,t){if(n instanceof xi){if(n.type===ae&&typeof n.value=="string"){const i=Bu(n.value);return function(){return i}}return function(){return n.value}}const e=n.operator;switch(e){case q.Number:case q.String:case q.Coalesce:return q_(n);case q.Get:case q.Var:return U_(n);case q.Id:return i=>i.featureId;case q.GeometryType:return i=>i.geometryType;case q.Concat:{const i=n.args.map(s=>gn(s));return s=>"".concat(...i.map(u=>u(s).toString()))}case q.Resolution:return i=>i.resolution;case q.Any:case q.All:case q.Between:case q.In:case q.Not:return V_(n);case q.Equal:case q.NotEqual:case q.LessThan:case q.LessThanOrEqualTo:case q.GreaterThan:case q.GreaterThanOrEqualTo:return j_(n);case q.Multiply:case q.Divide:case q.Add:case q.Subtract:case q.Clamp:case q.Mod:case q.Pow:case q.Abs:case q.Floor:case q.Ceil:case q.Round:case q.Sin:case q.Cos:case q.Atan:case q.Sqrt:return Z_(n);case q.Case:return H_(n);case q.Match:return K_(n);case q.Interpolate:return J_(n);case q.ToString:return $_(n);default:throw new Error(`Unsupported operator ${e}`)}}function q_(n,t){const e=n.operator,i=n.args.length,s=new Array(i);for(let u=0;u<i;++u)s[u]=gn(n.args[u]);switch(e){case q.Coalesce:return u=>{for(let l=0;l<i;++l){const f=s[l](u);if(typeof f<"u"&&f!==null)return f}throw new Error("Expected one of the values to be non-null")};case q.Number:case q.String:return u=>{for(let l=0;l<i;++l){const f=s[l](u);if(typeof f===e)return f}throw new Error(`Expected one of the values to be a ${e}`)};default:throw new Error(`Unsupported assertion operator ${e}`)}}function U_(n,t){const i=n.args[0].value;switch(n.operator){case q.Get:return s=>s.properties[i];case q.Var:return s=>s.variables[i];default:throw new Error(`Unsupported accessor operator ${n.operator}`)}}function j_(n,t){const e=n.operator,i=gn(n.args[0]),s=gn(n.args[1]);switch(e){case q.Equal:return u=>i(u)===s(u);case q.NotEqual:return u=>i(u)!==s(u);case q.LessThan:return u=>i(u)<s(u);case q.LessThanOrEqualTo:return u=>i(u)<=s(u);case q.GreaterThan:return u=>i(u)>s(u);case q.GreaterThanOrEqualTo:return u=>i(u)>=s(u);default:throw new Error(`Unsupported comparison operator ${e}`)}}function V_(n,t){const e=n.operator,i=n.args.length,s=new Array(i);for(let u=0;u<i;++u)s[u]=gn(n.args[u]);switch(e){case q.Any:return u=>{for(let l=0;l<i;++l)if(s[l](u))return!0;return!1};case q.All:return u=>{for(let l=0;l<i;++l)if(!s[l](u))return!1;return!0};case q.Between:return u=>{const l=s[0](u),f=s[1](u),g=s[2](u);return l>=f&&l<=g};case q.In:return u=>{const l=s[0](u);for(let f=1;f<i;++f)if(l===s[f](u))return!0;return!1};case q.Not:return u=>!s[0](u);default:throw new Error(`Unsupported logical operator ${e}`)}}function Z_(n,t){const e=n.operator,i=n.args.length,s=new Array(i);for(let u=0;u<i;++u)s[u]=gn(n.args[u]);switch(e){case q.Multiply:return u=>{let l=1;for(let f=0;f<i;++f)l*=s[f](u);return l};case q.Divide:return u=>s[0](u)/s[1](u);case q.Add:return u=>{let l=0;for(let f=0;f<i;++f)l+=s[f](u);return l};case q.Subtract:return u=>s[0](u)-s[1](u);case q.Clamp:return u=>{const l=s[0](u),f=s[1](u);if(l<f)return f;const g=s[2](u);return l>g?g:l};case q.Mod:return u=>s[0](u)%s[1](u);case q.Pow:return u=>Math.pow(s[0](u),s[1](u));case q.Abs:return u=>Math.abs(s[0](u));case q.Floor:return u=>Math.floor(s[0](u));case q.Ceil:return u=>Math.ceil(s[0](u));case q.Round:return u=>Math.round(s[0](u));case q.Sin:return u=>Math.sin(s[0](u));case q.Cos:return u=>Math.cos(s[0](u));case q.Atan:return i===2?u=>Math.atan2(s[0](u),s[1](u)):u=>Math.atan(s[0](u));case q.Sqrt:return u=>Math.sqrt(s[0](u));default:throw new Error(`Unsupported numeric operator ${e}`)}}function H_(n,t){const e=n.args.length,i=new Array(e);for(let s=0;s<e;++s)i[s]=gn(n.args[s]);return s=>{for(let u=0;u<e-1;u+=2)if(i[u](s))return i[u+1](s);return i[e-1](s)}}function K_(n,t){const e=n.args.length,i=new Array(e);for(let s=0;s<e;++s)i[s]=gn(n.args[s]);return s=>{const u=i[0](s);for(let l=1;l<e;l+=2)if(u===i[l](s))return i[l+1](s);return i[e-1](s)}}function J_(n,t){const e=n.args.length,i=new Array(e);for(let s=0;s<e;++s)i[s]=gn(n.args[s]);return s=>{const u=i[0](s),l=i[1](s);let f,g;for(let m=2;m<e;m+=2){const y=i[m](s);let p=i[m+1](s);const _=Array.isArray(p);if(_&&(p=f_(p)),y>=l)return m===2?p:_?Q_(u,l,f,g,y,p):Ys(u,l,f,g,y,p);f=y,g=p}return g}}function $_(n,t){const e=n.operator,i=n.args.length,s=new Array(i);for(let u=0;u<i;++u)s[u]=gn(n.args[u]);switch(e){case q.ToString:return u=>{const l=s[0](u);return n.args[0].type===ae?zu(l):l.toString()};default:throw new Error(`Unsupported convert operator ${e}`)}}function Ys(n,t,e,i,s,u){const l=s-e;if(l===0)return i;const f=t-e,g=n===1?f/l:(Math.pow(n,f)-1)/(Math.pow(n,l)-1);return i+g*(u-i)}function Q_(n,t,e,i,s,u){if(s-e===0)return i;const f=jc(i),g=jc(u);let m=g[2]-f[2];m>180?m-=360:m<-180&&(m+=360);const y=[Ys(n,t,e,f[0],s,g[0]),Ys(n,t,e,f[1],s,g[1]),f[2]+Ys(n,t,e,0,s,m),Ys(n,t,e,i[3],s,u[3])];return Vc(g_(y))}function t0(n){return!0}function e0(n){const t=tf(),e=n0(n,t),i=rf();return function(s,u){if(i.properties=s.getPropertiesInternal(),i.resolution=u,t.featureId){const l=s.getId();l!==void 0?i.featureId=l:i.featureId=null}return t.geometryType&&(i.geometryType=nf(s.getGeometry())),e(i)}}function sf(n){const t=tf(),e=n.length,i=new Array(e);for(let l=0;l<e;++l)i[l]=ju(n[l],t);const s=rf(),u=new Array(e);return function(l,f){if(s.properties=l.getPropertiesInternal(),s.resolution=f,t.featureId){const m=l.getId();m!==void 0?s.featureId=m:s.featureId=null}let g=0;for(let m=0;m<e;++m){const y=i[m](s);y&&(u[g]=y,g+=1)}return u.length=g,u}}function n0(n,t){const e=n.length,i=new Array(e);for(let s=0;s<e;++s){const u=n[s],l="filter"in u?Vn(u.filter,ee,t):t0;let f;if(Array.isArray(u.style)){const g=u.style.length;f=new Array(g);for(let m=0;m<g;++m)f[m]=ju(u.style[m],t)}else f=[ju(u.style,t)];i[s]={filter:l,styles:f}}return function(s){const u=[];let l=!1;for(let f=0;f<e;++f){const g=i[f].filter;if(g(s)&&!(n[f].else&&l)){l=!0;for(const m of i[f].styles){const y=m(s);y&&u.push(y)}}}return u}}function ju(n,t){const e=Ws(n,"",t),i=Xs(n,"",t),s=i0(n,t),u=r0(n,t),l=De(n,"z-index",t);if(!e&&!i&&!s&&!u&&!kr(n))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(n));const f=new Ei;return function(g){let m=!0;if(e){const y=e(g);y&&(m=!1),f.setFill(y)}if(i){const y=i(g);y&&(m=!1),f.setStroke(y)}if(s){const y=s(g);y&&(m=!1),f.setText(y)}if(u){const y=u(g);y&&(m=!1),f.setImage(y)}return l&&f.setZIndex(l(g)),m?null:f}}function Ws(n,t,e){let i;if(t+"fill-pattern-src"in n?i=u0(n,t+"fill-",e):i=Vu(n,t+"fill-color",e),!i)return null;const s=new ir;return function(u){const l=i(u);return l==="none"?null:(s.setColor(l),s)}}function Xs(n,t,e){const i=De(n,t+"stroke-width",e),s=Vu(n,t+"stroke-color",e);if(!i&&!s)return null;const u=Zn(n,t+"stroke-line-cap",e),l=Zn(n,t+"stroke-line-join",e),f=of(n,t+"stroke-line-dash",e),g=De(n,t+"stroke-line-dash-offset",e),m=De(n,t+"stroke-miter-limit",e),y=new Dr;return function(p){if(s){const _=s(p);if(_==="none")return null;y.setColor(_)}if(i&&y.setWidth(i(p)),u){const _=u(p);if(_!=="butt"&&_!=="round"&&_!=="square")throw new Error("Expected butt, round, or square line cap");y.setLineCap(_)}if(l){const _=l(p);if(_!=="bevel"&&_!=="round"&&_!=="miter")throw new Error("Expected bevel, round, or miter line join");y.setLineJoin(_)}return f&&y.setLineDash(f(p)),g&&y.setLineDashOffset(g(p)),m&&y.setMiterLimit(m(p)),y}}function i0(n,t){const e="text-",i=Zn(n,e+"value",t);if(!i)return null;const s=Ws(n,e,t),u=Ws(n,e+"background-",t),l=Xs(n,e,t),f=Xs(n,e+"background-",t),g=Zn(n,e+"font",t),m=De(n,e+"max-angle",t),y=De(n,e+"offset-x",t),p=De(n,e+"offset-y",t),_=qs(n,e+"overflow",t),E=Zn(n,e+"placement",t),S=De(n,e+"repeat",t),b=Ho(n,e+"scale",t),k=qs(n,e+"rotate-with-view",t),C=De(n,e+"rotation",t),R=Zn(n,e+"align",t),M=Zn(n,e+"justify",t),O=Zn(n,e+"baseline",t),T=of(n,e+"padding",t),G=Jo(n,e+"declutter-mode"),D=new jo({declutterMode:G});return function(F){if(D.setText(i(F)),s&&D.setFill(s(F)),u&&D.setBackgroundFill(u(F)),l&&D.setStroke(l(F)),f&&D.setBackgroundStroke(f(F)),g&&D.setFont(g(F)),m&&D.setMaxAngle(m(F)),y&&D.setOffsetX(y(F)),p&&D.setOffsetY(p(F)),_&&D.setOverflow(_(F)),E){const A=E(F);if(A!=="point"&&A!=="line")throw new Error("Expected point or line for text-placement");D.setPlacement(A)}if(S&&D.setRepeat(S(F)),b&&D.setScale(b(F)),k&&D.setRotateWithView(k(F)),C&&D.setRotation(C(F)),R){const A=R(F);if(A!=="left"&&A!=="center"&&A!=="right"&&A!=="end"&&A!=="start")throw new Error("Expected left, right, center, start, or end for text-align");D.setTextAlign(A)}if(M){const A=M(F);if(A!=="left"&&A!=="right"&&A!=="center")throw new Error("Expected left, right, or center for text-justify");D.setJustify(A)}if(O){const A=O(F);if(A!=="bottom"&&A!=="top"&&A!=="middle"&&A!=="alphabetic"&&A!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");D.setTextBaseline(A)}return T&&D.setPadding(T(F)),D}}function r0(n,t){return"icon-src"in n?s0(n,t):"shape-points"in n?o0(n,t):"circle-radius"in n?a0(n,t):null}function s0(n,t){const e="icon-",i=e+"src",s=hf(n[i],i),u=Zo(n,e+"anchor",t),l=Ho(n,e+"scale",t),f=De(n,e+"opacity",t),g=Zo(n,e+"displacement",t),m=De(n,e+"rotation",t),y=qs(n,e+"rotate-with-view",t),p=uf(n,e+"anchor-origin"),_=lf(n,e+"anchor-x-units"),E=lf(n,e+"anchor-y-units"),S=f0(n,e+"color"),b=h0(n,e+"cross-origin"),k=c0(n,e+"offset"),C=uf(n,e+"offset-origin"),R=Ko(n,e+"width"),M=Ko(n,e+"height"),O=l0(n,e+"size"),T=Jo(n,e+"declutter-mode"),G=new Bs({src:s,anchorOrigin:p,anchorXUnits:_,anchorYUnits:E,color:S,crossOrigin:b,offset:k,offsetOrigin:C,height:M,width:R,size:O,declutterMode:T});return function(D){return f&&G.setOpacity(f(D)),g&&G.setDisplacement(g(D)),m&&G.setRotation(m(D)),y&&G.setRotateWithView(y(D)),l&&G.setScale(l(D)),u&&G.setAnchor(u(D)),G}}function o0(n,t){const e="shape-",i=e+"points",s=e+"radius",u=Zu(n[i],i),l=Zu(n[s],s),f=Ws(n,e,t),g=Xs(n,e,t),m=Ho(n,e+"scale",t),y=Zo(n,e+"displacement",t),p=De(n,e+"rotation",t),_=qs(n,e+"rotate-with-view",t),E=Ko(n,e+"radius2"),S=Ko(n,e+"angle"),b=Jo(n,e+"declutter-mode"),k=new qo({points:u,radius:l,radius2:E,angle:S,declutterMode:b});return function(C){return f&&k.setFill(f(C)),g&&k.setStroke(g(C)),y&&k.setDisplacement(y(C)),p&&k.setRotation(p(C)),_&&k.setRotateWithView(_(C)),m&&k.setScale(m(C)),k}}function a0(n,t){const e="circle-",i=Ws(n,e,t),s=Xs(n,e,t),u=De(n,e+"radius",t),l=Ho(n,e+"scale",t),f=Zo(n,e+"displacement",t),g=De(n,e+"rotation",t),m=qs(n,e+"rotate-with-view",t),y=Jo(n,e+"declutter-mode"),p=new Uo({radius:5,declutterMode:y});return function(_){return u&&p.setRadius(u(_)),i&&p.setFill(i(_)),s&&p.setStroke(s(_)),f&&p.setDisplacement(f(_)),g&&p.setRotation(g(_)),m&&p.setRotateWithView(m(_)),l&&p.setScale(l(_)),p}}function De(n,t,e){if(!(t in n))return;const i=Vn(n[t],rt,e);return function(s){return Zu(i(s),t)}}function Zn(n,t,e){if(!(t in n))return null;const i=Vn(n[t],ze,e);return function(s){return hf(i(s),t)}}function u0(n,t,e){const i=Zn(n,t+"pattern-src",e),s=af(n,t+"pattern-offset",e),u=af(n,t+"pattern-size",e),l=Vu(n,t+"color",e);return function(f){return{src:i(f),offset:s&&s(f),size:u&&u(f),color:l&&l(f)}}}function qs(n,t,e){if(!(t in n))return null;const i=Vn(n[t],ee,e);return function(s){const u=i(s);if(typeof u!="boolean")throw new Error(`Expected a boolean for ${t}`);return u}}function Vu(n,t,e){if(!(t in n))return null;const i=Vn(n[t],ae|ze,e);return function(s){return cf(i(s),t)}}function of(n,t,e){if(!(t in n))return null;const i=Vn(n[t],jn,e);return function(s){return Us(i(s),t)}}function Zo(n,t,e){if(!(t in n))return null;const i=Vn(n[t],jn,e);return function(s){const u=Us(i(s),t);if(u.length!==2)throw new Error(`Expected two numbers for ${t}`);return u}}function af(n,t,e){if(!(t in n))return null;const i=Vn(n[t],jn,e);return function(s){return ff(i(s),t)}}function Ho(n,t,e){if(!(t in n))return null;const i=Vn(n[t],jn|rt,e);return function(s){return g0(i(s),t)}}function Ko(n,t){const e=n[t];if(e!==void 0){if(typeof e!="number")throw new Error(`Expected a number for ${t}`);return e}}function l0(n,t){const e=n[t];if(e!==void 0){if(typeof e=="number")return Ns(e);if(!Array.isArray(e))throw new Error(`Expected a number or size array for ${t}`);if(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")throw new Error(`Expected a number or size array for ${t}`);return e}}function h0(n,t){const e=n[t];if(e!==void 0){if(typeof e!="string")throw new Error(`Expected a string for ${t}`);return e}}function uf(n,t){const e=n[t];if(e!==void 0){if(e!=="bottom-left"&&e!=="bottom-right"&&e!=="top-left"&&e!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${t}`);return e}}function lf(n,t){const e=n[t];if(e!==void 0){if(e!=="pixels"&&e!=="fraction")throw new Error(`Expected pixels or fraction for ${t}`);return e}}function c0(n,t){const e=n[t];if(e!==void 0)return Us(e,t)}function Jo(n,t){const e=n[t];if(e!==void 0){if(typeof e!="string")throw new Error(`Expected a string for ${t}`);if(e!=="declutter"&&e!=="obstacle"&&e!=="none")throw new Error(`Expected declutter, obstacle, or none for ${t}`);return e}}function f0(n,t){const e=n[t];if(e!==void 0)return cf(e,t)}function Us(n,t){if(!Array.isArray(n))throw new Error(`Expected an array for ${t}`);const e=n.length;for(let i=0;i<e;++i)if(typeof n[i]!="number")throw new Error(`Expected an array of numbers for ${t}`);return n}function hf(n,t){if(typeof n!="string")throw new Error(`Expected a string for ${t}`);return n}function Zu(n,t){if(typeof n!="number")throw new Error(`Expected a number for ${t}`);return n}function cf(n,t){if(typeof n=="string")return n;const e=Us(n,t),i=e.length;if(i<3||i>4)throw new Error(`Expected a color with 3 or 4 values for ${t}`);return e}function ff(n,t){const e=Us(n,t);if(e.length!==2)throw new Error(`Expected an array of two numbers for ${t}`);return e}function g0(n,t){return typeof n=="number"?n:ff(n,t)}const gf={RENDER_ORDER:"renderOrder"};class d0 extends Qv{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(gf.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const i=this.getDeclutter();i in t.declutter||(t.declutter[i]=new Yc(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(gf.RENDER_ORDER,t)}setStyle(t){this.style_=m0(t),this.styleFunction_=t===null?void 0:k_(this.style_),this.changed()}}function m0(n){if(n===void 0)return b_;if(!n)return null;if(typeof n=="function"||n instanceof Ei)return n;if(!Array.isArray(n))return sf([n]);if(n.length===0)return[];const t=n.length,e=n[0];if(e instanceof Ei){const s=new Array(t);for(let u=0;u<t;++u){const l=n[u];if(!(l instanceof Ei))throw new Error("Expected a list of style instances");s[u]=l}return s}if("style"in e){const s=new Array(t);for(let u=0;u<t;++u){const l=n[u];if(!("style"in l))throw new Error("Expected a list of rules with a style property");s[u]=l}return e0(s)}return sf(n)}class y0 extends It{constructor(t,e,i,s){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=s}}function Kt(){}function p0(n,t){for(const e in t)n[e]=t[e];return n}function df(n){return n()}function mf(){return Object.create(null)}function Hn(n){n.forEach(df)}function yf(n){return typeof n=="function"}function rr(n,t){return n!=n?t==t:n!==t||n&&typeof n=="object"||typeof n=="function"}let $o;function Ie(n,t){return n===t?!0:($o||($o=document.createElement("a")),$o.href=t,n===$o.href)}function v0(n){return Object.keys(n).length===0}function _0(n,t,e,i){if(n){const s=pf(n,t,e,i);return n[0](s)}}function pf(n,t,e,i){return n[1]&&i?p0(e.ctx.slice(),n[1](i(t))):e.ctx}function E0(n,t,e,i){if(n[2]&&i){const s=n[2](i(e));if(t.dirty===void 0)return s;if(typeof s=="object"){const u=[],l=Math.max(t.dirty.length,s.length);for(let f=0;f<l;f+=1)u[f]=t.dirty[f]|s[f];return u}return t.dirty|s}return t.dirty}function x0(n,t,e,i,s,u){if(s){const l=pf(t,e,i,u);n.p(l,s)}}function S0(n){if(n.ctx.length>32){const t=[],e=n.ctx.length/32;for(let i=0;i<e;i++)t[i]=-1;return t}return-1}function vf(n){return n??""}function Nt(n,t){n.appendChild(t)}function Jt(n,t,e){n.insertBefore(t,e||null)}function Zt(n){n.parentNode&&n.parentNode.removeChild(n)}function Yt(n){return document.createElement(n)}function Kn(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function wi(n){return document.createTextNode(n)}function Ye(){return wi(" ")}function w0(){return wi("")}function Ne(n,t,e,i){return n.addEventListener(t,e,i),()=>n.removeEventListener(t,e,i)}function I0(n){return function(t){return t.preventDefault(),n.call(this,t)}}function V(n,t,e){e==null?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e)}function k0(n){return Array.from(n.childNodes)}function js(n,t){t=""+t,n.data!==t&&(n.data=t)}function _f(n,t){n.value=t??""}function Ii(n,t,e){n.classList.toggle(t,!!e)}function b0(n,t,{bubbles:e=!1,cancelable:i=!1}={}){return new CustomEvent(n,{detail:t,bubbles:e,cancelable:i})}let Vs;function Zs(n){Vs=n}function Ef(){if(!Vs)throw new Error("Function called outside component initialization");return Vs}function C0(n){Ef().$$.on_destroy.push(n)}function R0(){const n=Ef();return(t,e,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[t];if(s){const u=b0(t,e,{cancelable:i});return s.slice().forEach(l=>{l.call(n,u)}),!u.defaultPrevented}return!0}}function xf(n,t){const e=n.$$.callbacks[t.type];e&&e.slice().forEach(i=>i.call(this,t))}const Br=[],Hu=[];let zr=[];const Sf=[],L0=Promise.resolve();let Ku=!1;function N0(){Ku||(Ku=!0,L0.then(wf))}function Ju(n){zr.push(n)}const $u=new Set;let Yr=0;function wf(){if(Yr!==0)return;const n=Vs;do{try{for(;Yr<Br.length;){const t=Br[Yr];Yr++,Zs(t),T0(t.$$)}}catch(t){throw Br.length=0,Yr=0,t}for(Zs(null),Br.length=0,Yr=0;Hu.length;)Hu.pop()();for(let t=0;t<zr.length;t+=1){const e=zr[t];$u.has(e)||($u.add(e),e())}zr.length=0}while(Br.length);for(;Sf.length;)Sf.pop()();Ku=!1,$u.clear(),Zs(n)}function T0(n){if(n.fragment!==null){n.update(),Hn(n.before_update);const t=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,t),n.after_update.forEach(Ju)}}function M0(n){const t=[],e=[];zr.forEach(i=>n.indexOf(i)===-1?t.push(i):e.push(i)),e.forEach(i=>i()),zr=t}const Qo=new Set;let sr;function ta(){sr={r:0,c:[],p:sr}}function ea(){sr.r||Hn(sr.c),sr=sr.p}function ie(n,t){n&&n.i&&(Qo.delete(n),n.i(t))}function ue(n,t,e,i){if(n&&n.o){if(Qo.has(n))return;Qo.add(n),sr.c.push(()=>{Qo.delete(n),i&&(e&&n.d(1),i())}),n.o(t)}else i&&i()}function If(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function O0(n,t){ue(n,1,1,()=>{t.delete(n.key)})}function A0(n,t,e,i,s,u,l,f,g,m,y,p){let _=n.length,E=u.length,S=_;const b={};for(;S--;)b[n[S].key]=S;const k=[],C=new Map,R=new Map,M=[];for(S=E;S--;){const D=p(s,u,S),F=e(D);let A=l.get(F);A?M.push(()=>A.p(D,t)):(A=m(F,D),A.c()),C.set(F,k[S]=A),F in b&&R.set(F,Math.abs(S-b[F]))}const O=new Set,T=new Set;function G(D){ie(D,1),D.m(f,y),l.set(D.key,D),y=D.first,E--}for(;_&&E;){const D=k[E-1],F=n[_-1],A=D.key,j=F.key;D===F?(y=D.first,_--,E--):C.has(j)?!l.has(A)||O.has(A)?G(D):T.has(j)?_--:R.get(A)>R.get(j)?(T.add(A),G(D)):(O.add(j),_--):(g(F,l),_--)}for(;_--;){const D=n[_];C.has(D.key)||g(D,l)}for(;E;)G(k[E-1]);return Hn(M),k}function ki(n){n&&n.c()}function Jn(n,t,e){const{fragment:i,after_update:s}=n.$$;i&&i.m(t,e),Ju(()=>{const u=n.$$.on_mount.map(df).filter(yf);n.$$.on_destroy?n.$$.on_destroy.push(...u):Hn(u),n.$$.on_mount=[]}),s.forEach(Ju)}function $n(n,t){const e=n.$$;e.fragment!==null&&(M0(e.after_update),Hn(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function P0(n,t){n.$$.dirty[0]===-1&&(Br.push(n),N0(),n.$$.dirty.fill(0)),n.$$.dirty[t/31|0]|=1<<t%31}function or(n,t,e,i,s,u,l=null,f=[-1]){const g=Vs;Zs(n);const m=n.$$={fragment:null,ctx:[],props:u,update:Kt,not_equal:s,bound:mf(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(g?g.$$.context:[])),callbacks:mf(),dirty:f,skip_bound:!1,root:t.target||g.$$.root};l&&l(m.root);let y=!1;if(m.ctx=e?e(n,t.props||{},(p,_,...E)=>{const S=E.length?E[0]:_;return m.ctx&&s(m.ctx[p],m.ctx[p]=S)&&(!m.skip_bound&&m.bound[p]&&m.bound[p](S),y&&P0(n,p)),_}):[],m.update(),y=!0,Hn(m.before_update),m.fragment=i?i(m.ctx):!1,t.target){if(t.hydrate){const p=k0(t.target);m.fragment&&m.fragment.l(p),p.forEach(Zt)}else m.fragment&&m.fragment.c();t.intro&&ie(n.$$.fragment),Jn(n,t.target,t.anchor),wf()}Zs(g)}class ar{constructor(){Ze(this,"$$");Ze(this,"$$set")}$destroy(){$n(this,1),this.$destroy=Kt}$on(t,e){if(!yf(e))return Kt;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(e),()=>{const s=i.indexOf(e);s!==-1&&i.splice(s,1)}}$set(t){this.$$set&&!v0(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const D0="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(D0);function F0(n){let t,e;return{c(){t=Kn("svg"),e=Kn("path"),V(e,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),V(t,"viewBox","0 0 14 14"),V(t,"width","13"),V(t,"height","13"),V(t,"class","svelte-en2qvf")},m(i,s){Jt(i,t,s),Nt(t,e)},p:Kt,i:Kt,o:Kt,d(i){i&&Zt(t)}}}class kf extends ar{constructor(t){super(),or(this,t,null,F0,rr,{})}}function G0(n){let t,e;return{c(){t=Kn("svg"),e=Kn("path"),V(e,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),V(t,"viewBox","0 0 30 30"),V(t,"fill","none"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"class","svelte-d2loi5")},m(i,s){Jt(i,t,s),Nt(t,e)},p:Kt,i:Kt,o:Kt,d(i){i&&Zt(t)}}}class bf extends ar{constructor(t){super(),or(this,t,null,G0,rr,{})}}function B0(n){let t,e;return{c(){t=Yt("img"),Ie(t.src,e=n[3]+"area.svg")||V(t,"src",e),V(t,"alt",n[6]),V(t,"class","svelte-ltkwvy")},m(i,s){Jt(i,t,s)},p(i,s){s&8&&!Ie(t.src,e=i[3]+"area.svg")&&V(t,"src",e),s&64&&V(t,"alt",i[6])},d(i){i&&Zt(t)}}}function z0(n){let t,e;return{c(){t=Yt("img"),Ie(t.src,e=n[3]+"reverse.svg")||V(t,"src",e),V(t,"alt",n[6]),V(t,"class","svelte-ltkwvy")},m(i,s){Jt(i,t,s)},p(i,s){s&8&&!Ie(t.src,e=i[3]+"reverse.svg")&&V(t,"src",e),s&64&&V(t,"alt",i[6])},d(i){i&&Zt(t)}}}function Y0(n){let t,e;return{c(){t=Yt("img"),Ie(t.src,e=n[3]+"poi.svg")||V(t,"src",e),V(t,"alt",n[6]),V(t,"class","svelte-ltkwvy")},m(i,s){Jt(i,t,s)},p(i,s){s&8&&!Ie(t.src,e=i[3]+"poi.svg")&&V(t,"src",e),s&64&&V(t,"alt",i[6])},d(i){i&&Zt(t)}}}function W0(n){let t,e;return{c(){t=Yt("img"),Ie(t.src,e=n[3]+"postal_code.svg")||V(t,"src",e),V(t,"alt",n[6]),V(t,"class","svelte-ltkwvy")},m(i,s){Jt(i,t,s)},p(i,s){s&8&&!Ie(t.src,e=i[3]+"postal_code.svg")&&V(t,"src",e),s&64&&V(t,"alt",i[6])},d(i){i&&Zt(t)}}}function X0(n){let t,e;return{c(){t=Yt("img"),Ie(t.src,e=n[3]+"street.svg")||V(t,"src",e),V(t,"alt",n[6]),V(t,"class","svelte-ltkwvy")},m(i,s){Jt(i,t,s)},p(i,s){s&8&&!Ie(t.src,e=i[3]+"street.svg")&&V(t,"src",e),s&64&&V(t,"alt",i[6])},d(i){i&&Zt(t)}}}function q0(n){let t,e;return{c(){t=Yt("img"),Ie(t.src,e=n[3]+"road.svg")||V(t,"src",e),V(t,"alt",n[6]),V(t,"class","svelte-ltkwvy")},m(i,s){Jt(i,t,s)},p(i,s){s&8&&!Ie(t.src,e=i[3]+"road.svg")&&V(t,"src",e),s&64&&V(t,"alt",i[6])},d(i){i&&Zt(t)}}}function U0(n){let t,e;return{c(){t=Yt("img"),Ie(t.src,e=n[3]+"housenumber.svg")||V(t,"src",e),V(t,"alt",n[6]),V(t,"class","svelte-ltkwvy")},m(i,s){Jt(i,t,s)},p(i,s){s&8&&!Ie(t.src,e=i[3]+"housenumber.svg")&&V(t,"src",e),s&64&&V(t,"alt",i[6])},d(i){i&&Zt(t)}}}function j0(n){let t,e,i,s;return{c(){t=Yt("img"),Ie(t.src,e=n[5])||V(t,"src",e),V(t,"alt",n[4]),V(t,"class","svelte-ltkwvy")},m(u,l){Jt(u,t,l),i||(s=Ne(t,"error",n[14]),i=!0)},p(u,l){l&32&&!Ie(t.src,e=u[5])&&V(t,"src",e),l&16&&V(t,"alt",u[4])},d(u){u&&Zt(t),i=!1,s()}}}function Cf(n){let t,e;return{c(){t=Yt("span"),e=wi(n[6]),V(t,"class","secondary svelte-ltkwvy")},m(i,s){Jt(i,t,s),Nt(t,e)},p(i,s){s&64&&js(e,i[6])},d(i){i&&Zt(t)}}}function V0(n){var D,F;let t,e,i,s,u,l,f,g,m=(n[7]?n[0].place_name:n[0].place_name.replace(/,.*/,""))+"",y,p,_=n[2]==="always"||n[2]&&!n[0].address&&((D=n[0].properties)==null?void 0:D.kind)!=="road"&&((F=n[0].properties)==null?void 0:F.kind)!=="road_relation"&&!n[0].id.startsWith("address.")&&!n[0].id.startsWith("postal_code.")&&(!n[0].id.startsWith("poi.")||!n[5])&&!n[7],E,S,b=(n[7]?"":n[0].place_name.replace(/[^,]*,?\s*/,""))+"",k,C,R;function M(A,j){var et,U;return j&1&&(e=null),j&1&&(i=null),j&1&&(s=null),A[5]?j0:A[0].address?U0:((et=A[0].properties)==null?void 0:et.kind)==="road"||((U=A[0].properties)==null?void 0:U.kind)==="road_relation"?q0:(e==null&&(e=!!A[0].id.startsWith("address.")),e?X0:(i==null&&(i=!!A[0].id.startsWith("postal_code.")),i?W0:(s==null&&(s=!!A[0].id.startsWith("poi.")),s?Y0:A[7]?z0:B0)))}let O=M(n,-1),T=O(n),G=_&&Cf(n);return{c(){t=Yt("li"),T.c(),u=Ye(),l=Yt("span"),f=Yt("span"),g=Yt("span"),y=wi(m),p=Ye(),G&&G.c(),E=Ye(),S=Yt("span"),k=wi(b),V(g,"class","primary svelte-ltkwvy"),V(f,"class","svelte-ltkwvy"),V(S,"class","line2 svelte-ltkwvy"),V(l,"class","texts svelte-ltkwvy"),V(t,"tabindex","0"),V(t,"data-selected",n[1]),V(t,"class","svelte-ltkwvy"),Ii(t,"selected",n[1])},m(A,j){Jt(A,t,j),T.m(t,null),Nt(t,u),Nt(t,l),Nt(l,f),Nt(f,g),Nt(g,y),Nt(f,p),G&&G.m(f,null),Nt(l,E),Nt(l,S),Nt(S,k),C||(R=[Ne(t,"mouseenter",n[12]),Ne(t,"focus",n[13])],C=!0)},p(A,[j]){var et,U;O===(O=M(A,j))&&T?T.p(A,j):(T.d(1),T=O(A),T&&(T.c(),T.m(t,u))),j&1&&m!==(m=(A[7]?A[0].place_name:A[0].place_name.replace(/,.*/,""))+"")&&js(y,m),j&37&&(_=A[2]==="always"||A[2]&&!A[0].address&&((et=A[0].properties)==null?void 0:et.kind)!=="road"&&((U=A[0].properties)==null?void 0:U.kind)!=="road_relation"&&!A[0].id.startsWith("address.")&&!A[0].id.startsWith("postal_code.")&&(!A[0].id.startsWith("poi.")||!A[5])&&!A[7]),_?G?G.p(A,j):(G=Cf(A),G.c(),G.m(f,null)):G&&(G.d(1),G=null),j&1&&b!==(b=(A[7]?"":A[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&js(k,b),j&2&&V(t,"data-selected",A[1]),j&2&&Ii(t,"selected",A[1])},i:Kt,o:Kt,d(A){A&&Zt(t),T.d(),G&&G.d(),C=!1,Hn(R)}}}function Z0(n,t,e){var M;let i,s,{feature:u}=t,{selected:l=!1}=t,{showPlaceType:f}=t,{missingIconsCache:g}=t,{iconsBaseUrl:m}=t;const y=(M=u.properties)==null?void 0:M.categories;let p,_,E=0,S=u.place_type[0]==="reverse";function b(){_&&g.add(_),e(10,E++,E)}function k(O){xf.call(this,n,O)}function C(O){xf.call(this,n,O)}const R=()=>b();return n.$$set=O=>{"feature"in O&&e(0,u=O.feature),"selected"in O&&e(1,l=O.selected),"showPlaceType"in O&&e(2,f=O.showPlaceType),"missingIconsCache"in O&&e(9,g=O.missingIconsCache),"iconsBaseUrl"in O&&e(3,m=O.iconsBaseUrl)},n.$$.update=()=>{var O,T,G,D;if(n.$$.dirty&3640)do e(11,i--,i),e(4,p=y==null?void 0:y[i]),e(5,_=p?m+p.replace(/ /g,"_")+".svg":void 0);while(i>-1&&(!_||g.has(_)));n.$$.dirty&1&&e(6,s=u.id.startsWith("poi.")?(T=(O=u.properties)==null?void 0:O.categories)==null?void 0:T.join(", "):((D=(G=u.properties)==null?void 0:G.place_type_name)==null?void 0:D[0])??u.place_type[0])},e(11,i=(y==null?void 0:y.length)??0),[u,l,f,m,p,_,s,S,b,g,E,i,k,C,R]}class H0 extends ar{constructor(t){super(),or(this,t,Z0,V0,rr,{feature:0,selected:1,showPlaceType:2,missingIconsCache:9,iconsBaseUrl:3})}}function K0(n){let t;return{c(){t=Yt("div"),t.innerHTML='<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>',V(t,"class","svelte-7cmwmc")},m(e,i){Jt(e,t,i)},p:Kt,i:Kt,o:Kt,d(e){e&&Zt(t)}}}class J0 extends ar{constructor(t){super(),or(this,t,null,K0,rr,{})}}function $0(n){let t,e;return{c(){t=Kn("svg"),e=Kn("path"),V(e,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),V(t,"viewBox","0 0 60.006 21.412"),V(t,"width","14"),V(t,"height","20"),V(t,"class","svelte-en2qvf")},m(i,s){Jt(i,t,s),Nt(t,e)},p:Kt,i:Kt,o:Kt,d(i){i&&Zt(t)}}}class Q0 extends ar{constructor(t){super(),or(this,t,null,$0,rr,{})}}function t1(n){let t,e,i;return{c(){t=Kn("svg"),e=Kn("circle"),i=Kn("path"),V(e,"cx","4.789"),V(e,"cy","4.787"),V(e,"r","3.85"),V(e,"class","svelte-1aq105l"),V(i,"d","M12.063 12.063 7.635 7.635"),V(i,"class","svelte-1aq105l"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width","13"),V(t,"height","13"),V(t,"viewBox","0 0 13 13"),V(t,"class","svelte-1aq105l")},m(s,u){Jt(s,t,u),Nt(t,e),Nt(t,i)},p:Kt,i:Kt,o:Kt,d(s){s&&Zt(t)}}}class e1 extends ar{constructor(t){super(),or(this,t,null,t1,rr,{})}}function n1(n,t,e){const i=t[1],s=t[0],u=i-s;return n===i&&e?n:((n-s)%u+u)%u+s}function Rf(n){const t=[...n];return t[2]<t[0]&&(t[2]+=360),t}let Hs;async function i1(n,t,e){const i=n==null?void 0:n.getCenterAndZoom();for(const s of t??[])if(!(i&&(s.minZoom!=null&&s.minZoom>i[0]||s.maxZoom!=null&&s.maxZoom<i[0]))){if(s.type==="fixed")return s.coordinates.join(",");t:if(s.type==="client-geolocation"){if(Hs&&s.cachedLocationExpiry&&Hs.time+s.cachedLocationExpiry>Date.now()){if(!Hs.coords)break t;return Hs.coords}let u;try{return u=await new Promise((l,f)=>{e.signal.addEventListener("abort",()=>{f(Error("aborted"))}),navigator.geolocation.getCurrentPosition(g=>{l([g.coords.longitude,g.coords.latitude].map(m=>m.toFixed(6)).join(","))},g=>{f(g)},s)}),u}catch{}finally{s.cachedLocationExpiry&&(Hs={time:Date.now(),coords:u})}if(e.signal.aborted)return}if(s.type==="server-geolocation")return"ip";if(i&&s.type==="map-center")return i[1].toFixed(6)+","+i[2].toFixed(6)}}const Lf=/([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})/,Nf=/(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?/i,Tf=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?/i,Mf=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?/i,Of=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?/i;function r1(n){if(!["DMS","DM","DD"].includes(n))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){if(n=="DD")return this.decimalCoordinates;const t=this.decimalCoordinates.split(",").map(l=>Number(l.trim()));let e=Af(t[0],n),i=Af(t[1],n);e.endsWith('.0"')&&i.endsWith('.0"')&&(e=e.replace(/\.0"$/,'"'),i=i.replace(/\.0"$/,'"'));const s=t[0]>=0?" N":" S",u=t[1]>=0?" E":" W";return`${e+s}, ${i+u}`}else throw new Error("no decimal coordinates to convert")}function Af(n,t){const e=Math.abs(n),i=Math.floor(e),s=(e-i)*60;if(t=="DM"){let f=s1(s,3).toFixed(3).padStart(6,"0");return`${i}° ${f}'`}let u=Math.floor(s),l=((s-u)*60).toFixed(1).padStart(4,"0");return u=u.toString().padStart(2,"0"),`${i}° ${u}' ${l}"`}function s1(n,t){const e=Math.pow(10,t);return Math.round((n+Number.EPSILON)*e)/e}function Qu(n,t){t||(t=5),n=n.replace(/\s+/g," ").trim();let e=null,i=null,s="",u="",l=[],f=!1;if(Lf.test(n))if(l=Lf.exec(n),f=Ks(l),f)e=Math.abs(l[1])+l[2]/60,Number(l[1])<0&&(e*=-1),i=Math.abs(l[3])+l[4]/60,Number(l[3])<0&&(i*=-1);else throw new Error("invalid coordinate format");else if(Nf.test(n))if(l=Nf.exec(n),f=Ks(l),f){if(e=l[2],i=l[6],e.includes(",")&&(e=e.replace(",",".")),i.includes(",")&&(i=i.replace(",",".")),Number(Math.round(e))==Number(e))throw new Error("integer only coordinate provided");if(Number(Math.round(i))==Number(i))throw new Error("integer only coordinate provided");l[1]?(s=l[1],u=l[5]):l[4]&&(s=l[4],u=l[8])}else throw new Error("invalid decimal coordinate format");else if(Tf.test(n))if(l=Tf.exec(n),f=Ks(l),f)e=Math.abs(parseInt(l[2])),l[4]&&(e+=l[4]/60),l[6]&&(e+=l[6].replace(",",".")/3600),parseInt(l[2])<0&&(e=-1*e),i=Math.abs(parseInt(l[9])),l[11]&&(i+=l[11]/60),l[13]&&(i+=l[13].replace(",",".")/3600),parseInt(l[9])<0&&(i=-1*i),l[1]?(s=l[1],u=l[8]):l[7]&&(s=l[7],u=l[14]);else throw new Error("invalid DMS coordinates format");else if(Mf.test(n))if(l=Mf.exec(n),f=Ks(l),f)e=Math.abs(parseInt(l[2])),l[4]&&(e+=l[4]/60),l[6]&&(e+=l[6]/3600),parseInt(l[2])<0&&(e=-1*e),i=Math.abs(parseInt(l[10])),l[12]&&(i+=l[12]/60),l[14]&&(i+=l[14]/3600),parseInt(l[10])<0&&(i=-1*i),l[1]?(s=l[1],u=l[9]):l[8]&&(s=l[8],u=l[16]);else throw new Error("invalid DMS coordinates format");else if(Of.test(n))if(l=Of.exec(n),f=Ks(l),f)e=Math.abs(parseInt(l[2])),l[4]&&(e+=l[4].replace(",",".")/60),l[6]&&(e+=l[6].replace(",",".")/3600),parseInt(l[2])<0&&(e=-1*e),i=Math.abs(parseInt(l[10])),l[12]&&(i+=l[12].replace(",",".")/60),l[14]&&(i+=l[14].replace(",",".")/3600),parseInt(l[10])<0&&(i=-1*i),l[1]?(s=l[1],u=l[9]):l[8]&&(s=l[8],u=l[16]);else throw new Error("invalid coordinates format");if(f){if(Math.abs(i)>=180)throw new Error("invalid longitude value");if(Math.abs(e)>=90)throw new Error("invalid latitude value");if((s||u)&&(!s||!u))throw new Error("invalid coordinates format");if(s&&s==u)throw new Error("invalid coordinates format");let g=/S|SOUTH/i;g.test(s)&&e>0&&(e=-1*e),g=/W|WEST/i,g.test(u)&&i>0&&(i=-1*i);const m=l[0].trim();let y,p;const _=/[,/;\u0020]/g,E=m.match(_);if(E==null){const k=Math.floor(n.length/2);y=m.substring(0,k).trim(),p=m.substring(k).trim()}else{let k;E.length%2==1?k=Math.floor(E.length/2):k=E.length/2-1;let C=0;if(k==0)C=m.indexOf(E[0]),y=m.substring(0,C).trim(),p=m.substring(C+1).trim();else{let R=0,M=0;for(;R<=k;)C=m.indexOf(E[R],M),M=C+1,R++;y=m.substring(0,C).trim(),p=m.substring(C+1).trim()}}const S=y.split(".");if(S.length==2&&S[1]==0&&S[1].length!=2)throw new Error("invalid coordinates format");const b=p.split(".");if(b.length==2&&b[1]==0&&b[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(y)||/^\d+$/.test(p))throw new Error("degree only coordinate/s provided");return isNaN(e)&&e.includes(",")&&(e=e.replace(",",".")),e=Number(Number(e).toFixed(t)),isNaN(i)&&i.includes(",")&&(i=i.replace(",",".")),i=Number(Number(i).toFixed(t)),Object.freeze({verbatimCoordinates:m,verbatimLatitude:y,verbatimLongitude:p,decimalLatitude:e,decimalLongitude:i,decimalCoordinates:`${e},${i}`,closeEnough:o1,toCoordinateFormat:r1})}else throw new Error("coordinates pattern match failed")}function Ks(n){if(!isNaN(n[0]))return!1;const t=[...n];if(t.shift(),t.length%2>0)return!1;const e=/^[-+]?\d+([\.,]\d+)?$/,i=/[eastsouthnorthwest]+/i,s=t.length/2;for(let u=0;u<s;u++){const l=t[u],f=t[u+s],g=e.test(l)&&e.test(f),m=i.test(l)&&i.test(f),y=l==f;if(!(l==null&&f==null)){if(l==null||f==null)return!1;if(g||m||y)continue;return!1}}return!0}function Pf(n,t){const e=Math.abs(n-t);return Number(e.toFixed(6))<=1e-5}function o1(n){if(n.includes(",")){const t=n.split(",");if(Number(t[0])==NaN||Number(t[1])==NaN)throw new Error("coords are not valid decimals");return Pf(this.decimalLatitude,Number(t[0]))&&Pf(this.decimalLongitude,t[1])}else throw new Error("coords being tested must be separated by a comma")}const a1=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Qu.to=a1;const u1=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],l1={decimalLatitude:40.123,decimalLongitude:-74.123},h1=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],c1=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"53 16.3863,4 52.8171",verbatimLatitude:"53 16.3863",verbatimLongitude:"4 52.8171",decimalLatitude:53.273105,decimalLongitude:4.88029},{verbatimCoordinates:"50 8.2914,-5 2.4447",verbatimLatitude:"50 8.2914",verbatimLongitude:"-5 2.4447",decimalLatitude:50.13819,decimalLongitude:-5.040745},{verbatimCoordinates:"N 48° 30,6410', E 18° 57,4583'",verbatimLatitude:"N 48° 30,6410'",verbatimLongitude:"E 18° 57,4583'",decimalLatitude:48.51068,decimalLongitude:18.95764}];function f1(){const n=[];return u1.forEach(t=>{t.decimalLatitude?n.push(t):n.push({...t,...l1})}),[...n,...h1,...c1]}const g1=f1();Qu.formats=g1.map(n=>n.verbatimCoordinates);const d1=Qu;function Df(n,t,e){const i=n.slice();return i[81]=t[e],i[83]=e,i}function Ff(n){let t,e;return t=new J0({}),{c(){ki(t.$$.fragment)},m(i,s){Jn(t,i,s),e=!0},i(i){e||(ie(t.$$.fragment,i),e=!0)},o(i){ue(t.$$.fragment,i),e=!1},d(i){$n(t,i)}}}function Gf(n){let t,e,i,s,u;return e=new Q0({}),{c(){t=Yt("button"),ki(e.$$.fragment),V(t,"type","button"),V(t,"title",n[9]),V(t,"class","svelte-zh3kmv"),Ii(t,"active",n[0])},m(l,f){Jt(l,t,f),Jn(e,t,null),i=!0,s||(u=Ne(t,"click",n[67]),s=!0)},p(l,f){(!i||f[0]&512)&&V(t,"title",l[9]),(!i||f[0]&1)&&Ii(t,"active",l[0])},i(l){i||(ie(e.$$.fragment,l),i=!0)},o(l){ue(e.$$.fragment,l),i=!1},d(l){l&&Zt(t),$n(e),s=!1,u()}}}function m1(n){let t,e=[],i=new Map,s,u,l,f=If(n[14]);const g=m=>m[81].id+(m[81].address?","+m[81].address:"");for(let m=0;m<f.length;m+=1){let y=Df(n,f,m),p=g(y);i.set(p,e[m]=Bf(p,y))}return{c(){t=Yt("ul");for(let m=0;m<e.length;m+=1)e[m].c();V(t,"class","svelte-zh3kmv")},m(m,y){Jt(m,t,y);for(let p=0;p<e.length;p+=1)e[p]&&e[p].m(t,null);s=!0,u||(l=[Ne(t,"mouseleave",n[71]),Ne(t,"blur",n[72])],u=!0)},p(m,y){y[0]&17880064&&(f=If(m[14]),ta(),e=A0(e,y,g,1,m,f,i,t,O0,Bf,null,Df),ea())},i(m){if(!s){for(let y=0;y<f.length;y+=1)ie(e[y]);s=!0}},o(m){for(let y=0;y<e.length;y+=1)ue(e[y]);s=!1},d(m){m&&Zt(t);for(let y=0;y<e.length;y+=1)e[y].d();u=!1,Hn(l)}}}function y1(n){let t,e,i,s,u,l;return e=new bf({}),{c(){t=Yt("div"),ki(e.$$.fragment),i=Ye(),s=Yt("div"),u=wi(n[7]),V(s,"class","svelte-zh3kmv"),V(t,"class","no-results svelte-zh3kmv")},m(f,g){Jt(f,t,g),Jn(e,t,null),Nt(t,i),Nt(t,s),Nt(s,u),l=!0},p(f,g){(!l||g[0]&128)&&js(u,f[7])},i(f){l||(ie(e.$$.fragment,f),l=!0)},o(f){ue(e.$$.fragment,f),l=!1},d(f){f&&Zt(t),$n(e)}}}function p1(n){let t="",e;return{c(){e=wi(t)},m(i,s){Jt(i,e,s)},p:Kt,i:Kt,o:Kt,d(i){i&&Zt(e)}}}function v1(n){let t,e,i,s,u,l,f,g,m,y,p;return e=new bf({}),g=new kf({}),{c(){t=Yt("div"),ki(e.$$.fragment),i=Ye(),s=Yt("div"),u=wi(n[6]),l=Ye(),f=Yt("button"),ki(g.$$.fragment),V(s,"class","svelte-zh3kmv"),V(f,"class","svelte-zh3kmv"),V(t,"class","error svelte-zh3kmv")},m(_,E){Jt(_,t,E),Jn(e,t,null),Nt(t,i),Nt(t,s),Nt(s,u),Nt(t,l),Nt(t,f),Jn(g,f,null),m=!0,y||(p=Ne(f,"click",n[68]),y=!0)},p(_,E){(!m||E[0]&64)&&js(u,_[6])},i(_){m||(ie(e.$$.fragment,_),ie(g.$$.fragment,_),m=!0)},o(_){ue(e.$$.fragment,_),ue(g.$$.fragment,_),m=!1},d(_){_&&Zt(t),$n(e),$n(g),y=!1,p()}}}function Bf(n,t){let e,i,s;function u(){return t[69](t[83])}function l(){return t[70](t[81])}return i=new H0({props:{feature:t[81],showPlaceType:t[10],selected:t[15]===t[83],missingIconsCache:t[20],iconsBaseUrl:t[12]}}),i.$on("mouseenter",u),i.$on("focus",l),{key:n,first:null,c(){e=w0(),ki(i.$$.fragment),this.first=e},m(f,g){Jt(f,e,g),Jn(i,f,g),s=!0},p(f,g){t=f;const m={};g[0]&16384&&(m.feature=t[81]),g[0]&1024&&(m.showPlaceType=t[10]),g[0]&49152&&(m.selected=t[15]===t[83]),g[0]&4096&&(m.iconsBaseUrl=t[12]),i.$set(m)},i(f){s||(ie(i.$$.fragment,f),s=!0)},o(f){ue(i.$$.fragment,f),s=!1},d(f){f&&Zt(e),$n(i,f)}}}function _1(n){let t,e,i,s,u,l,f,g,m,y,p,_,E,S,b,k,C,R,M,O,T,G=!1;u=new e1({}),p=new kf({});let D=n[19]&&Ff(),F=n[5]===!0&&Gf(n);const A=n[59].default,j=_0(A,n,n[58],null),et=[v1,p1,y1,m1],U=[];function nt(z,K){var Z,at;return z[18]?0:z[16]?((Z=z[14])==null?void 0:Z.length)===0?2:z[16]&&((at=z[14])!=null&&at.length)?3:-1:1}return~(k=nt(n))&&(C=U[k]=et[k](n)),{c(){t=Ye(),e=Yt("form"),i=Yt("div"),s=Yt("button"),ki(u.$$.fragment),l=Ye(),f=Yt("input"),g=Ye(),m=Yt("div"),y=Yt("button"),ki(p.$$.fragment),_=Ye(),D&&D.c(),E=Ye(),F&&F.c(),S=Ye(),j&&j.c(),b=Ye(),C&&C.c(),V(s,"class","search-button svelte-zh3kmv"),V(s,"type","button"),V(f,"placeholder",n[8]),V(f,"aria-label",n[8]),V(f,"class","svelte-zh3kmv"),V(y,"type","button"),V(y,"title",n[3]),V(y,"class","svelte-zh3kmv"),V(m,"class","clear-button-container svelte-zh3kmv"),Ii(m,"displayable",n[1]!==""),V(i,"class","input-group svelte-zh3kmv"),V(e,"tabindex","0"),V(e,"class",R=vf(n[2])+" svelte-zh3kmv"),Ii(e,"can-collapse",n[4]&&n[1]==="")},m(z,K){Jt(z,t,K),Jt(z,e,K),Nt(e,i),Nt(i,s),Jn(u,s,null),Nt(i,l),Nt(i,f),n[61](f),_f(f,n[1]),Nt(i,g),Nt(i,m),Nt(m,y),Jn(p,y,null),Nt(m,_),D&&D.m(m,null),Nt(i,E),F&&F.m(i,null),Nt(i,S),j&&j.m(i,null),Nt(e,b),~k&&U[k].m(e,null),M=!0,O||(T=[Ne(s,"click",n[60]),Ne(f,"input",n[62]),Ne(f,"focus",n[63]),Ne(f,"blur",n[64]),Ne(f,"keydown",n[22]),Ne(f,"input",n[65]),Ne(y,"click",n[66]),Ne(e,"submit",I0(n[21]))],O=!0)},p(z,K){(!M||K[0]&256)&&V(f,"placeholder",z[8]),(!M||K[0]&256)&&V(f,"aria-label",z[8]),K[0]&2&&f.value!==z[1]&&_f(f,z[1]),(!M||K[0]&8)&&V(y,"title",z[3]),z[19]?D?K[0]&524288&&ie(D,1):(D=Ff(),D.c(),ie(D,1),D.m(m,null)):D&&(ta(),ue(D,1,1,()=>{D=null}),ea()),(!M||K[0]&2)&&Ii(m,"displayable",z[1]!==""),z[5]===!0?F?(F.p(z,K),K[0]&32&&ie(F,1)):(F=Gf(z),F.c(),ie(F,1),F.m(i,S)):F&&(ta(),ue(F,1,1,()=>{F=null}),ea()),j&&j.p&&(!M||K[1]&134217728)&&x0(j,A,z,z[58],M?E0(A,z[58],K,null):S0(z[58]),null);let Z=k;k=nt(z),k===Z?~k&&U[k].p(z,K):(C&&(ta(),ue(U[Z],1,1,()=>{U[Z]=null}),ea()),~k?(C=U[k],C?C.p(z,K):(C=U[k]=et[k](z),C.c()),ie(C,1),C.m(e,null)):C=null),(!M||K[0]&4&&R!==(R=vf(z[2])+" svelte-zh3kmv"))&&V(e,"class",R),(!M||K[0]&22)&&Ii(e,"can-collapse",z[4]&&z[1]==="")},i(z){M||(ie(G),ie(u.$$.fragment,z),ie(p.$$.fragment,z),ie(D),ie(F),ie(j,z),ie(C),M=!0)},o(z){ue(G),ue(u.$$.fragment,z),ue(p.$$.fragment,z),ue(D),ue(F),ue(j,z),ue(C),M=!1},d(z){z&&(Zt(t),Zt(e)),$n(u),n[61](null),$n(p),D&&D.d(),F&&F.d(),j&&j.d(z),~k&&U[k].d(),O=!1,Hn(T)}}}function E1(n,t,e){let i,{$$slots:s={},$$scope:u}=t,{class:l=void 0}=t,{apiKey:f}=t,{bbox:g=void 0}=t,{clearButtonTitle:m="clear"}=t,{clearOnBlur:y=!1}=t,{collapsed:p=!1}=t,{country:_=void 0}=t,{debounceSearch:E=200}=t,{enableReverse:S=!1}=t,{errorMessage:b="Something went wrong…"}=t,{filter:k=()=>!0}=t,{flyTo:C=!0}=t,{fuzzyMatch:R=!0}=t,{language:M=void 0}=t,{limit:O=void 0}=t,{mapController:T=void 0}=t,{minLength:G=2}=t,{noResultsMessage:D="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=t,{placeholder:F="Search"}=t,{proximity:A=[{type:"server-geolocation"}]}=t,{reverseActive:j=S==="always"}=t,{reverseButtonTitle:et="toggle reverse geocoding"}=t,{searchValue:U=""}=t,{showFullGeometry:nt=!0}=t,{showPlaceType:z="ifNeeded"}=t,{showResultsWhileTyping:K=!0}=t,{selectFirst:Z=!0}=t,{flyToSelected:at=!1}=t,{markerOnSelected:gt=!0}=t,{types:St=void 0}=t,{excludeTypes:Q=!1}=t,{zoom:_t=16}=t,{maxZoom:Et=18}=t,{apiUrl:qt="https://api.maptiler.com/geocoding"}=t,{fetchParameters:X={}}=t,{iconsBaseUrl:Ce="https://cdn.maptiler.com/maptiler-geocoding-control/v1.3.0-rc2/icons/"}=t,{adjustUrlQuery:si=()=>{}}=t;function zi(){ce.focus()}function B(){ce.blur()}function us(Y,Rt=!0,Ot=!1){e(1,U=Y),Rt?(e(15,Wt=-1),Dn()):(_e(!Ot,Ot),setTimeout(()=>{ce.focus(),ce.select()}))}function Dt(){e(14,mt=void 0),e(55,dt=void 0),e(15,Wt=-1)}function it(){e(54,Ut=[]),e(55,dt=void 0)}let L=!1,mt,Ut,dt,_n="",ce,Wt=-1,H,oi=[],We,fe,Yi,ht;const Xe=new Set,ve=R0();C0(()=>{T&&(T.setEventHandler(void 0),T.indicateReverse(!1),T.setSelectedMarker(-1),T.setMarkers(void 0,void 0))});function Dn(Y){if(fe&&(clearTimeout(fe),fe=void 0),Wt>-1&&mt)e(55,dt=mt[Wt]),e(1,U=dt.place_type[0]==="reverse"?dt.place_name:dt.place_name.replace(/,.*/,"")),e(18,H=void 0),e(54,Ut=void 0),e(15,Wt=-1);else if(U){const Rt=Y||!st(U);rn(U,{exact:!0}).then(()=>{e(54,Ut=mt),e(55,dt=void 0),Rt&&kt()}).catch(Ot=>e(18,H=Ot))}}function st(Y){try{return d1(Y,6)}catch{return!1}}async function rn(Y,{byId:Rt=!1,exact:Ot=!1}={}){e(18,H=void 0),We==null||We.abort();const Vt=new AbortController;e(19,We=Vt);try{const yt=st(Y),bt=new URLSearchParams;if(M!==void 0&&bt.set("language",Array.isArray(M)?M.join(","):M??""),St&&bt.set("types",St.join(",")),Q&&bt.set("excludeTypes",String(Q)),g&&bt.set("bbox",g.map(gs=>gs.toFixed(6)).join(",")),_&&bt.set("country",Array.isArray(_)?_.join(","):_),!Rt&&!yt){const gs=await i1(T,A,Vt);gs&&bt.set("proximity",gs),(Ot||!K)&&bt.set("autocomplete","false"),bt.set("fuzzyMatch",String(R))}O!==void 0&&(!yt||(St==null?void 0:St.length)===1)&&bt.set("limit",String(O)),bt.set("key",f),si(bt);const Xt=qt+"/"+encodeURIComponent(yt?yt.decimalLongitude+","+yt.decimalLatitude:Y)+".json?"+bt.toString();if(Xt===_n){Rt?(e(14,mt=void 0),e(55,dt=oi[0])):e(14,mt=oi);return}_n=Xt;const Re=await fetch(Xt,{signal:Vt.signal,...X});if(!Re.ok)throw new Error(await Re.text());const Gn=await Re.json();ve("response",{url:Xt,featureCollection:Gn}),Rt?(e(14,mt=void 0),e(55,dt=Gn.features[0]),oi=[dt]):(e(14,mt=Gn.features.filter(k)),yt&&mt.unshift({type:"Feature",properties:{},id:"reverse_"+yt.decimalLongitude+"_"+yt.decimalLatitude,text:yt.decimalLatitude+", "+yt.decimalLongitude,place_name:yt.decimalLatitude+", "+yt.decimalLongitude,place_type:["reverse"],center:[yt.decimalLongitude,yt.decimalLatitude],bbox:[yt.decimalLongitude,yt.decimalLatitude,yt.decimalLongitude,yt.decimalLatitude],geometry:{type:"Point",coordinates:[yt.decimalLongitude,yt.decimalLatitude]}}),oi=mt,yt&&ce.focus())}catch(yt){if(yt&&typeof yt=="object"&&"name"in yt&&yt.name==="AbortError")return;throw yt}finally{Vt===We&&e(19,We=void 0)}}function kt(){var Ot;if(!(Ut!=null&&Ut.length)||!C)return;const Y=[180,90,-180,-90],Rt=!Ut.some(Vt=>!Vt.matching_text);for(const Vt of Ut)if(Rt||!Vt.matching_text)for(const yt of[0,1,2,3])Y[yt]=Math[yt<2?"min":"max"](Y[yt],((Ot=Vt.bbox)==null?void 0:Ot[yt])??Vt.center[yt%2]);T&&Ut.length>0&&(dt&&Y[0]===Y[2]&&Y[1]===Y[3]?T.flyTo(dt.center,_t):T.fitBounds(Rf(Y),50,Et))}function ct(Y){e(0,j=S==="always"),e(14,mt=void 0),e(55,dt=void 0),e(15,Wt=-1),us(Y[1].toFixed(6)+", "+n1(Y[0],[-180,180],!0).toFixed(6),!1,!0)}function ls(Y){if(!mt)return;let Rt=Y.key==="ArrowDown"?1:Y.key==="ArrowUp"?-1:0;Rt&&(Wt===(Z?0:-1)&&Rt===-1&&e(15,Wt=mt.length),e(15,Wt+=Rt),Wt>=mt.length&&e(15,Wt=-1),Wt<0&&Z&&e(15,Wt=0),Y.preventDefault())}function _e(Y=!0,Rt=!1){if(e(18,H=void 0),K||Rt){if(fe&&clearTimeout(fe),U.length<G)return;const Ot=U;fe=window.setTimeout(()=>{rn(Ot).catch(Vt=>e(18,H=Vt))},Y?E:0)}else e(14,mt=void 0),e(18,H=void 0)}function yr(Y){e(55,dt=Y),e(1,U=Y.place_name),e(15,Wt=-1)}const lt=()=>ce.focus();function hs(Y){Hu[Y?"unshift":"push"](()=>{ce=Y,e(17,ce)})}function cs(){U=this.value,e(1,U),e(13,L),e(27,y)}const ai=()=>e(13,L=!0),Ee=()=>e(13,L=!1),En=()=>_e(),ge=()=>{e(1,U=""),ce.focus()},Fn=()=>e(0,j=!j),sn=()=>e(18,H=void 0),fs=Y=>e(15,Wt=Y),pr=Y=>yr(Y),ne=()=>{Z||e(15,Wt=-1)},$=()=>{};return n.$$set=Y=>{"class"in Y&&e(2,l=Y.class),"apiKey"in Y&&e(25,f=Y.apiKey),"bbox"in Y&&e(26,g=Y.bbox),"clearButtonTitle"in Y&&e(3,m=Y.clearButtonTitle),"clearOnBlur"in Y&&e(27,y=Y.clearOnBlur),"collapsed"in Y&&e(4,p=Y.collapsed),"country"in Y&&e(28,_=Y.country),"debounceSearch"in Y&&e(29,E=Y.debounceSearch),"enableReverse"in Y&&e(5,S=Y.enableReverse),"errorMessage"in Y&&e(6,b=Y.errorMessage),"filter"in Y&&e(30,k=Y.filter),"flyTo"in Y&&e(31,C=Y.flyTo),"fuzzyMatch"in Y&&e(32,R=Y.fuzzyMatch),"language"in Y&&e(33,M=Y.language),"limit"in Y&&e(34,O=Y.limit),"mapController"in Y&&e(35,T=Y.mapController),"minLength"in Y&&e(36,G=Y.minLength),"noResultsMessage"in Y&&e(7,D=Y.noResultsMessage),"placeholder"in Y&&e(8,F=Y.placeholder),"proximity"in Y&&e(37,A=Y.proximity),"reverseActive"in Y&&e(0,j=Y.reverseActive),"reverseButtonTitle"in Y&&e(9,et=Y.reverseButtonTitle),"searchValue"in Y&&e(1,U=Y.searchValue),"showFullGeometry"in Y&&e(38,nt=Y.showFullGeometry),"showPlaceType"in Y&&e(10,z=Y.showPlaceType),"showResultsWhileTyping"in Y&&e(39,K=Y.showResultsWhileTyping),"selectFirst"in Y&&e(11,Z=Y.selectFirst),"flyToSelected"in Y&&e(40,at=Y.flyToSelected),"markerOnSelected"in Y&&e(41,gt=Y.markerOnSelected),"types"in Y&&e(42,St=Y.types),"excludeTypes"in Y&&e(43,Q=Y.excludeTypes),"zoom"in Y&&e(44,_t=Y.zoom),"maxZoom"in Y&&e(45,Et=Y.maxZoom),"apiUrl"in Y&&e(46,qt=Y.apiUrl),"fetchParameters"in Y&&e(47,X=Y.fetchParameters),"iconsBaseUrl"in Y&&e(12,Ce=Y.iconsBaseUrl),"adjustUrlQuery"in Y&&e(48,si=Y.adjustUrlQuery),"$$scope"in Y&&e(58,u=Y.$$scope)},n.$$.update=()=>{if(n.$$.dirty[0]&32&&e(0,j=S==="always"),n.$$.dirty[0]&134225920&&setTimeout(()=>{e(16,Yi=L),y&&!L&&e(1,U="")}),n.$$.dirty[0]&16386|n.$$.dirty[1]&32&&U.length<G&&(e(55,dt=void 0),e(14,mt=void 0),e(18,H=void 0),e(54,Ut=mt)),n.$$.dirty[1]&16777344&&nt&&dt&&!dt.address&&dt.geometry.type==="Point"&&dt.place_type[0]!=="reverse"&&rn(dt.id,{byId:!0}).catch(Y=>e(18,H=Y)),n.$$.dirty[1]&50356241&&(T&&dt&&dt.id!==ht&&C&&(!dt.bbox||dt.bbox[0]===dt.bbox[2]&&dt.bbox[1]===dt.bbox[3]?T.flyTo(dt.center,dt.id.startsWith("poi.")||dt.id.startsWith("address.")?Et:_t):T.fitBounds(Rf(dt.bbox),50,Et),e(14,mt=void 0),e(54,Ut=void 0),e(15,Wt=-1)),e(56,ht=dt==null?void 0:dt.id)),n.$$.dirty[0]&18432&&Z&&mt!=null&&mt.length&&e(15,Wt=0),n.$$.dirty[0]&2050&&(Z||e(15,Wt=-1)),n.$$.dirty[0]&16384|n.$$.dirty[1]&8388608&&Ut!==mt&&e(54,Ut=void 0),n.$$.dirty[0]&81921|n.$$.dirty[1]&8388624&&T&&T.setEventHandler(Y=>{switch(Y.type){case"mapClick":j&&ct(Y.coordinates);break;case"markerClick":{const Rt=mt==null?void 0:mt.find(Ot=>Ot.id===Y.id);Rt&&yr(Rt)}break;case"markerMouseEnter":Ut&&e(15,Wt=Yi?(mt==null?void 0:mt.findIndex(Rt=>Rt.id===Y.id))??-1:-1);break;case"markerMouseLeave":Ut&&e(15,Wt=-1);break}}),n.$$.dirty[0]&49152&&e(57,i=mt==null?void 0:mt[Wt]),n.$$.dirty[1]&67133969&&T&&i&&C&&at&&T.flyTo(i.center,i.id.startsWith("poi.")||i.id.startsWith("address.")?Et:_t),n.$$.dirty[1]&1040&&(gt||T==null||T.setMarkers(void 0,void 0)),n.$$.dirty[1]&75498512&&T&>&&!Ut&&(T.setMarkers(i?[i]:void 0,void 0),T.setSelectedMarker(i?0:-1)),n.$$.dirty[1]&25165840&&T&&T.setMarkers(Ut,dt),n.$$.dirty[0]&32768|n.$$.dirty[1]&8388624&&Ut&&T&&T.setSelectedMarker(Wt),n.$$.dirty[0]&2|n.$$.dirty[1]&16&&T){const Y=st(U);T.setReverseMarker(Y?[Y.decimalLongitude,Y.decimalLatitude]:void 0)}n.$$.dirty[1]&67108864&&ve("select",i),n.$$.dirty[1]&16777216&&ve("pick",dt),n.$$.dirty[0]&81920&&ve("optionsVisibilityChange",Yi&&!!mt),n.$$.dirty[0]&16384&&ve("featuresListed",mt),n.$$.dirty[1]&8388608&&ve("featuresMarked",Ut),n.$$.dirty[0]&1&&ve("reverseToggle",j),n.$$.dirty[0]&2&&ve("queryChange",U),n.$$.dirty[0]&1|n.$$.dirty[1]&16&&T&&T.indicateReverse(j)},[j,U,l,m,p,S,b,D,F,et,z,Z,Ce,L,mt,Wt,Yi,ce,H,We,Xe,Dn,ls,_e,yr,f,g,y,_,E,k,C,R,M,O,T,G,A,nt,K,at,gt,St,Q,_t,Et,qt,X,si,zi,B,us,Dt,it,Ut,dt,ht,i,u,s,lt,hs,cs,ai,Ee,En,ge,Fn,sn,fs,pr,ne,$]}let x1=class extends ar{constructor(t){super(),or(this,t,E1,_1,rr,{class:2,apiKey:25,bbox:26,clearButtonTitle:3,clearOnBlur:27,collapsed:4,country:28,debounceSearch:29,enableReverse:5,errorMessage:6,filter:30,flyTo:31,fuzzyMatch:32,language:33,limit:34,mapController:35,minLength:36,noResultsMessage:7,placeholder:8,proximity:37,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:38,showPlaceType:10,showResultsWhileTyping:39,selectFirst:11,flyToSelected:40,markerOnSelected:41,types:42,excludeTypes:43,zoom:44,maxZoom:45,apiUrl:46,fetchParameters:47,iconsBaseUrl:12,adjustUrlQuery:48,focus:49,blur:50,setQuery:51,clearList:52,clearMap:53},null,[-1,-1,-1])}get focus(){return this.$$.ctx[49]}get blur(){return this.$$.ctx[50]}get setQuery(){return this.$$.ctx[51]}get clearList(){return this.$$.ctx[52]}get clearMap(){return this.$$.ctx[53]}};class dn extends ci{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new dn(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(bn(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=hn(t,He.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?S1(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function S1(n){if(typeof n=="function")return n;let t;return Array.isArray(n)?t=n:(me(typeof n.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),t=[n]),function(){return t}}function na(n,t,e,i,s,u,l){let f,g;const m=(e-t)/i;if(m===1)f=t;else if(m===2)f=t,g=s;else if(m!==0){let y=n[t],p=n[t+1],_=0;const E=[0];for(let k=t+i;k<e;k+=i){const C=n[k],R=n[k+1];_+=Math.sqrt((C-y)*(C-y)+(R-p)*(R-p)),E.push(_),y=C,p=R}const S=s*_,b=Sp(E,S);b<0?(g=(S-E[-b-2])/(E[-b-1]-E[-b-2]),f=t+(-b-2)*i):f=t+b*i}l=l>1?l:2,u=u||new Array(l);for(let y=0;y<l;++y)u[y]=f===void 0?NaN:g===void 0?n[f+y]:Be(n[f+y],n[f+i+y],g);return u}function tl(n,t,e,i,s,u){if(e==t)return null;let l;if(s<n[t+i-1])return u?(l=n.slice(t,t+i),l[i-1]=s,l):null;if(n[e-1]<s)return u?(l=n.slice(e-i,e),l[i-1]=s,l):null;if(s==n[t+i-1])return n.slice(t,t+i);let f=t/i,g=e/i;for(;f<g;){const _=f+g>>1;s<n[(_+1)*i-1]?g=_:f=_+1}const m=n[f*i-1];if(s==m)return n.slice((f-1)*i,(f-1)*i+i);const y=n[(f+1)*i-1],p=(s-m)/(y-m);l=[];for(let _=0;_<i-1;++_)l.push(Be(n[(f-1)*i+_],n[f*i+_],p));return l.push(s),l}function w1(n,t,e,i,s,u,l){if(l)return tl(n,t,e[e.length-1],i,s,u);let f;if(s<n[i-1])return u?(f=n.slice(0,i),f[i-1]=s,f):null;if(n[n.length-1]<s)return u?(f=n.slice(n.length-i),f[i-1]=s,f):null;for(let g=0,m=e.length;g<m;++g){const y=e[g];if(t!=y){if(s<n[t+i-1])return null;if(s<=n[y-1])return tl(n,t,y,i,s,!1);t=y}}return null}function zf(n,t,e,i){let s=n[t],u=n[t+1],l=0;for(let f=t+i;f<e;f+=i){const g=n[f],m=n[f+1];l+=Math.sqrt((g-s)*(g-s)+(m-u)*(m-u)),s=g,u=m}return l}class ur extends Qi{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){kn(this.flatCoordinates,t),this.changed()}clone(){const t=new ur(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,s){return s<Ui(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(xu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),wu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,s))}forEachSegment(t){return Ac(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return this.layout!="XYM"&&this.layout!="XYZM"?null:(e=e!==void 0?e:!1,tl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return mi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return na(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return zf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=Do(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new ur(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return Fo(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Po(this.flatCoordinates,0,t,this.stride),this.changed()}}const ut={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},ia=[ut.FILL],bi=[ut.STROKE],lr=[ut.BEGIN_PATH],Yf=[ut.CLOSE_PATH];class Wf{drawCustom(t,e,i,s,u){}drawGeometry(t){}setStyle(t){}drawCircle(t,e,i){}drawFeature(t,e,i){}drawGeometryCollection(t,e,i){}drawLineString(t,e,i){}drawMultiLineString(t,e,i){}drawMultiPoint(t,e,i){}drawMultiPolygon(t,e,i){}drawPoint(t,e,i){}drawPolygon(t,e,i){}drawText(t,e,i){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}class Js extends Wf{constructor(t,e,i,s){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=s,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return e==1?t:t.map(function(i){return i*e})}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),s=this.tmpCoordinate_,u=this.coordinates;let l=u.length;for(let f=0,g=t.length;f<g;f+=e)s[0]=t[f],s[1]=t[f+1],cu(i,s)&&(u[l++]=s[0],u[l++]=s[1]);return l}appendFlatLineCoordinates(t,e,i,s,u,l){const f=this.coordinates;let g=f.length;const m=this.getBufferedMaxExtent();l&&(e+=s);let y=t[e],p=t[e+1];const _=this.tmpCoordinate_;let E=!0,S,b,k;for(S=e+s;S<i;S+=s)_[0]=t[S],_[1]=t[S+1],k=gu(m,_),k!==b?(E&&(f[g++]=y,f[g++]=p,E=!1),f[g++]=_[0],f[g++]=_[1]):k===oe.INTERSECTING?(f[g++]=_[0],f[g++]=_[1],E=!1):E=!0,y=_[0],p=_[1],b=k;return(u&&E||S===e+s)&&(f[g++]=y,f[g++]=p),g}drawCustomCoordinates_(t,e,i,s,u){for(let l=0,f=i.length;l<f;++l){const g=i[l],m=this.appendFlatLineCoordinates(t,e,g,s,!1,!1);u.push(m),e=g}return e}drawCustom(t,e,i,s,u){this.beginGeometry(t,e,u);const l=t.getType(),f=t.getStride(),g=this.coordinates.length;let m,y,p,_,E;switch(l){case"MultiPolygon":m=t.getOrientedFlatCoordinates(),_=[];const S=t.getEndss();E=0;for(let b=0,k=S.length;b<k;++b){const C=[];E=this.drawCustomCoordinates_(m,E,S[b],f,C),_.push(C)}this.instructions.push([ut.CUSTOM,g,_,t,i,Cu,u]),this.hitDetectionInstructions.push([ut.CUSTOM,g,_,t,s||i,Cu,u]);break;case"Polygon":case"MultiLineString":p=[],m=l=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),E=this.drawCustomCoordinates_(m,0,t.getEnds(),f,p),this.instructions.push([ut.CUSTOM,g,p,t,i,ks,u]),this.hitDetectionInstructions.push([ut.CUSTOM,g,p,t,s||i,ks,u]);break;case"LineString":case"Circle":m=t.getFlatCoordinates(),y=this.appendFlatLineCoordinates(m,0,m.length,f,!1,!1),this.instructions.push([ut.CUSTOM,g,y,t,i,mi,u]),this.hitDetectionInstructions.push([ut.CUSTOM,g,y,t,s||i,mi,u]);break;case"MultiPoint":m=t.getFlatCoordinates(),y=this.appendFlatPointCoordinates(m,f),y>g&&(this.instructions.push([ut.CUSTOM,g,y,t,i,mi,u]),this.hitDetectionInstructions.push([ut.CUSTOM,g,y,t,s||i,mi,u]));break;case"Point":m=t.getFlatCoordinates(),this.coordinates.push(m[0],m[1]),y=this.coordinates.length,this.instructions.push([ut.CUSTOM,g,y,t,i,void 0,u]),this.hitDetectionInstructions.push([ut.CUSTOM,g,y,t,s||i,void 0,u]);break}this.endGeometry(e)}beginGeometry(t,e,i){this.beginGeometryInstruction1_=[ut.BEGIN_GEOMETRY,e,0,t,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[ut.BEGIN_GEOMETRY,e,0,t,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const i=t.length;let s,u,l=-1;for(e=0;e<i;++e)s=t[e],u=s[0],u==ut.END_GEOMETRY?l=e:u==ut.BEGIN_GEOMETRY&&(s[2]=e,wp(this.hitDetectionInstructions,l,e),l=-1)}setFillStrokeStyle(t,e){const i=this.state;if(t){const s=t.getColor();i.fillPatternScale=s&&typeof s=="object"&&"src"in s?this.pixelRatio:1,i.fillStyle=Cn(s||Pe)}else i.fillStyle=void 0;if(e){const s=e.getColor();i.strokeStyle=Cn(s||Ds);const u=e.getLineCap();i.lineCap=u!==void 0?u:Or;const l=e.getLineDash();i.lineDash=l?l.slice():qn;const f=e.getLineDashOffset();i.lineDashOffset=f||Un;const g=e.getLineJoin();i.lineJoin=g!==void 0?g:Ar;const m=e.getWidth();i.lineWidth=m!==void 0?m:Gs;const y=e.getMiterLimit();i.miterLimit=y!==void 0?y:Ps,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[ut.SET_FILL_STYLE,e];return typeof e!="string"&&i.push(t.fillPatternScale),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[ut.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;(typeof i!="string"||t.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,s=t.lineCap,u=t.lineDash,l=t.lineDashOffset,f=t.lineJoin,g=t.lineWidth,m=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=s||u!=t.currentLineDash&&!wr(t.currentLineDash,u)||t.currentLineDashOffset!=l||t.currentLineJoin!=f||t.currentLineWidth!=g||t.currentMiterLimit!=m)&&(i!==void 0&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=s,t.currentLineDash=u,t.currentLineDashOffset=l,t.currentLineJoin=f,t.currentLineWidth=g,t.currentMiterLimit=m)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[ut.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Wp(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;hu(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class I1 extends Js{constructor(t,e,i,s){super(t,e,i,s),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,i){if(!this.image_||this.maxExtent&&!cu(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,i);const s=t.getFlatCoordinates(),u=t.getStride(),l=this.coordinates.length,f=this.appendFlatPointCoordinates(s,u);this.instructions.push([ut.DRAW_IMAGE,l,f,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([ut.DRAW_IMAGE,l,f,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,i){if(!this.image_)return;this.beginGeometry(t,e,i);const s=t.getFlatCoordinates(),u=[];for(let g=0,m=s.length;g<m;g+=t.getStride())(!this.maxExtent||cu(this.maxExtent,s.slice(g,g+2)))&&u.push(s[g],s[g+1]);const l=this.coordinates.length,f=this.appendFlatPointCoordinates(u,2);this.instructions.push([ut.DRAW_IMAGE,l,f,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([ut.DRAW_IMAGE,l,f,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){const i=t.getAnchor(),s=t.getSize(),u=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=s[1],this.opacity_=t.getOpacity(),this.originX_=u[0],this.originY_=u[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=s[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}class k1 extends Js{constructor(t,e,i,s){super(t,e,i,s)}drawFlatCoordinates_(t,e,i,s){const u=this.coordinates.length,l=this.appendFlatLineCoordinates(t,e,i,s,!1,!1),f=[ut.MOVE_TO_LINE_TO,u,l];return this.instructions.push(f),this.hitDetectionInstructions.push(f),i}drawLineString(t,e,i){const s=this.state,u=s.strokeStyle,l=s.lineWidth;if(u===void 0||l===void 0)return;this.updateStrokeStyle(s,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([ut.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,qn,Un],lr);const f=t.getFlatCoordinates(),g=t.getStride();this.drawFlatCoordinates_(f,0,f.length,g),this.hitDetectionInstructions.push(bi),this.endGeometry(e)}drawMultiLineString(t,e,i){const s=this.state,u=s.strokeStyle,l=s.lineWidth;if(u===void 0||l===void 0)return;this.updateStrokeStyle(s,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([ut.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,qn,Un],lr);const f=t.getEnds(),g=t.getFlatCoordinates(),m=t.getStride();let y=0;for(let p=0,_=f.length;p<_;++p)y=this.drawFlatCoordinates_(g,y,f[p],m);this.hitDetectionInstructions.push(bi),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(bi),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(bi),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(lr)}}class Xf extends Js{constructor(t,e,i,s){super(t,e,i,s)}drawFlatCoordinatess_(t,e,i,s){const u=this.state,l=u.fillStyle!==void 0,f=u.strokeStyle!==void 0,g=i.length;this.instructions.push(lr),this.hitDetectionInstructions.push(lr);for(let m=0;m<g;++m){const y=i[m],p=this.coordinates.length,_=this.appendFlatLineCoordinates(t,e,y,s,!0,!f),E=[ut.MOVE_TO_LINE_TO,p,_];this.instructions.push(E),this.hitDetectionInstructions.push(E),f&&(this.instructions.push(Yf),this.hitDetectionInstructions.push(Yf)),e=y}return l&&(this.instructions.push(ia),this.hitDetectionInstructions.push(ia)),f&&(this.instructions.push(bi),this.hitDetectionInstructions.push(bi)),e}drawCircle(t,e,i){const s=this.state,u=s.fillStyle,l=s.strokeStyle;if(u===void 0&&l===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),s.fillStyle!==void 0&&this.hitDetectionInstructions.push([ut.SET_FILL_STYLE,Pe]),s.strokeStyle!==void 0&&this.hitDetectionInstructions.push([ut.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,qn,Un]);const f=t.getFlatCoordinates(),g=t.getStride(),m=this.coordinates.length;this.appendFlatLineCoordinates(f,0,f.length,g,!1,!1);const y=[ut.CIRCLE,m];this.instructions.push(lr,y),this.hitDetectionInstructions.push(lr,y),s.fillStyle!==void 0&&(this.instructions.push(ia),this.hitDetectionInstructions.push(ia)),s.strokeStyle!==void 0&&(this.instructions.push(bi),this.hitDetectionInstructions.push(bi)),this.endGeometry(e)}drawPolygon(t,e,i){const s=this.state,u=s.fillStyle,l=s.strokeStyle;if(u===void 0&&l===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),s.fillStyle!==void 0&&this.hitDetectionInstructions.push([ut.SET_FILL_STYLE,Pe]),s.strokeStyle!==void 0&&this.hitDetectionInstructions.push([ut.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,qn,Un]);const f=t.getEnds(),g=t.getOrientedFlatCoordinates(),m=t.getStride();this.drawFlatCoordinatess_(g,0,f,m),this.endGeometry(e)}drawMultiPolygon(t,e,i){const s=this.state,u=s.fillStyle,l=s.strokeStyle;if(u===void 0&&l===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),s.fillStyle!==void 0&&this.hitDetectionInstructions.push([ut.SET_FILL_STYLE,Pe]),s.strokeStyle!==void 0&&this.hitDetectionInstructions.push([ut.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,qn,Un]);const f=t.getEndss(),g=t.getOrientedFlatCoordinates(),m=t.getStride();let y=0;for(let p=0,_=f.length;p<_;++p)y=this.drawFlatCoordinatess_(g,y,f[p],m);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(t!==0){const e=this.coordinates;for(let i=0,s=e.length;i<s;++i)e[i]=tr(e[i],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;t.fillStyle!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)}}function b1(n,t,e,i,s){const u=[];let l=e,f=0,g=t.slice(e,2);for(;f<n&&l+s<i;){const[m,y]=g.slice(-2),p=t[l+s],_=t[l+s+1],E=Math.sqrt((p-m)*(p-m)+(_-y)*(_-y));if(f+=E,f>=n){const S=(n-f+E)/E,b=Be(m,p,S),k=Be(y,_,S);g.push(b,k),u.push(g),g=[b,k],f==n&&(l+=s),f=0}else if(f<n)g.push(t[l+s],t[l+s+1]),l+=s;else{const S=E-f,b=Be(m,p,S/E),k=Be(y,_,S/E);g.push(b,k),u.push(g),g=[b,k],f=0,l+=s}}return f>0&&u.push(g),u}function C1(n,t,e,i,s){let u=e,l=e,f=0,g=0,m=e,y,p,_,E,S,b,k,C,R,M;for(p=e;p<i;p+=s){const O=t[p],T=t[p+1];S!==void 0&&(R=O-S,M=T-b,E=Math.sqrt(R*R+M*M),k!==void 0&&(g+=_,y=Math.acos((k*R+C*M)/(_*E)),y>n&&(g>f&&(f=g,u=m,l=p),g=0,m=p-s)),_=E,k=R,C=M),S=O,b=T}return g+=E,g>f?[m,p]:[u,l]}const ra={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class R1 extends Js{constructor(t,e,i,s){super(t,e,i,s),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[Pe]={fillStyle:Pe},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,i){const s=this.textFillState_,u=this.textStrokeState_,l=this.textState_;if(this.text_===""||!l||!s&&!u)return;const f=this.coordinates;let g=f.length;const m=t.getType();let y=null,p=t.getStride();if(l.placement==="line"&&(m=="LineString"||m=="MultiLineString"||m=="Polygon"||m=="MultiPolygon")){if(!cn(this.maxExtent,t.getExtent()))return;let _;if(y=t.getFlatCoordinates(),m=="LineString")_=[y.length];else if(m=="MultiLineString")_=t.getEnds();else if(m=="Polygon")_=t.getEnds().slice(0,1);else if(m=="MultiPolygon"){const k=t.getEndss();_=[];for(let C=0,R=k.length;C<R;++C)_.push(k[C][0])}this.beginGeometry(t,e,i);const E=l.repeat,S=E?void 0:l.textAlign;let b=0;for(let k=0,C=_.length;k<C;++k){let R;E?R=b1(E*this.resolution,y,b,_[k],p):R=[y.slice(b,_[k])];for(let M=0,O=R.length;M<O;++M){const T=R[M];let G=0,D=T.length;if(S==null){const A=C1(l.maxAngle,T,0,T.length,2);G=A[0],D=A[1]}for(let A=G;A<D;A+=p)f.push(T[A],T[A+1]);const F=f.length;b=_[k],this.drawChars_(g,F),g=F}}this.endGeometry(e)}else{let _=l.overflow?null:[];switch(m){case"Point":case"MultiPoint":y=t.getFlatCoordinates();break;case"LineString":y=t.getFlatMidpoint();break;case"Circle":y=t.getCenter();break;case"MultiLineString":y=t.getFlatMidpoints(),p=2;break;case"Polygon":y=t.getFlatInteriorPoint(),l.overflow||_.push(y[2]/this.resolution),p=3;break;case"MultiPolygon":const R=t.getFlatInteriorPoints();y=[];for(let M=0,O=R.length;M<O;M+=3)l.overflow||_.push(R[M+2]/this.resolution),y.push(R[M],R[M+1]);if(y.length===0)return;p=2;break}const E=this.appendFlatPointCoordinates(y,p);if(E===g)return;if(_&&(E-g)/2!==y.length/p){let R=g/2;_=_.filter((M,O)=>{const T=f[(R+O)*2]===y[O*p]&&f[(R+O)*2+1]===y[O*p+1];return T||--R,T})}this.saveTextStates_(),(l.backgroundFill||l.backgroundStroke)&&(this.setFillStrokeStyle(l.backgroundFill,l.backgroundStroke),l.backgroundFill&&this.updateFillStyle(this.state,this.createFill),l.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e,i);let S=l.padding;if(S!=nr&&(l.scale[0]<0||l.scale[1]<0)){let R=l.padding[0],M=l.padding[1],O=l.padding[2],T=l.padding[3];l.scale[0]<0&&(M=-M,T=-T),l.scale[1]<0&&(R=-R,O=-O),S=[R,M,O,T]}const b=this.pixelRatio;this.instructions.push([ut.DRAW_IMAGE,g,E,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,S==nr?nr:S.map(function(R){return R*b}),!!l.backgroundFill,!!l.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,_]);const k=1/b,C=this.state.fillStyle;l.backgroundFill&&(this.state.fillStyle=Pe,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([ut.DRAW_IMAGE,g,E,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[k,k],NaN,this.declutterMode_,this.declutterImageWithText_,S,!!l.backgroundFill,!!l.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?Pe:this.fillKey_,this.textOffsetX_,this.textOffsetY_,_]),l.backgroundFill&&(this.state.fillStyle=C,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,s=this.strokeKey_;t&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const u=this.textKey_;u in this.textStates||(this.textStates[u]={font:e.font,textAlign:e.textAlign||Fs,justify:e.justify,textBaseline:e.textBaseline||Wo,scale:e.scale});const l=this.fillKey_;i&&(l in this.fillStates||(this.fillStates[l]={fillStyle:i.fillStyle}))}drawChars_(t,e){const i=this.textStrokeState_,s=this.textState_,u=this.strokeKey_,l=this.textKey_,f=this.fillKey_;this.saveTextStates_();const g=this.pixelRatio,m=ra[s.textBaseline],y=this.textOffsetY_*g,p=this.text_,_=i?i.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([ut.DRAW_CHARS,t,e,m,s.overflow,f,s.maxAngle,g,y,u,_*g,p,l,1,this.declutterMode_]),this.hitDetectionInstructions.push([ut.DRAW_CHARS,t,e,m,s.overflow,f&&Pe,s.maxAngle,g,y,u,_*g,p,l,1/g,this.declutterMode_])}setTextStyle(t,e){let i,s,u;if(!t)this.text_="";else{const l=t.getFill();l?(s=this.textFillState_,s||(s={},this.textFillState_=s),s.fillStyle=Cn(l.getColor()||Pe)):(s=null,this.textFillState_=s);const f=t.getStroke();if(!f)u=null,this.textStrokeState_=u;else{u=this.textStrokeState_,u||(u={},this.textStrokeState_=u);const S=f.getLineDash(),b=f.getLineDashOffset(),k=f.getWidth(),C=f.getMiterLimit();u.lineCap=f.getLineCap()||Or,u.lineDash=S?S.slice():qn,u.lineDashOffset=b===void 0?Un:b,u.lineJoin=f.getLineJoin()||Ar,u.lineWidth=k===void 0?Gs:k,u.miterLimit=C===void 0?Ps:C,u.strokeStyle=Cn(f.getColor()||Ds)}i=this.textState_;const g=t.getFont()||Zc;E_(g);const m=t.getScaleArray();i.overflow=t.getOverflow(),i.font=g,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||Wo,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||nr,i.scale=m===void 0?[1,1]:m;const y=t.getOffsetX(),p=t.getOffsetY(),_=t.getRotateWithView(),E=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=y===void 0?0:y,this.textOffsetY_=p===void 0?0:p,this.textRotateWithView_=_===void 0?!1:_,this.textRotation_=E===void 0?0:E,this.strokeKey_=u?(typeof u.strokeStyle=="string"?u.strokeStyle:de(u.strokeStyle))+u.lineCap+u.lineDashOffset+"|"+u.lineWidth+u.lineJoin+u.miterLimit+"["+u.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=s&&s.fillStyle?typeof s.fillStyle=="string"?s.fillStyle:"|"+de(s.fillStyle):""}this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const L1={Circle:Xf,Default:Js,Image:I1,LineString:k1,Polygon:Xf,Text:R1};class N1{constructor(t,e,i,s){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=s,this.resolution_=i,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const i=this.buildersByZIndex_[e];for(const s in i){const u=i[s].finish();t[e][s]=u}}return t}getBuilder(t,e){const i=t!==void 0?t.toString():"0";let s=this.buildersByZIndex_[i];s===void 0&&(s={},this.buildersByZIndex_[i]=s);let u=s[e];if(u===void 0){const l=L1[e];u=new l(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[e]=u}return u}}class T1 extends Ss{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return zt()}getData(t){return null}prepareFrame(t){return zt()}renderFrame(t,e){return zt()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return(s,u)=>{const l=this.loadedTileCallback.bind(this,i,s);return t.forEachLoadedTile(e,s,u,l)}}forEachFeatureAtCoordinate(t,e,i,s,u){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;(e.getState()===wt.LOADED||e.getState()===wt.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=wt.LOADED&&e!=wt.ERROR&&t.addEventListener(He.CHANGE,this.boundHandleImageChange_),e==wt.IDLE&&(t.load(),e=t.getState()),e==wt.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class qf{constructor(){Ze(this,"pushMethodArgs_",(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this));this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(CanvasRenderingContext2D.prototype,{get:(t,e)=>{if(typeof uu()[e]=="function")return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,i)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,i),!0)})}getContext(){return this.context_}draw(t){this.instructions_.forEach(e=>{for(let i=0,s=e.length;i<s;i+=2){const u=e[i],l=e[i+1];if(typeof t[u]=="function")t[u](...l);else{if(typeof l=="function"){t[u]=l(t);continue}t[u]=l}}})}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}}const Uf=[];let Wr=null;function M1(){Wr=Ge(1,1,void 0,{willReadFrequently:!0})}class O1 extends T1{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Xn(),this.pixelTransform=Xn(),this.inversePixelTransform=Xn(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){Wr||M1(),Wr.clearRect(0,0,1,1);let s;try{Wr.drawImage(t,e,i,1,1,0,0,1,1),s=Wr.getImageData(0,0,1,1).data}catch{return Wr=null,null}return s}getBackground(t){let i=this.getLayer().getBackground();return typeof i=="function"&&(i=i(t.viewState.resolution)),i||void 0}useContainer(t,e,i){const s=this.getLayer().getClassName();let u,l;if(t&&t.className===s&&(!i||t&&t.style.backgroundColor&&wr(Os(t.style.backgroundColor),Os(i)))){const f=t.firstElementChild;f instanceof HTMLCanvasElement&&(l=f.getContext("2d"))}if(l&&l.canvas.style.transform===e?(this.container=t,this.context=l,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){u=document.createElement("div"),u.className=s;let f=u.style;f.position="absolute",f.width="100%",f.height="100%",l=Ge();const g=l.canvas;u.appendChild(g),f=g.style,f.position="absolute",f.left="0",f.transformOrigin="top left",this.container=u,this.context=l}!this.containerReused&&i&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const s=hc(i),u=cc(i),l=lc(i),f=uc(i);Ae(e.coordinateToPixelTransform,s),Ae(e.coordinateToPixelTransform,u),Ae(e.coordinateToPixelTransform,l),Ae(e.coordinateToPixelTransform,f);const g=this.inversePixelTransform;Ae(g,s),Ae(g,u),Ae(g,l),Ae(g,f),t.save(),t.beginPath(),t.moveTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(u[0]),Math.round(u[1])),t.lineTo(Math.round(l[0]),Math.round(l[1])),t.lineTo(Math.round(f[0]),Math.round(f[1])),t.clip()}dispatchRenderEvent_(t,e,i){const s=this.getLayer();if(s.hasListener(t)){const u=new y0(t,this.inversePixelTransform,i,e);s.dispatchEvent(u)}}preRender(t,e){this.frameState=e,!e.declutter&&this.dispatchRenderEvent_(Ji.PRERENDER,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(Ji.POSTRENDER,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new qf),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(Ji.PRERENDER,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(Ji.POSTRENDER,this.context,t))}getRenderTransform(t,e,i,s,u,l,f){const g=u/2,m=l/2,y=s/e,p=-y,_=-t[0]+f,E=-t[1];return $i(this.tempTransform,g,m,y,p,-i,_,E)}disposeInternal(){delete this.frameState,super.disposeInternal()}}function A1(n,t,e,i,s,u,l,f,g,m,y,p){let _=n[t],E=n[t+1],S=0,b=0,k=0,C=0;function R(){S=_,b=E,t+=i,_=n[t],E=n[t+1],C+=k,k=Math.sqrt((_-S)*(_-S)+(E-b)*(E-b))}do R();while(t<e-i&&C+k<u);let M=k===0?0:(u-C)/k;const O=Be(S,_,M),T=Be(b,E,M),G=t-i,D=C,F=u+f*g(m,s,y);for(;t<e-i&&C+k<F;)R();M=k===0?0:(F-C)/k;const A=Be(S,_,M),j=Be(b,E,M);let et;if(p){const Z=[O,T,A,j];kc(Z,0,4,2,p,Z,Z),et=Z[0]>Z[2]}else et=O>A;const U=Math.PI,nt=[],z=G+i===t;t=G,k=0,C=D,_=n[t],E=n[t+1];let K;if(z){R(),K=Math.atan2(E-b,_-S),et&&(K+=K>0?-U:U);const Z=(A+O)/2,at=(j+T)/2;return nt[0]=[Z,at,(F-u)/2,K,s],nt}s=s.replace(/\n/g," ");for(let Z=0,at=s.length;Z<at;){R();let gt=Math.atan2(E-b,_-S);if(et&&(gt+=gt>0?-U:U),K!==void 0){let X=gt-K;if(X+=X>U?-2*U:X<-U?2*U:0,Math.abs(X)>l)return null}K=gt;const St=Z;let Q=0;for(;Z<at;++Z){const X=et?at-Z-1:Z,Ce=f*g(m,s[X],y);if(t+i<e&&C+k<u+Q+Ce/2)break;Q+=Ce}if(Z===St)continue;const _t=et?s.substring(at-St,at-Z):s.substring(St,Z);M=k===0?0:(u+Q/2-C)/k;const Et=Be(S,_,M),qt=Be(b,E,M);nt.push([Et,qt,Q/2,gt,_t]),u+=Q}return nt}const Xr=ji(),Ci=[],Qn=[],ti=[],Ri=[];function jf(n){return n[3].declutterBox}const Vf=new RegExp("[֑-ࣿיִ-﷿ﹰ-ﻼࠀ--]");function el(n,t){return t==="start"?t=Vf.test(n)?"right":"left":t==="end"&&(t=Vf.test(n)?"left":"right"),ra[t]}function P1(n,t,e){return e>0&&n.push(`
|
|
6
|
+
`||m===y){u=Math.max(u,l),s.push(l),l=0,f+=g;continue}const _=t[m+1]||n.font,E=Xo(_,p);e.push(E),l+=E;const S=x_(_);i.push(S),g=Math.max(g,S)}return{width:u,height:f,widths:e,heights:i,lineWidths:s}}function w_(n,t,e,i,s,u,l,f,g,m,y){n.save(),e!==1&&(n.globalAlpha===void 0?n.globalAlpha=p=>p.globalAlpha*=e:n.globalAlpha*=e),t&&n.transform.apply(n,t),i.contextInstructions?(n.translate(g,m),n.scale(y[0],y[1]),I_(i,n)):y[0]<0||y[1]<0?(n.translate(g,m),n.scale(y[0],y[1]),n.drawImage(i,s,u,l,f,0,0,l,f)):n.drawImage(i,s,u,l,f,g,m,l*y[0],f*y[1]),n.restore()}function I_(n,t){const e=n.contextInstructions;for(let i=0,s=e.length;i<s;i+=2)Array.isArray(e[i+1])?t[e[i]].apply(t,e[i+1]):t[e[i]]=e[i+1]}class qo extends Yo{constructor(t){super({opacity:1,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?wt.LOADING:wt.LOADED,this.imageState_===wt.LOADING&&this.ready().then(()=>this.imageState_=wt.LOADED),this.render()}clone(){const t=this.getScale(),e=new qo({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const i=this.renderOptions_,s=Ge(i.size*t,i.size*t);this.draw_(i,s,t),e=s.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let s=this.radius_,u=this.radius2_===void 0?s:this.radius2_;if(s<u){const G=s;s=u,u=G}const l=this.radius2_===void 0?this.points_:this.points_*2,f=2*Math.PI/l,g=u*Math.sin(f),m=Math.sqrt(u*u-g*g),y=s-m,p=Math.sqrt(g*g+y*y),_=p/g;if(t==="miter"&&_<=i)return _*e;const E=e/2/_,S=e/2*(y/p),k=Math.sqrt((s+E)*(s+E)+S*S)-s;if(this.radius2_===void 0||t==="bevel")return k*2;const C=s*Math.sin(f),R=Math.sqrt(s*s-C*C),M=u-R,T=Math.sqrt(C*C+M*M)/C;if(T<=i){const G=T*e/2-u-s;return 2*Math.max(k,G)}return k*2}createRenderOptions(){let t=Or,e=Ar,i=0,s=null,u=0,l,f=0;this.stroke_&&(l=Cn(this.stroke_.getColor()??Ds),f=this.stroke_.getWidth()??Gs,s=this.stroke_.getLineDash(),u=this.stroke_.getLineDashOffset()??0,e=this.stroke_.getLineJoin()??Ar,t=this.stroke_.getLineCap()??Or,i=this.stroke_.getMiterLimit()??Ps);const g=this.calculateLineJoinSize_(e,f,i),m=Math.max(this.radius_,this.radius2_||0),y=Math.ceil(2*m+g);return{strokeStyle:l,strokeWidth:f,size:y,lineCap:t,lineDash:s,lineDashOffset:u,lineJoin:e,miterLimit:i}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvases_={},this.hitDetectionCanvas_=null,this.size_=[t,t]}draw_(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let s=this.fill_.getColor();s===null&&(s=Pe),e.fillStyle=Cn(s),e.fill()}t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){let e;if(this.fill_){let i=this.fill_.getColor(),s=0;typeof i=="string"&&(i=Os(i)),i===null?s=1:Array.isArray(i)&&(s=i.length===4?i[3]:1),s===0&&(e=Ge(t.size,t.size),this.drawHitDetectionCanvas_(t,e))}return e?e.canvas:this.getImage(1)}createPath_(t){let e=this.points_;const i=this.radius_;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{const s=this.radius2_===void 0?i:this.radius2_;this.radius2_!==void 0&&(e*=2);const u=this.angle_-Math.PI/2,l=2*Math.PI/e;for(let f=0;f<e;f++){const g=u+f*l,m=f%2===0?i:s;t.lineTo(m*Math.cos(g),m*Math.sin(g))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=Pe,e.fill(),t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}}class Uo extends qo{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:t.scale!==void 0?t.scale:1,rotation:t.rotation!==void 0?t.rotation:0,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new Uo({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}class ir{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,t.color!==void 0&&this.setColor(t.color)}clone(){const t=this.getColor();return new ir({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(t!==null&&typeof t=="object"&&"src"in t){const e=Wu(null,t.src,"anonymous",void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then(()=>{this.patternImage_=null}),e.getImageState()===wt.IDLE&&e.load(),e.getImageState()===wt.LOADING&&(this.patternImage_=e)}this.color_=t}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}class Dr{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new Dr({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}class Ei{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=Jc,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new Ei({geometry:t??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=Jc,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function k_(n){let t;if(typeof n=="function")t=n;else{let e;Array.isArray(n)?e=n:(me(typeof n.getZIndex=="function","Expected an `Style` or an array of `Style`"),e=[n]),t=function(){return e}}return t}let Uu=null;function b_(n,t){if(!Uu){const e=new ir({color:"rgba(255,255,255,0.4)"}),i=new Dr({color:"#3399CC",width:1.25});Uu=[new Ei({image:new Uo({fill:e,stroke:i,radius:5}),fill:e,stroke:i})]}return Uu}function Jc(n){return n.getGeometry()}function $c(n,t,e,i){return e!==void 0&&i!==void 0?[e/n,i/t]:e!==void 0?e/n:i!==void 0?i/t:1}class Bs extends Yo{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,i=t.rotation!==void 0?t.rotation:0,s=t.scale!==void 0?t.scale:1,u=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:i,scale:s,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:u,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const l=t.img!==void 0?t.img:null;let f=t.src;me(!(f!==void 0&&l),"`image` and `src` cannot be provided at the same time"),(f===void 0||f.length===0)&&l&&(f=l.src||de(l)),me(f!==void 0&&f.length>0,"A defined and non-empty `src` or `image` must be provided"),me(!((t.width!==void 0||t.height!==void 0)&&t.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let g;if(t.src!==void 0?g=wt.IDLE:l!==void 0&&(l instanceof HTMLImageElement?l.complete?g=l.src?wt.LOADED:wt.IDLE:g=wt.LOADING:g=wt.LOADED),this.color_=t.color!==void 0?Os(t.color):null,this.iconImage_=Wu(l,f,this.crossOrigin_,g,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null,t.width!==void 0||t.height!==void 0){let m,y;if(t.size)[m,y]=t.size;else{const p=this.getImage(1);if(p.width&&p.height)m=p.width,y=p.height;else if(p instanceof HTMLImageElement){this.initialOptions_=t;const _=()=>{if(this.unlistenImageChange(_),!this.initialOptions_)return;const E=this.iconImage_.getSize();this.setScale($c(E[0],E[1],t.width,t.height))};this.listenImageChange(_);return}}m!==void 0&&this.setScale($c(m,y,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new Bs({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const s=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!s)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=s[0]),this.anchorYUnits_=="fraction"&&(t[1]*=s[1])}if(this.anchorOrigin_!="top-left"){if(!s)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+s[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+s[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=i[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();if(this.size_)return this.size_[0]*t[0];if(this.iconImage_.getImageState()==wt.LOADED)return this.iconImage_.getSize()[0]*t[0]}getHeight(){const t=this.getScaleArray();if(this.size_)return this.size_[1]*t[1];if(this.iconImage_.getImageState()==wt.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(He.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(He.CHANGE,t)}ready(){return this.iconImage_.ready()}}const C_="#333";class jo{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=Ns(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new ir({color:C_}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new jo({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Ns(t!==void 0?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}let Fr=0;const Gr=0,ee=1<<Fr++,rt=1<<Fr++,ze=1<<Fr++,ae=1<<Fr++,jn=1<<Fr++,Se=Math.pow(2,Fr)-1,Qc={[ee]:"boolean",[rt]:"number",[ze]:"string",[ae]:"color",[jn]:"number[]"},R_=Object.keys(Qc).map(Number).sort(Xi);function we(n){const t=[];for(const e of R_)L_(n,e)&&t.push(Qc[e]);return t.length===0?"untyped":t.length<3?t.join(" or "):t.slice(0,-1).join(", ")+", or "+t[t.length-1]}function L_(n,t){return(n&t)===t}function Rn(n,t){return!!(n&t)}function Vo(n,t){return n===t}class xi{constructor(t,e){this.type=t,this.value=e}}class N_{constructor(t,e,...i){this.type=t,this.operator=e,this.args=i}}function tf(){return{variables:new Set,properties:new Set,featureId:!1,geometryType:!1,style:{}}}function T_(n){switch(n){case"string":return ze;case"color":return ae;case"number":return rt;case"boolean":return ee;case"number[]":return jn;default:throw new Error(`Unrecognized type hint: ${n}`)}}function Pt(n,t,e){switch(typeof n){case"boolean":return new xi(ee,n);case"number":return new xi(rt,n);case"string":{let s=ze;return d_(n)&&(s|=ae),Vo(s&e,Gr)||(s&=e),new xi(s,n)}}if(!Array.isArray(n))throw new Error("Expression must be an array or a primitive value");if(n.length===0)throw new Error("Empty expression");if(typeof n[0]=="string")return X_(n,t,e);for(const s of n)if(typeof s!="number")throw new Error("Expected an array of numbers");let i=jn;return(n.length===3||n.length===4)&&(i|=ae),e&&(i&=e),new xi(i,n)}const q={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string"},M_={[q.Get]:pt(([n,t])=>t!==void 0?T_(t.value):Se,xt(1,2),O_),[q.Var]:pt(([n])=>n.type,xt(1,1),A_),[q.Id]:pt(rt|ze,zs,P_),[q.Concat]:pt(ze,xt(2,1/0),Tt(Se)),[q.GeometryType]:pt(ze,zs,D_),[q.Resolution]:pt(rt,zs),[q.Zoom]:pt(rt,zs),[q.Time]:pt(rt,zs),[q.Any]:pt(ee,xt(2,1/0),Tt(ee)),[q.All]:pt(ee,xt(2,1/0),Tt(ee)),[q.Not]:pt(ee,xt(1,1),Tt(ee)),[q.Equal]:pt(ee,xt(2,2),Tt(Se),Si),[q.NotEqual]:pt(ee,xt(2,2),Tt(Se),Si),[q.GreaterThan]:pt(ee,xt(2,2),Tt(Se),Si),[q.GreaterThanOrEqualTo]:pt(ee,xt(2,2),Tt(Se),Si),[q.LessThan]:pt(ee,xt(2,2),Tt(Se),Si),[q.LessThanOrEqualTo]:pt(ee,xt(2,2),Tt(Se),Si),[q.Multiply]:pt(n=>{let t=rt|ae;for(let e=0;e<n.length;e++)t&=n[e].type;return t},xt(2,1/0),Tt(rt|ae),Si),[q.Coalesce]:pt(n=>{let t=Se;for(let e=1;e<n.length;e+=2)t&=n[e].type;return t&=n[n.length-1].type,t},xt(2,1/0),Tt(Se),Si),[q.Divide]:pt(rt,xt(2,2),Tt(rt)),[q.Add]:pt(rt,xt(2,1/0),Tt(rt)),[q.Subtract]:pt(rt,xt(2,2),Tt(rt)),[q.Clamp]:pt(rt,xt(3,3),Tt(rt)),[q.Mod]:pt(rt,xt(2,2),Tt(rt)),[q.Pow]:pt(rt,xt(2,2),Tt(rt)),[q.Abs]:pt(rt,xt(1,1),Tt(rt)),[q.Floor]:pt(rt,xt(1,1),Tt(rt)),[q.Ceil]:pt(rt,xt(1,1),Tt(rt)),[q.Round]:pt(rt,xt(1,1),Tt(rt)),[q.Sin]:pt(rt,xt(1,1),Tt(rt)),[q.Cos]:pt(rt,xt(1,1),Tt(rt)),[q.Atan]:pt(rt,xt(1,2),Tt(rt)),[q.Sqrt]:pt(rt,xt(1,1),Tt(rt)),[q.Match]:pt(n=>{let t=Se;for(let e=2;e<n.length;e+=2)t&=n[e].type;return t&=n[n.length-1].type,t},xt(4,1/0),ef,G_),[q.Between]:pt(ee,xt(3,3),Tt(rt)),[q.Interpolate]:pt(n=>{let t=ae|rt;for(let e=3;e<n.length;e+=2)t&=n[e].type;return t},xt(6,1/0),ef,B_),[q.Case]:pt(n=>{let t=Se;for(let e=1;e<n.length;e+=2)t&=n[e].type;return t&=n[n.length-1].type,t},xt(3,1/0),F_,z_),[q.In]:pt(ee,xt(2,2),Y_),[q.Number]:pt(rt,xt(1,1/0),Tt(Se)),[q.String]:pt(ze,xt(1,1/0),Tt(Se)),[q.Array]:pt(n=>n.length===3||n.length===4?jn|ae:jn,xt(1,1/0),Tt(rt)),[q.Color]:pt(ae,xt(1,4),Tt(rt)),[q.Band]:pt(rt,xt(1,3),Tt(rt)),[q.Palette]:pt(ae,xt(2,2),W_),[q.ToString]:pt(ze,xt(1,1),Tt(ee|rt|ze|ae))};function O_(n,t){const e=Pt(n[1],t);if(!(e instanceof xi))throw new Error("Expected a literal argument for get operation");if(typeof e.value!="string")throw new Error("Expected a string argument for get operation");if(t.properties.add(e.value),n.length===3){const i=Pt(n[2],t);return[e,i]}return[e]}function A_(n,t,e,i){const s=n[1];if(typeof s!="string")throw new Error("Expected a string argument for var operation");if(t.variables.add(s),!("variables"in t.style)||t.style.variables[s]===void 0)return[new xi(Se,s)];const u=t.style.variables[s],l=Pt(u,t);if(l.value=s,i&&!Rn(i,l.type))throw new Error(`The variable ${s} has type ${we(l.type)} but the following type was expected: ${we(i)}`);return[l]}function P_(n,t){t.featureId=!0}function D_(n,t){t.geometryType=!0}function zs(n,t){const e=n[0];if(n.length!==1)throw new Error(`Expected no arguments for ${e} operation`);return[]}function xt(n,t){return function(e,i){const s=e[0],u=e.length-1;if(n===t){if(u!==n){const l=n===1?"":"s";throw new Error(`Expected ${n} argument${l} for ${s}, got ${u}`)}}else if(u<n||u>t){const l=t===1/0?`${n} or more`:`${n} to ${t}`;throw new Error(`Expected ${l} arguments for ${s}, got ${u}`)}}}function Tt(n){return function(t,e){const i=t[0],s=t.length-1,u=new Array(s);for(let l=0;l<s;++l){const f=Pt(t[l+1],e);if(!Rn(n,f.type)){const g=we(n),m=we(f.type);throw new Error(`Unexpected type for argument ${l} of ${i} operation, got ${g} but expected ${m}`)}f.type&=n,u[l]=f}return u}}function Si(n,t,e){const i=n[0],s=n.length-1;let u=Se;for(let f=0;f<e.length;++f)u&=e[f].type;if(u===Gr)throw new Error(`No common type could be found for arguments of ${i} operation`);const l=new Array(s);for(let f=0;f<s;++f)l[f]=Pt(n[f+1],t,u);return l}function F_(n,t){const e=n[0],i=n.length-1;if(i%2===0)throw new Error(`An odd amount of arguments was expected for operation ${e}, got ${JSON.stringify(i)} instead`)}function ef(n,t){const e=n[0],i=n.length-1;if(i%2===1)throw new Error(`An even amount of arguments was expected for operation ${e}, got ${JSON.stringify(i)} instead`)}function G_(n,t,e,i){const s=n.length-1;let l=Pt(n[1],t).type;const f=Pt(n[n.length-1],t);let g=i!==void 0?i&f.type:f.type;const m=new Array(s-2);for(let p=0;p<s-2;p+=2){const _=Pt(n[p+2],t),E=Pt(n[p+3],t);l&=_.type,g&=E.type,m[p]=_,m[p+1]=E}const y=ze|rt|ee;if(!Rn(y,l))throw new Error(`Expected an input of type ${we(y)} for the interpolate operation, got ${we(l)} instead`);if(Vo(g,Gr))throw new Error("Could not find a common output type for the following match operation: "+JSON.stringify(n));for(let p=0;p<s-2;p+=2){const _=Pt(n[p+2],t,l),E=Pt(n[p+3],t,g);m[p]=_,m[p+1]=E}return[Pt(n[1],t,l),...m,Pt(n[n.length-1],t,g)]}function B_(n,t,e,i){const s=n[1];let u;switch(s[0]){case"linear":u=1;break;case"exponential":if(u=s[1],typeof u!="number")throw new Error(`Expected a number base for exponential interpolation, got ${JSON.stringify(u)} instead`);break;default:u=null}if(!u)throw new Error(`Invalid interpolation type: ${JSON.stringify(s)}`);u=Pt(u,t);let l=Pt(n[2],t);if(!Rn(rt,l.type))throw new Error(`Expected an input of type number for the interpolate operation, got ${we(l.type)} instead`);l=Pt(n[2],t,rt);const f=new Array(n.length-3);for(let g=0;g<f.length;g+=2){let m=Pt(n[g+3],t);if(!Rn(rt,m.type))throw new Error(`Expected all stop input values in the interpolate operation to be of type number, got ${we(m.type)} at position ${g+2} instead`);let y=Pt(n[g+4],t);if(!Rn(rt|ae,y.type))throw new Error(`Expected all stop output values in the interpolate operation to be a number or color, got ${we(y.type)} at position ${g+3} instead`);m=Pt(n[g+3],t,rt),y=Pt(n[g+4],t,rt|ae),f[g]=m,f[g+1]=y}return[u,l,...f]}function z_(n,t,e,i){const s=Pt(n[n.length-1],t);let u=i!==void 0?i&s.type:s.type;const l=new Array(n.length-1);for(let f=0;f<l.length-1;f+=2){const g=Pt(n[f+1],t),m=Pt(n[f+2],t);if(!Rn(ee,g.type))throw new Error(`Expected all conditions in the case operation to be of type boolean, got ${we(g.type)} at position ${f} instead`);u&=m.type,l[f]=g,l[f+1]=m}if(Vo(u,Gr))throw new Error("Could not find a common output type for the following case operation: "+JSON.stringify(n));for(let f=0;f<l.length-1;f+=2)l[f+1]=Pt(n[f+2],t,u);return l[l.length-1]=Pt(n[n.length-1],t,u),l}function Y_(n,t){let e=n[2];if(!Array.isArray(e))throw new Error('The "in" operator was provided a literal value which was not an array as second argument.');if(typeof e[0]=="string"){if(e[0]!=="literal")throw new Error('For the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions.');if(!Array.isArray(e[1]))throw new Error('The "in" operator was provided a literal value which was not an array as second argument.');e=e[1]}let i=ze|rt;const s=new Array(e.length);for(let l=0;l<s.length;l++){const f=Pt(e[l],t);i&=f.type,s[l]=f}if(Vo(i,Gr))throw new Error("Could not find a common type for the following in operation: "+JSON.stringify(n));return[Pt(n[1],t,i),...s]}function W_(n,t){const e=Pt(n[1],t,rt);if(e.type!==rt)throw new Error(`The first argument of palette must be an number, got ${we(e.type)} instead`);const i=n[2];if(!Array.isArray(i))throw new Error("The second argument of palette must be an array");const s=new Array(i.length);for(let u=0;u<s.length;u++){const l=Pt(i[u],t,ae);if(!(l instanceof xi))throw new Error(`The palette color at index ${u} must be a literal value`);if(!Rn(l.type,ae))throw new Error(`The palette color at index ${u} should be of type color, got ${we(l.type)} instead`);s[u]=l}return[e,...s]}function pt(n,...t){return function(e,i,s){const u=e[0];let l=[];for(let g=0;g<t.length;g++)l=t[g](e,i,l,s)||l;let f=typeof n=="function"?n(l):n;if(s!==void 0){if(!Rn(f,s))throw new Error(`The following expression was expected to return ${we(s)}, but returns ${we(f)} instead: ${JSON.stringify(e)}`);f&=s}if(f===Gr)throw new Error(`No matching type was found for the following expression: ${JSON.stringify(e)}`);return new N_(f,u,...l)}}function X_(n,t,e){const i=n[0],s=M_[i];if(!s)throw new Error(`Unknown operator: ${i}`);return s(n,t,e)}function nf(n){if(!n)return"";const t=n.getType();switch(t){case"Point":case"LineString":case"Polygon":return t;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return t.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return nf(n.getGeometries()[0]);default:return""}}function rf(){return{variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""}}function Vn(n,t,e){const i=Pt(n,e);if(!Rn(t,i.type)){const s=we(t),u=we(i.type);throw new Error(`Expected expression to be of type ${s}, got ${u}`)}return gn(i)}function gn(n,t){if(n instanceof xi){if(n.type===ae&&typeof n.value=="string"){const i=Bu(n.value);return function(){return i}}return function(){return n.value}}const e=n.operator;switch(e){case q.Number:case q.String:case q.Coalesce:return q_(n);case q.Get:case q.Var:return U_(n);case q.Id:return i=>i.featureId;case q.GeometryType:return i=>i.geometryType;case q.Concat:{const i=n.args.map(s=>gn(s));return s=>"".concat(...i.map(u=>u(s).toString()))}case q.Resolution:return i=>i.resolution;case q.Any:case q.All:case q.Between:case q.In:case q.Not:return V_(n);case q.Equal:case q.NotEqual:case q.LessThan:case q.LessThanOrEqualTo:case q.GreaterThan:case q.GreaterThanOrEqualTo:return j_(n);case q.Multiply:case q.Divide:case q.Add:case q.Subtract:case q.Clamp:case q.Mod:case q.Pow:case q.Abs:case q.Floor:case q.Ceil:case q.Round:case q.Sin:case q.Cos:case q.Atan:case q.Sqrt:return Z_(n);case q.Case:return H_(n);case q.Match:return K_(n);case q.Interpolate:return J_(n);case q.ToString:return $_(n);default:throw new Error(`Unsupported operator ${e}`)}}function q_(n,t){const e=n.operator,i=n.args.length,s=new Array(i);for(let u=0;u<i;++u)s[u]=gn(n.args[u]);switch(e){case q.Coalesce:return u=>{for(let l=0;l<i;++l){const f=s[l](u);if(typeof f<"u"&&f!==null)return f}throw new Error("Expected one of the values to be non-null")};case q.Number:case q.String:return u=>{for(let l=0;l<i;++l){const f=s[l](u);if(typeof f===e)return f}throw new Error(`Expected one of the values to be a ${e}`)};default:throw new Error(`Unsupported assertion operator ${e}`)}}function U_(n,t){const i=n.args[0].value;switch(n.operator){case q.Get:return s=>s.properties[i];case q.Var:return s=>s.variables[i];default:throw new Error(`Unsupported accessor operator ${n.operator}`)}}function j_(n,t){const e=n.operator,i=gn(n.args[0]),s=gn(n.args[1]);switch(e){case q.Equal:return u=>i(u)===s(u);case q.NotEqual:return u=>i(u)!==s(u);case q.LessThan:return u=>i(u)<s(u);case q.LessThanOrEqualTo:return u=>i(u)<=s(u);case q.GreaterThan:return u=>i(u)>s(u);case q.GreaterThanOrEqualTo:return u=>i(u)>=s(u);default:throw new Error(`Unsupported comparison operator ${e}`)}}function V_(n,t){const e=n.operator,i=n.args.length,s=new Array(i);for(let u=0;u<i;++u)s[u]=gn(n.args[u]);switch(e){case q.Any:return u=>{for(let l=0;l<i;++l)if(s[l](u))return!0;return!1};case q.All:return u=>{for(let l=0;l<i;++l)if(!s[l](u))return!1;return!0};case q.Between:return u=>{const l=s[0](u),f=s[1](u),g=s[2](u);return l>=f&&l<=g};case q.In:return u=>{const l=s[0](u);for(let f=1;f<i;++f)if(l===s[f](u))return!0;return!1};case q.Not:return u=>!s[0](u);default:throw new Error(`Unsupported logical operator ${e}`)}}function Z_(n,t){const e=n.operator,i=n.args.length,s=new Array(i);for(let u=0;u<i;++u)s[u]=gn(n.args[u]);switch(e){case q.Multiply:return u=>{let l=1;for(let f=0;f<i;++f)l*=s[f](u);return l};case q.Divide:return u=>s[0](u)/s[1](u);case q.Add:return u=>{let l=0;for(let f=0;f<i;++f)l+=s[f](u);return l};case q.Subtract:return u=>s[0](u)-s[1](u);case q.Clamp:return u=>{const l=s[0](u),f=s[1](u);if(l<f)return f;const g=s[2](u);return l>g?g:l};case q.Mod:return u=>s[0](u)%s[1](u);case q.Pow:return u=>Math.pow(s[0](u),s[1](u));case q.Abs:return u=>Math.abs(s[0](u));case q.Floor:return u=>Math.floor(s[0](u));case q.Ceil:return u=>Math.ceil(s[0](u));case q.Round:return u=>Math.round(s[0](u));case q.Sin:return u=>Math.sin(s[0](u));case q.Cos:return u=>Math.cos(s[0](u));case q.Atan:return i===2?u=>Math.atan2(s[0](u),s[1](u)):u=>Math.atan(s[0](u));case q.Sqrt:return u=>Math.sqrt(s[0](u));default:throw new Error(`Unsupported numeric operator ${e}`)}}function H_(n,t){const e=n.args.length,i=new Array(e);for(let s=0;s<e;++s)i[s]=gn(n.args[s]);return s=>{for(let u=0;u<e-1;u+=2)if(i[u](s))return i[u+1](s);return i[e-1](s)}}function K_(n,t){const e=n.args.length,i=new Array(e);for(let s=0;s<e;++s)i[s]=gn(n.args[s]);return s=>{const u=i[0](s);for(let l=1;l<e;l+=2)if(u===i[l](s))return i[l+1](s);return i[e-1](s)}}function J_(n,t){const e=n.args.length,i=new Array(e);for(let s=0;s<e;++s)i[s]=gn(n.args[s]);return s=>{const u=i[0](s),l=i[1](s);let f,g;for(let m=2;m<e;m+=2){const y=i[m](s);let p=i[m+1](s);const _=Array.isArray(p);if(_&&(p=f_(p)),y>=l)return m===2?p:_?Q_(u,l,f,g,y,p):Ys(u,l,f,g,y,p);f=y,g=p}return g}}function $_(n,t){const e=n.operator,i=n.args.length,s=new Array(i);for(let u=0;u<i;++u)s[u]=gn(n.args[u]);switch(e){case q.ToString:return u=>{const l=s[0](u);return n.args[0].type===ae?zu(l):l.toString()};default:throw new Error(`Unsupported convert operator ${e}`)}}function Ys(n,t,e,i,s,u){const l=s-e;if(l===0)return i;const f=t-e,g=n===1?f/l:(Math.pow(n,f)-1)/(Math.pow(n,l)-1);return i+g*(u-i)}function Q_(n,t,e,i,s,u){if(s-e===0)return i;const f=jc(i),g=jc(u);let m=g[2]-f[2];m>180?m-=360:m<-180&&(m+=360);const y=[Ys(n,t,e,f[0],s,g[0]),Ys(n,t,e,f[1],s,g[1]),f[2]+Ys(n,t,e,0,s,m),Ys(n,t,e,i[3],s,u[3])];return Vc(g_(y))}function t0(n){return!0}function e0(n){const t=tf(),e=n0(n,t),i=rf();return function(s,u){if(i.properties=s.getPropertiesInternal(),i.resolution=u,t.featureId){const l=s.getId();l!==void 0?i.featureId=l:i.featureId=null}return t.geometryType&&(i.geometryType=nf(s.getGeometry())),e(i)}}function sf(n){const t=tf(),e=n.length,i=new Array(e);for(let l=0;l<e;++l)i[l]=ju(n[l],t);const s=rf(),u=new Array(e);return function(l,f){if(s.properties=l.getPropertiesInternal(),s.resolution=f,t.featureId){const m=l.getId();m!==void 0?s.featureId=m:s.featureId=null}let g=0;for(let m=0;m<e;++m){const y=i[m](s);y&&(u[g]=y,g+=1)}return u.length=g,u}}function n0(n,t){const e=n.length,i=new Array(e);for(let s=0;s<e;++s){const u=n[s],l="filter"in u?Vn(u.filter,ee,t):t0;let f;if(Array.isArray(u.style)){const g=u.style.length;f=new Array(g);for(let m=0;m<g;++m)f[m]=ju(u.style[m],t)}else f=[ju(u.style,t)];i[s]={filter:l,styles:f}}return function(s){const u=[];let l=!1;for(let f=0;f<e;++f){const g=i[f].filter;if(g(s)&&!(n[f].else&&l)){l=!0;for(const m of i[f].styles){const y=m(s);y&&u.push(y)}}}return u}}function ju(n,t){const e=Ws(n,"",t),i=Xs(n,"",t),s=i0(n,t),u=r0(n,t),l=De(n,"z-index",t);if(!e&&!i&&!s&&!u&&!kr(n))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(n));const f=new Ei;return function(g){let m=!0;if(e){const y=e(g);y&&(m=!1),f.setFill(y)}if(i){const y=i(g);y&&(m=!1),f.setStroke(y)}if(s){const y=s(g);y&&(m=!1),f.setText(y)}if(u){const y=u(g);y&&(m=!1),f.setImage(y)}return l&&f.setZIndex(l(g)),m?null:f}}function Ws(n,t,e){let i;if(t+"fill-pattern-src"in n?i=u0(n,t+"fill-",e):i=Vu(n,t+"fill-color",e),!i)return null;const s=new ir;return function(u){const l=i(u);return l==="none"?null:(s.setColor(l),s)}}function Xs(n,t,e){const i=De(n,t+"stroke-width",e),s=Vu(n,t+"stroke-color",e);if(!i&&!s)return null;const u=Zn(n,t+"stroke-line-cap",e),l=Zn(n,t+"stroke-line-join",e),f=of(n,t+"stroke-line-dash",e),g=De(n,t+"stroke-line-dash-offset",e),m=De(n,t+"stroke-miter-limit",e),y=new Dr;return function(p){if(s){const _=s(p);if(_==="none")return null;y.setColor(_)}if(i&&y.setWidth(i(p)),u){const _=u(p);if(_!=="butt"&&_!=="round"&&_!=="square")throw new Error("Expected butt, round, or square line cap");y.setLineCap(_)}if(l){const _=l(p);if(_!=="bevel"&&_!=="round"&&_!=="miter")throw new Error("Expected bevel, round, or miter line join");y.setLineJoin(_)}return f&&y.setLineDash(f(p)),g&&y.setLineDashOffset(g(p)),m&&y.setMiterLimit(m(p)),y}}function i0(n,t){const e="text-",i=Zn(n,e+"value",t);if(!i)return null;const s=Ws(n,e,t),u=Ws(n,e+"background-",t),l=Xs(n,e,t),f=Xs(n,e+"background-",t),g=Zn(n,e+"font",t),m=De(n,e+"max-angle",t),y=De(n,e+"offset-x",t),p=De(n,e+"offset-y",t),_=qs(n,e+"overflow",t),E=Zn(n,e+"placement",t),S=De(n,e+"repeat",t),b=Ho(n,e+"scale",t),k=qs(n,e+"rotate-with-view",t),C=De(n,e+"rotation",t),R=Zn(n,e+"align",t),M=Zn(n,e+"justify",t),O=Zn(n,e+"baseline",t),T=of(n,e+"padding",t),G=Jo(n,e+"declutter-mode"),D=new jo({declutterMode:G});return function(F){if(D.setText(i(F)),s&&D.setFill(s(F)),u&&D.setBackgroundFill(u(F)),l&&D.setStroke(l(F)),f&&D.setBackgroundStroke(f(F)),g&&D.setFont(g(F)),m&&D.setMaxAngle(m(F)),y&&D.setOffsetX(y(F)),p&&D.setOffsetY(p(F)),_&&D.setOverflow(_(F)),E){const A=E(F);if(A!=="point"&&A!=="line")throw new Error("Expected point or line for text-placement");D.setPlacement(A)}if(S&&D.setRepeat(S(F)),b&&D.setScale(b(F)),k&&D.setRotateWithView(k(F)),C&&D.setRotation(C(F)),R){const A=R(F);if(A!=="left"&&A!=="center"&&A!=="right"&&A!=="end"&&A!=="start")throw new Error("Expected left, right, center, start, or end for text-align");D.setTextAlign(A)}if(M){const A=M(F);if(A!=="left"&&A!=="right"&&A!=="center")throw new Error("Expected left, right, or center for text-justify");D.setJustify(A)}if(O){const A=O(F);if(A!=="bottom"&&A!=="top"&&A!=="middle"&&A!=="alphabetic"&&A!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");D.setTextBaseline(A)}return T&&D.setPadding(T(F)),D}}function r0(n,t){return"icon-src"in n?s0(n,t):"shape-points"in n?o0(n,t):"circle-radius"in n?a0(n,t):null}function s0(n,t){const e="icon-",i=e+"src",s=hf(n[i],i),u=Zo(n,e+"anchor",t),l=Ho(n,e+"scale",t),f=De(n,e+"opacity",t),g=Zo(n,e+"displacement",t),m=De(n,e+"rotation",t),y=qs(n,e+"rotate-with-view",t),p=uf(n,e+"anchor-origin"),_=lf(n,e+"anchor-x-units"),E=lf(n,e+"anchor-y-units"),S=f0(n,e+"color"),b=h0(n,e+"cross-origin"),k=c0(n,e+"offset"),C=uf(n,e+"offset-origin"),R=Ko(n,e+"width"),M=Ko(n,e+"height"),O=l0(n,e+"size"),T=Jo(n,e+"declutter-mode"),G=new Bs({src:s,anchorOrigin:p,anchorXUnits:_,anchorYUnits:E,color:S,crossOrigin:b,offset:k,offsetOrigin:C,height:M,width:R,size:O,declutterMode:T});return function(D){return f&&G.setOpacity(f(D)),g&&G.setDisplacement(g(D)),m&&G.setRotation(m(D)),y&&G.setRotateWithView(y(D)),l&&G.setScale(l(D)),u&&G.setAnchor(u(D)),G}}function o0(n,t){const e="shape-",i=e+"points",s=e+"radius",u=Zu(n[i],i),l=Zu(n[s],s),f=Ws(n,e,t),g=Xs(n,e,t),m=Ho(n,e+"scale",t),y=Zo(n,e+"displacement",t),p=De(n,e+"rotation",t),_=qs(n,e+"rotate-with-view",t),E=Ko(n,e+"radius2"),S=Ko(n,e+"angle"),b=Jo(n,e+"declutter-mode"),k=new qo({points:u,radius:l,radius2:E,angle:S,declutterMode:b});return function(C){return f&&k.setFill(f(C)),g&&k.setStroke(g(C)),y&&k.setDisplacement(y(C)),p&&k.setRotation(p(C)),_&&k.setRotateWithView(_(C)),m&&k.setScale(m(C)),k}}function a0(n,t){const e="circle-",i=Ws(n,e,t),s=Xs(n,e,t),u=De(n,e+"radius",t),l=Ho(n,e+"scale",t),f=Zo(n,e+"displacement",t),g=De(n,e+"rotation",t),m=qs(n,e+"rotate-with-view",t),y=Jo(n,e+"declutter-mode"),p=new Uo({radius:5,declutterMode:y});return function(_){return u&&p.setRadius(u(_)),i&&p.setFill(i(_)),s&&p.setStroke(s(_)),f&&p.setDisplacement(f(_)),g&&p.setRotation(g(_)),m&&p.setRotateWithView(m(_)),l&&p.setScale(l(_)),p}}function De(n,t,e){if(!(t in n))return;const i=Vn(n[t],rt,e);return function(s){return Zu(i(s),t)}}function Zn(n,t,e){if(!(t in n))return null;const i=Vn(n[t],ze,e);return function(s){return hf(i(s),t)}}function u0(n,t,e){const i=Zn(n,t+"pattern-src",e),s=af(n,t+"pattern-offset",e),u=af(n,t+"pattern-size",e),l=Vu(n,t+"color",e);return function(f){return{src:i(f),offset:s&&s(f),size:u&&u(f),color:l&&l(f)}}}function qs(n,t,e){if(!(t in n))return null;const i=Vn(n[t],ee,e);return function(s){const u=i(s);if(typeof u!="boolean")throw new Error(`Expected a boolean for ${t}`);return u}}function Vu(n,t,e){if(!(t in n))return null;const i=Vn(n[t],ae|ze,e);return function(s){return cf(i(s),t)}}function of(n,t,e){if(!(t in n))return null;const i=Vn(n[t],jn,e);return function(s){return Us(i(s),t)}}function Zo(n,t,e){if(!(t in n))return null;const i=Vn(n[t],jn,e);return function(s){const u=Us(i(s),t);if(u.length!==2)throw new Error(`Expected two numbers for ${t}`);return u}}function af(n,t,e){if(!(t in n))return null;const i=Vn(n[t],jn,e);return function(s){return ff(i(s),t)}}function Ho(n,t,e){if(!(t in n))return null;const i=Vn(n[t],jn|rt,e);return function(s){return g0(i(s),t)}}function Ko(n,t){const e=n[t];if(e!==void 0){if(typeof e!="number")throw new Error(`Expected a number for ${t}`);return e}}function l0(n,t){const e=n[t];if(e!==void 0){if(typeof e=="number")return Ns(e);if(!Array.isArray(e))throw new Error(`Expected a number or size array for ${t}`);if(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")throw new Error(`Expected a number or size array for ${t}`);return e}}function h0(n,t){const e=n[t];if(e!==void 0){if(typeof e!="string")throw new Error(`Expected a string for ${t}`);return e}}function uf(n,t){const e=n[t];if(e!==void 0){if(e!=="bottom-left"&&e!=="bottom-right"&&e!=="top-left"&&e!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${t}`);return e}}function lf(n,t){const e=n[t];if(e!==void 0){if(e!=="pixels"&&e!=="fraction")throw new Error(`Expected pixels or fraction for ${t}`);return e}}function c0(n,t){const e=n[t];if(e!==void 0)return Us(e,t)}function Jo(n,t){const e=n[t];if(e!==void 0){if(typeof e!="string")throw new Error(`Expected a string for ${t}`);if(e!=="declutter"&&e!=="obstacle"&&e!=="none")throw new Error(`Expected declutter, obstacle, or none for ${t}`);return e}}function f0(n,t){const e=n[t];if(e!==void 0)return cf(e,t)}function Us(n,t){if(!Array.isArray(n))throw new Error(`Expected an array for ${t}`);const e=n.length;for(let i=0;i<e;++i)if(typeof n[i]!="number")throw new Error(`Expected an array of numbers for ${t}`);return n}function hf(n,t){if(typeof n!="string")throw new Error(`Expected a string for ${t}`);return n}function Zu(n,t){if(typeof n!="number")throw new Error(`Expected a number for ${t}`);return n}function cf(n,t){if(typeof n=="string")return n;const e=Us(n,t),i=e.length;if(i<3||i>4)throw new Error(`Expected a color with 3 or 4 values for ${t}`);return e}function ff(n,t){const e=Us(n,t);if(e.length!==2)throw new Error(`Expected an array of two numbers for ${t}`);return e}function g0(n,t){return typeof n=="number"?n:ff(n,t)}const gf={RENDER_ORDER:"renderOrder"};class d0 extends Qv{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(gf.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const i=this.getDeclutter();i in t.declutter||(t.declutter[i]=new Yc(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(gf.RENDER_ORDER,t)}setStyle(t){this.style_=m0(t),this.styleFunction_=t===null?void 0:k_(this.style_),this.changed()}}function m0(n){if(n===void 0)return b_;if(!n)return null;if(typeof n=="function"||n instanceof Ei)return n;if(!Array.isArray(n))return sf([n]);if(n.length===0)return[];const t=n.length,e=n[0];if(e instanceof Ei){const s=new Array(t);for(let u=0;u<t;++u){const l=n[u];if(!(l instanceof Ei))throw new Error("Expected a list of style instances");s[u]=l}return s}if("style"in e){const s=new Array(t);for(let u=0;u<t;++u){const l=n[u];if(!("style"in l))throw new Error("Expected a list of rules with a style property");s[u]=l}return e0(s)}return sf(n)}class y0 extends It{constructor(t,e,i,s){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=s}}function Kt(){}function p0(n,t){for(const e in t)n[e]=t[e];return n}function df(n){return n()}function mf(){return Object.create(null)}function Hn(n){n.forEach(df)}function yf(n){return typeof n=="function"}function rr(n,t){return n!=n?t==t:n!==t||n&&typeof n=="object"||typeof n=="function"}let $o;function Ie(n,t){return n===t?!0:($o||($o=document.createElement("a")),$o.href=t,n===$o.href)}function v0(n){return Object.keys(n).length===0}function _0(n,t,e,i){if(n){const s=pf(n,t,e,i);return n[0](s)}}function pf(n,t,e,i){return n[1]&&i?p0(e.ctx.slice(),n[1](i(t))):e.ctx}function E0(n,t,e,i){if(n[2]&&i){const s=n[2](i(e));if(t.dirty===void 0)return s;if(typeof s=="object"){const u=[],l=Math.max(t.dirty.length,s.length);for(let f=0;f<l;f+=1)u[f]=t.dirty[f]|s[f];return u}return t.dirty|s}return t.dirty}function x0(n,t,e,i,s,u){if(s){const l=pf(t,e,i,u);n.p(l,s)}}function S0(n){if(n.ctx.length>32){const t=[],e=n.ctx.length/32;for(let i=0;i<e;i++)t[i]=-1;return t}return-1}function vf(n){return n??""}function Nt(n,t){n.appendChild(t)}function Jt(n,t,e){n.insertBefore(t,e||null)}function Zt(n){n.parentNode&&n.parentNode.removeChild(n)}function Yt(n){return document.createElement(n)}function Kn(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function wi(n){return document.createTextNode(n)}function Ye(){return wi(" ")}function w0(){return wi("")}function Ne(n,t,e,i){return n.addEventListener(t,e,i),()=>n.removeEventListener(t,e,i)}function I0(n){return function(t){return t.preventDefault(),n.call(this,t)}}function V(n,t,e){e==null?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e)}function k0(n){return Array.from(n.childNodes)}function js(n,t){t=""+t,n.data!==t&&(n.data=t)}function _f(n,t){n.value=t??""}function Ii(n,t,e){n.classList.toggle(t,!!e)}function b0(n,t,{bubbles:e=!1,cancelable:i=!1}={}){return new CustomEvent(n,{detail:t,bubbles:e,cancelable:i})}let Vs;function Zs(n){Vs=n}function Ef(){if(!Vs)throw new Error("Function called outside component initialization");return Vs}function C0(n){Ef().$$.on_destroy.push(n)}function R0(){const n=Ef();return(t,e,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[t];if(s){const u=b0(t,e,{cancelable:i});return s.slice().forEach(l=>{l.call(n,u)}),!u.defaultPrevented}return!0}}function xf(n,t){const e=n.$$.callbacks[t.type];e&&e.slice().forEach(i=>i.call(this,t))}const Br=[],Hu=[];let zr=[];const Sf=[],L0=Promise.resolve();let Ku=!1;function N0(){Ku||(Ku=!0,L0.then(wf))}function Ju(n){zr.push(n)}const $u=new Set;let Yr=0;function wf(){if(Yr!==0)return;const n=Vs;do{try{for(;Yr<Br.length;){const t=Br[Yr];Yr++,Zs(t),T0(t.$$)}}catch(t){throw Br.length=0,Yr=0,t}for(Zs(null),Br.length=0,Yr=0;Hu.length;)Hu.pop()();for(let t=0;t<zr.length;t+=1){const e=zr[t];$u.has(e)||($u.add(e),e())}zr.length=0}while(Br.length);for(;Sf.length;)Sf.pop()();Ku=!1,$u.clear(),Zs(n)}function T0(n){if(n.fragment!==null){n.update(),Hn(n.before_update);const t=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,t),n.after_update.forEach(Ju)}}function M0(n){const t=[],e=[];zr.forEach(i=>n.indexOf(i)===-1?t.push(i):e.push(i)),e.forEach(i=>i()),zr=t}const Qo=new Set;let sr;function ta(){sr={r:0,c:[],p:sr}}function ea(){sr.r||Hn(sr.c),sr=sr.p}function ie(n,t){n&&n.i&&(Qo.delete(n),n.i(t))}function ue(n,t,e,i){if(n&&n.o){if(Qo.has(n))return;Qo.add(n),sr.c.push(()=>{Qo.delete(n),i&&(e&&n.d(1),i())}),n.o(t)}else i&&i()}function If(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function O0(n,t){ue(n,1,1,()=>{t.delete(n.key)})}function A0(n,t,e,i,s,u,l,f,g,m,y,p){let _=n.length,E=u.length,S=_;const b={};for(;S--;)b[n[S].key]=S;const k=[],C=new Map,R=new Map,M=[];for(S=E;S--;){const D=p(s,u,S),F=e(D);let A=l.get(F);A?M.push(()=>A.p(D,t)):(A=m(F,D),A.c()),C.set(F,k[S]=A),F in b&&R.set(F,Math.abs(S-b[F]))}const O=new Set,T=new Set;function G(D){ie(D,1),D.m(f,y),l.set(D.key,D),y=D.first,E--}for(;_&&E;){const D=k[E-1],F=n[_-1],A=D.key,j=F.key;D===F?(y=D.first,_--,E--):C.has(j)?!l.has(A)||O.has(A)?G(D):T.has(j)?_--:R.get(A)>R.get(j)?(T.add(A),G(D)):(O.add(j),_--):(g(F,l),_--)}for(;_--;){const D=n[_];C.has(D.key)||g(D,l)}for(;E;)G(k[E-1]);return Hn(M),k}function ki(n){n&&n.c()}function Jn(n,t,e){const{fragment:i,after_update:s}=n.$$;i&&i.m(t,e),Ju(()=>{const u=n.$$.on_mount.map(df).filter(yf);n.$$.on_destroy?n.$$.on_destroy.push(...u):Hn(u),n.$$.on_mount=[]}),s.forEach(Ju)}function $n(n,t){const e=n.$$;e.fragment!==null&&(M0(e.after_update),Hn(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function P0(n,t){n.$$.dirty[0]===-1&&(Br.push(n),N0(),n.$$.dirty.fill(0)),n.$$.dirty[t/31|0]|=1<<t%31}function or(n,t,e,i,s,u,l=null,f=[-1]){const g=Vs;Zs(n);const m=n.$$={fragment:null,ctx:[],props:u,update:Kt,not_equal:s,bound:mf(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(g?g.$$.context:[])),callbacks:mf(),dirty:f,skip_bound:!1,root:t.target||g.$$.root};l&&l(m.root);let y=!1;if(m.ctx=e?e(n,t.props||{},(p,_,...E)=>{const S=E.length?E[0]:_;return m.ctx&&s(m.ctx[p],m.ctx[p]=S)&&(!m.skip_bound&&m.bound[p]&&m.bound[p](S),y&&P0(n,p)),_}):[],m.update(),y=!0,Hn(m.before_update),m.fragment=i?i(m.ctx):!1,t.target){if(t.hydrate){const p=k0(t.target);m.fragment&&m.fragment.l(p),p.forEach(Zt)}else m.fragment&&m.fragment.c();t.intro&&ie(n.$$.fragment),Jn(n,t.target,t.anchor),wf()}Zs(g)}class ar{constructor(){Ze(this,"$$");Ze(this,"$$set")}$destroy(){$n(this,1),this.$destroy=Kt}$on(t,e){if(!yf(e))return Kt;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(e),()=>{const s=i.indexOf(e);s!==-1&&i.splice(s,1)}}$set(t){this.$$set&&!v0(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const D0="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(D0);function F0(n){let t,e;return{c(){t=Kn("svg"),e=Kn("path"),V(e,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),V(t,"viewBox","0 0 14 14"),V(t,"width","13"),V(t,"height","13"),V(t,"class","svelte-en2qvf")},m(i,s){Jt(i,t,s),Nt(t,e)},p:Kt,i:Kt,o:Kt,d(i){i&&Zt(t)}}}class kf extends ar{constructor(t){super(),or(this,t,null,F0,rr,{})}}function G0(n){let t,e;return{c(){t=Kn("svg"),e=Kn("path"),V(e,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),V(t,"viewBox","0 0 30 30"),V(t,"fill","none"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"class","svelte-d2loi5")},m(i,s){Jt(i,t,s),Nt(t,e)},p:Kt,i:Kt,o:Kt,d(i){i&&Zt(t)}}}class bf extends ar{constructor(t){super(),or(this,t,null,G0,rr,{})}}function B0(n){let t,e;return{c(){t=Yt("img"),Ie(t.src,e=n[3]+"area.svg")||V(t,"src",e),V(t,"alt",n[6]),V(t,"class","svelte-ltkwvy")},m(i,s){Jt(i,t,s)},p(i,s){s&8&&!Ie(t.src,e=i[3]+"area.svg")&&V(t,"src",e),s&64&&V(t,"alt",i[6])},d(i){i&&Zt(t)}}}function z0(n){let t,e;return{c(){t=Yt("img"),Ie(t.src,e=n[3]+"reverse.svg")||V(t,"src",e),V(t,"alt",n[6]),V(t,"class","svelte-ltkwvy")},m(i,s){Jt(i,t,s)},p(i,s){s&8&&!Ie(t.src,e=i[3]+"reverse.svg")&&V(t,"src",e),s&64&&V(t,"alt",i[6])},d(i){i&&Zt(t)}}}function Y0(n){let t,e;return{c(){t=Yt("img"),Ie(t.src,e=n[3]+"poi.svg")||V(t,"src",e),V(t,"alt",n[6]),V(t,"class","svelte-ltkwvy")},m(i,s){Jt(i,t,s)},p(i,s){s&8&&!Ie(t.src,e=i[3]+"poi.svg")&&V(t,"src",e),s&64&&V(t,"alt",i[6])},d(i){i&&Zt(t)}}}function W0(n){let t,e;return{c(){t=Yt("img"),Ie(t.src,e=n[3]+"postal_code.svg")||V(t,"src",e),V(t,"alt",n[6]),V(t,"class","svelte-ltkwvy")},m(i,s){Jt(i,t,s)},p(i,s){s&8&&!Ie(t.src,e=i[3]+"postal_code.svg")&&V(t,"src",e),s&64&&V(t,"alt",i[6])},d(i){i&&Zt(t)}}}function X0(n){let t,e;return{c(){t=Yt("img"),Ie(t.src,e=n[3]+"street.svg")||V(t,"src",e),V(t,"alt",n[6]),V(t,"class","svelte-ltkwvy")},m(i,s){Jt(i,t,s)},p(i,s){s&8&&!Ie(t.src,e=i[3]+"street.svg")&&V(t,"src",e),s&64&&V(t,"alt",i[6])},d(i){i&&Zt(t)}}}function q0(n){let t,e;return{c(){t=Yt("img"),Ie(t.src,e=n[3]+"road.svg")||V(t,"src",e),V(t,"alt",n[6]),V(t,"class","svelte-ltkwvy")},m(i,s){Jt(i,t,s)},p(i,s){s&8&&!Ie(t.src,e=i[3]+"road.svg")&&V(t,"src",e),s&64&&V(t,"alt",i[6])},d(i){i&&Zt(t)}}}function U0(n){let t,e;return{c(){t=Yt("img"),Ie(t.src,e=n[3]+"housenumber.svg")||V(t,"src",e),V(t,"alt",n[6]),V(t,"class","svelte-ltkwvy")},m(i,s){Jt(i,t,s)},p(i,s){s&8&&!Ie(t.src,e=i[3]+"housenumber.svg")&&V(t,"src",e),s&64&&V(t,"alt",i[6])},d(i){i&&Zt(t)}}}function j0(n){let t,e,i,s;return{c(){t=Yt("img"),Ie(t.src,e=n[5])||V(t,"src",e),V(t,"alt",n[4]),V(t,"class","svelte-ltkwvy")},m(u,l){Jt(u,t,l),i||(s=Ne(t,"error",n[14]),i=!0)},p(u,l){l&32&&!Ie(t.src,e=u[5])&&V(t,"src",e),l&16&&V(t,"alt",u[4])},d(u){u&&Zt(t),i=!1,s()}}}function Cf(n){let t,e;return{c(){t=Yt("span"),e=wi(n[6]),V(t,"class","secondary svelte-ltkwvy")},m(i,s){Jt(i,t,s),Nt(t,e)},p(i,s){s&64&&js(e,i[6])},d(i){i&&Zt(t)}}}function V0(n){var D,F;let t,e,i,s,u,l,f,g,m=(n[7]?n[0].place_name:n[0].place_name.replace(/,.*/,""))+"",y,p,_=n[2]==="always"||n[2]&&!n[0].address&&((D=n[0].properties)==null?void 0:D.kind)!=="road"&&((F=n[0].properties)==null?void 0:F.kind)!=="road_relation"&&!n[0].id.startsWith("address.")&&!n[0].id.startsWith("postal_code.")&&(!n[0].id.startsWith("poi.")||!n[5])&&!n[7],E,S,b=(n[7]?"":n[0].place_name.replace(/[^,]*,?\s*/,""))+"",k,C,R;function M(A,j){var et,U;return j&1&&(e=null),j&1&&(i=null),j&1&&(s=null),A[5]?j0:A[0].address?U0:((et=A[0].properties)==null?void 0:et.kind)==="road"||((U=A[0].properties)==null?void 0:U.kind)==="road_relation"?q0:(e==null&&(e=!!A[0].id.startsWith("address.")),e?X0:(i==null&&(i=!!A[0].id.startsWith("postal_code.")),i?W0:(s==null&&(s=!!A[0].id.startsWith("poi.")),s?Y0:A[7]?z0:B0)))}let O=M(n,-1),T=O(n),G=_&&Cf(n);return{c(){t=Yt("li"),T.c(),u=Ye(),l=Yt("span"),f=Yt("span"),g=Yt("span"),y=wi(m),p=Ye(),G&&G.c(),E=Ye(),S=Yt("span"),k=wi(b),V(g,"class","primary svelte-ltkwvy"),V(f,"class","svelte-ltkwvy"),V(S,"class","line2 svelte-ltkwvy"),V(l,"class","texts svelte-ltkwvy"),V(t,"tabindex","0"),V(t,"data-selected",n[1]),V(t,"class","svelte-ltkwvy"),Ii(t,"selected",n[1])},m(A,j){Jt(A,t,j),T.m(t,null),Nt(t,u),Nt(t,l),Nt(l,f),Nt(f,g),Nt(g,y),Nt(f,p),G&&G.m(f,null),Nt(l,E),Nt(l,S),Nt(S,k),C||(R=[Ne(t,"mouseenter",n[12]),Ne(t,"focus",n[13])],C=!0)},p(A,[j]){var et,U;O===(O=M(A,j))&&T?T.p(A,j):(T.d(1),T=O(A),T&&(T.c(),T.m(t,u))),j&1&&m!==(m=(A[7]?A[0].place_name:A[0].place_name.replace(/,.*/,""))+"")&&js(y,m),j&37&&(_=A[2]==="always"||A[2]&&!A[0].address&&((et=A[0].properties)==null?void 0:et.kind)!=="road"&&((U=A[0].properties)==null?void 0:U.kind)!=="road_relation"&&!A[0].id.startsWith("address.")&&!A[0].id.startsWith("postal_code.")&&(!A[0].id.startsWith("poi.")||!A[5])&&!A[7]),_?G?G.p(A,j):(G=Cf(A),G.c(),G.m(f,null)):G&&(G.d(1),G=null),j&1&&b!==(b=(A[7]?"":A[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&js(k,b),j&2&&V(t,"data-selected",A[1]),j&2&&Ii(t,"selected",A[1])},i:Kt,o:Kt,d(A){A&&Zt(t),T.d(),G&&G.d(),C=!1,Hn(R)}}}function Z0(n,t,e){var M;let i,s,{feature:u}=t,{selected:l=!1}=t,{showPlaceType:f}=t,{missingIconsCache:g}=t,{iconsBaseUrl:m}=t;const y=(M=u.properties)==null?void 0:M.categories;let p,_,E=0,S=u.place_type[0]==="reverse";function b(){_&&g.add(_),e(10,E++,E)}function k(O){xf.call(this,n,O)}function C(O){xf.call(this,n,O)}const R=()=>b();return n.$$set=O=>{"feature"in O&&e(0,u=O.feature),"selected"in O&&e(1,l=O.selected),"showPlaceType"in O&&e(2,f=O.showPlaceType),"missingIconsCache"in O&&e(9,g=O.missingIconsCache),"iconsBaseUrl"in O&&e(3,m=O.iconsBaseUrl)},n.$$.update=()=>{var O,T,G,D;if(n.$$.dirty&3640)do e(11,i--,i),e(4,p=y==null?void 0:y[i]),e(5,_=p?m+p.replace(/ /g,"_")+".svg":void 0);while(i>-1&&(!_||g.has(_)));n.$$.dirty&1&&e(6,s=u.id.startsWith("poi.")?(T=(O=u.properties)==null?void 0:O.categories)==null?void 0:T.join(", "):((D=(G=u.properties)==null?void 0:G.place_type_name)==null?void 0:D[0])??u.place_type[0])},e(11,i=(y==null?void 0:y.length)??0),[u,l,f,m,p,_,s,S,b,g,E,i,k,C,R]}class H0 extends ar{constructor(t){super(),or(this,t,Z0,V0,rr,{feature:0,selected:1,showPlaceType:2,missingIconsCache:9,iconsBaseUrl:3})}}function K0(n){let t;return{c(){t=Yt("div"),t.innerHTML='<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>',V(t,"class","svelte-7cmwmc")},m(e,i){Jt(e,t,i)},p:Kt,i:Kt,o:Kt,d(e){e&&Zt(t)}}}class J0 extends ar{constructor(t){super(),or(this,t,null,K0,rr,{})}}function $0(n){let t,e;return{c(){t=Kn("svg"),e=Kn("path"),V(e,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),V(t,"viewBox","0 0 60.006 21.412"),V(t,"width","14"),V(t,"height","20"),V(t,"class","svelte-en2qvf")},m(i,s){Jt(i,t,s),Nt(t,e)},p:Kt,i:Kt,o:Kt,d(i){i&&Zt(t)}}}class Q0 extends ar{constructor(t){super(),or(this,t,null,$0,rr,{})}}function t1(n){let t,e,i;return{c(){t=Kn("svg"),e=Kn("circle"),i=Kn("path"),V(e,"cx","4.789"),V(e,"cy","4.787"),V(e,"r","3.85"),V(e,"class","svelte-1aq105l"),V(i,"d","M12.063 12.063 7.635 7.635"),V(i,"class","svelte-1aq105l"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width","13"),V(t,"height","13"),V(t,"viewBox","0 0 13 13"),V(t,"class","svelte-1aq105l")},m(s,u){Jt(s,t,u),Nt(t,e),Nt(t,i)},p:Kt,i:Kt,o:Kt,d(s){s&&Zt(t)}}}class e1 extends ar{constructor(t){super(),or(this,t,null,t1,rr,{})}}function n1(n,t,e){const i=t[1],s=t[0],u=i-s;return n===i&&e?n:((n-s)%u+u)%u+s}function Rf(n){const t=[...n];return t[2]<t[0]&&(t[2]+=360),t}let Hs;async function i1(n,t,e){const i=n==null?void 0:n.getCenterAndZoom();for(const s of t??[])if(!(i&&(s.minZoom!=null&&s.minZoom>i[0]||s.maxZoom!=null&&s.maxZoom<i[0]))){if(s.type==="fixed")return s.coordinates.join(",");t:if(s.type==="client-geolocation"){if(Hs&&s.cachedLocationExpiry&&Hs.time+s.cachedLocationExpiry>Date.now()){if(!Hs.coords)break t;return Hs.coords}let u;try{return u=await new Promise((l,f)=>{e.signal.addEventListener("abort",()=>{f(Error("aborted"))}),navigator.geolocation.getCurrentPosition(g=>{l([g.coords.longitude,g.coords.latitude].map(m=>m.toFixed(6)).join(","))},g=>{f(g)},s)}),u}catch{}finally{s.cachedLocationExpiry&&(Hs={time:Date.now(),coords:u})}if(e.signal.aborted)return}if(s.type==="server-geolocation")return"ip";if(i&&s.type==="map-center")return i[1].toFixed(6)+","+i[2].toFixed(6)}}const Lf=/([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})/,Nf=/(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?/i,Tf=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?/i,Mf=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?/i,Of=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?/i;function r1(n){if(!["DMS","DM","DD"].includes(n))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){if(n=="DD")return this.decimalCoordinates;const t=this.decimalCoordinates.split(",").map(l=>Number(l.trim()));let e=Af(t[0],n),i=Af(t[1],n);e.endsWith('.0"')&&i.endsWith('.0"')&&(e=e.replace(/\.0"$/,'"'),i=i.replace(/\.0"$/,'"'));const s=t[0]>=0?" N":" S",u=t[1]>=0?" E":" W";return`${e+s}, ${i+u}`}else throw new Error("no decimal coordinates to convert")}function Af(n,t){const e=Math.abs(n),i=Math.floor(e),s=(e-i)*60;if(t=="DM"){let f=s1(s,3).toFixed(3).padStart(6,"0");return`${i}° ${f}'`}let u=Math.floor(s),l=((s-u)*60).toFixed(1).padStart(4,"0");return u=u.toString().padStart(2,"0"),`${i}° ${u}' ${l}"`}function s1(n,t){const e=Math.pow(10,t);return Math.round((n+Number.EPSILON)*e)/e}function Qu(n,t){t||(t=5),n=n.replace(/\s+/g," ").trim();let e=null,i=null,s="",u="",l=[],f=!1;if(Lf.test(n))if(l=Lf.exec(n),f=Ks(l),f)e=Math.abs(l[1])+l[2]/60,Number(l[1])<0&&(e*=-1),i=Math.abs(l[3])+l[4]/60,Number(l[3])<0&&(i*=-1);else throw new Error("invalid coordinate format");else if(Nf.test(n))if(l=Nf.exec(n),f=Ks(l),f){if(e=l[2],i=l[6],e.includes(",")&&(e=e.replace(",",".")),i.includes(",")&&(i=i.replace(",",".")),Number(Math.round(e))==Number(e))throw new Error("integer only coordinate provided");if(Number(Math.round(i))==Number(i))throw new Error("integer only coordinate provided");l[1]?(s=l[1],u=l[5]):l[4]&&(s=l[4],u=l[8])}else throw new Error("invalid decimal coordinate format");else if(Tf.test(n))if(l=Tf.exec(n),f=Ks(l),f)e=Math.abs(parseInt(l[2])),l[4]&&(e+=l[4]/60),l[6]&&(e+=l[6].replace(",",".")/3600),parseInt(l[2])<0&&(e=-1*e),i=Math.abs(parseInt(l[9])),l[11]&&(i+=l[11]/60),l[13]&&(i+=l[13].replace(",",".")/3600),parseInt(l[9])<0&&(i=-1*i),l[1]?(s=l[1],u=l[8]):l[7]&&(s=l[7],u=l[14]);else throw new Error("invalid DMS coordinates format");else if(Mf.test(n))if(l=Mf.exec(n),f=Ks(l),f)e=Math.abs(parseInt(l[2])),l[4]&&(e+=l[4]/60),l[6]&&(e+=l[6]/3600),parseInt(l[2])<0&&(e=-1*e),i=Math.abs(parseInt(l[10])),l[12]&&(i+=l[12]/60),l[14]&&(i+=l[14]/3600),parseInt(l[10])<0&&(i=-1*i),l[1]?(s=l[1],u=l[9]):l[8]&&(s=l[8],u=l[16]);else throw new Error("invalid DMS coordinates format");else if(Of.test(n))if(l=Of.exec(n),f=Ks(l),f)e=Math.abs(parseInt(l[2])),l[4]&&(e+=l[4].replace(",",".")/60),l[6]&&(e+=l[6].replace(",",".")/3600),parseInt(l[2])<0&&(e=-1*e),i=Math.abs(parseInt(l[10])),l[12]&&(i+=l[12].replace(",",".")/60),l[14]&&(i+=l[14].replace(",",".")/3600),parseInt(l[10])<0&&(i=-1*i),l[1]?(s=l[1],u=l[9]):l[8]&&(s=l[8],u=l[16]);else throw new Error("invalid coordinates format");if(f){if(Math.abs(i)>=180)throw new Error("invalid longitude value");if(Math.abs(e)>=90)throw new Error("invalid latitude value");if((s||u)&&(!s||!u))throw new Error("invalid coordinates format");if(s&&s==u)throw new Error("invalid coordinates format");let g=/S|SOUTH/i;g.test(s)&&e>0&&(e=-1*e),g=/W|WEST/i,g.test(u)&&i>0&&(i=-1*i);const m=l[0].trim();let y,p;const _=/[,/;\u0020]/g,E=m.match(_);if(E==null){const k=Math.floor(n.length/2);y=m.substring(0,k).trim(),p=m.substring(k).trim()}else{let k;E.length%2==1?k=Math.floor(E.length/2):k=E.length/2-1;let C=0;if(k==0)C=m.indexOf(E[0]),y=m.substring(0,C).trim(),p=m.substring(C+1).trim();else{let R=0,M=0;for(;R<=k;)C=m.indexOf(E[R],M),M=C+1,R++;y=m.substring(0,C).trim(),p=m.substring(C+1).trim()}}const S=y.split(".");if(S.length==2&&S[1]==0&&S[1].length!=2)throw new Error("invalid coordinates format");const b=p.split(".");if(b.length==2&&b[1]==0&&b[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(y)||/^\d+$/.test(p))throw new Error("degree only coordinate/s provided");return isNaN(e)&&e.includes(",")&&(e=e.replace(",",".")),e=Number(Number(e).toFixed(t)),isNaN(i)&&i.includes(",")&&(i=i.replace(",",".")),i=Number(Number(i).toFixed(t)),Object.freeze({verbatimCoordinates:m,verbatimLatitude:y,verbatimLongitude:p,decimalLatitude:e,decimalLongitude:i,decimalCoordinates:`${e},${i}`,closeEnough:o1,toCoordinateFormat:r1})}else throw new Error("coordinates pattern match failed")}function Ks(n){if(!isNaN(n[0]))return!1;const t=[...n];if(t.shift(),t.length%2>0)return!1;const e=/^[-+]?\d+([\.,]\d+)?$/,i=/[eastsouthnorthwest]+/i,s=t.length/2;for(let u=0;u<s;u++){const l=t[u],f=t[u+s],g=e.test(l)&&e.test(f),m=i.test(l)&&i.test(f),y=l==f;if(!(l==null&&f==null)){if(l==null||f==null)return!1;if(g||m||y)continue;return!1}}return!0}function Pf(n,t){const e=Math.abs(n-t);return Number(e.toFixed(6))<=1e-5}function o1(n){if(n.includes(",")){const t=n.split(",");if(Number(t[0])==NaN||Number(t[1])==NaN)throw new Error("coords are not valid decimals");return Pf(this.decimalLatitude,Number(t[0]))&&Pf(this.decimalLongitude,t[1])}else throw new Error("coords being tested must be separated by a comma")}const a1=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Qu.to=a1;const u1=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],l1={decimalLatitude:40.123,decimalLongitude:-74.123},h1=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],c1=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"53 16.3863,4 52.8171",verbatimLatitude:"53 16.3863",verbatimLongitude:"4 52.8171",decimalLatitude:53.273105,decimalLongitude:4.88029},{verbatimCoordinates:"50 8.2914,-5 2.4447",verbatimLatitude:"50 8.2914",verbatimLongitude:"-5 2.4447",decimalLatitude:50.13819,decimalLongitude:-5.040745},{verbatimCoordinates:"N 48° 30,6410', E 18° 57,4583'",verbatimLatitude:"N 48° 30,6410'",verbatimLongitude:"E 18° 57,4583'",decimalLatitude:48.51068,decimalLongitude:18.95764}];function f1(){const n=[];return u1.forEach(t=>{t.decimalLatitude?n.push(t):n.push({...t,...l1})}),[...n,...h1,...c1]}const g1=f1();Qu.formats=g1.map(n=>n.verbatimCoordinates);const d1=Qu;function Df(n,t,e){const i=n.slice();return i[81]=t[e],i[83]=e,i}function Ff(n){let t,e;return t=new J0({}),{c(){ki(t.$$.fragment)},m(i,s){Jn(t,i,s),e=!0},i(i){e||(ie(t.$$.fragment,i),e=!0)},o(i){ue(t.$$.fragment,i),e=!1},d(i){$n(t,i)}}}function Gf(n){let t,e,i,s,u;return e=new Q0({}),{c(){t=Yt("button"),ki(e.$$.fragment),V(t,"type","button"),V(t,"title",n[9]),V(t,"class","svelte-zh3kmv"),Ii(t,"active",n[0])},m(l,f){Jt(l,t,f),Jn(e,t,null),i=!0,s||(u=Ne(t,"click",n[67]),s=!0)},p(l,f){(!i||f[0]&512)&&V(t,"title",l[9]),(!i||f[0]&1)&&Ii(t,"active",l[0])},i(l){i||(ie(e.$$.fragment,l),i=!0)},o(l){ue(e.$$.fragment,l),i=!1},d(l){l&&Zt(t),$n(e),s=!1,u()}}}function m1(n){let t,e=[],i=new Map,s,u,l,f=If(n[14]);const g=m=>m[81].id+(m[81].address?","+m[81].address:"");for(let m=0;m<f.length;m+=1){let y=Df(n,f,m),p=g(y);i.set(p,e[m]=Bf(p,y))}return{c(){t=Yt("ul");for(let m=0;m<e.length;m+=1)e[m].c();V(t,"class","svelte-zh3kmv")},m(m,y){Jt(m,t,y);for(let p=0;p<e.length;p+=1)e[p]&&e[p].m(t,null);s=!0,u||(l=[Ne(t,"mouseleave",n[71]),Ne(t,"blur",n[72])],u=!0)},p(m,y){y[0]&17880064&&(f=If(m[14]),ta(),e=A0(e,y,g,1,m,f,i,t,O0,Bf,null,Df),ea())},i(m){if(!s){for(let y=0;y<f.length;y+=1)ie(e[y]);s=!0}},o(m){for(let y=0;y<e.length;y+=1)ue(e[y]);s=!1},d(m){m&&Zt(t);for(let y=0;y<e.length;y+=1)e[y].d();u=!1,Hn(l)}}}function y1(n){let t,e,i,s,u,l;return e=new bf({}),{c(){t=Yt("div"),ki(e.$$.fragment),i=Ye(),s=Yt("div"),u=wi(n[7]),V(s,"class","svelte-zh3kmv"),V(t,"class","no-results svelte-zh3kmv")},m(f,g){Jt(f,t,g),Jn(e,t,null),Nt(t,i),Nt(t,s),Nt(s,u),l=!0},p(f,g){(!l||g[0]&128)&&js(u,f[7])},i(f){l||(ie(e.$$.fragment,f),l=!0)},o(f){ue(e.$$.fragment,f),l=!1},d(f){f&&Zt(t),$n(e)}}}function p1(n){let t="",e;return{c(){e=wi(t)},m(i,s){Jt(i,e,s)},p:Kt,i:Kt,o:Kt,d(i){i&&Zt(e)}}}function v1(n){let t,e,i,s,u,l,f,g,m,y,p;return e=new bf({}),g=new kf({}),{c(){t=Yt("div"),ki(e.$$.fragment),i=Ye(),s=Yt("div"),u=wi(n[6]),l=Ye(),f=Yt("button"),ki(g.$$.fragment),V(s,"class","svelte-zh3kmv"),V(f,"class","svelte-zh3kmv"),V(t,"class","error svelte-zh3kmv")},m(_,E){Jt(_,t,E),Jn(e,t,null),Nt(t,i),Nt(t,s),Nt(s,u),Nt(t,l),Nt(t,f),Jn(g,f,null),m=!0,y||(p=Ne(f,"click",n[68]),y=!0)},p(_,E){(!m||E[0]&64)&&js(u,_[6])},i(_){m||(ie(e.$$.fragment,_),ie(g.$$.fragment,_),m=!0)},o(_){ue(e.$$.fragment,_),ue(g.$$.fragment,_),m=!1},d(_){_&&Zt(t),$n(e),$n(g),y=!1,p()}}}function Bf(n,t){let e,i,s;function u(){return t[69](t[83])}function l(){return t[70](t[81])}return i=new H0({props:{feature:t[81],showPlaceType:t[10],selected:t[15]===t[83],missingIconsCache:t[20],iconsBaseUrl:t[12]}}),i.$on("mouseenter",u),i.$on("focus",l),{key:n,first:null,c(){e=w0(),ki(i.$$.fragment),this.first=e},m(f,g){Jt(f,e,g),Jn(i,f,g),s=!0},p(f,g){t=f;const m={};g[0]&16384&&(m.feature=t[81]),g[0]&1024&&(m.showPlaceType=t[10]),g[0]&49152&&(m.selected=t[15]===t[83]),g[0]&4096&&(m.iconsBaseUrl=t[12]),i.$set(m)},i(f){s||(ie(i.$$.fragment,f),s=!0)},o(f){ue(i.$$.fragment,f),s=!1},d(f){f&&Zt(e),$n(i,f)}}}function _1(n){let t,e,i,s,u,l,f,g,m,y,p,_,E,S,b,k,C,R,M,O,T,G=!1;u=new e1({}),p=new kf({});let D=n[19]&&Ff(),F=n[5]===!0&&Gf(n);const A=n[59].default,j=_0(A,n,n[58],null),et=[v1,p1,y1,m1],U=[];function nt(z,K){var Z,at;return z[18]?0:z[16]?((Z=z[14])==null?void 0:Z.length)===0?2:z[16]&&((at=z[14])!=null&&at.length)?3:-1:1}return~(k=nt(n))&&(C=U[k]=et[k](n)),{c(){t=Ye(),e=Yt("form"),i=Yt("div"),s=Yt("button"),ki(u.$$.fragment),l=Ye(),f=Yt("input"),g=Ye(),m=Yt("div"),y=Yt("button"),ki(p.$$.fragment),_=Ye(),D&&D.c(),E=Ye(),F&&F.c(),S=Ye(),j&&j.c(),b=Ye(),C&&C.c(),V(s,"class","search-button svelte-zh3kmv"),V(s,"type","button"),V(f,"placeholder",n[8]),V(f,"aria-label",n[8]),V(f,"class","svelte-zh3kmv"),V(y,"type","button"),V(y,"title",n[3]),V(y,"class","svelte-zh3kmv"),V(m,"class","clear-button-container svelte-zh3kmv"),Ii(m,"displayable",n[1]!==""),V(i,"class","input-group svelte-zh3kmv"),V(e,"tabindex","0"),V(e,"class",R=vf(n[2])+" svelte-zh3kmv"),Ii(e,"can-collapse",n[4]&&n[1]==="")},m(z,K){Jt(z,t,K),Jt(z,e,K),Nt(e,i),Nt(i,s),Jn(u,s,null),Nt(i,l),Nt(i,f),n[61](f),_f(f,n[1]),Nt(i,g),Nt(i,m),Nt(m,y),Jn(p,y,null),Nt(m,_),D&&D.m(m,null),Nt(i,E),F&&F.m(i,null),Nt(i,S),j&&j.m(i,null),Nt(e,b),~k&&U[k].m(e,null),M=!0,O||(T=[Ne(s,"click",n[60]),Ne(f,"input",n[62]),Ne(f,"focus",n[63]),Ne(f,"blur",n[64]),Ne(f,"keydown",n[22]),Ne(f,"input",n[65]),Ne(y,"click",n[66]),Ne(e,"submit",I0(n[21]))],O=!0)},p(z,K){(!M||K[0]&256)&&V(f,"placeholder",z[8]),(!M||K[0]&256)&&V(f,"aria-label",z[8]),K[0]&2&&f.value!==z[1]&&_f(f,z[1]),(!M||K[0]&8)&&V(y,"title",z[3]),z[19]?D?K[0]&524288&&ie(D,1):(D=Ff(),D.c(),ie(D,1),D.m(m,null)):D&&(ta(),ue(D,1,1,()=>{D=null}),ea()),(!M||K[0]&2)&&Ii(m,"displayable",z[1]!==""),z[5]===!0?F?(F.p(z,K),K[0]&32&&ie(F,1)):(F=Gf(z),F.c(),ie(F,1),F.m(i,S)):F&&(ta(),ue(F,1,1,()=>{F=null}),ea()),j&&j.p&&(!M||K[1]&134217728)&&x0(j,A,z,z[58],M?E0(A,z[58],K,null):S0(z[58]),null);let Z=k;k=nt(z),k===Z?~k&&U[k].p(z,K):(C&&(ta(),ue(U[Z],1,1,()=>{U[Z]=null}),ea()),~k?(C=U[k],C?C.p(z,K):(C=U[k]=et[k](z),C.c()),ie(C,1),C.m(e,null)):C=null),(!M||K[0]&4&&R!==(R=vf(z[2])+" svelte-zh3kmv"))&&V(e,"class",R),(!M||K[0]&22)&&Ii(e,"can-collapse",z[4]&&z[1]==="")},i(z){M||(ie(G),ie(u.$$.fragment,z),ie(p.$$.fragment,z),ie(D),ie(F),ie(j,z),ie(C),M=!0)},o(z){ue(G),ue(u.$$.fragment,z),ue(p.$$.fragment,z),ue(D),ue(F),ue(j,z),ue(C),M=!1},d(z){z&&(Zt(t),Zt(e)),$n(u),n[61](null),$n(p),D&&D.d(),F&&F.d(),j&&j.d(z),~k&&U[k].d(),O=!1,Hn(T)}}}function E1(n,t,e){let i,{$$slots:s={},$$scope:u}=t,{class:l=void 0}=t,{apiKey:f}=t,{bbox:g=void 0}=t,{clearButtonTitle:m="clear"}=t,{clearOnBlur:y=!1}=t,{collapsed:p=!1}=t,{country:_=void 0}=t,{debounceSearch:E=200}=t,{enableReverse:S=!1}=t,{errorMessage:b="Something went wrong…"}=t,{filter:k=()=>!0}=t,{flyTo:C=!0}=t,{fuzzyMatch:R=!0}=t,{language:M=void 0}=t,{limit:O=void 0}=t,{mapController:T=void 0}=t,{minLength:G=2}=t,{noResultsMessage:D="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=t,{placeholder:F="Search"}=t,{proximity:A=[{type:"server-geolocation"}]}=t,{reverseActive:j=S==="always"}=t,{reverseButtonTitle:et="toggle reverse geocoding"}=t,{searchValue:U=""}=t,{showFullGeometry:nt=!0}=t,{showPlaceType:z="ifNeeded"}=t,{showResultsWhileTyping:K=!0}=t,{selectFirst:Z=!0}=t,{flyToSelected:at=!1}=t,{markerOnSelected:gt=!0}=t,{types:St=void 0}=t,{excludeTypes:Q=!1}=t,{zoom:_t=16}=t,{maxZoom:Et=18}=t,{apiUrl:qt="https://api.maptiler.com/geocoding"}=t,{fetchParameters:X={}}=t,{iconsBaseUrl:Ce="https://cdn.maptiler.com/maptiler-geocoding-control/v1.3.0-rc3/icons/"}=t,{adjustUrlQuery:si=()=>{}}=t;function zi(){ce.focus()}function B(){ce.blur()}function us(Y,Rt=!0,Ot=!1){e(1,U=Y),Rt?(e(15,Wt=-1),Dn()):(_e(!Ot,Ot),setTimeout(()=>{ce.focus(),ce.select()}))}function Dt(){e(14,mt=void 0),e(55,dt=void 0),e(15,Wt=-1)}function it(){e(54,Ut=[]),e(55,dt=void 0)}let L=!1,mt,Ut,dt,_n="",ce,Wt=-1,H,oi=[],We,fe,Yi,ht;const Xe=new Set,ve=R0();C0(()=>{T&&(T.setEventHandler(void 0),T.indicateReverse(!1),T.setSelectedMarker(-1),T.setMarkers(void 0,void 0))});function Dn(Y){if(fe&&(clearTimeout(fe),fe=void 0),Wt>-1&&mt)e(55,dt=mt[Wt]),e(1,U=dt.place_type[0]==="reverse"?dt.place_name:dt.place_name.replace(/,.*/,"")),e(18,H=void 0),e(54,Ut=void 0),e(15,Wt=-1);else if(U){const Rt=Y||!st(U);rn(U,{exact:!0}).then(()=>{e(54,Ut=mt),e(55,dt=void 0),Rt&&kt()}).catch(Ot=>e(18,H=Ot))}}function st(Y){try{return d1(Y,6)}catch{return!1}}async function rn(Y,{byId:Rt=!1,exact:Ot=!1}={}){e(18,H=void 0),We==null||We.abort();const Vt=new AbortController;e(19,We=Vt);try{const yt=st(Y),bt=new URLSearchParams;if(M!==void 0&&bt.set("language",Array.isArray(M)?M.join(","):M??""),St&&bt.set("types",St.join(",")),Q&&bt.set("excludeTypes",String(Q)),g&&bt.set("bbox",g.map(gs=>gs.toFixed(6)).join(",")),_&&bt.set("country",Array.isArray(_)?_.join(","):_),!Rt&&!yt){const gs=await i1(T,A,Vt);gs&&bt.set("proximity",gs),(Ot||!K)&&bt.set("autocomplete","false"),bt.set("fuzzyMatch",String(R))}O!==void 0&&(!yt||(St==null?void 0:St.length)===1)&&bt.set("limit",String(O)),bt.set("key",f),si(bt);const Xt=qt+"/"+encodeURIComponent(yt?yt.decimalLongitude+","+yt.decimalLatitude:Y)+".json?"+bt.toString();if(Xt===_n){Rt?(e(14,mt=void 0),e(55,dt=oi[0])):e(14,mt=oi);return}_n=Xt;const Re=await fetch(Xt,{signal:Vt.signal,...X});if(!Re.ok)throw new Error(await Re.text());const Gn=await Re.json();ve("response",{url:Xt,featureCollection:Gn}),Rt?(e(14,mt=void 0),e(55,dt=Gn.features[0]),oi=[dt]):(e(14,mt=Gn.features.filter(k)),yt&&mt.unshift({type:"Feature",properties:{},id:"reverse_"+yt.decimalLongitude+"_"+yt.decimalLatitude,text:yt.decimalLatitude+", "+yt.decimalLongitude,place_name:yt.decimalLatitude+", "+yt.decimalLongitude,place_type:["reverse"],center:[yt.decimalLongitude,yt.decimalLatitude],bbox:[yt.decimalLongitude,yt.decimalLatitude,yt.decimalLongitude,yt.decimalLatitude],geometry:{type:"Point",coordinates:[yt.decimalLongitude,yt.decimalLatitude]}}),oi=mt,yt&&ce.focus())}catch(yt){if(yt&&typeof yt=="object"&&"name"in yt&&yt.name==="AbortError")return;throw yt}finally{Vt===We&&e(19,We=void 0)}}function kt(){var Ot;if(!(Ut!=null&&Ut.length)||!C)return;const Y=[180,90,-180,-90],Rt=!Ut.some(Vt=>!Vt.matching_text);for(const Vt of Ut)if(Rt||!Vt.matching_text)for(const yt of[0,1,2,3])Y[yt]=Math[yt<2?"min":"max"](Y[yt],((Ot=Vt.bbox)==null?void 0:Ot[yt])??Vt.center[yt%2]);T&&Ut.length>0&&(dt&&Y[0]===Y[2]&&Y[1]===Y[3]?T.flyTo(dt.center,_t):T.fitBounds(Rf(Y),50,Et))}function ct(Y){e(0,j=S==="always"),e(14,mt=void 0),e(55,dt=void 0),e(15,Wt=-1),us(Y[1].toFixed(6)+", "+n1(Y[0],[-180,180],!0).toFixed(6),!1,!0)}function ls(Y){if(!mt)return;let Rt=Y.key==="ArrowDown"?1:Y.key==="ArrowUp"?-1:0;Rt&&(Wt===(Z?0:-1)&&Rt===-1&&e(15,Wt=mt.length),e(15,Wt+=Rt),Wt>=mt.length&&e(15,Wt=-1),Wt<0&&Z&&e(15,Wt=0),Y.preventDefault())}function _e(Y=!0,Rt=!1){if(e(18,H=void 0),K||Rt){if(fe&&clearTimeout(fe),U.length<G)return;const Ot=U;fe=window.setTimeout(()=>{rn(Ot).catch(Vt=>e(18,H=Vt))},Y?E:0)}else e(14,mt=void 0),e(18,H=void 0)}function yr(Y){e(55,dt=Y),e(1,U=Y.place_name),e(15,Wt=-1)}const lt=()=>ce.focus();function hs(Y){Hu[Y?"unshift":"push"](()=>{ce=Y,e(17,ce)})}function cs(){U=this.value,e(1,U),e(13,L),e(27,y)}const ai=()=>e(13,L=!0),Ee=()=>e(13,L=!1),En=()=>_e(),ge=()=>{e(1,U=""),ce.focus()},Fn=()=>e(0,j=!j),sn=()=>e(18,H=void 0),fs=Y=>e(15,Wt=Y),pr=Y=>yr(Y),ne=()=>{Z||e(15,Wt=-1)},$=()=>{};return n.$$set=Y=>{"class"in Y&&e(2,l=Y.class),"apiKey"in Y&&e(25,f=Y.apiKey),"bbox"in Y&&e(26,g=Y.bbox),"clearButtonTitle"in Y&&e(3,m=Y.clearButtonTitle),"clearOnBlur"in Y&&e(27,y=Y.clearOnBlur),"collapsed"in Y&&e(4,p=Y.collapsed),"country"in Y&&e(28,_=Y.country),"debounceSearch"in Y&&e(29,E=Y.debounceSearch),"enableReverse"in Y&&e(5,S=Y.enableReverse),"errorMessage"in Y&&e(6,b=Y.errorMessage),"filter"in Y&&e(30,k=Y.filter),"flyTo"in Y&&e(31,C=Y.flyTo),"fuzzyMatch"in Y&&e(32,R=Y.fuzzyMatch),"language"in Y&&e(33,M=Y.language),"limit"in Y&&e(34,O=Y.limit),"mapController"in Y&&e(35,T=Y.mapController),"minLength"in Y&&e(36,G=Y.minLength),"noResultsMessage"in Y&&e(7,D=Y.noResultsMessage),"placeholder"in Y&&e(8,F=Y.placeholder),"proximity"in Y&&e(37,A=Y.proximity),"reverseActive"in Y&&e(0,j=Y.reverseActive),"reverseButtonTitle"in Y&&e(9,et=Y.reverseButtonTitle),"searchValue"in Y&&e(1,U=Y.searchValue),"showFullGeometry"in Y&&e(38,nt=Y.showFullGeometry),"showPlaceType"in Y&&e(10,z=Y.showPlaceType),"showResultsWhileTyping"in Y&&e(39,K=Y.showResultsWhileTyping),"selectFirst"in Y&&e(11,Z=Y.selectFirst),"flyToSelected"in Y&&e(40,at=Y.flyToSelected),"markerOnSelected"in Y&&e(41,gt=Y.markerOnSelected),"types"in Y&&e(42,St=Y.types),"excludeTypes"in Y&&e(43,Q=Y.excludeTypes),"zoom"in Y&&e(44,_t=Y.zoom),"maxZoom"in Y&&e(45,Et=Y.maxZoom),"apiUrl"in Y&&e(46,qt=Y.apiUrl),"fetchParameters"in Y&&e(47,X=Y.fetchParameters),"iconsBaseUrl"in Y&&e(12,Ce=Y.iconsBaseUrl),"adjustUrlQuery"in Y&&e(48,si=Y.adjustUrlQuery),"$$scope"in Y&&e(58,u=Y.$$scope)},n.$$.update=()=>{if(n.$$.dirty[0]&32&&e(0,j=S==="always"),n.$$.dirty[0]&134225920&&setTimeout(()=>{e(16,Yi=L),y&&!L&&e(1,U="")}),n.$$.dirty[0]&16386|n.$$.dirty[1]&32&&U.length<G&&(e(55,dt=void 0),e(14,mt=void 0),e(18,H=void 0),e(54,Ut=mt)),n.$$.dirty[1]&16777344&&nt&&dt&&!dt.address&&dt.geometry.type==="Point"&&dt.place_type[0]!=="reverse"&&rn(dt.id,{byId:!0}).catch(Y=>e(18,H=Y)),n.$$.dirty[1]&50356241&&(T&&dt&&dt.id!==ht&&C&&(!dt.bbox||dt.bbox[0]===dt.bbox[2]&&dt.bbox[1]===dt.bbox[3]?T.flyTo(dt.center,dt.id.startsWith("poi.")||dt.id.startsWith("address.")?Et:_t):T.fitBounds(Rf(dt.bbox),50,Et),e(14,mt=void 0),e(54,Ut=void 0),e(15,Wt=-1)),e(56,ht=dt==null?void 0:dt.id)),n.$$.dirty[0]&18432&&Z&&mt!=null&&mt.length&&e(15,Wt=0),n.$$.dirty[0]&2050&&(Z||e(15,Wt=-1)),n.$$.dirty[0]&16384|n.$$.dirty[1]&8388608&&Ut!==mt&&e(54,Ut=void 0),n.$$.dirty[0]&81921|n.$$.dirty[1]&8388624&&T&&T.setEventHandler(Y=>{switch(Y.type){case"mapClick":j&&ct(Y.coordinates);break;case"markerClick":{const Rt=mt==null?void 0:mt.find(Ot=>Ot.id===Y.id);Rt&&yr(Rt)}break;case"markerMouseEnter":Ut&&e(15,Wt=Yi?(mt==null?void 0:mt.findIndex(Rt=>Rt.id===Y.id))??-1:-1);break;case"markerMouseLeave":Ut&&e(15,Wt=-1);break}}),n.$$.dirty[0]&49152&&e(57,i=mt==null?void 0:mt[Wt]),n.$$.dirty[1]&67133969&&T&&i&&C&&at&&T.flyTo(i.center,i.id.startsWith("poi.")||i.id.startsWith("address.")?Et:_t),n.$$.dirty[1]&1040&&(gt||T==null||T.setMarkers(void 0,void 0)),n.$$.dirty[1]&75498512&&T&>&&!Ut&&(T.setMarkers(i?[i]:void 0,void 0),T.setSelectedMarker(i?0:-1)),n.$$.dirty[1]&25165840&&T&&T.setMarkers(Ut,dt),n.$$.dirty[0]&32768|n.$$.dirty[1]&8388624&&Ut&&T&&T.setSelectedMarker(Wt),n.$$.dirty[0]&2|n.$$.dirty[1]&16&&T){const Y=st(U);T.setReverseMarker(Y?[Y.decimalLongitude,Y.decimalLatitude]:void 0)}n.$$.dirty[1]&67108864&&ve("select",i),n.$$.dirty[1]&16777216&&ve("pick",dt),n.$$.dirty[0]&81920&&ve("optionsVisibilityChange",Yi&&!!mt),n.$$.dirty[0]&16384&&ve("featuresListed",mt),n.$$.dirty[1]&8388608&&ve("featuresMarked",Ut),n.$$.dirty[0]&1&&ve("reverseToggle",j),n.$$.dirty[0]&2&&ve("queryChange",U),n.$$.dirty[0]&1|n.$$.dirty[1]&16&&T&&T.indicateReverse(j)},[j,U,l,m,p,S,b,D,F,et,z,Z,Ce,L,mt,Wt,Yi,ce,H,We,Xe,Dn,ls,_e,yr,f,g,y,_,E,k,C,R,M,O,T,G,A,nt,K,at,gt,St,Q,_t,Et,qt,X,si,zi,B,us,Dt,it,Ut,dt,ht,i,u,s,lt,hs,cs,ai,Ee,En,ge,Fn,sn,fs,pr,ne,$]}let x1=class extends ar{constructor(t){super(),or(this,t,E1,_1,rr,{class:2,apiKey:25,bbox:26,clearButtonTitle:3,clearOnBlur:27,collapsed:4,country:28,debounceSearch:29,enableReverse:5,errorMessage:6,filter:30,flyTo:31,fuzzyMatch:32,language:33,limit:34,mapController:35,minLength:36,noResultsMessage:7,placeholder:8,proximity:37,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:38,showPlaceType:10,showResultsWhileTyping:39,selectFirst:11,flyToSelected:40,markerOnSelected:41,types:42,excludeTypes:43,zoom:44,maxZoom:45,apiUrl:46,fetchParameters:47,iconsBaseUrl:12,adjustUrlQuery:48,focus:49,blur:50,setQuery:51,clearList:52,clearMap:53},null,[-1,-1,-1])}get focus(){return this.$$.ctx[49]}get blur(){return this.$$.ctx[50]}get setQuery(){return this.$$.ctx[51]}get clearList(){return this.$$.ctx[52]}get clearMap(){return this.$$.ctx[53]}};class dn extends ci{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new dn(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(bn(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=hn(t,He.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?S1(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function S1(n){if(typeof n=="function")return n;let t;return Array.isArray(n)?t=n:(me(typeof n.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),t=[n]),function(){return t}}function na(n,t,e,i,s,u,l){let f,g;const m=(e-t)/i;if(m===1)f=t;else if(m===2)f=t,g=s;else if(m!==0){let y=n[t],p=n[t+1],_=0;const E=[0];for(let k=t+i;k<e;k+=i){const C=n[k],R=n[k+1];_+=Math.sqrt((C-y)*(C-y)+(R-p)*(R-p)),E.push(_),y=C,p=R}const S=s*_,b=Sp(E,S);b<0?(g=(S-E[-b-2])/(E[-b-1]-E[-b-2]),f=t+(-b-2)*i):f=t+b*i}l=l>1?l:2,u=u||new Array(l);for(let y=0;y<l;++y)u[y]=f===void 0?NaN:g===void 0?n[f+y]:Be(n[f+y],n[f+i+y],g);return u}function tl(n,t,e,i,s,u){if(e==t)return null;let l;if(s<n[t+i-1])return u?(l=n.slice(t,t+i),l[i-1]=s,l):null;if(n[e-1]<s)return u?(l=n.slice(e-i,e),l[i-1]=s,l):null;if(s==n[t+i-1])return n.slice(t,t+i);let f=t/i,g=e/i;for(;f<g;){const _=f+g>>1;s<n[(_+1)*i-1]?g=_:f=_+1}const m=n[f*i-1];if(s==m)return n.slice((f-1)*i,(f-1)*i+i);const y=n[(f+1)*i-1],p=(s-m)/(y-m);l=[];for(let _=0;_<i-1;++_)l.push(Be(n[(f-1)*i+_],n[f*i+_],p));return l.push(s),l}function w1(n,t,e,i,s,u,l){if(l)return tl(n,t,e[e.length-1],i,s,u);let f;if(s<n[i-1])return u?(f=n.slice(0,i),f[i-1]=s,f):null;if(n[n.length-1]<s)return u?(f=n.slice(n.length-i),f[i-1]=s,f):null;for(let g=0,m=e.length;g<m;++g){const y=e[g];if(t!=y){if(s<n[t+i-1])return null;if(s<=n[y-1])return tl(n,t,y,i,s,!1);t=y}}return null}function zf(n,t,e,i){let s=n[t],u=n[t+1],l=0;for(let f=t+i;f<e;f+=i){const g=n[f],m=n[f+1];l+=Math.sqrt((g-s)*(g-s)+(m-u)*(m-u)),s=g,u=m}return l}class ur extends Qi{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){kn(this.flatCoordinates,t),this.changed()}clone(){const t=new ur(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,s){return s<Ui(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(xu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),wu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,s))}forEachSegment(t){return Ac(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return this.layout!="XYM"&&this.layout!="XYZM"?null:(e=e!==void 0?e:!1,tl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return mi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return na(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return zf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=Do(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new ur(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return Fo(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Po(this.flatCoordinates,0,t,this.stride),this.changed()}}const ut={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},ia=[ut.FILL],bi=[ut.STROKE],lr=[ut.BEGIN_PATH],Yf=[ut.CLOSE_PATH];class Wf{drawCustom(t,e,i,s,u){}drawGeometry(t){}setStyle(t){}drawCircle(t,e,i){}drawFeature(t,e,i){}drawGeometryCollection(t,e,i){}drawLineString(t,e,i){}drawMultiLineString(t,e,i){}drawMultiPoint(t,e,i){}drawMultiPolygon(t,e,i){}drawPoint(t,e,i){}drawPolygon(t,e,i){}drawText(t,e,i){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}class Js extends Wf{constructor(t,e,i,s){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=s,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return e==1?t:t.map(function(i){return i*e})}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),s=this.tmpCoordinate_,u=this.coordinates;let l=u.length;for(let f=0,g=t.length;f<g;f+=e)s[0]=t[f],s[1]=t[f+1],cu(i,s)&&(u[l++]=s[0],u[l++]=s[1]);return l}appendFlatLineCoordinates(t,e,i,s,u,l){const f=this.coordinates;let g=f.length;const m=this.getBufferedMaxExtent();l&&(e+=s);let y=t[e],p=t[e+1];const _=this.tmpCoordinate_;let E=!0,S,b,k;for(S=e+s;S<i;S+=s)_[0]=t[S],_[1]=t[S+1],k=gu(m,_),k!==b?(E&&(f[g++]=y,f[g++]=p,E=!1),f[g++]=_[0],f[g++]=_[1]):k===oe.INTERSECTING?(f[g++]=_[0],f[g++]=_[1],E=!1):E=!0,y=_[0],p=_[1],b=k;return(u&&E||S===e+s)&&(f[g++]=y,f[g++]=p),g}drawCustomCoordinates_(t,e,i,s,u){for(let l=0,f=i.length;l<f;++l){const g=i[l],m=this.appendFlatLineCoordinates(t,e,g,s,!1,!1);u.push(m),e=g}return e}drawCustom(t,e,i,s,u){this.beginGeometry(t,e,u);const l=t.getType(),f=t.getStride(),g=this.coordinates.length;let m,y,p,_,E;switch(l){case"MultiPolygon":m=t.getOrientedFlatCoordinates(),_=[];const S=t.getEndss();E=0;for(let b=0,k=S.length;b<k;++b){const C=[];E=this.drawCustomCoordinates_(m,E,S[b],f,C),_.push(C)}this.instructions.push([ut.CUSTOM,g,_,t,i,Cu,u]),this.hitDetectionInstructions.push([ut.CUSTOM,g,_,t,s||i,Cu,u]);break;case"Polygon":case"MultiLineString":p=[],m=l=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),E=this.drawCustomCoordinates_(m,0,t.getEnds(),f,p),this.instructions.push([ut.CUSTOM,g,p,t,i,ks,u]),this.hitDetectionInstructions.push([ut.CUSTOM,g,p,t,s||i,ks,u]);break;case"LineString":case"Circle":m=t.getFlatCoordinates(),y=this.appendFlatLineCoordinates(m,0,m.length,f,!1,!1),this.instructions.push([ut.CUSTOM,g,y,t,i,mi,u]),this.hitDetectionInstructions.push([ut.CUSTOM,g,y,t,s||i,mi,u]);break;case"MultiPoint":m=t.getFlatCoordinates(),y=this.appendFlatPointCoordinates(m,f),y>g&&(this.instructions.push([ut.CUSTOM,g,y,t,i,mi,u]),this.hitDetectionInstructions.push([ut.CUSTOM,g,y,t,s||i,mi,u]));break;case"Point":m=t.getFlatCoordinates(),this.coordinates.push(m[0],m[1]),y=this.coordinates.length,this.instructions.push([ut.CUSTOM,g,y,t,i,void 0,u]),this.hitDetectionInstructions.push([ut.CUSTOM,g,y,t,s||i,void 0,u]);break}this.endGeometry(e)}beginGeometry(t,e,i){this.beginGeometryInstruction1_=[ut.BEGIN_GEOMETRY,e,0,t,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[ut.BEGIN_GEOMETRY,e,0,t,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const i=t.length;let s,u,l=-1;for(e=0;e<i;++e)s=t[e],u=s[0],u==ut.END_GEOMETRY?l=e:u==ut.BEGIN_GEOMETRY&&(s[2]=e,wp(this.hitDetectionInstructions,l,e),l=-1)}setFillStrokeStyle(t,e){const i=this.state;if(t){const s=t.getColor();i.fillPatternScale=s&&typeof s=="object"&&"src"in s?this.pixelRatio:1,i.fillStyle=Cn(s||Pe)}else i.fillStyle=void 0;if(e){const s=e.getColor();i.strokeStyle=Cn(s||Ds);const u=e.getLineCap();i.lineCap=u!==void 0?u:Or;const l=e.getLineDash();i.lineDash=l?l.slice():qn;const f=e.getLineDashOffset();i.lineDashOffset=f||Un;const g=e.getLineJoin();i.lineJoin=g!==void 0?g:Ar;const m=e.getWidth();i.lineWidth=m!==void 0?m:Gs;const y=e.getMiterLimit();i.miterLimit=y!==void 0?y:Ps,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[ut.SET_FILL_STYLE,e];return typeof e!="string"&&i.push(t.fillPatternScale),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[ut.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;(typeof i!="string"||t.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,s=t.lineCap,u=t.lineDash,l=t.lineDashOffset,f=t.lineJoin,g=t.lineWidth,m=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=s||u!=t.currentLineDash&&!wr(t.currentLineDash,u)||t.currentLineDashOffset!=l||t.currentLineJoin!=f||t.currentLineWidth!=g||t.currentMiterLimit!=m)&&(i!==void 0&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=s,t.currentLineDash=u,t.currentLineDashOffset=l,t.currentLineJoin=f,t.currentLineWidth=g,t.currentMiterLimit=m)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[ut.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Wp(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;hu(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class I1 extends Js{constructor(t,e,i,s){super(t,e,i,s),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,i){if(!this.image_||this.maxExtent&&!cu(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,i);const s=t.getFlatCoordinates(),u=t.getStride(),l=this.coordinates.length,f=this.appendFlatPointCoordinates(s,u);this.instructions.push([ut.DRAW_IMAGE,l,f,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([ut.DRAW_IMAGE,l,f,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,i){if(!this.image_)return;this.beginGeometry(t,e,i);const s=t.getFlatCoordinates(),u=[];for(let g=0,m=s.length;g<m;g+=t.getStride())(!this.maxExtent||cu(this.maxExtent,s.slice(g,g+2)))&&u.push(s[g],s[g+1]);const l=this.coordinates.length,f=this.appendFlatPointCoordinates(u,2);this.instructions.push([ut.DRAW_IMAGE,l,f,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([ut.DRAW_IMAGE,l,f,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){const i=t.getAnchor(),s=t.getSize(),u=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=s[1],this.opacity_=t.getOpacity(),this.originX_=u[0],this.originY_=u[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=s[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}class k1 extends Js{constructor(t,e,i,s){super(t,e,i,s)}drawFlatCoordinates_(t,e,i,s){const u=this.coordinates.length,l=this.appendFlatLineCoordinates(t,e,i,s,!1,!1),f=[ut.MOVE_TO_LINE_TO,u,l];return this.instructions.push(f),this.hitDetectionInstructions.push(f),i}drawLineString(t,e,i){const s=this.state,u=s.strokeStyle,l=s.lineWidth;if(u===void 0||l===void 0)return;this.updateStrokeStyle(s,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([ut.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,qn,Un],lr);const f=t.getFlatCoordinates(),g=t.getStride();this.drawFlatCoordinates_(f,0,f.length,g),this.hitDetectionInstructions.push(bi),this.endGeometry(e)}drawMultiLineString(t,e,i){const s=this.state,u=s.strokeStyle,l=s.lineWidth;if(u===void 0||l===void 0)return;this.updateStrokeStyle(s,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([ut.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,qn,Un],lr);const f=t.getEnds(),g=t.getFlatCoordinates(),m=t.getStride();let y=0;for(let p=0,_=f.length;p<_;++p)y=this.drawFlatCoordinates_(g,y,f[p],m);this.hitDetectionInstructions.push(bi),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(bi),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(bi),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(lr)}}class Xf extends Js{constructor(t,e,i,s){super(t,e,i,s)}drawFlatCoordinatess_(t,e,i,s){const u=this.state,l=u.fillStyle!==void 0,f=u.strokeStyle!==void 0,g=i.length;this.instructions.push(lr),this.hitDetectionInstructions.push(lr);for(let m=0;m<g;++m){const y=i[m],p=this.coordinates.length,_=this.appendFlatLineCoordinates(t,e,y,s,!0,!f),E=[ut.MOVE_TO_LINE_TO,p,_];this.instructions.push(E),this.hitDetectionInstructions.push(E),f&&(this.instructions.push(Yf),this.hitDetectionInstructions.push(Yf)),e=y}return l&&(this.instructions.push(ia),this.hitDetectionInstructions.push(ia)),f&&(this.instructions.push(bi),this.hitDetectionInstructions.push(bi)),e}drawCircle(t,e,i){const s=this.state,u=s.fillStyle,l=s.strokeStyle;if(u===void 0&&l===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),s.fillStyle!==void 0&&this.hitDetectionInstructions.push([ut.SET_FILL_STYLE,Pe]),s.strokeStyle!==void 0&&this.hitDetectionInstructions.push([ut.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,qn,Un]);const f=t.getFlatCoordinates(),g=t.getStride(),m=this.coordinates.length;this.appendFlatLineCoordinates(f,0,f.length,g,!1,!1);const y=[ut.CIRCLE,m];this.instructions.push(lr,y),this.hitDetectionInstructions.push(lr,y),s.fillStyle!==void 0&&(this.instructions.push(ia),this.hitDetectionInstructions.push(ia)),s.strokeStyle!==void 0&&(this.instructions.push(bi),this.hitDetectionInstructions.push(bi)),this.endGeometry(e)}drawPolygon(t,e,i){const s=this.state,u=s.fillStyle,l=s.strokeStyle;if(u===void 0&&l===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),s.fillStyle!==void 0&&this.hitDetectionInstructions.push([ut.SET_FILL_STYLE,Pe]),s.strokeStyle!==void 0&&this.hitDetectionInstructions.push([ut.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,qn,Un]);const f=t.getEnds(),g=t.getOrientedFlatCoordinates(),m=t.getStride();this.drawFlatCoordinatess_(g,0,f,m),this.endGeometry(e)}drawMultiPolygon(t,e,i){const s=this.state,u=s.fillStyle,l=s.strokeStyle;if(u===void 0&&l===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),s.fillStyle!==void 0&&this.hitDetectionInstructions.push([ut.SET_FILL_STYLE,Pe]),s.strokeStyle!==void 0&&this.hitDetectionInstructions.push([ut.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,qn,Un]);const f=t.getEndss(),g=t.getOrientedFlatCoordinates(),m=t.getStride();let y=0;for(let p=0,_=f.length;p<_;++p)y=this.drawFlatCoordinatess_(g,y,f[p],m);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(t!==0){const e=this.coordinates;for(let i=0,s=e.length;i<s;++i)e[i]=tr(e[i],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;t.fillStyle!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)}}function b1(n,t,e,i,s){const u=[];let l=e,f=0,g=t.slice(e,2);for(;f<n&&l+s<i;){const[m,y]=g.slice(-2),p=t[l+s],_=t[l+s+1],E=Math.sqrt((p-m)*(p-m)+(_-y)*(_-y));if(f+=E,f>=n){const S=(n-f+E)/E,b=Be(m,p,S),k=Be(y,_,S);g.push(b,k),u.push(g),g=[b,k],f==n&&(l+=s),f=0}else if(f<n)g.push(t[l+s],t[l+s+1]),l+=s;else{const S=E-f,b=Be(m,p,S/E),k=Be(y,_,S/E);g.push(b,k),u.push(g),g=[b,k],f=0,l+=s}}return f>0&&u.push(g),u}function C1(n,t,e,i,s){let u=e,l=e,f=0,g=0,m=e,y,p,_,E,S,b,k,C,R,M;for(p=e;p<i;p+=s){const O=t[p],T=t[p+1];S!==void 0&&(R=O-S,M=T-b,E=Math.sqrt(R*R+M*M),k!==void 0&&(g+=_,y=Math.acos((k*R+C*M)/(_*E)),y>n&&(g>f&&(f=g,u=m,l=p),g=0,m=p-s)),_=E,k=R,C=M),S=O,b=T}return g+=E,g>f?[m,p]:[u,l]}const ra={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class R1 extends Js{constructor(t,e,i,s){super(t,e,i,s),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[Pe]={fillStyle:Pe},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,i){const s=this.textFillState_,u=this.textStrokeState_,l=this.textState_;if(this.text_===""||!l||!s&&!u)return;const f=this.coordinates;let g=f.length;const m=t.getType();let y=null,p=t.getStride();if(l.placement==="line"&&(m=="LineString"||m=="MultiLineString"||m=="Polygon"||m=="MultiPolygon")){if(!cn(this.maxExtent,t.getExtent()))return;let _;if(y=t.getFlatCoordinates(),m=="LineString")_=[y.length];else if(m=="MultiLineString")_=t.getEnds();else if(m=="Polygon")_=t.getEnds().slice(0,1);else if(m=="MultiPolygon"){const k=t.getEndss();_=[];for(let C=0,R=k.length;C<R;++C)_.push(k[C][0])}this.beginGeometry(t,e,i);const E=l.repeat,S=E?void 0:l.textAlign;let b=0;for(let k=0,C=_.length;k<C;++k){let R;E?R=b1(E*this.resolution,y,b,_[k],p):R=[y.slice(b,_[k])];for(let M=0,O=R.length;M<O;++M){const T=R[M];let G=0,D=T.length;if(S==null){const A=C1(l.maxAngle,T,0,T.length,2);G=A[0],D=A[1]}for(let A=G;A<D;A+=p)f.push(T[A],T[A+1]);const F=f.length;b=_[k],this.drawChars_(g,F),g=F}}this.endGeometry(e)}else{let _=l.overflow?null:[];switch(m){case"Point":case"MultiPoint":y=t.getFlatCoordinates();break;case"LineString":y=t.getFlatMidpoint();break;case"Circle":y=t.getCenter();break;case"MultiLineString":y=t.getFlatMidpoints(),p=2;break;case"Polygon":y=t.getFlatInteriorPoint(),l.overflow||_.push(y[2]/this.resolution),p=3;break;case"MultiPolygon":const R=t.getFlatInteriorPoints();y=[];for(let M=0,O=R.length;M<O;M+=3)l.overflow||_.push(R[M+2]/this.resolution),y.push(R[M],R[M+1]);if(y.length===0)return;p=2;break}const E=this.appendFlatPointCoordinates(y,p);if(E===g)return;if(_&&(E-g)/2!==y.length/p){let R=g/2;_=_.filter((M,O)=>{const T=f[(R+O)*2]===y[O*p]&&f[(R+O)*2+1]===y[O*p+1];return T||--R,T})}this.saveTextStates_(),(l.backgroundFill||l.backgroundStroke)&&(this.setFillStrokeStyle(l.backgroundFill,l.backgroundStroke),l.backgroundFill&&this.updateFillStyle(this.state,this.createFill),l.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e,i);let S=l.padding;if(S!=nr&&(l.scale[0]<0||l.scale[1]<0)){let R=l.padding[0],M=l.padding[1],O=l.padding[2],T=l.padding[3];l.scale[0]<0&&(M=-M,T=-T),l.scale[1]<0&&(R=-R,O=-O),S=[R,M,O,T]}const b=this.pixelRatio;this.instructions.push([ut.DRAW_IMAGE,g,E,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,S==nr?nr:S.map(function(R){return R*b}),!!l.backgroundFill,!!l.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,_]);const k=1/b,C=this.state.fillStyle;l.backgroundFill&&(this.state.fillStyle=Pe,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([ut.DRAW_IMAGE,g,E,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[k,k],NaN,this.declutterMode_,this.declutterImageWithText_,S,!!l.backgroundFill,!!l.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?Pe:this.fillKey_,this.textOffsetX_,this.textOffsetY_,_]),l.backgroundFill&&(this.state.fillStyle=C,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,s=this.strokeKey_;t&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const u=this.textKey_;u in this.textStates||(this.textStates[u]={font:e.font,textAlign:e.textAlign||Fs,justify:e.justify,textBaseline:e.textBaseline||Wo,scale:e.scale});const l=this.fillKey_;i&&(l in this.fillStates||(this.fillStates[l]={fillStyle:i.fillStyle}))}drawChars_(t,e){const i=this.textStrokeState_,s=this.textState_,u=this.strokeKey_,l=this.textKey_,f=this.fillKey_;this.saveTextStates_();const g=this.pixelRatio,m=ra[s.textBaseline],y=this.textOffsetY_*g,p=this.text_,_=i?i.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([ut.DRAW_CHARS,t,e,m,s.overflow,f,s.maxAngle,g,y,u,_*g,p,l,1,this.declutterMode_]),this.hitDetectionInstructions.push([ut.DRAW_CHARS,t,e,m,s.overflow,f&&Pe,s.maxAngle,g,y,u,_*g,p,l,1/g,this.declutterMode_])}setTextStyle(t,e){let i,s,u;if(!t)this.text_="";else{const l=t.getFill();l?(s=this.textFillState_,s||(s={},this.textFillState_=s),s.fillStyle=Cn(l.getColor()||Pe)):(s=null,this.textFillState_=s);const f=t.getStroke();if(!f)u=null,this.textStrokeState_=u;else{u=this.textStrokeState_,u||(u={},this.textStrokeState_=u);const S=f.getLineDash(),b=f.getLineDashOffset(),k=f.getWidth(),C=f.getMiterLimit();u.lineCap=f.getLineCap()||Or,u.lineDash=S?S.slice():qn,u.lineDashOffset=b===void 0?Un:b,u.lineJoin=f.getLineJoin()||Ar,u.lineWidth=k===void 0?Gs:k,u.miterLimit=C===void 0?Ps:C,u.strokeStyle=Cn(f.getColor()||Ds)}i=this.textState_;const g=t.getFont()||Zc;E_(g);const m=t.getScaleArray();i.overflow=t.getOverflow(),i.font=g,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||Wo,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||nr,i.scale=m===void 0?[1,1]:m;const y=t.getOffsetX(),p=t.getOffsetY(),_=t.getRotateWithView(),E=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=y===void 0?0:y,this.textOffsetY_=p===void 0?0:p,this.textRotateWithView_=_===void 0?!1:_,this.textRotation_=E===void 0?0:E,this.strokeKey_=u?(typeof u.strokeStyle=="string"?u.strokeStyle:de(u.strokeStyle))+u.lineCap+u.lineDashOffset+"|"+u.lineWidth+u.lineJoin+u.miterLimit+"["+u.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=s&&s.fillStyle?typeof s.fillStyle=="string"?s.fillStyle:"|"+de(s.fillStyle):""}this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const L1={Circle:Xf,Default:Js,Image:I1,LineString:k1,Polygon:Xf,Text:R1};class N1{constructor(t,e,i,s){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=s,this.resolution_=i,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const i=this.buildersByZIndex_[e];for(const s in i){const u=i[s].finish();t[e][s]=u}}return t}getBuilder(t,e){const i=t!==void 0?t.toString():"0";let s=this.buildersByZIndex_[i];s===void 0&&(s={},this.buildersByZIndex_[i]=s);let u=s[e];if(u===void 0){const l=L1[e];u=new l(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[e]=u}return u}}class T1 extends Ss{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return zt()}getData(t){return null}prepareFrame(t){return zt()}renderFrame(t,e){return zt()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return(s,u)=>{const l=this.loadedTileCallback.bind(this,i,s);return t.forEachLoadedTile(e,s,u,l)}}forEachFeatureAtCoordinate(t,e,i,s,u){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;(e.getState()===wt.LOADED||e.getState()===wt.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=wt.LOADED&&e!=wt.ERROR&&t.addEventListener(He.CHANGE,this.boundHandleImageChange_),e==wt.IDLE&&(t.load(),e=t.getState()),e==wt.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class qf{constructor(){Ze(this,"pushMethodArgs_",(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this));this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(CanvasRenderingContext2D.prototype,{get:(t,e)=>{if(typeof uu()[e]=="function")return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,i)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,i),!0)})}getContext(){return this.context_}draw(t){this.instructions_.forEach(e=>{for(let i=0,s=e.length;i<s;i+=2){const u=e[i],l=e[i+1];if(typeof t[u]=="function")t[u](...l);else{if(typeof l=="function"){t[u]=l(t);continue}t[u]=l}}})}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}}const Uf=[];let Wr=null;function M1(){Wr=Ge(1,1,void 0,{willReadFrequently:!0})}class O1 extends T1{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Xn(),this.pixelTransform=Xn(),this.inversePixelTransform=Xn(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){Wr||M1(),Wr.clearRect(0,0,1,1);let s;try{Wr.drawImage(t,e,i,1,1,0,0,1,1),s=Wr.getImageData(0,0,1,1).data}catch{return Wr=null,null}return s}getBackground(t){let i=this.getLayer().getBackground();return typeof i=="function"&&(i=i(t.viewState.resolution)),i||void 0}useContainer(t,e,i){const s=this.getLayer().getClassName();let u,l;if(t&&t.className===s&&(!i||t&&t.style.backgroundColor&&wr(Os(t.style.backgroundColor),Os(i)))){const f=t.firstElementChild;f instanceof HTMLCanvasElement&&(l=f.getContext("2d"))}if(l&&l.canvas.style.transform===e?(this.container=t,this.context=l,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){u=document.createElement("div"),u.className=s;let f=u.style;f.position="absolute",f.width="100%",f.height="100%",l=Ge();const g=l.canvas;u.appendChild(g),f=g.style,f.position="absolute",f.left="0",f.transformOrigin="top left",this.container=u,this.context=l}!this.containerReused&&i&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const s=hc(i),u=cc(i),l=lc(i),f=uc(i);Ae(e.coordinateToPixelTransform,s),Ae(e.coordinateToPixelTransform,u),Ae(e.coordinateToPixelTransform,l),Ae(e.coordinateToPixelTransform,f);const g=this.inversePixelTransform;Ae(g,s),Ae(g,u),Ae(g,l),Ae(g,f),t.save(),t.beginPath(),t.moveTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(u[0]),Math.round(u[1])),t.lineTo(Math.round(l[0]),Math.round(l[1])),t.lineTo(Math.round(f[0]),Math.round(f[1])),t.clip()}dispatchRenderEvent_(t,e,i){const s=this.getLayer();if(s.hasListener(t)){const u=new y0(t,this.inversePixelTransform,i,e);s.dispatchEvent(u)}}preRender(t,e){this.frameState=e,!e.declutter&&this.dispatchRenderEvent_(Ji.PRERENDER,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(Ji.POSTRENDER,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new qf),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(Ji.PRERENDER,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(Ji.POSTRENDER,this.context,t))}getRenderTransform(t,e,i,s,u,l,f){const g=u/2,m=l/2,y=s/e,p=-y,_=-t[0]+f,E=-t[1];return $i(this.tempTransform,g,m,y,p,-i,_,E)}disposeInternal(){delete this.frameState,super.disposeInternal()}}function A1(n,t,e,i,s,u,l,f,g,m,y,p){let _=n[t],E=n[t+1],S=0,b=0,k=0,C=0;function R(){S=_,b=E,t+=i,_=n[t],E=n[t+1],C+=k,k=Math.sqrt((_-S)*(_-S)+(E-b)*(E-b))}do R();while(t<e-i&&C+k<u);let M=k===0?0:(u-C)/k;const O=Be(S,_,M),T=Be(b,E,M),G=t-i,D=C,F=u+f*g(m,s,y);for(;t<e-i&&C+k<F;)R();M=k===0?0:(F-C)/k;const A=Be(S,_,M),j=Be(b,E,M);let et;if(p){const Z=[O,T,A,j];kc(Z,0,4,2,p,Z,Z),et=Z[0]>Z[2]}else et=O>A;const U=Math.PI,nt=[],z=G+i===t;t=G,k=0,C=D,_=n[t],E=n[t+1];let K;if(z){R(),K=Math.atan2(E-b,_-S),et&&(K+=K>0?-U:U);const Z=(A+O)/2,at=(j+T)/2;return nt[0]=[Z,at,(F-u)/2,K,s],nt}s=s.replace(/\n/g," ");for(let Z=0,at=s.length;Z<at;){R();let gt=Math.atan2(E-b,_-S);if(et&&(gt+=gt>0?-U:U),K!==void 0){let X=gt-K;if(X+=X>U?-2*U:X<-U?2*U:0,Math.abs(X)>l)return null}K=gt;const St=Z;let Q=0;for(;Z<at;++Z){const X=et?at-Z-1:Z,Ce=f*g(m,s[X],y);if(t+i<e&&C+k<u+Q+Ce/2)break;Q+=Ce}if(Z===St)continue;const _t=et?s.substring(at-St,at-Z):s.substring(St,Z);M=k===0?0:(u+Q/2-C)/k;const Et=Be(S,_,M),qt=Be(b,E,M);nt.push([Et,qt,Q/2,gt,_t]),u+=Q}return nt}const Xr=ji(),Ci=[],Qn=[],ti=[],Ri=[];function jf(n){return n[3].declutterBox}const Vf=new RegExp("[֑-ࣿיִ-﷿ﹰ-ﻼࠀ--]");function el(n,t){return t==="start"?t=Vf.test(n)?"right":"left":t==="end"&&(t=Vf.test(n)?"left":"right"),ra[t]}function P1(n,t,e){return e>0&&n.push(`
|
|
7
7
|
`,""),n.push(t,""),n}class D1{constructor(t,e,i,s,u){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=Xn(),this.hitDetectionInstructions=s.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=s.fillStates||{},this.strokeStates=s.strokeStates||{},this.textStates=s.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=u?new qf:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,i,s){const u=t+e+i+s;if(this.labels_[u])return this.labels_[u];const l=s?this.strokeStates[s]:null,f=i?this.fillStates[i]:null,g=this.textStates[e],m=this.pixelRatio,y=[g.scale[0]*m,g.scale[1]*m],p=Array.isArray(t),_=g.justify?ra[g.justify]:el(Array.isArray(t)?t[0]:t,g.textAlign||Fs),E=s&&l.lineWidth?l.lineWidth:0,S=p?t:t.split(`
|
|
8
8
|
`).reduce(P1,[]),{width:b,height:k,widths:C,heights:R,lineWidths:M}=S_(g,S),O=b+E,T=[],G=(O+2)*y[0],D=(k+E)*y[1],F={width:G<0?Math.floor(G):Math.ceil(G),height:D<0?Math.floor(D):Math.ceil(D),contextInstructions:T};(y[0]!=1||y[1]!=1)&&T.push("scale",y),s&&(T.push("strokeStyle",l.strokeStyle),T.push("lineWidth",E),T.push("lineCap",l.lineCap),T.push("lineJoin",l.lineJoin),T.push("miterLimit",l.miterLimit),T.push("setLineDash",[l.lineDash]),T.push("lineDashOffset",l.lineDashOffset)),i&&T.push("fillStyle",f.fillStyle),T.push("textBaseline","middle"),T.push("textAlign","center");const A=.5-_;let j=_*O+A*E;const et=[],U=[];let nt=0,z=0,K=0,Z=0,at;for(let gt=0,St=S.length;gt<St;gt+=2){const Q=S[gt];if(Q===`
|
|
9
9
|
`){z+=nt,nt=0,j=_*O+A*E,++Z;continue}const _t=S[gt+1]||g.font;_t!==at&&(s&&et.push("font",_t),i&&U.push("font",_t),at=_t),nt=Math.max(nt,R[K]);const Et=[Q,j+A*C[K]+_*(C[K]-M[Z]),.5*(E+nt)+z];j+=C[K],s&&et.push("strokeText",Et),i&&U.push("fillText",Et),++K}return Array.prototype.push.apply(T,et),Array.prototype.push.apply(T,U),this.labels_[u]=F,F}replayTextBackground_(t,e,i,s,u,l,f){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,s),t.lineTo.apply(t,u),t.lineTo.apply(t,e),l&&(this.alignAndScaleFill_=l[2],this.fill_(t)),f&&(this.setStrokeStyle_(t,f),t.stroke())}calculateImageOrLabelDimensions_(t,e,i,s,u,l,f,g,m,y,p,_,E,S,b,k){f*=_[0],g*=_[1];let C=i-f,R=s-g;const M=u+m>t?t-m:u,O=l+y>e?e-y:l,T=S[3]+M*_[0]+S[1],G=S[0]+O*_[1]+S[2],D=C-S[3],F=R-S[0];(b||p!==0)&&(Ci[0]=D,Ri[0]=D,Ci[1]=F,Qn[1]=F,Qn[0]=D+T,ti[0]=Qn[0],ti[1]=F+G,Ri[1]=ti[1]);let A;return p!==0?(A=$i(Xn(),i,s,1,1,p,-i,-s),Ae(A,Ci),Ae(A,Qn),Ae(A,ti),Ae(A,Ri),Vi(Math.min(Ci[0],Qn[0],ti[0],Ri[0]),Math.min(Ci[1],Qn[1],ti[1],Ri[1]),Math.max(Ci[0],Qn[0],ti[0],Ri[0]),Math.max(Ci[1],Qn[1],ti[1],Ri[1]),Xr)):Vi(Math.min(D,D+T),Math.min(F,F+G),Math.max(D,D+T),Math.max(F,F+G),Xr),E&&(C=Math.round(C),R=Math.round(R)),{drawImageX:C,drawImageY:R,drawImageW:M,drawImageH:O,originX:m,originY:y,declutterBox:{minX:Xr[0],minY:Xr[1],maxX:Xr[2],maxY:Xr[3],value:k},canvasTransform:A,scale:_}}replayImageOrLabel_(t,e,i,s,u,l,f){const g=!!(l||f),m=s.declutterBox,y=f?f[2]*s.scale[0]/2:0;return m.minX-y<=e[0]&&m.maxX+y>=0&&m.minY-y<=e[1]&&m.maxY+y>=0&&(g&&this.replayTextBackground_(t,Ci,Qn,ti,Ri,l,f),w_(t,s.canvasTransform,u,i,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const i=Ae(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;t.save(),t.translate(i[0]%s,i[1]%s),e!==1&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,s){const u=this.textStates[e],l=this.createLabel(t,e,s,i),f=this.strokeStates[i],g=this.pixelRatio,m=el(Array.isArray(t)?t[0]:t,u.textAlign||Fs),y=ra[u.textBaseline||Wo],p=f&&f.lineWidth?f.lineWidth:0,_=l.width/g-2*u.scale[0],E=m*_+2*(.5-m)*p,S=y*l.height/g+2*(.5-y)*p;return{label:l,anchorX:E,anchorY:S}}execute_(t,e,i,s,u,l,f,g){const m=this.zIndexContext_;let y;this.pixelCoordinates_&&wr(i,this.renderedTransform_)?y=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),y=di(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),bv(this.renderedTransform_,i));let p=0;const _=s.length;let E=0,S,b,k,C,R,M,O,T,G,D,F,A,j,et=0,U=0,nt=null,z=null;const K=this.coordinateCache_,Z=this.viewRotation_,at=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,gt={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:Z},St=this.instructions!=s||this.overlaps?0:200;let Q,_t,Et,qt;for(;p<_;){const X=s[p];switch(X[0]){case ut.BEGIN_GEOMETRY:Q=X[1],qt=X[3],Q.getGeometry()?f!==void 0&&!cn(f,qt.getExtent())?p=X[2]+1:++p:p=X[2],m&&(m.zIndex=X[4]);break;case ut.BEGIN_PATH:et>St&&(this.fill_(t),et=0),U>St&&(t.stroke(),U=0),!et&&!U&&(t.beginPath(),R=NaN,M=NaN),++p;break;case ut.CIRCLE:E=X[1];const si=y[E],zi=y[E+1],B=y[E+2],us=y[E+3],Dt=B-si,it=us-zi,L=Math.sqrt(Dt*Dt+it*it);t.moveTo(si+L,zi),t.arc(si,zi,L,0,2*Math.PI,!0),++p;break;case ut.CLOSE_PATH:t.closePath(),++p;break;case ut.CUSTOM:E=X[1],S=X[2];const mt=X[3],Ut=X[4],dt=X[5];gt.geometry=mt,gt.feature=Q,p in K||(K[p]=[]);const _n=K[p];dt?dt(y,E,S,2,_n):(_n[0]=y[E],_n[1]=y[E+1],_n.length=2),m&&(m.zIndex=X[6]),Ut(_n,gt),++p;break;case ut.DRAW_IMAGE:E=X[1],S=X[2],G=X[3],b=X[4],k=X[5];let ce=X[6];const Wt=X[7],H=X[8],oi=X[9],We=X[10];let fe=X[11];const Yi=X[12];let ht=X[13];C=X[14]||"declutter";const Xe=X[15];if(!G&&X.length>=20){D=X[19],F=X[20],A=X[21],j=X[22];const ne=this.drawLabelWithPointPlacement_(D,F,A,j);G=ne.label,X[3]=G;const $=X[23];b=(ne.anchorX-$)*this.pixelRatio,X[4]=b;const Y=X[24];k=(ne.anchorY-Y)*this.pixelRatio,X[5]=k,ce=G.height,X[6]=ce,ht=G.width,X[13]=ht}let ve;X.length>25&&(ve=X[25]);let Dn,st,rn;X.length>17?(Dn=X[16],st=X[17],rn=X[18]):(Dn=nr,st=!1,rn=!1),We&&at?fe+=Z:!We&&!at&&(fe-=Z);let kt=0;for(;E<S;E+=2){if(ve&&ve[kt++]<ht/this.pixelRatio)continue;const ne=this.calculateImageOrLabelDimensions_(G.width,G.height,y[E],y[E+1],ht,ce,b,k,H,oi,fe,Yi,u,Dn,st||rn,Q),$=[t,e,G,ne,Wt,st?nt:null,rn?z:null];if(g){let Y,Rt,Ot;if(Xe){const bt=S-E;if(!Xe[bt]){Xe[bt]={args:$,declutterMode:C};continue}const Xt=Xe[bt];Y=Xt.args,Rt=Xt.declutterMode,delete Xe[bt],Ot=jf(Y)}let Vt,yt;if(Y&&(Rt!=="declutter"||!g.collides(Ot))&&(Vt=!0),(C!=="declutter"||!g.collides(ne.declutterBox))&&(yt=!0),Rt==="declutter"&&C==="declutter"){const bt=Vt&&yt;Vt=bt,yt=bt}Vt&&(Rt!=="none"&&g.insert(Ot),this.replayImageOrLabel_.apply(this,Y)),yt&&(C!=="none"&&g.insert(ne.declutterBox),this.replayImageOrLabel_.apply(this,$))}else this.replayImageOrLabel_.apply(this,$)}++p;break;case ut.DRAW_CHARS:const ct=X[1],ls=X[2],_e=X[3],yr=X[4];j=X[5];const lt=X[6],hs=X[7],cs=X[8];A=X[9];const ai=X[10];D=X[11],F=X[12];const Ee=[X[13],X[13]];C=X[14]||"declutter";const En=this.textStates[F],ge=En.font,Fn=[En.scale[0]*hs,En.scale[1]*hs];let sn;ge in this.widths_?sn=this.widths_[ge]:(sn={},this.widths_[ge]=sn);const fs=zf(y,ct,ls,2),pr=Math.abs(Fn[0])*Kc(ge,D,sn);if(yr||pr<=fs){const ne=this.textStates[F].textAlign,$=(fs-pr)*el(D,ne),Y=A1(y,ct,ls,2,D,$,lt,Math.abs(Fn[0]),Kc,ge,sn,at?0:this.viewRotation_);t:if(Y){const Rt=[];let Ot,Vt,yt,bt,Xt;if(A)for(Ot=0,Vt=Y.length;Ot<Vt;++Ot){Xt=Y[Ot],yt=Xt[4],bt=this.createLabel(yt,F,"",A),b=Xt[2]+(Fn[0]<0?-ai:ai),k=_e*bt.height+(.5-_e)*2*ai*Fn[1]/Fn[0]-cs;const Re=this.calculateImageOrLabelDimensions_(bt.width,bt.height,Xt[0],Xt[1],bt.width,bt.height,b,k,0,0,Xt[3],Ee,!1,nr,!1,Q);if(g&&C==="declutter"&&g.collides(Re.declutterBox))break t;Rt.push([t,e,bt,Re,1,null,null])}if(j)for(Ot=0,Vt=Y.length;Ot<Vt;++Ot){Xt=Y[Ot],yt=Xt[4],bt=this.createLabel(yt,F,j,""),b=Xt[2],k=_e*bt.height-cs;const Re=this.calculateImageOrLabelDimensions_(bt.width,bt.height,Xt[0],Xt[1],bt.width,bt.height,b,k,0,0,Xt[3],Ee,!1,nr,!1,Q);if(g&&C==="declutter"&&g.collides(Re.declutterBox))break t;Rt.push([t,e,bt,Re,1,null,null])}g&&C!=="none"&&g.load(Rt.map(jf));for(let Re=0,Gn=Rt.length;Re<Gn;++Re)this.replayImageOrLabel_.apply(this,Rt[Re])}}++p;break;case ut.END_GEOMETRY:if(l!==void 0){Q=X[1];const ne=l(Q,qt);if(ne)return ne}++p;break;case ut.FILL:St?et++:this.fill_(t),++p;break;case ut.MOVE_TO_LINE_TO:for(E=X[1],S=X[2],_t=y[E],Et=y[E+1],O=_t+.5|0,T=Et+.5|0,(O!==R||T!==M)&&(t.moveTo(_t,Et),R=O,M=T),E+=2;E<S;E+=2)_t=y[E],Et=y[E+1],O=_t+.5|0,T=Et+.5|0,(E==S-2||O!==R||T!==M)&&(t.lineTo(_t,Et),R=O,M=T);++p;break;case ut.SET_FILL_STYLE:nt=X,this.alignAndScaleFill_=X[2],et&&(this.fill_(t),et=0,U&&(t.stroke(),U=0)),t.fillStyle=X[1],++p;break;case ut.SET_STROKE_STYLE:z=X,U&&(t.stroke(),U=0),this.setStrokeStyle_(t,X),++p;break;case ut.STROKE:St?U++:t.stroke(),++p;break;default:++p;break}}et&&this.fill_(t),U&&t.stroke()}execute(t,e,i,s,u,l){this.viewRotation_=s,this.execute_(t,e,i,this.instructions,u,void 0,void 0,l)}executeHitDetection(t,e,i,s,u){return this.viewRotation_=i,this.execute_(t,[t.canvas.width,t.canvas.height],e,this.hitDetectionInstructions,!0,s,u)}}const $s=["Polygon","Circle","LineString","Image","Text","Default"],Zf=["Image","Text"],F1=$s.filter(n=>!Zf.includes(n));class G1{constructor(t,e,i,s,u,l,f){this.maxExtent_=t,this.overlaps_=s,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=l,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Xn(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(u,f)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t,e){for(const i in t){let s=this.executorsByZIndex_[i];s===void 0&&(s={},this.executorsByZIndex_[i]=s);const u=t[i];for(const l in u){const f=u[l];s[l]=new D1(this.resolution_,this.pixelRatio_,this.overlaps_,f,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let s=0,u=t.length;s<u;++s)if(t[s]in i)return!0}return!1}forEachFeatureAtCoordinate(t,e,i,s,u,l){s=Math.round(s);const f=s*2+1,g=$i(this.hitDetectionTransform_,s+.5,s+.5,1/e,-1/e,-i,-t[0],-t[1]),m=!this.hitDetectionContext_;m&&(this.hitDetectionContext_=Ge(f,f,void 0,{willReadFrequently:!0}));const y=this.hitDetectionContext_;y.canvas.width!==f||y.canvas.height!==f?(y.canvas.width=f,y.canvas.height=f):m||y.clearRect(0,0,f,f);let p;this.renderBuffer_!==void 0&&(p=ji(),qp(p,t),hu(p,e*(this.renderBuffer_+s),p));const _=B1(s);let E;function S(T,G){const D=y.getImageData(0,0,f,f).data;for(let F=0,A=_.length;F<A;F++)if(D[_[F]]>0){if(!l||E!=="Image"&&E!=="Text"||l.includes(T)){const j=(_[F]-3)/4,et=s-j%f,U=s-(j/f|0),nt=u(T,G,et*et+U*U);if(nt)return nt}y.clearRect(0,0,f,f);break}}const b=Object.keys(this.executorsByZIndex_).map(Number);b.sort(Xi);let k,C,R,M,O;for(k=b.length-1;k>=0;--k){const T=b[k].toString();for(R=this.executorsByZIndex_[T],C=$s.length-1;C>=0;--C)if(E=$s[C],M=R[E],M!==void 0&&(O=M.executeHitDetection(y,g,i,S,p),O))return O}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],s=e[1],u=e[2],l=e[3],f=[i,s,i,l,u,l,u,s];return di(f,0,8,2,t,f),f}isEmpty(){return kr(this.executorsByZIndex_)}execute(t,e,i,s,u,l,f){const g=Object.keys(this.executorsByZIndex_).map(Number);g.sort(Xi),l=l||$s;let m,y,p,_,E,S;for(f&&g.reverse(),m=0,y=g.length;m<y;++m){const b=g[m].toString();for(E=this.executorsByZIndex_[b],p=0,_=l.length;p<_;++p){const k=l[p];if(S=E[k],S!==void 0){const C=f===null?void 0:S.getZIndexContext(),R=C?C.getContext():t,M=this.maxExtent_&&k!=="Image"&&k!=="Text";if(M&&(R.save(),this.clip(R,i)),S.execute(R,e,i,s,u,f),M&&R.restore(),C){C.offset();const O=g[m];this.deferredZIndexContexts_[O]||(this.deferredZIndexContexts_[O]=[]),this.deferredZIndexContexts_[O].push(C)}}}}this.renderedContext_=t}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const t=this.deferredZIndexContexts_,e=Object.keys(t).map(Number).sort(Xi);for(let i=0,s=e.length;i<s;++i)t[e[i]].forEach(u=>{u.draw(this.renderedContext_),u.clear()})}}const nl={};function B1(n){if(nl[n]!==void 0)return nl[n];const t=n*2+1,e=n*n,i=new Array(e+1);for(let u=0;u<=n;++u)for(let l=0;l<=n;++l){const f=u*u+l*l;if(f>e)break;let g=i[f];g||(g=[],i[f]=g),g.push(((n+u)*t+(n+l))*4+3),u>0&&g.push(((n-u)*t+(n+l))*4+3),l>0&&(g.push(((n+u)*t+(n-l))*4+3),u>0&&g.push(((n-u)*t+(n-l))*4+3))}const s=[];for(let u=0,l=i.length;u<l;++u)i[u]&&s.push(...i[u]);return nl[n]=s,s}class z1 extends Wf{constructor(t,e,i,s,u,l,f){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=s,this.transformRotation_=s?ev(Math.atan2(s[1],s[0]),10):0,this.viewRotation_=u,this.squaredTolerance_=l,this.userTransform_=f,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=Xn()}drawImages_(t,e,i,s){if(!this.image_)return;const u=di(t,e,i,s,this.transform_,this.pixelCoordinates_),l=this.context_,f=this.tmpLocalTransform_,g=l.globalAlpha;this.imageOpacity_!=1&&(l.globalAlpha=g*this.imageOpacity_);let m=this.imageRotation_;this.transformRotation_===0&&(m-=this.viewRotation_),this.imageRotateWithView_&&(m+=this.viewRotation_);for(let y=0,p=u.length;y<p;y+=2){const _=u[y]-this.imageAnchorX_,E=u[y+1]-this.imageAnchorY_;if(m!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const S=_+this.imageAnchorX_,b=E+this.imageAnchorY_;$i(f,S,b,1,1,m,-S,-b),l.save(),l.transform.apply(l,f),l.translate(S,b),l.scale(this.imageScale_[0],this.imageScale_[1]),l.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),l.restore()}else l.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,_,E,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(l.globalAlpha=g)}drawText_(t,e,i,s){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const u=di(t,e,i,s,this.transform_,this.pixelCoordinates_),l=this.context_;let f=this.textRotation_;for(this.transformRotation_===0&&(f-=this.viewRotation_),this.textRotateWithView_&&(f+=this.viewRotation_);e<i;e+=s){const g=u[e]+this.textOffsetX_,m=u[e+1]+this.textOffsetY_;f!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(l.save(),l.translate(g-this.textOffsetX_,m-this.textOffsetY_),l.rotate(f),l.translate(this.textOffsetX_,this.textOffsetY_),l.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&l.strokeText(this.text_,0,0),this.textFillState_&&l.fillText(this.text_,0,0),l.restore()):(this.textStrokeState_&&l.strokeText(this.text_,g,m),this.textFillState_&&l.fillText(this.text_,g,m))}}moveToLineTo_(t,e,i,s,u){const l=this.context_,f=di(t,e,i,s,this.transform_,this.pixelCoordinates_);l.moveTo(f[0],f[1]);let g=f.length;u&&(g-=2);for(let m=2;m<g;m+=2)l.lineTo(f[m],f[m+1]);return u&&l.closePath(),i}drawRings_(t,e,i,s){for(let u=0,l=i.length;u<l;++u)e=this.moveToLineTo_(t,e,i[u],s,!0);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!cn(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=Ov(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],s=e[3]-e[1],u=Math.sqrt(i*i+s*s),l=this.context_;l.beginPath(),l.arc(e[0],e[1],u,0,2*Math.PI),this.fillState_&&l.fill(),this.strokeState_&&l.stroke()}this.text_!==""&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t);break}}drawFeature(t,e){const i=e.getGeometryFunction()(t);i&&(this.setStyle(e),this.drawGeometry(i))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let i=0,s=e.length;i<s;++i)this.drawGeometry(e[i])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),this.text_!==""&&this.drawText_(e,0,e.length,i)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),this.text_!==""&&this.drawText_(e,0,e.length,i)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!cn(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(this.text_!==""){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(cn(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const i=this.context_,s=t.getFlatCoordinates();let u=0;const l=t.getEnds(),f=t.getStride();i.beginPath();for(let g=0,m=l.length;g<m;++g)u=this.moveToLineTo_(s,u,l[g],f,!1);i.stroke()}if(this.text_!==""){const i=t.getFlatMidpoints();this.drawText_(i,0,i.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!cn(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!cn(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getOrientedFlatCoordinates();let s=0;const u=t.getEndss(),l=t.getStride();e.beginPath();for(let f=0,g=u.length;f<g;++f){const m=u[f];s=this.drawRings_(i,s,m,l)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),wr(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,i=this.contextTextState_,s=t.textAlign?t.textAlign:Fs;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=s&&(i.textAlign=s,e.textAlign=s),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=s,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:s,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(!t)this.fillState_=null;else{const i=t.getColor();this.fillState_={fillStyle:Cn(i||Pe)}}if(!e)this.strokeState_=null;else{const i=e.getColor(),s=e.getLineCap(),u=e.getLineDash(),l=e.getLineDashOffset(),f=e.getLineJoin(),g=e.getWidth(),m=e.getMiterLimit(),y=u||qn;this.strokeState_={lineCap:s!==void 0?s:Or,lineDash:this.pixelRatio_===1?y:y.map(p=>p*this.pixelRatio_),lineDashOffset:(l||Un)*this.pixelRatio_,lineJoin:f!==void 0?f:Ar,lineWidth:(g!==void 0?g:Gs)*this.pixelRatio_,miterLimit:m!==void 0?m:Ps,strokeStyle:Cn(i||Ds)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const i=t.getPixelRatio(this.pixelRatio_),s=t.getAnchor(),u=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*i,this.imageAnchorY_=s[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=u[0],this.imageOriginY_=u[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const l=t.getScaleArray();this.imageScale_=[l[0]*this.pixelRatio_/i,l[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const E=e.getColor();this.textFillState_={fillStyle:Cn(E||Pe)}}const i=t.getStroke();if(!i)this.textStrokeState_=null;else{const E=i.getColor(),S=i.getLineCap(),b=i.getLineDash(),k=i.getLineDashOffset(),C=i.getLineJoin(),R=i.getWidth(),M=i.getMiterLimit();this.textStrokeState_={lineCap:S!==void 0?S:Or,lineDash:b||qn,lineDashOffset:k||Un,lineJoin:C!==void 0?C:Ar,lineWidth:R!==void 0?R:Gs,miterLimit:M!==void 0?M:Ps,strokeStyle:Cn(E||Ds)}}const s=t.getFont(),u=t.getOffsetX(),l=t.getOffsetY(),f=t.getRotateWithView(),g=t.getRotation(),m=t.getScaleArray(),y=t.getText(),p=t.getTextAlign(),_=t.getTextBaseline();this.textState_={font:s!==void 0?s:Zc,textAlign:p!==void 0?p:Fs,textBaseline:_!==void 0?_:Wo},this.text_=y!==void 0?Array.isArray(y)?y.reduce((E,S,b)=>E+=b%2?" ":S,""):y:"",this.textOffsetX_=u!==void 0?this.pixelRatio_*u:0,this.textOffsetY_=l!==void 0?this.pixelRatio_*l:0,this.textRotateWithView_=f!==void 0?f:!1,this.textRotation_=g!==void 0?g:0,this.textScale_=[this.pixelRatio_*m[0],this.pixelRatio_*m[1]]}}}const Ln=.5;function Y1(n,t,e,i,s,u,l,f,g){const m=s,y=n[0]*Ln,p=n[1]*Ln,_=Ge(y,p);_.imageSmoothingEnabled=!1;const E=_.canvas,S=new z1(_,Ln,s,null,l,f,null),b=e.length,k=Math.floor((256*256*256-1)/b),C={};for(let M=1;M<=b;++M){const O=e[M-1],T=O.getStyleFunction()||i;if(!T)continue;let G=T(O,u);if(!G)continue;Array.isArray(G)||(G=[G]);const F=(M*k).toString(16).padStart(7,"#00000");for(let A=0,j=G.length;A<j;++A){const et=G[A],U=et.getGeometryFunction()(O);if(!U||!cn(m,U.getExtent()))continue;const nt=et.clone(),z=nt.getFill();z&&z.setColor(F);const K=nt.getStroke();K&&(K.setColor(F),K.setLineDash(null)),nt.setText(void 0);const Z=et.getImage();if(Z){const Q=Z.getImageSize();if(!Q)continue;const _t=Ge(Q[0],Q[1],void 0,{alpha:!1}),Et=_t.canvas;_t.fillStyle=F,_t.fillRect(0,0,Et.width,Et.height),nt.setImage(new Bs({img:Et,anchor:Z.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:Z.getOrigin(),opacity:1,size:Z.getSize(),scale:Z.getScale(),rotation:Z.getRotation(),rotateWithView:Z.getRotateWithView()}))}const at=nt.getZIndex()||0;let gt=C[at];gt||(gt={},C[at]=gt,gt.Polygon=[],gt.Circle=[],gt.LineString=[],gt.Point=[]);const St=U.getType();if(St==="GeometryCollection"){const Q=U.getGeometriesArrayRecursive();for(let _t=0,Et=Q.length;_t<Et;++_t){const qt=Q[_t];gt[qt.getType().replace("Multi","")].push(qt,nt)}}else gt[St.replace("Multi","")].push(U,nt)}}const R=Object.keys(C).map(Number).sort(Xi);for(let M=0,O=R.length;M<O;++M){const T=C[R[M]];for(const G in T){const D=T[G];for(let F=0,A=D.length;F<A;F+=2){S.setStyle(D[F+1]);for(let j=0,et=t.length;j<et;++j)S.setTransform(t[j]),S.drawGeometry(D[F])}}}return _.getImageData(0,0,E.width,E.height)}function W1(n,t,e){const i=[];if(e){const s=Math.floor(Math.round(n[0])*Ln),u=Math.floor(Math.round(n[1])*Ln),l=(xe(s,0,e.width-1)+xe(u,0,e.height-1)*e.width)*4,f=e.data[l],g=e.data[l+1],y=e.data[l+2]+256*(g+256*f),p=Math.floor((256*256*256-1)/t.length);y&&y%p===0&&i.push(t[y/p-1])}return i}const X1=.5,Hf={Point:J1,LineString:Z1,Polygon:Q1,MultiPoint:$1,MultiLineString:H1,MultiPolygon:K1,GeometryCollection:V1,Circle:U1};function q1(n,t){return parseInt(de(n),10)-parseInt(de(t),10)}function Kf(n,t){const e=Jf(n,t);return e*e}function Jf(n,t){return X1*n/t}function U1(n,t,e,i,s){const u=e.getFill(),l=e.getStroke();if(u||l){const g=n.getBuilder(e.getZIndex(),"Circle");g.setFillStrokeStyle(u,l),g.drawCircle(t,i,s)}const f=e.getText();if(f&&f.getText()){const g=n.getBuilder(e.getZIndex(),"Text");g.setTextStyle(f),g.drawText(t,i)}}function $f(n,t,e,i,s,u,l,f){const g=[],m=e.getImage();if(m){let _=!0;const E=m.getImageState();E==wt.LOADED||E==wt.ERROR?_=!1:E==wt.IDLE&&m.load(),_&&g.push(m.ready())}const y=e.getFill();y&&y.loading()&&g.push(y.ready());const p=g.length>0;return p&&Promise.all(g).then(()=>s(null)),j1(n,t,e,i,u,l,f),p}function j1(n,t,e,i,s,u,l){const f=e.getGeometryFunction()(t);if(!f)return;const g=f.simplifyTransformed(i,s);if(e.getRenderer())Qf(n,g,e,t,l);else{const y=Hf[g.getType()];y(n,g,e,t,l,u)}}function Qf(n,t,e,i,s){if(t.getType()=="GeometryCollection"){const l=t.getGeometries();for(let f=0,g=l.length;f<g;++f)Qf(n,l[f],e,i,s);return}n.getBuilder(e.getZIndex(),"Default").drawCustom(t,i,e.getRenderer(),e.getHitDetectionRenderer(),s)}function V1(n,t,e,i,s,u){const l=t.getGeometriesArray();let f,g;for(f=0,g=l.length;f<g;++f){const m=Hf[l[f].getType()];m(n,l[f],e,i,s,u)}}function Z1(n,t,e,i,s){const u=e.getStroke();if(u){const f=n.getBuilder(e.getZIndex(),"LineString");f.setFillStrokeStyle(null,u),f.drawLineString(t,i,s)}const l=e.getText();if(l&&l.getText()){const f=n.getBuilder(e.getZIndex(),"Text");f.setTextStyle(l),f.drawText(t,i,s)}}function H1(n,t,e,i,s){const u=e.getStroke();if(u){const f=n.getBuilder(e.getZIndex(),"LineString");f.setFillStrokeStyle(null,u),f.drawMultiLineString(t,i,s)}const l=e.getText();if(l&&l.getText()){const f=n.getBuilder(e.getZIndex(),"Text");f.setTextStyle(l),f.drawText(t,i,s)}}function K1(n,t,e,i,s){const u=e.getFill(),l=e.getStroke();if(l||u){const g=n.getBuilder(e.getZIndex(),"Polygon");g.setFillStrokeStyle(u,l),g.drawMultiPolygon(t,i,s)}const f=e.getText();if(f&&f.getText()){const g=n.getBuilder(e.getZIndex(),"Text");g.setTextStyle(f),g.drawText(t,i,s)}}function J1(n,t,e,i,s,u){const l=e.getImage(),f=e.getText(),g=f&&f.getText(),m=u&&l&&g?{}:void 0;if(l){if(l.getImageState()!=wt.LOADED)return;const y=n.getBuilder(e.getZIndex(),"Image");y.setImageStyle(l,m),y.drawPoint(t,i,s)}if(g){const y=n.getBuilder(e.getZIndex(),"Text");y.setTextStyle(f,m),y.drawText(t,i,s)}}function $1(n,t,e,i,s,u){const l=e.getImage(),f=l&&l.getOpacity()!==0,g=e.getText(),m=g&&g.getText(),y=u&&f&&m?{}:void 0;if(f){if(l.getImageState()!=wt.LOADED)return;const p=n.getBuilder(e.getZIndex(),"Image");p.setImageStyle(l,y),p.drawMultiPoint(t,i,s)}if(m){const p=n.getBuilder(e.getZIndex(),"Text");p.setTextStyle(g,y),p.drawText(t,i,s)}}function Q1(n,t,e,i,s){const u=e.getFill(),l=e.getStroke();if(u||l){const g=n.getBuilder(e.getZIndex(),"Polygon");g.setFillStrokeStyle(u,l),g.drawPolygon(t,i,s)}const f=e.getText();if(f&&f.getText()){const g=n.getBuilder(e.getZIndex(),"Text");g.setTextStyle(f),g.drawText(t,i,s)}}class tE extends O1{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=ji(),this.wrappedRenderedExtent_=ji(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(t,e,i){const s=e.extent,u=e.viewState,l=u.center,f=u.resolution,g=u.projection,m=u.rotation,y=g.getExtent(),p=this.getLayer().getSource(),_=this.getLayer().getDeclutter(),E=e.pixelRatio,S=e.viewHints,b=!(S[Ke.ANIMATING]||S[Ke.INTERACTING]),k=this.context,C=Math.round(Oe(s)/f*E),R=Math.round(Wn(s)/f*E),M=p.getWrapX()&&g.canWrapX(),O=M?Oe(y):null,T=M?Math.ceil((s[2]-y[2])/O)+1:1;let G=M?Math.floor((s[0]-y[0])/O):0;do{const D=this.getRenderTransform(l,f,m,E,C,R,G*O);t.execute(k,[k.canvas.width,k.canvas.height],D,m,b,i===void 0?$s:i?Zf:F1,i?_&&e.declutter[_]:void 0)}while(++G<T)}setDrawContext_(){this.opacity_!==1&&(this.targetContext_=this.context,this.context=Ge(this.context.canvas.width,this.context.canvas.height,Uf))}resetDrawContext_(){if(this.opacity_!==1){const t=this.targetContext_.globalAlpha;this.targetContext_.globalAlpha=this.opacity_,this.targetContext_.drawImage(this.context.canvas,0,0),this.targetContext_.globalAlpha=t,Lp(this.context),Uf.push(this.context.canvas),this.context=this.targetContext_,this.targetContext_=null}}renderDeclutter(t){!this.replayGroup_||!this.getLayer().getDeclutter()||this.renderWorlds(this.replayGroup_,t,!0)}renderDeferredInternal(t){this.replayGroup_&&(this.replayGroup_.renderDeferred(),this.resetDrawContext_())}renderFrame(t,e){const i=t.pixelRatio,s=t.layerStatesArray[t.layerIndex];this.opacity_=s.opacity;const u=t.extent,l=t.viewState.resolution,f=Math.round(Oe(u)/l*i),g=Math.round(Wn(u)/l*i);$i(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/i,1/i,0,-f/2,-g/2),Cv(this.inversePixelTransform,this.pixelTransform);const m=Lv(this.pixelTransform);this.useContainer(e,m,this.getBackground(t));const y=this.context,p=y.canvas,_=this.replayGroup_;let E=_&&!_.isEmpty();if(!E&&!(this.getLayer().hasListener(Ji.PRERENDER)||this.getLayer().hasListener(Ji.POSTRENDER)))return null;p.width!=f||p.height!=g?(p.width=f,p.height=g,p.style.transform!==m&&(p.style.transform=m)):this.containerReused||y.clearRect(0,0,f,g),this.setDrawContext_(),this.preRender(y,t);const S=t.viewState;S.projection;let b=!1;if(E&&s.extent&&this.clipping){const k=Is(s.extent);E=cn(k,t.extent),b=E&&!Lr(k,t.extent),b&&this.clipUnrotated(y,t,k)}return E&&this.renderWorlds(_,t,this.getLayer().getDeclutter()?!1:void 0),b&&y.restore(),this.postRender(y,t),this.renderedRotation_!==S.rotation&&(this.renderedRotation_=S.rotation,this.hitDetectionImageData_=null),t.declutter||this.resetDrawContext_(),this.container}getFeatures(t){return new Promise(e=>{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const i=[this.context.canvas.width,this.context.canvas.height];Ae(this.pixelTransform,i);const s=this.renderedCenter_,u=this.renderedResolution_,l=this.renderedRotation_,f=this.renderedProjection_,g=this.wrappedRenderedExtent_,m=this.getLayer(),y=[],p=i[0]*Ln,_=i[1]*Ln;y.push(this.getRenderTransform(s,u,l,Ln,p,_,0).slice());const E=m.getSource(),S=f.getExtent();if(E.getWrapX()&&f.canWrapX()&&!Lr(S,g)){let b=g[0];const k=Oe(S);let C=0,R;for(;b<S[0];)--C,R=k*C,y.push(this.getRenderTransform(s,u,l,Ln,p,_,R).slice()),b+=k;for(C=0,b=g[2];b>S[2];)++C,R=k*C,y.push(this.getRenderTransform(s,u,l,Ln,p,_,R).slice()),b-=k}this.hitDetectionImageData_=Y1(i,y,this.renderedFeatures_,m.getStyleFunction(),g,u,l,Kf(u,this.renderedPixelRatio_))}e(W1(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,e,i,s,u){if(!this.replayGroup_)return;const l=e.viewState.resolution,f=e.viewState.rotation,g=this.getLayer(),m={},y=function(S,b,k){const C=de(S),R=m[C];if(R){if(R!==!0&&k<R.distanceSq){if(k===0)return m[C]=!0,u.splice(u.lastIndexOf(R),1),s(S,g,b);R.geometry=b,R.distanceSq=k}}else{if(k===0)return m[C]=!0,s(S,g,b);u.push(m[C]={feature:S,layer:g,geometry:b,distanceSq:k,callback:s})}};let p;const _=[this.replayGroup_],E=this.getLayer().getDeclutter();return _.some(S=>p=S.forEachFeatureAtCoordinate(t,l,f,i,y,E&&e.declutter[E]?e.declutter[E].all().map(b=>b.value):null)),p}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const s=t.viewHints[Ke.ANIMATING],u=t.viewHints[Ke.INTERACTING],l=e.getUpdateWhileAnimating(),f=e.getUpdateWhileInteracting();if(this.ready&&!l&&s||!f&&u)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const g=t.extent,m=t.viewState,y=m.projection,p=m.resolution,_=t.pixelRatio,E=e.getRevision(),S=e.getRenderBuffer();let b=e.getRenderOrder();b===void 0&&(b=q1);const k=m.center.slice(),C=hu(g,S*p),R=C.slice(),M=[C.slice()],O=y.getExtent();if(i.getWrapX()&&y.canWrapX()&&!Lr(O,t.extent)){const z=Oe(O),K=Math.max(Oe(C)/2,z);C[0]=O[0]-K,C[2]=O[2]+K,rv(k,y);const Z=fc(M[0],y);Z[0]<O[0]&&Z[2]<O[2]?M.push([Z[0]+z,Z[1],Z[2]+z,Z[3]]):Z[0]>O[0]&&Z[2]>O[2]&&M.push([Z[0]-z,Z[1],Z[2]-z,Z[3]])}if(this.ready&&this.renderedResolution_==p&&this.renderedRevision_==E&&this.renderedRenderOrder_==b&&Lr(this.wrappedRenderedExtent_,C))return wr(this.renderedExtent_,R)||(this.hitDetectionImageData_=null,this.renderedExtent_=R),this.renderedCenter_=k,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const T=new N1(Jf(p,_),C,p,_);let G;for(let z=0,K=M.length;z<K;++z)i.loadFeatures(M[z],p,y);const D=Kf(p,_);let F=!0;const A=(z,K)=>{let Z;const at=z.getStyleFunction()||e.getStyleFunction();if(at&&(Z=at(z,p)),Z){const gt=this.renderFeature(z,D,Z,T,G,this.getLayer().getDeclutter(),K);F=F&&!gt}},j=_c(C),et=i.getFeaturesInExtent(j);b&&et.sort(b);for(let z=0,K=et.length;z<K;++z)A(et[z],z);this.renderedFeatures_=et,this.ready=F;const U=T.finish(),nt=new G1(C,p,_,i.getOverlaps(),U,e.getRenderBuffer(),!!t.declutter);return this.renderedResolution_=p,this.renderedRevision_=E,this.renderedRenderOrder_=b,this.renderedExtent_=R,this.wrappedRenderedExtent_=C,this.renderedCenter_=k,this.renderedProjection_=y,this.renderedPixelRatio_=_,this.replayGroup_=nt,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,i,s,u,l,f){if(!i)return!1;let g=!1;if(Array.isArray(i))for(let m=0,y=i.length;m<y;++m)g=$f(s,t,i[m],e,this.boundHandleStyleImageChange_,u,l,f)||g;else g=$f(s,t,i,e,this.boundHandleStyleImageChange_,u,l,f);return g}}class eE extends d0{constructor(t){super(t)}createRenderer(){return new tE(this)}}class tg{constructor(t){this.rbush_=new Yc(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[de(e)]=i}load(t,e){const i=new Array(e.length);for(let s=0,u=e.length;s<u;s++){const l=t[s],f=e[s],g={minX:l[0],minY:l[1],maxX:l[2],maxY:l[3],value:f};i[s]=g,this.items_[de(f)]=g}this.rbush_.load(i)}remove(t){const e=de(t),i=this.items_[e];return delete this.items_[e],this.rbush_.remove(i)!==null}update(t,e){const i=this.items_[de(e)],s=[i.minX,i.minY,i.maxX,i.maxY];oc(s,t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map(function(e){return e.value})}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(s){return s.value})}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let i;for(let s=0,u=t.length;s<u;s++)if(i=e(t[s]),i)return i;return i}isEmpty(){return kr(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return Vi(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}}class sa extends Cc{constructor(t){super(),this.geometries_=t,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(bn),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const t=this.geometries_;for(let e=0,i=t.length;e<i;++e)this.changeEventsKeys_.push(hn(t[e],He.CHANGE,this.changed,this))}clone(){const t=new sa(il(this.geometries_));return t.applyProperties(this),t}closestPointXY(t,e,i,s){if(s<Ui(this.getExtent(),t,e))return s;const u=this.geometries_;for(let l=0,f=u.length;l<f;++l)s=u[l].closestPointXY(t,e,i,s);return s}containsXY(t,e){const i=this.geometries_;for(let s=0,u=i.length;s<u;++s)if(i[s].containsXY(t,e))return!0;return!1}computeExtent(t){No(t);const e=this.geometries_;for(let i=0,s=e.length;i<s;++i)Xp(t,e[i].getExtent());return t}getGeometries(){return il(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let i=0,s=e.length;i<s;++i)e[i].getType()===this.getType()?t=t.concat(e[i].getGeometriesArrayRecursive()):t.push(e[i]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=[],i=this.geometries_;let s=!1;for(let u=0,l=i.length;u<l;++u){const f=i[u],g=f.getSimplifiedGeometry(t);e.push(g),g!==f&&(s=!0)}return s?new sa(e):(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let i=0,s=e.length;i<s;++i)if(e[i].intersectsExtent(t))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(t,e){const i=this.geometries_;for(let s=0,u=i.length;s<u;++s)i[s].rotate(t,e);this.changed()}scale(t,e,i){i||(i=Zi(this.getExtent()));const s=this.geometries_;for(let u=0,l=s.length;u<l;++u)s[u].scale(t,e,i);this.changed()}setGeometries(t){this.setGeometriesArray(il(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let i=0,s=e.length;i<s;++i)e[i].applyTransform(t);this.changed()}translate(t,e){const i=this.geometries_;for(let s=0,u=i.length;s<u;++s)i[s].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function il(n){return n.map(t=>t.clone())}class Qs extends Qi{constructor(t,e,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&i)this.setFlatCoordinates(e,t),this.ends_=i;else{const s=t,u=[],l=[];for(let g=0,m=s.length;g<m;++g){const y=s[g];kn(u,y.getFlatCoordinates()),l.push(u.length)}const f=s.length===0?this.getLayout():s[0].getLayout();this.setFlatCoordinates(f,u),this.ends_=l}}appendLineString(t){kn(this.flatCoordinates,t.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Qs(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,s){return s<Ui(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Su(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Iu(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,s))}getCoordinateAtM(t,e,i){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(e=e!==void 0?e:!1,i=i!==void 0?i:!1,w1(this.flatCoordinates,0,this.ends_,this.stride,t,e,i))}getCoordinates(){return ks(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new ur(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){const t=this.flatCoordinates,e=this.ends_,i=this.layout,s=[];let u=0;for(let l=0,f=e.length;l<f;++l){const g=e[l],m=new ur(t.slice(u,g),i);s.push(m),u=g}return s}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let i=0;const s=this.ends_,u=this.stride;for(let l=0,f=s.length;l<f;++l){const g=s[l],m=na(e,i,g,u,.5);kn(t,m),i=g}return t}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=Nc(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,i),new Qs(e,"XY",i)}getType(){return"MultiLineString"}intersectsExtent(t){return Xv(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=ku(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()}}class rl extends Qi{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){kn(this.flatCoordinates,t.getFlatCoordinates()),this.changed()}clone(){const t=new rl(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,s){if(s<Ui(this.getExtent(),t,e))return s;const u=this.flatCoordinates,l=this.stride;for(let f=0,g=u.length;f<g;f+=l){const m=Hi(t,e,u[f],u[f+1]);if(m<s){s=m;for(let y=0;y<l;++y)i[y]=u[f+y];i.length=l}}return s}getCoordinates(){return mi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates.length/this.stride;return t<0||e<=t?null:new yi(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,i=this.stride,s=[];for(let u=0,l=t.length;u<l;u+=i){const f=new yi(t.slice(u,u+i),e);s.push(f)}return s}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,i=this.stride;for(let s=0,u=e.length;s<u;s+=i){const l=e[s],f=e[s+1];if(fu(t,l,f))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Po(this.flatCoordinates,0,t,this.stride),this.changed()}}function eg(n,t,e,i){const s=[];let u=ji();for(let l=0,f=e.length;l<f;++l){const g=e[l];u=du(n,t,g[0],i),s.push((u[0]+u[2])/2,(u[1]+u[3])/2),t=g[g.length-1]}return s}class to extends Qi{constructor(t,e,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){const s=t,u=[],l=[];for(let f=0,g=s.length;f<g;++f){const m=s[f],y=u.length,p=m.getEnds();for(let _=0,E=p.length;_<E;++_)p[_]+=y;kn(u,m.getFlatCoordinates()),l.push(p)}e=s.length===0?this.getLayout():s[0].getLayout(),t=u,i=l}e!==void 0&&i?(this.setFlatCoordinates(e,t),this.endss_=i):this.setCoordinates(t,e)}appendPolygon(t){let e;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();else{const i=this.flatCoordinates.length;kn(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let s=0,u=e.length;s<u;++s)e[s]+=i}this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let s=0;s<t;++s)e[s]=this.endss_[s].slice();const i=new to(this.flatCoordinates.slice(),this.layout,e);return i.applyProperties(this),i}closestPointXY(t,e,i,s){return s<Ui(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Av(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Pv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,i,s))}containsXY(t,e){return Wv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return zv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),Fc(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,Cu(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=eg(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=Oc(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new rl(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;Vv(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Fc(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=Bv(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,i),new to(e,"XY",i)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(t===0)e=0;else{const u=this.endss_[t-1];e=u[u.length-1]}const i=this.endss_[t].slice(),s=i[i.length-1];if(e!==0)for(let u=0,l=i.length;u<l;++u)i[u]-=e;return new pi(this.flatCoordinates.slice(e,s),this.layout,i)}getPolygons(){const t=this.layout,e=this.flatCoordinates,i=this.endss_,s=[];let u=0;for(let l=0,f=i.length;l<f;++l){const g=i[l].slice(),m=g[g.length-1];if(u!==0)for(let p=0,_=g.length;p<_;++p)g[p]-=u;const y=new pi(e.slice(u,m),t,g);s.push(y),u=m}return s}getType(){return"MultiPolygon"}intersectsExtent(t){return Uv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const i=Fv(this.flatCoordinates,0,t,this.stride,this.endss_);if(i.length===0)this.flatCoordinates.length=0;else{const s=i[i.length-1];this.flatCoordinates.length=s.length===0?0:s[s.length-1]}this.changed()}}const ng=Xn();class Je{constructor(t,e,i,s,u,l){this.styleFunction,this.extent_,this.id_=l,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i||null,this.properties_=u,this.squaredTolerance_,this.stride_=s,this.simplifiedGeometry_}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?sc(this.flatCoordinates_):du(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=Zi(this.getExtent());this.flatInteriorPoints_=Lu(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=Zv(this.flatCoordinates_,this.ends_),e=eg(this.flatCoordinates_,0,t,2);this.flatInteriorPoints_=Oc(this.flatCoordinates_,0,t,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=na(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const i=this.ends_;for(let s=0,u=i.length;s<u;++s){const l=i[s],f=na(t,e,l,2,.5);kn(this.flatMidpoints_,f),e=l}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){t=Ki(t);const e=t.getExtent(),i=t.getWorldExtent();if(e&&i){const s=Wn(i)/Wn(e);$i(ng,i[0],i[3],s,-s,0,0,0),di(this.flatCoordinates_,0,this.flatCoordinates_.length,2,ng,this.flatCoordinates_)}}applyTransform(t){t(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){var t;return new Je(this.type_,this.flatCoordinates_.slice(),(t=this.ends_)==null?void 0:t.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=jh((t,e)=>{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const i=this.simplifiedGeometry_.getFlatCoordinates();let s;switch(this.type_){case"LineString":i.length=Do(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),s=[i.length];break;case"MultiLineString":s=[],i.length=Nc(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,s);break;case"Polygon":s=[],i.length=bu(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,s);break}return s&&(this.simplifiedGeometry_=new Je(this.type_,i,s,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}}Je.prototype.getFlatCoordinates=Je.prototype.getOrientedFlatCoordinates;class nE extends ci{constructor(t){super(),this.projection=Ki(t.projection),this.attributions_=ig(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,this.loading=!1,this.state_=t.state!==void 0?t.state:"ready",this.wrapX_=t.wrapX!==void 0?t.wrapX:!1,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise(function(i,s){e.viewResolver=i,e.viewRejector=s})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=ig(t),this.changed()}setState(t){this.state_=t,this.changed()}}function ig(n){return n?Array.isArray(n)?function(t){return n}:typeof n=="function"?n:function(t){return[n]}:null}const $e={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function iE(n,t){return[[-1/0,-1/0,1/0,1/0]]}let rE=!1;function sE(n,t,e,i,s,u,l){const f=new XMLHttpRequest;f.open("GET",typeof n=="function"?n(e,i,s):n,!0),t.getType()=="arraybuffer"&&(f.responseType="arraybuffer"),f.withCredentials=rE,f.onload=function(g){if(!f.status||f.status>=200&&f.status<300){const m=t.getType();let y;m=="json"?y=JSON.parse(f.responseText):m=="text"?y=f.responseText:m=="xml"?(y=f.responseXML,y||(y=new DOMParser().parseFromString(f.responseText,"application/xml"))):m=="arraybuffer"&&(y=f.response),y?u(t.readFeatures(y,{extent:e,featureProjection:s}),t.readProjection(y)):l()}else l()},f.onerror=l,f.send()}function rg(n,t){return function(e,i,s,u,l){const f=this;sE(n,t,e,i,s,function(g,m){f.addFeatures(g),u!==void 0&&u(g)},l||Ir)}}class Li extends It{constructor(t,e,i){super(t),this.feature=e,this.features=i}}class oE extends nE{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=Ir,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(me(this.format_,"`format` must be set when `url` is set"),this.loader_=rg(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:iE;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new tg:null,this.loadedExtentsRtree_=new tg,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,s;Array.isArray(t.features)?s=t.features:t.features&&(i=t.features,s=i.getArray()),!e&&i===void 0&&(i=new dv(s)),s!==void 0&&this.addFeaturesInternal(s),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=de(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const s=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(s,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Li($e.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof Je||(this.featureChangeKeys_[t]=[hn(e,He.CHANGE,this.handleFeatureChange_,this),hn(e,re.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let i=!0;if(e.getId()!==void 0){const s=String(e.getId());if(!(s in this.idIndex_))this.idIndex_[s]=e;else if(e instanceof Je){const u=this.idIndex_[s];u instanceof Je?Array.isArray(u)?u.push(e):this.idIndex_[s]=[u,e]:i=!1}else i=!1}return i&&(me(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],s=[];for(let u=0,l=t.length;u<l;u++){const f=t[u],g=de(f);this.addToIndex_(g,f)&&i.push(f)}for(let u=0,l=i.length;u<l;u++){const f=i[u],g=de(f);this.setupChangeEvents_(g,f);const m=f.getGeometry();if(m){const y=m.getExtent();e.push(y),s.push(f)}else this.nullGeometryFeatures_[g]=f}if(this.featuresRtree_&&this.featuresRtree_.load(e,s),this.hasListener($e.ADDFEATURE))for(let u=0,l=i.length;u<l;u++)this.dispatchEvent(new Li($e.ADDFEATURE,i[u]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener($e.ADDFEATURE,function(i){e||(e=!0,t.push(i.feature),e=!1)}),this.addEventListener($e.REMOVEFEATURE,function(i){e||(e=!0,t.remove(i.feature),e=!1)}),t.addEventListener(Nr.ADD,i=>{e||(e=!0,this.addFeature(i.element),e=!1)}),t.addEventListener(Nr.REMOVE,i=>{e||(e=!0,this.removeFeature(i.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(const i in this.featureChangeKeys_)this.featureChangeKeys_[i].forEach(bn);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const i=s=>{this.removeFeatureInternal(s)};this.featuresRtree_.forEach(i);for(const s in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[s])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new Li($e.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,function(s){const u=s.getGeometry();if(u instanceof Je||u.intersectsCoordinate(t))return e(s)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(i){const s=i.getGeometry();if(s instanceof Je||s.intersectsExtent(t)){const u=e(i);if(u)return u}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),kr(this.nullGeometryFeatures_)||kn(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(i){e.push(i)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const s=$p(t,e);return[].concat(...s.map(u=>this.featuresRtree_.getInExtent(u)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],s=t[1];let u=null;const l=[NaN,NaN];let f=1/0;const g=[-1/0,-1/0,1/0,1/0];return e=e||Ip,this.featuresRtree_.forEachInExtent(g,function(m){if(e(m)){const y=m.getGeometry(),p=f;if(f=y instanceof Je?0:y.closestPointXY(i,s,l,f),f<p){u=m;const _=Math.sqrt(f);g[0]=i-_,g[1]=s-_,g[2]=i+_,g[3]=s+_}}}),u}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return e!==void 0?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return e!==void 0?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,i=de(e),s=e.getGeometry();if(!s)i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);else{const l=s.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(l,e)):this.featuresRtree_&&this.featuresRtree_.update(l,e)}const u=e.getId();if(u!==void 0){const l=u.toString();this.idIndex_[l]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[l]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new Li($e.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return e!==void 0?e in this.idIndex_:de(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&kr(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(t,e,i){const s=this.loadedExtentsRtree_,u=this.strategy_(t,e,i);for(let l=0,f=u.length;l<f;++l){const g=u[l];s.forEachInExtent(g,function(y){return Lr(y.extent,g)})||(++this.loadingExtentsCount_,this.dispatchEvent(new Li($e.FEATURESLOADSTART)),this.loader_.call(this,g,e,i,y=>{--this.loadingExtentsCount_,this.dispatchEvent(new Li($e.FEATURESLOADEND,void 0,y))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Li($e.FEATURESLOADERROR))}),s.insert(g,{extent:g.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,function(s){if(oc(s.extent,t))return i=s,!0}),i&&e.remove(i)}removeFeatures(t){const e=[];for(let i=0,s=t.length;i<s;++i){const u=t[i],l=this.removeFeatureInternal(u);l&&e.push(l)}e.length>0&&this.changed()}removeFeature(t){if(!t)return;this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=de(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t);const i=this.featureChangeKeys_[e];if(!i)return;i.forEach(bn),delete this.featureChangeKeys_[e];const s=t.getId();return s!==void 0&&delete this.idIndex_[s.toString()],delete this.uidIndex_[e],this.hasListener($e.REMOVEFEATURE)&&this.dispatchEvent(new Li($e.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const i in this.idIndex_){const s=this.idIndex_[i];if(t instanceof Je&&Array.isArray(s)&&s.includes(t))s.splice(s.indexOf(t),1);else if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}}return e}setLoader(t){this.loader_=t}setUrl(t){me(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader(rg(t,this.format_))}}var oa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function aE(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var s=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:function(){return n[i]}})}),e}var og=Object.prototype.toString,ag=function(t){var e=og.call(t),i=e==="[object Arguments]";return i||(i=e!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&og.call(t.callee)==="[object Function]"),i},sl,ug;function uE(){if(ug)return sl;ug=1;var n;if(!Object.keys){var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,i=ag,s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),l=s.call(function(){},"prototype"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],g=function(_){var E=_.constructor;return E&&E.prototype===_},m={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},y=function(){if(typeof window>"u")return!1;for(var _ in window)try{if(!m["$"+_]&&t.call(window,_)&&window[_]!==null&&typeof window[_]=="object")try{g(window[_])}catch{return!0}}catch{return!0}return!1}(),p=function(_){if(typeof window>"u"||!y)return g(_);try{return g(_)}catch{return!1}};n=function(E){var S=E!==null&&typeof E=="object",b=e.call(E)==="[object Function]",k=i(E),C=S&&e.call(E)==="[object String]",R=[];if(!S&&!b&&!k)throw new TypeError("Object.keys called on a non-object");var M=l&&b;if(C&&E.length>0&&!t.call(E,0))for(var O=0;O<E.length;++O)R.push(String(O));if(k&&E.length>0)for(var T=0;T<E.length;++T)R.push(String(T));else for(var G in E)!(M&&G==="prototype")&&t.call(E,G)&&R.push(String(G));if(u)for(var D=p(E),F=0;F<f.length;++F)!(D&&f[F]==="constructor")&&t.call(E,f[F])&&R.push(f[F]);return R}}return sl=n,sl}var lE=Array.prototype.slice,hE=ag,lg=Object.keys,aa=lg?function(t){return lg(t)}:uE(),hg=Object.keys;aa.shim=function(){if(Object.keys){var t=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);t||(Object.keys=function(i){return hE(i)?hg(lE.call(i)):hg(i)})}else Object.keys=aa;return Object.keys||aa};var ol=aa,cE=Error,fE=EvalError,gE=RangeError,dE=ReferenceError,cg=SyntaxError,Ni=TypeError,mE=URIError,ua=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),i=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var s=42;t[e]=s;for(e in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var u=Object.getOwnPropertySymbols(t);if(u.length!==1||u[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,e);if(l.value!==s||l.enumerable!==!0)return!1}return!0},fg=typeof Symbol<"u"&&Symbol,yE=ua,al=function(){return typeof fg!="function"||typeof Symbol!="function"||typeof fg("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:yE()},ul={__proto__:null,foo:{}},pE=Object,vE=function(){return{__proto__:ul}.foo===ul.foo&&!(ul instanceof pE)},_E="Function.prototype.bind called on incompatible ",EE=Object.prototype.toString,xE=Math.max,SE="[object Function]",gg=function(t,e){for(var i=[],s=0;s<t.length;s+=1)i[s]=t[s];for(var u=0;u<e.length;u+=1)i[u+t.length]=e[u];return i},wE=function(t,e){for(var i=[],s=e,u=0;s<t.length;s+=1,u+=1)i[u]=t[s];return i},IE=function(n,t){for(var e="",i=0;i<n.length;i+=1)e+=n[i],i+1<n.length&&(e+=t);return e},kE=function(t){var e=this;if(typeof e!="function"||EE.apply(e)!==SE)throw new TypeError(_E+e);for(var i=wE(arguments,1),s,u=function(){if(this instanceof s){var y=e.apply(this,gg(i,arguments));return Object(y)===y?y:this}return e.apply(t,gg(i,arguments))},l=xE(0,e.length-i.length),f=[],g=0;g<l;g++)f[g]="$"+g;if(s=Function("binder","return function ("+IE(f,",")+"){ return binder.apply(this,arguments); }")(u),e.prototype){var m=function(){};m.prototype=e.prototype,s.prototype=new m,m.prototype=null}return s},bE=kE,ll=Function.prototype.bind||bE,CE=Function.prototype.call,RE=Object.prototype.hasOwnProperty,LE=ll,dg=LE.call(CE,RE),Ct,NE=cE,TE=fE,ME=gE,OE=dE,qr=cg,Ur=Ni,AE=mE,mg=Function,hl=function(n){try{return mg('"use strict"; return ('+n+").constructor;")()}catch{}},hr=Object.getOwnPropertyDescriptor;if(hr)try{hr({},"")}catch{hr=null}var cl=function(){throw new Ur},PE=hr?function(){try{return arguments.callee,cl}catch{try{return hr(arguments,"callee").get}catch{return cl}}}():cl,jr=al(),DE=vE(),le=Object.getPrototypeOf||(DE?function(n){return n.__proto__}:null),Vr={},FE=typeof Uint8Array>"u"||!le?Ct:le(Uint8Array),cr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ct:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ct:ArrayBuffer,"%ArrayIteratorPrototype%":jr&&le?le([][Symbol.iterator]()):Ct,"%AsyncFromSyncIteratorPrototype%":Ct,"%AsyncFunction%":Vr,"%AsyncGenerator%":Vr,"%AsyncGeneratorFunction%":Vr,"%AsyncIteratorPrototype%":Vr,"%Atomics%":typeof Atomics>"u"?Ct:Atomics,"%BigInt%":typeof BigInt>"u"?Ct:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ct:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ct:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ct:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":NE,"%eval%":eval,"%EvalError%":TE,"%Float32Array%":typeof Float32Array>"u"?Ct:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ct:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ct:FinalizationRegistry,"%Function%":mg,"%GeneratorFunction%":Vr,"%Int8Array%":typeof Int8Array>"u"?Ct:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ct:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ct:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":jr&&le?le(le([][Symbol.iterator]())):Ct,"%JSON%":typeof JSON=="object"?JSON:Ct,"%Map%":typeof Map>"u"?Ct:Map,"%MapIteratorPrototype%":typeof Map>"u"||!jr||!le?Ct:le(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ct:Promise,"%Proxy%":typeof Proxy>"u"?Ct:Proxy,"%RangeError%":ME,"%ReferenceError%":OE,"%Reflect%":typeof Reflect>"u"?Ct:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ct:Set,"%SetIteratorPrototype%":typeof Set>"u"||!jr||!le?Ct:le(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ct:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":jr&&le?le(""[Symbol.iterator]()):Ct,"%Symbol%":jr?Symbol:Ct,"%SyntaxError%":qr,"%ThrowTypeError%":PE,"%TypedArray%":FE,"%TypeError%":Ur,"%Uint8Array%":typeof Uint8Array>"u"?Ct:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ct:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ct:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ct:Uint32Array,"%URIError%":AE,"%WeakMap%":typeof WeakMap>"u"?Ct:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ct:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ct:WeakSet};if(le)try{null.error}catch(n){var GE=le(le(n));cr["%Error.prototype%"]=GE}var BE=function n(t){var e;if(t==="%AsyncFunction%")e=hl("async function () {}");else if(t==="%GeneratorFunction%")e=hl("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=hl("async function* () {}");else if(t==="%AsyncGenerator%"){var i=n("%AsyncGeneratorFunction%");i&&(e=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var s=n("%AsyncGenerator%");s&&le&&(e=le(s.prototype))}return cr[t]=e,e},yg={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},eo=ll,la=dg,zE=eo.call(Function.call,Array.prototype.concat),YE=eo.call(Function.apply,Array.prototype.splice),pg=eo.call(Function.call,String.prototype.replace),ha=eo.call(Function.call,String.prototype.slice),WE=eo.call(Function.call,RegExp.prototype.exec),XE=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,qE=/\\(\\)?/g,UE=function(t){var e=ha(t,0,1),i=ha(t,-1);if(e==="%"&&i!=="%")throw new qr("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&e!=="%")throw new qr("invalid intrinsic syntax, expected opening `%`");var s=[];return pg(t,XE,function(u,l,f,g){s[s.length]=f?pg(g,qE,"$1"):l||u}),s},jE=function(t,e){var i=t,s;if(la(yg,i)&&(s=yg[i],i="%"+s[0]+"%"),la(cr,i)){var u=cr[i];if(u===Vr&&(u=BE(i)),typeof u>"u"&&!e)throw new Ur("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:s,name:i,value:u}}throw new qr("intrinsic "+t+" does not exist!")},Nn=function(t,e){if(typeof t!="string"||t.length===0)throw new Ur("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new Ur('"allowMissing" argument must be a boolean');if(WE(/^%?[^%]*%?$/,t)===null)throw new qr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=UE(t),s=i.length>0?i[0]:"",u=jE("%"+s+"%",e),l=u.name,f=u.value,g=!1,m=u.alias;m&&(s=m[0],YE(i,zE([0,1],m)));for(var y=1,p=!0;y<i.length;y+=1){var _=i[y],E=ha(_,0,1),S=ha(_,-1);if((E==='"'||E==="'"||E==="`"||S==='"'||S==="'"||S==="`")&&E!==S)throw new qr("property names with quotes must have matching quotes");if((_==="constructor"||!p)&&(g=!0),s+="."+_,l="%"+s+"%",la(cr,l))f=cr[l];else if(f!=null){if(!(_ in f)){if(!e)throw new Ur("base intrinsic for "+t+" exists, but the property is not available.");return}if(hr&&y+1>=i.length){var b=hr(f,_);p=!!b,p&&"get"in b&&!("originalValue"in b.get)?f=b.get:f=f[_]}else p=la(f,_),f=f[_];p&&!g&&(cr[l]=f)}}return f},VE=Nn,ca=VE("%Object.defineProperty%",!0)||!1;if(ca)try{ca({},"a",{value:1})}catch{ca=!1}var fl=ca,ZE=Nn,fa=ZE("%Object.getOwnPropertyDescriptor%",!0);if(fa)try{fa([],"length")}catch{fa=null}var gl=fa,vg=fl,HE=cg,Zr=Ni,_g=gl,dl=function(t,e,i){if(!t||typeof t!="object"&&typeof t!="function")throw new Zr("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new Zr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Zr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Zr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Zr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Zr("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,f=arguments.length>6?arguments[6]:!1,g=!!_g&&_g(t,e);if(vg)vg(t,e,{configurable:l===null&&g?g.configurable:!l,enumerable:s===null&&g?g.enumerable:!s,value:i,writable:u===null&&g?g.writable:!u});else if(f||!s&&!u&&!l)t[e]=i;else throw new HE("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ml=fl,Eg=function(){return!!ml};Eg.hasArrayLengthDefineBug=function(){if(!ml)return null;try{return ml([],"length",{value:1}).length!==1}catch{return!0}};var yl=Eg,KE=ol,JE=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",$E=Object.prototype.toString,QE=Array.prototype.concat,xg=dl,tx=function(n){return typeof n=="function"&&$E.call(n)==="[object Function]"},Sg=yl(),ex=function(n,t,e,i){if(t in n){if(i===!0){if(n[t]===e)return}else if(!tx(i)||!i())return}Sg?xg(n,t,e,!0):xg(n,t,e)},wg=function(n,t){var e=arguments.length>2?arguments[2]:{},i=KE(t);JE&&(i=QE.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s<i.length;s+=1)ex(n,i[s],t[i[s]],e[i[s]])};wg.supportsDescriptors=!!Sg;var fr=wg,Ig={exports:{}},nx=Nn,kg=dl,ix=yl(),bg=gl,Cg=Ni,rx=nx("%Math.floor%"),sx=function(t,e){if(typeof t!="function")throw new Cg("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||rx(e)!==e)throw new Cg("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],s=!0,u=!0;if("length"in t&&bg){var l=bg(t,"length");l&&!l.configurable&&(s=!1),l&&!l.writable&&(u=!1)}return(s||u||!i)&&(ix?kg(t,"length",e,!0,!0):kg(t,"length",e)),t};(function(n){var t=ll,e=Nn,i=sx,s=Ni,u=e("%Function.prototype.apply%"),l=e("%Function.prototype.call%"),f=e("%Reflect.apply%",!0)||t.call(l,u),g=fl,m=e("%Math.max%");n.exports=function(_){if(typeof _!="function")throw new s("a function is required");var E=f(t,l,arguments);return i(E,1+m(0,_.length-(arguments.length-1)),!0)};var y=function(){return f(t,u,arguments)};g?g(n.exports,"apply",{value:y}):n.exports.apply=y})(Ig);var Hr=Ig.exports,Rg=Nn,Lg=Hr,ox=Lg(Rg("String.prototype.indexOf")),Qe=function(t,e){var i=Rg(t,!!e);return typeof i=="function"&&ox(t,".prototype.")>-1?Lg(i):i},ax=ol,Ng=ua(),Tg=Qe,Mg=Object,ux=Tg("Array.prototype.push"),Og=Tg("Object.prototype.propertyIsEnumerable"),lx=Ng?Object.getOwnPropertySymbols:null,Ag=function(t,e){if(t==null)throw new TypeError("target must be an object");var i=Mg(t);if(arguments.length===1)return i;for(var s=1;s<arguments.length;++s){var u=Mg(arguments[s]),l=ax(u),f=Ng&&(Object.getOwnPropertySymbols||lx);if(f)for(var g=f(u),m=0;m<g.length;++m){var y=g[m];Og(u,y)&&ux(l,y)}for(var p=0;p<l.length;++p){var _=l[p];if(Og(u,_)){var E=u[_];i[_]=E}}}return i},pl=Ag,hx=function(){if(!Object.assign)return!1;for(var n="abcdefghijklmnopqrst",t=n.split(""),e={},i=0;i<t.length;++i)e[t[i]]=t[i];var s=Object.assign({},e),u="";for(var l in s)u+=l;return n!==u},cx=function(){if(!Object.assign||!Object.preventExtensions)return!1;var n=Object.preventExtensions({1:2});try{Object.assign(n,"xy")}catch{return n[1]==="y"}return!1},Pg=function(){return!Object.assign||hx()||cx()?pl:Object.assign},fx=fr,gx=Pg,dx=function(){var t=gx();return fx(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t},mx=fr,yx=Hr,px=Ag,Dg=Pg,vx=dx,_x=yx.apply(Dg()),Fg=function(t,e){return _x(Object,arguments)};mx(Fg,{getPolyfill:Dg,implementation:px,shim:vx});var Ex=Fg,no=function(){return typeof(function(){}).name=="string"},io=Object.getOwnPropertyDescriptor;if(io)try{io([],"length")}catch{io=null}no.functionsHaveConfigurableNames=function(){if(!no()||!io)return!1;var t=io(function(){},"name");return!!t&&!!t.configurable};var xx=Function.prototype.bind;no.boundFunctionsHaveNames=function(){return no()&&typeof xx=="function"&&(function(){}).bind().name!==""};var Sx=no,Gg=dl,wx=yl(),Ix=Sx.functionsHaveConfigurableNames(),kx=Ni,bx=function(t,e){if(typeof t!="function")throw new kx("`fn` is not a function");var i=arguments.length>2&&!!arguments[2];return(!i||Ix)&&(wx?Gg(t,"name",e,!0,!0):Gg(t,"name",e)),t},Cx=bx,Rx=Ni,Lx=Object,Bg=Cx(function(){if(this==null||this!==Lx(this))throw new Rx("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),Nx=Bg,Tx=fr.supportsDescriptors,Mx=Object.getOwnPropertyDescriptor,zg=function(){if(Tx&&/a/mig.flags==="gim"){var t=Mx(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var e="",i={};if(Object.defineProperty(i,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(i,"sticky",{get:function(){e+="y"}}),e==="dy")return t.get}}return Nx},Ox=fr.supportsDescriptors,Ax=zg,Px=Object.getOwnPropertyDescriptor,Dx=Object.defineProperty,Fx=TypeError,Yg=Object.getPrototypeOf,Gx=/a/,Bx=function(){if(!Ox||!Yg)throw new Fx("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=Ax(),e=Yg(Gx),i=Px(e,"flags");return(!i||i.get!==t)&&Dx(e,"flags",{configurable:!0,enumerable:!1,get:t}),t},zx=fr,Yx=Hr,Wx=Bg,Wg=zg,Xx=Bx,Xg=Yx(Wg());zx(Xg,{getPolyfill:Wg,implementation:Wx,shim:Xx});var qx=Xg,ga={exports:{}},Ux=ua,gr=function(){return Ux()&&!!Symbol.toStringTag},jx=gr(),Vx=Qe,vl=Vx("Object.prototype.toString"),da=function(t){return jx&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:vl(t)==="[object Arguments]"},qg=function(t){return da(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&vl(t)!=="[object Array]"&&vl(t.callee)==="[object Function]"},Zx=function(){return da(arguments)}();da.isLegacyArguments=qg;var Ug=Zx?da:qg;const Hx=aE(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var _l=typeof Map=="function"&&Map.prototype,El=Object.getOwnPropertyDescriptor&&_l?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ma=_l&&El&&typeof El.get=="function"?El.get:null,jg=_l&&Map.prototype.forEach,xl=typeof Set=="function"&&Set.prototype,Sl=Object.getOwnPropertyDescriptor&&xl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ya=xl&&Sl&&typeof Sl.get=="function"?Sl.get:null,Vg=xl&&Set.prototype.forEach,Kx=typeof WeakMap=="function"&&WeakMap.prototype,ro=Kx?WeakMap.prototype.has:null,Jx=typeof WeakSet=="function"&&WeakSet.prototype,so=Jx?WeakSet.prototype.has:null,$x=typeof WeakRef=="function"&&WeakRef.prototype,Zg=$x?WeakRef.prototype.deref:null,Qx=Boolean.prototype.valueOf,tS=Object.prototype.toString,eS=Function.prototype.toString,nS=String.prototype.match,wl=String.prototype.slice,Ti=String.prototype.replace,iS=String.prototype.toUpperCase,Hg=String.prototype.toLowerCase,Kg=RegExp.prototype.test,Jg=Array.prototype.concat,Tn=Array.prototype.join,rS=Array.prototype.slice,$g=Math.floor,Il=typeof BigInt=="function"?BigInt.prototype.valueOf:null,kl=Object.getOwnPropertySymbols,bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Kr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ke=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Kr||!0)?Symbol.toStringTag:null,Qg=Object.prototype.propertyIsEnumerable,td=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function ed(n,t){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||Kg.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var i=n<0?-$g(-n):$g(n);if(i!==n){var s=String(i),u=wl.call(t,s.length+1);return Ti.call(s,e,"$&_")+"."+Ti.call(Ti.call(u,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ti.call(t,e,"$&_")}var Cl=Hx,nd=Cl.custom,id=od(nd)?nd:null,sS=function n(t,e,i,s){var u=e||{};if(Mi(u,"quoteStyle")&&u.quoteStyle!=="single"&&u.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Mi(u,"maxStringLength")&&(typeof u.maxStringLength=="number"?u.maxStringLength<0&&u.maxStringLength!==1/0:u.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=Mi(u,"customInspect")?u.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Mi(u,"indent")&&u.indent!==null&&u.indent!==" "&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Mi(u,"numericSeparator")&&typeof u.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var f=u.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return ud(t,u);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var g=String(t);return f?ed(t,g):g}if(typeof t=="bigint"){var m=String(t)+"n";return f?ed(t,m):m}var y=typeof u.depth>"u"?5:u.depth;if(typeof i>"u"&&(i=0),i>=y&&y>0&&typeof t=="object")return Rl(t)?"[Array]":"[Object]";var p=wS(u,i);if(typeof s>"u")s=[];else if(ad(s,t)>=0)return"[Circular]";function _(nt,z,K){if(z&&(s=rS.call(s),s.push(z)),K){var Z={depth:u.depth};return Mi(u,"quoteStyle")&&(Z.quoteStyle=u.quoteStyle),n(nt,Z,i+1,s)}return n(nt,u,i+1,s)}if(typeof t=="function"&&!sd(t)){var E=dS(t),S=pa(t,_);return"[Function"+(E?": "+E:" (anonymous)")+"]"+(S.length>0?" { "+Tn.call(S,", ")+" }":"")}if(od(t)){var b=Kr?Ti.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):bl.call(t);return typeof t=="object"&&!Kr?oo(b):b}if(ES(t)){for(var k="<"+Hg.call(String(t.nodeName)),C=t.attributes||[],R=0;R<C.length;R++)k+=" "+C[R].name+"="+rd(oS(C[R].value),"double",u);return k+=">",t.childNodes&&t.childNodes.length&&(k+="..."),k+="</"+Hg.call(String(t.nodeName))+">",k}if(Rl(t)){if(t.length===0)return"[]";var M=pa(t,_);return p&&!SS(M)?"["+Nl(M,p)+"]":"[ "+Tn.call(M,", ")+" ]"}if(uS(t)){var O=pa(t,_);return!("cause"in Error.prototype)&&"cause"in t&&!Qg.call(t,"cause")?"{ ["+String(t)+"] "+Tn.call(Jg.call("[cause]: "+_(t.cause),O),", ")+" }":O.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Tn.call(O,", ")+" }"}if(typeof t=="object"&&l){if(id&&typeof t[id]=="function"&&Cl)return Cl(t,{depth:y-i});if(l!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(mS(t)){var T=[];return jg&&jg.call(t,function(nt,z){T.push(_(z,t,!0)+" => "+_(nt,t))}),ld("Map",ma.call(t),T,p)}if(vS(t)){var G=[];return Vg&&Vg.call(t,function(nt){G.push(_(nt,t))}),ld("Set",ya.call(t),G,p)}if(yS(t))return Ll("WeakMap");if(_S(t))return Ll("WeakSet");if(pS(t))return Ll("WeakRef");if(hS(t))return oo(_(Number(t)));if(fS(t))return oo(_(Il.call(t)));if(cS(t))return oo(Qx.call(t));if(lS(t))return oo(_(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===oa)return"{ [object globalThis] }";if(!aS(t)&&!sd(t)){var D=pa(t,_),F=td?td(t)===Object.prototype:t instanceof Object||t.constructor===Object,A=t instanceof Object?"":"null prototype",j=!F&&ke&&Object(t)===t&&ke in t?wl.call(Oi(t),8,-1):A?"Object":"",et=F||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",U=et+(j||A?"["+Tn.call(Jg.call([],j||[],A||[]),": ")+"] ":"");return D.length===0?U+"{}":p?U+"{"+Nl(D,p)+"}":U+"{ "+Tn.call(D,", ")+" }"}return String(t)};function rd(n,t,e){var i=(e.quoteStyle||t)==="double"?'"':"'";return i+n+i}function oS(n){return Ti.call(String(n),/"/g,""")}function Rl(n){return Oi(n)==="[object Array]"&&(!ke||!(typeof n=="object"&&ke in n))}function aS(n){return Oi(n)==="[object Date]"&&(!ke||!(typeof n=="object"&&ke in n))}function sd(n){return Oi(n)==="[object RegExp]"&&(!ke||!(typeof n=="object"&&ke in n))}function uS(n){return Oi(n)==="[object Error]"&&(!ke||!(typeof n=="object"&&ke in n))}function lS(n){return Oi(n)==="[object String]"&&(!ke||!(typeof n=="object"&&ke in n))}function hS(n){return Oi(n)==="[object Number]"&&(!ke||!(typeof n=="object"&&ke in n))}function cS(n){return Oi(n)==="[object Boolean]"&&(!ke||!(typeof n=="object"&&ke in n))}function od(n){if(Kr)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!bl)return!1;try{return bl.call(n),!0}catch{}return!1}function fS(n){if(!n||typeof n!="object"||!Il)return!1;try{return Il.call(n),!0}catch{}return!1}var gS=Object.prototype.hasOwnProperty||function(n){return n in this};function Mi(n,t){return gS.call(n,t)}function Oi(n){return tS.call(n)}function dS(n){if(n.name)return n.name;var t=nS.call(eS.call(n),/^function\s*([\w$]+)/);return t?t[1]:null}function ad(n,t){if(n.indexOf)return n.indexOf(t);for(var e=0,i=n.length;e<i;e++)if(n[e]===t)return e;return-1}function mS(n){if(!ma||!n||typeof n!="object")return!1;try{ma.call(n);try{ya.call(n)}catch{return!0}return n instanceof Map}catch{}return!1}function yS(n){if(!ro||!n||typeof n!="object")return!1;try{ro.call(n,ro);try{so.call(n,so)}catch{return!0}return n instanceof WeakMap}catch{}return!1}function pS(n){if(!Zg||!n||typeof n!="object")return!1;try{return Zg.call(n),!0}catch{}return!1}function vS(n){if(!ya||!n||typeof n!="object")return!1;try{ya.call(n);try{ma.call(n)}catch{return!0}return n instanceof Set}catch{}return!1}function _S(n){if(!so||!n||typeof n!="object")return!1;try{so.call(n,so);try{ro.call(n,ro)}catch{return!0}return n instanceof WeakSet}catch{}return!1}function ES(n){return!n||typeof n!="object"?!1:typeof HTMLElement<"u"&&n instanceof HTMLElement?!0:typeof n.nodeName=="string"&&typeof n.getAttribute=="function"}function ud(n,t){if(n.length>t.maxStringLength){var e=n.length-t.maxStringLength,i="... "+e+" more character"+(e>1?"s":"");return ud(wl.call(n,0,t.maxStringLength),t)+i}var s=Ti.call(Ti.call(n,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,xS);return rd(s,"single",t)}function xS(n){var t=n.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+iS.call(t.toString(16))}function oo(n){return"Object("+n+")"}function Ll(n){return n+" { ? }"}function ld(n,t,e,i){var s=i?Nl(e,i):Tn.call(e,", ");return n+" ("+t+") {"+s+"}"}function SS(n){for(var t=0;t<n.length;t++)if(ad(n[t],`
|