@maptiler/geocoding-control 2.1.7 → 3.0.0-rc.2
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/CODE_OF_CONDUCT.md +46 -0
- package/CONTRIBUTING.md +72 -0
- package/README.md +115 -43
- package/SECURITY.md +16 -0
- package/dist/index.js +860 -0
- package/dist/index.js.map +1 -0
- package/dist/index.umd.js +263 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/leaflet.public.js +1251 -0
- package/dist/leaflet.public.js.map +1 -0
- package/dist/leaflet.public.umd.js +276 -0
- package/dist/leaflet.public.umd.js.map +1 -0
- package/dist/maplibregl.js +1275 -0
- package/dist/maplibregl.js.map +1 -0
- package/dist/maplibregl.umd.js +276 -0
- package/dist/maplibregl.umd.js.map +1 -0
- package/dist/maptilersdk.js +1283 -0
- package/dist/maptilersdk.js.map +1 -0
- package/dist/maptilersdk.umd.js +276 -0
- package/dist/maptilersdk.umd.js.map +1 -0
- package/dist/src/components/clear-icon.d.ts +10 -0
- package/dist/src/components/fail-icon.d.ts +10 -0
- package/dist/src/components/loading-icon.d.ts +10 -0
- package/dist/src/components/marker.d.ts +10 -0
- package/dist/src/components/reverse-geocoding-icon.d.ts +10 -0
- package/dist/src/components/search-icon.d.ts +10 -0
- package/dist/src/controls/base-control.d.ts +44 -0
- package/dist/src/controls/leaflet-control.d.ts +27 -0
- package/dist/src/controls/leaflet-events.d.ts +42 -0
- package/dist/src/controls/leaflet-options.d.ts +84 -0
- package/dist/src/controls/maplibregl-control.d.ts +34 -0
- package/dist/src/controls/maplibregl-events.d.ts +44 -0
- package/dist/src/controls/maplibregl-options.d.ts +104 -0
- package/dist/src/controls/maptilersdk-control.d.ts +7 -0
- package/dist/src/controls/maptilersdk-events.d.ts +2 -0
- package/dist/src/controls/maptilersdk-options.d.ts +10 -0
- package/dist/src/controls/openlayers-control.d.ts +35 -0
- package/dist/src/controls/openlayers-events.d.ts +43 -0
- package/dist/src/controls/openlayers-options.d.ts +83 -0
- package/dist/src/geocoder/geocoder-events.d.ts +46 -0
- package/dist/src/geocoder/geocoder-feature-item.d.ts +22 -0
- package/{svelte/types.d.ts → dist/src/geocoder/geocoder-options.d.ts} +23 -143
- package/dist/src/geocoder/geocoder.d.ts +113 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/leaflet.public.d.ts +7 -0
- package/dist/src/maplibregl.d.ts +7 -0
- package/dist/src/maptilersdk.d.ts +7 -0
- package/dist/src/openlayers.public.d.ts +7 -0
- package/dist/src/types.d.ts +46 -0
- package/dist/src/utils/geo-utils.d.ts +6 -0
- package/dist/src/utils/mask.d.ts +2 -0
- package/dist/src/utils/proximity.d.ts +2 -0
- package/package.json +84 -112
- package/MapLibreBasedGeocodingControl.d.ts +0 -3072
- package/geo-coordinates-parser.t.d.ts +0 -8
- package/geoUtils.d.ts +0 -3
- package/leaflet-controller.d.ts +0 -12
- package/leaflet-controller.js +0 -2475
- package/leaflet-controller.js.map +0 -1
- package/leaflet-controller.umd.js +0 -2
- package/leaflet-controller.umd.js.map +0 -1
- package/leaflet.d.ts +0 -131
- package/leaflet.js +0 -5082
- package/leaflet.js.map +0 -1
- package/leaflet.umd.js +0 -14
- package/leaflet.umd.js.map +0 -1
- package/maplibregl-controller.d.ts +0 -19
- package/maplibregl-controller.js +0 -2418
- package/maplibregl-controller.js.map +0 -1
- package/maplibregl-controller.umd.js +0 -2
- package/maplibregl-controller.umd.js.map +0 -1
- package/maplibregl.d.ts +0 -2509
- package/maplibregl.js +0 -5142
- package/maplibregl.js.map +0 -1
- package/maplibregl.umd.js +0 -14
- package/maplibregl.umd.js.map +0 -1
- package/maptilersdk.d.ts +0 -2504
- package/maptilersdk.js +0 -5152
- package/maptilersdk.js.map +0 -1
- package/maptilersdk.umd.js +0 -14
- package/maptilersdk.umd.js.map +0 -1
- package/mask.d.ts +0 -2
- package/openlayers-controller.d.ts +0 -15
- package/openlayers-controller.js +0 -2174
- package/openlayers-controller.js.map +0 -1
- package/openlayers-controller.umd.js +0 -2
- package/openlayers-controller.umd.js.map +0 -1
- package/openlayers.d.ts +0 -109
- package/openlayers.js +0 -5045
- package/openlayers.js.map +0 -1
- package/openlayers.umd.js +0 -14
- package/openlayers.umd.js.map +0 -1
- package/proximity.d.ts +0 -2
- package/react.d.ts +0 -45
- package/react.js +0 -2795
- package/react.js.map +0 -1
- package/react.umd.js +0 -14
- package/react.umd.js.map +0 -1
- package/style.css +0 -1
- package/svelte/ClearIcon.svelte +0 -12
- package/svelte/ClearIcon.svelte.d.ts +0 -25
- package/svelte/FailIcon.svelte +0 -12
- package/svelte/FailIcon.svelte.d.ts +0 -25
- package/svelte/FeatureItem.svelte +0 -246
- package/svelte/FeatureItem.svelte.d.ts +0 -26
- package/svelte/GeocodingControl.svelte +0 -921
- package/svelte/GeocodingControl.svelte.d.ts +0 -105
- package/svelte/LoadingIcon.svelte +0 -40
- package/svelte/LoadingIcon.svelte.d.ts +0 -25
- package/svelte/MapLibreBasedGeocodingControl.d.ts +0 -3072
- package/svelte/MapLibreBasedGeocodingControl.js +0 -210
- package/svelte/MarkerIcon.svelte +0 -71
- package/svelte/MarkerIcon.svelte.d.ts +0 -18
- package/svelte/ReverseGeocodingIcon.svelte +0 -12
- package/svelte/ReverseGeocodingIcon.svelte.d.ts +0 -25
- package/svelte/SearchIcon.svelte +0 -26
- package/svelte/SearchIcon.svelte.d.ts +0 -25
- package/svelte/geo-coordinates-parser.t.d.ts +0 -8
- package/svelte/geo-coordinates-parser.t.js +0 -1
- package/svelte/geoUtils.d.ts +0 -3
- package/svelte/geoUtils.js +0 -18
- package/svelte/info.json +0 -1
- package/svelte/leaflet-controller.d.ts +0 -12
- package/svelte/leaflet-controller.js +0 -274
- package/svelte/leaflet.d.ts +0 -131
- package/svelte/leaflet.js +0 -116
- package/svelte/maplibregl-controller.d.ts +0 -19
- package/svelte/maplibregl-controller.js +0 -279
- package/svelte/maplibregl.d.ts +0 -2509
- package/svelte/maplibregl.js +0 -17
- package/svelte/maptilersdk.d.ts +0 -2504
- package/svelte/maptilersdk.js +0 -32
- package/svelte/mask.d.ts +0 -2
- package/svelte/mask.js +0 -54
- package/svelte/openlayers-controller.d.ts +0 -15
- package/svelte/openlayers-controller.js +0 -283
- package/svelte/openlayers.d.ts +0 -109
- package/svelte/openlayers.js +0 -178
- package/svelte/proximity.d.ts +0 -2
- package/svelte/proximity.js +0 -60
- package/svelte/react.d.ts +0 -45
- package/svelte/react.js +0 -106
- package/svelte/types.js +0 -1
- package/svelte/vanilla.d.ts +0 -61
- package/svelte/vanilla.js +0 -101
- package/svelte/vite-env.d.ts +0 -2
- package/types.d.ts +0 -391
- package/vanilla.d.ts +0 -61
- package/vanilla.js +0 -2799
- package/vanilla.js.map +0 -1
- package/vanilla.umd.js +0 -14
- package/vanilla.umd.js.map +0 -1
- /package/{icons → dist/icons}/10pin.svg +0 -0
- /package/{icons → dist/icons}/9pin.svg +0 -0
- /package/{icons → dist/icons}/advertising_column.svg +0 -0
- /package/{icons → dist/icons}/aerodrome.svg +0 -0
- /package/{icons → dist/icons}/alcohol.svg +0 -0
- /package/{icons → dist/icons}/alpine_hut.svg +0 -0
- /package/{icons → dist/icons}/amusement_arcade.svg +0 -0
- /package/{icons → dist/icons}/amusement_park.svg +0 -0
- /package/{icons → dist/icons}/apartment.svg +0 -0
- /package/{icons → dist/icons}/archaeological_site.svg +0 -0
- /package/{icons → dist/icons}/area.svg +0 -0
- /package/{icons → dist/icons}/art.svg +0 -0
- /package/{icons → dist/icons}/arts_centre.svg +0 -0
- /package/{icons → dist/icons}/artwork.svg +0 -0
- /package/{icons → dist/icons}/audioguide.svg +0 -0
- /package/{icons → dist/icons}/bag.svg +0 -0
- /package/{icons → dist/icons}/beauty.svg +0 -0
- /package/{icons → dist/icons}/bed.svg +0 -0
- /package/{icons → dist/icons}/bell_tower.svg +0 -0
- /package/{icons → dist/icons}/beverages.svg +0 -0
- /package/{icons → dist/icons}/bicycle_repair_station.svg +0 -0
- /package/{icons → dist/icons}/biergarten.svg +0 -0
- /package/{icons → dist/icons}/bird_hide.svg +0 -0
- /package/{icons → dist/icons}/boat_rental.svg +0 -0
- /package/{icons → dist/icons}/bookmaker.svg +0 -0
- /package/{icons → dist/icons}/books.svg +0 -0
- /package/{icons → dist/icons}/bowl.svg +0 -0
- /package/{icons → dist/icons}/bowling_alley.svg +0 -0
- /package/{icons → dist/icons}/bunker.svg +0 -0
- /package/{icons → dist/icons}/bureau_de_change.svg +0 -0
- /package/{icons → dist/icons}/bus_station.svg +0 -0
- /package/{icons → dist/icons}/bust.svg +0 -0
- /package/{icons → dist/icons}/camping.svg +0 -0
- /package/{icons → dist/icons}/car_parts.svg +0 -0
- /package/{icons → dist/icons}/car_wash.svg +0 -0
- /package/{icons → dist/icons}/caravan_park.svg +0 -0
- /package/{icons → dist/icons}/carpet.svg +0 -0
- /package/{icons → dist/icons}/cattle_grid.svg +0 -0
- /package/{icons → dist/icons}/cave_entrance.svg +0 -0
- /package/{icons → dist/icons}/chalet.svg +0 -0
- /package/{icons → dist/icons}/charity.svg +0 -0
- /package/{icons → dist/icons}/chemist.svg +0 -0
- /package/{icons → dist/icons}/chimney.svg +0 -0
- /package/{icons → dist/icons}/church.svg +0 -0
- /package/{icons → dist/icons}/city_gate.svg +0 -0
- /package/{icons → dist/icons}/clinic.svg +0 -0
- /package/{icons → dist/icons}/clothes.svg +0 -0
- /package/{icons → dist/icons}/coffee.svg +0 -0
- /package/{icons → dist/icons}/community_centre.svg +0 -0
- /package/{icons → dist/icons}/computer.svg +0 -0
- /package/{icons → dist/icons}/consulate.svg +0 -0
- /package/{icons → dist/icons}/copyshop.svg +0 -0
- /package/{icons → dist/icons}/cosmetics.svg +0 -0
- /package/{icons → dist/icons}/courthouse.svg +0 -0
- /package/{icons → dist/icons}/crane.svg +0 -0
- /package/{icons → dist/icons}/dairy.svg +0 -0
- /package/{icons → dist/icons}/deli.svg +0 -0
- /package/{icons → dist/icons}/department_store.svg +0 -0
- /package/{icons → dist/icons}/diy.svg +0 -0
- /package/{icons → dist/icons}/electronics.svg +0 -0
- /package/{icons → dist/icons}/embankment.svg +0 -0
- /package/{icons → dist/icons}/embassy.svg +0 -0
- /package/{icons → dist/icons}/excrement_bags.svg +0 -0
- /package/{icons → dist/icons}/fabric.svg +0 -0
- /package/{icons → dist/icons}/farmyard.svg +0 -0
- /package/{icons → dist/icons}/ferry.svg +0 -0
- /package/{icons → dist/icons}/firepit.svg +0 -0
- /package/{icons → dist/icons}/firestation.svg +0 -0
- /package/{icons → dist/icons}/fishing.svg +0 -0
- /package/{icons → dist/icons}/fitness.svg +0 -0
- /package/{icons → dist/icons}/ford.svg +0 -0
- /package/{icons → dist/icons}/fort.svg +0 -0
- /package/{icons → dist/icons}/fortress.svg +0 -0
- /package/{icons → dist/icons}/full-height_turnstile.svg +0 -0
- /package/{icons → dist/icons}/generator_wind.svg +0 -0
- /package/{icons → dist/icons}/golf_pin.svg +0 -0
- /package/{icons → dist/icons}/greengrocer.svg +0 -0
- /package/{icons → dist/icons}/guest_house.svg +0 -0
- /package/{icons → dist/icons}/helipad.svg +0 -0
- /package/{icons → dist/icons}/hifi.svg +0 -0
- /package/{icons → dist/icons}/hostel.svg +0 -0
- /package/{icons → dist/icons}/hotel.svg +0 -0
- /package/{icons → dist/icons}/housenumber.svg +0 -0
- /package/{icons → dist/icons}/houseware.svg +0 -0
- /package/{icons → dist/icons}/hunting_stand.svg +0 -0
- /package/{icons → dist/icons}/interior_decoration.svg +0 -0
- /package/{icons → dist/icons}/internet_cafe.svg +0 -0
- /package/{icons → dist/icons}/kindergarten.svg +0 -0
- /package/{icons → dist/icons}/kissing_gate.svg +0 -0
- /package/{icons → dist/icons}/manor.svg +0 -0
- /package/{icons → dist/icons}/map.svg +0 -0
- /package/{icons → dist/icons}/marker_reverse.svg +0 -0
- /package/{icons → dist/icons}/marker_selected.svg +0 -0
- /package/{icons → dist/icons}/marker_unselected.svg +0 -0
- /package/{icons → dist/icons}/marketplace.svg +0 -0
- /package/{icons → dist/icons}/massage.svg +0 -0
- /package/{icons → dist/icons}/mast.svg +0 -0
- /package/{icons → dist/icons}/mast_communications.svg +0 -0
- /package/{icons → dist/icons}/mast_lighting.svg +0 -0
- /package/{icons → dist/icons}/medical_supply.svg +0 -0
- /package/{icons → dist/icons}/memorial.svg +0 -0
- /package/{icons → dist/icons}/miniature_golf.svg +0 -0
- /package/{icons → dist/icons}/motel.svg +0 -0
- /package/{icons → dist/icons}/mountain_range.svg +0 -0
- /package/{icons → dist/icons}/multifaith.svg +0 -0
- /package/{icons → dist/icons}/musical_instrument.svg +0 -0
- /package/{icons → dist/icons}/newsagent.svg +0 -0
- /package/{icons → dist/icons}/nightclub.svg +0 -0
- /package/{icons → dist/icons}/ocean.svg +0 -0
- /package/{icons → dist/icons}/office.svg +0 -0
- /package/{icons → dist/icons}/outdoor_seating.svg +0 -0
- /package/{icons → dist/icons}/palace.svg +0 -0
- /package/{icons → dist/icons}/parcel_locker.svg +0 -0
- /package/{icons → dist/icons}/parking_space.svg +0 -0
- /package/{icons → dist/icons}/parking_tickets.svg +0 -0
- /package/{icons → dist/icons}/pet.svg +0 -0
- /package/{icons → dist/icons}/photo.svg +0 -0
- /package/{icons → dist/icons}/picnic.svg +0 -0
- /package/{icons → dist/icons}/plaque.svg +0 -0
- /package/{icons → dist/icons}/poi.svg +0 -0
- /package/{icons → dist/icons}/post_box.svg +0 -0
- /package/{icons → dist/icons}/post_office.svg +0 -0
- /package/{icons → dist/icons}/postal_code.svg +0 -0
- /package/{icons → dist/icons}/pub.svg +0 -0
- /package/{icons → dist/icons}/public_bath.svg +0 -0
- /package/{icons → dist/icons}/public_bookcase.svg +0 -0
- /package/{icons → dist/icons}/public_building.svg +0 -0
- /package/{icons → dist/icons}/public_transport_tickets.svg +0 -0
- /package/{icons → dist/icons}/reverse.svg +0 -0
- /package/{icons → dist/icons}/river.svg +0 -0
- /package/{icons → dist/icons}/road.svg +0 -0
- /package/{icons → dist/icons}/saddle.svg +0 -0
- /package/{icons → dist/icons}/sauna.svg +0 -0
- /package/{icons → dist/icons}/sea.svg +0 -0
- /package/{icons → dist/icons}/second_hand.svg +0 -0
- /package/{icons → dist/icons}/shintoist.svg +0 -0
- /package/{icons → dist/icons}/shoe.svg +0 -0
- /package/{icons → dist/icons}/shower.svg +0 -0
- /package/{icons → dist/icons}/shrine.svg +0 -0
- /package/{icons → dist/icons}/sikhist.svg +0 -0
- /package/{icons → dist/icons}/slipway.svg +0 -0
- /package/{icons → dist/icons}/snowmobile.svg +0 -0
- /package/{icons → dist/icons}/social_facility.svg +0 -0
- /package/{icons → dist/icons}/sports.svg +0 -0
- /package/{icons → dist/icons}/sprite.json +0 -0
- /package/{icons → dist/icons}/sprite.png +0 -0
- /package/{icons → dist/icons}/sprite@2x.json +0 -0
- /package/{icons → dist/icons}/sprite@2x.png +0 -0
- /package/{icons → dist/icons}/stationery.svg +0 -0
- /package/{icons → dist/icons}/stile.svg +0 -0
- /package/{icons → dist/icons}/stone.svg +0 -0
- /package/{icons → dist/icons}/storage_tank.svg +0 -0
- /package/{icons → dist/icons}/stream.svg +0 -0
- /package/{icons → dist/icons}/street.svg +0 -0
- /package/{icons → dist/icons}/supermarket.svg +0 -0
- /package/{icons → dist/icons}/tea.svg +0 -0
- /package/{icons → dist/icons}/telescope_dish.svg +0 -0
- /package/{icons → dist/icons}/telescope_dome.svg +0 -0
- /package/{icons → dist/icons}/ticket.svg +0 -0
- /package/{icons → dist/icons}/tobacco.svg +0 -0
- /package/{icons → dist/icons}/tower_cantilever_communication.svg +0 -0
- /package/{icons → dist/icons}/tower_cooling.svg +0 -0
- /package/{icons → dist/icons}/tower_dish.svg +0 -0
- /package/{icons → dist/icons}/tower_dome.svg +0 -0
- /package/{icons → dist/icons}/tower_generic.svg +0 -0
- /package/{icons → dist/icons}/tower_lattice.svg +0 -0
- /package/{icons → dist/icons}/tower_lattice_communication.svg +0 -0
- /package/{icons → dist/icons}/tower_lattice_lighting.svg +0 -0
- /package/{icons → dist/icons}/tower_lighting.svg +0 -0
- /package/{icons → dist/icons}/townhall.svg +0 -0
- /package/{icons → dist/icons}/toys.svg +0 -0
- /package/{icons → dist/icons}/trade.svg +0 -0
- /package/{icons → dist/icons}/traffic_light.svg +0 -0
- /package/{icons → dist/icons}/train_station.svg +0 -0
- /package/{icons → dist/icons}/travel_agency.svg +0 -0
- /package/{icons → dist/icons}/tyres.svg +0 -0
- /package/{icons → dist/icons}/university.svg +0 -0
- /package/{icons → dist/icons}/variety_store.svg +0 -0
- /package/{icons → dist/icons}/vehicle_inspection.svg +0 -0
- /package/{icons → dist/icons}/vending_machine.svg +0 -0
- /package/{icons → dist/icons}/video.svg +0 -0
- /package/{icons → dist/icons}/video_games.svg +0 -0
- /package/{icons → dist/icons}/waste_disposal.svg +0 -0
- /package/{icons → dist/icons}/water_well.svg +0 -0
- /package/{icons → dist/icons}/waterfall.svg +0 -0
- /package/{icons → dist/icons}/wilderness_hut.svg +0 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
(function($,Te){typeof exports=="object"&&typeof module<"u"?Te(exports,require("maplibre-gl")):typeof define=="function"&&define.amd?define(["exports","maplibre-gl"],Te):($=typeof globalThis<"u"?globalThis:$||self,Te($.maptilerGeocoder={},$.maplibregl))})(this,(function($,Te){"use strict";/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/const lt=globalThis,kt=lt.ShadowRoot&&(lt.ShadyCSS===void 0||lt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ot=Symbol(),di=new WeakMap;let fi=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Ot)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(kt&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=di.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&di.set(t,e))}return e}toString(){return this.cssText}};const at=i=>new fi(typeof i=="string"?i:i+"",void 0,Ot),Se=(i,...e)=>{const t=i.length===1?i[0]:e.reduce(((r,s,n)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+i[n+1]),i[0]);return new fi(t,i,Ot)},br=(i,e)=>{if(kt)i.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const r=document.createElement("style"),s=lt.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=t.cssText,i.appendChild(r)}},pi=kt?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return at(t)})(i):i;/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2017 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/const{is:Er,defineProperty:wr,getOwnPropertyDescriptor:xr,getOwnPropertyNames:Sr,getOwnPropertySymbols:Lr,getPrototypeOf:_r}=Object,ct=globalThis,mi=ct.trustedTypes,$r=mi?mi.emptyScript:"",Mr=ct.reactiveElementPolyfillSupport,Fe=(i,e)=>i,ht={toAttribute(i,e){switch(e){case Boolean:i=i?$r:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Nt=(i,e)=>!Er(i,e),gi={attribute:!0,type:String,converter:ht,reflect:!1,useDefault:!1,hasChanged:Nt};Symbol.metadata??=Symbol("metadata"),ct.litPropertyMetadata??=new WeakMap;let Pe=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=gi){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),s=this.getPropertyDescriptor(e,r,t);s!==void 0&&wr(this.prototype,e,s)}}static getPropertyDescriptor(e,t,r){const{get:s,set:n}=xr(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:s,set(o){const l=s?.call(this);n?.call(this,o),this.requestUpdate(e,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??gi}static _$Ei(){if(this.hasOwnProperty(Fe("elementProperties")))return;const e=_r(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Fe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Fe("properties"))){const t=this.properties,r=[...Sr(t),...Lr(t)];for(const s of r)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[r,s]of t)this.elementProperties.set(r,s)}this._$Eh=new Map;for(const[t,r]of this.elementProperties){const s=this._$Eu(t,r);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const s of r)t.unshift(pi(s))}else e!==void 0&&t.push(pi(e));return t}static _$Eu(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return br(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){const r=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,r);if(s!==void 0&&r.reflect===!0){const n=(r.converter?.toAttribute!==void 0?r.converter:ht).toAttribute(t,r.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){const r=this.constructor,s=r._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const n=r.getPropertyOptions(s),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:ht;this._$Em=s;const l=o.fromAttribute(t,n.type);this[s]=l??this._$Ej?.get(s)??l,this._$Em=null}}requestUpdate(e,t,r){if(e!==void 0){const s=this.constructor,n=this[e];if(r??=s.getPropertyOptions(e),!((r.hasChanged??Nt)(n,t)||r.useDefault&&r.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:s,wrapped:n},o){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),n!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[s,n]of this._$Ep)this[s]=n;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[s,n]of r){const{wrapped:o}=n,l=this[s];o!==!0||this._$AL.has(s)||l===void 0||this.C(s,void 0,n,l)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};Pe.elementStyles=[],Pe.shadowRootOptions={mode:"open"},Pe[Fe("elementProperties")]=new Map,Pe[Fe("finalized")]=new Map,Mr?.({ReactiveElement:Pe}),(ct.reactiveElementVersions??=[]).push("2.1.1");/**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright 2017 Google LLC
|
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
+
*/const It=globalThis,ut=It.trustedTypes,yi=ut?ut.createPolicy("lit-html",{createHTML:i=>i}):void 0,vi="$lit$",Le=`lit$${Math.random().toFixed(9).slice(2)}$`,bi="?"+Le,Tr=`<${bi}>`,Ae=document,We=()=>Ae.createComment(""),ze=i=>i===null||typeof i!="object"&&typeof i!="function",Pt=Array.isArray,Ar=i=>Pt(i)||typeof i?.[Symbol.iterator]=="function",Rt=`[
|
|
14
|
+
\f\r]`,qe=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ei=/-->/g,wi=/>/g,Ce=RegExp(`>|${Rt}(?:([^\\s"'>=/]+)(${Rt}*=${Rt}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),xi=/'/g,Si=/"/g,Li=/^(?:script|style|textarea|title)$/i,_i=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),K=_i(1),He=_i(2),be=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),$i=new WeakMap,ke=Ae.createTreeWalker(Ae,129);function Mi(i,e){if(!Pt(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return yi!==void 0?yi.createHTML(e):e}const Cr=(i,e)=>{const t=i.length-1,r=[];let s,n=e===2?"<svg>":e===3?"<math>":"",o=qe;for(let l=0;l<t;l++){const u=i[l];let f,x,w=-1,_=0;for(;_<u.length&&(o.lastIndex=_,x=o.exec(u),x!==null);)_=o.lastIndex,o===qe?x[1]==="!--"?o=Ei:x[1]!==void 0?o=wi:x[2]!==void 0?(Li.test(x[2])&&(s=RegExp("</"+x[2],"g")),o=Ce):x[3]!==void 0&&(o=Ce):o===Ce?x[0]===">"?(o=s??qe,w=-1):x[1]===void 0?w=-2:(w=o.lastIndex-x[2].length,f=x[1],o=x[3]===void 0?Ce:x[3]==='"'?Si:xi):o===Si||o===xi?o=Ce:o===Ei||o===wi?o=qe:(o=Ce,s=void 0);const M=o===Ce&&i[l+1].startsWith("/>")?" ":"";n+=o===qe?u+Tr:w>=0?(r.push(f),u.slice(0,w)+vi+u.slice(w)+Le+M):u+Le+(w===-2?l:M)}return[Mi(i,n+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class je{constructor({strings:e,_$litType$:t},r){let s;this.parts=[];let n=0,o=0;const l=e.length-1,u=this.parts,[f,x]=Cr(e,t);if(this.el=je.createElement(f,r),ke.currentNode=this.el.content,t===2||t===3){const w=this.el.content.firstChild;w.replaceWith(...w.childNodes)}for(;(s=ke.nextNode())!==null&&u.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(const w of s.getAttributeNames())if(w.endsWith(vi)){const _=x[o++],M=s.getAttribute(w).split(Le),T=/([.?@])?(.*)/.exec(_);u.push({type:1,index:n,name:T[2],strings:M,ctor:T[1]==="."?Or:T[1]==="?"?Nr:T[1]==="@"?Ir:dt}),s.removeAttribute(w)}else w.startsWith(Le)&&(u.push({type:6,index:n}),s.removeAttribute(w));if(Li.test(s.tagName)){const w=s.textContent.split(Le),_=w.length-1;if(_>0){s.textContent=ut?ut.emptyScript:"";for(let M=0;M<_;M++)s.append(w[M],We()),ke.nextNode(),u.push({type:2,index:++n});s.append(w[_],We())}}}else if(s.nodeType===8)if(s.data===bi)u.push({type:2,index:n});else{let w=-1;for(;(w=s.data.indexOf(Le,w+1))!==-1;)u.push({type:7,index:n}),w+=Le.length-1}n++}}static createElement(e,t){const r=Ae.createElement("template");return r.innerHTML=e,r}}function Re(i,e,t=i,r){if(e===be)return e;let s=r!==void 0?t._$Co?.[r]:t._$Cl;const n=ze(e)?void 0:e._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(!1),n===void 0?s=void 0:(s=new n(i),s._$AT(i,t,r)),r!==void 0?(t._$Co??=[])[r]=s:t._$Cl=s),s!==void 0&&(e=Re(i,s._$AS(i,e.values),s,r)),e}let kr=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,s=(e?.creationScope??Ae).importNode(t,!0);ke.currentNode=s;let n=ke.nextNode(),o=0,l=0,u=r[0];for(;u!==void 0;){if(o===u.index){let f;u.type===2?f=new Ge(n,n.nextSibling,this,e):u.type===1?f=new u.ctor(n,u.name,u.strings,this,e):u.type===6&&(f=new Pr(n,this,e)),this._$AV.push(f),u=r[++l]}o!==u?.index&&(n=ke.nextNode(),o++)}return ke.currentNode=Ae,s}p(e){let t=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}};class Ge{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,s){this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Re(this,e,t),ze(e)?e===V||e==null||e===""?(this._$AH!==V&&this._$AR(),this._$AH=V):e!==this._$AH&&e!==be&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ar(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==V&&ze(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ae.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,s=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=je.createElement(Mi(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(t);else{const n=new kr(s,this),o=n.u(this.options);n.p(t),this.T(o),this._$AH=n}}_$AC(e){let t=$i.get(e.strings);return t===void 0&&$i.set(e.strings,t=new je(e)),t}k(e){Pt(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,s=0;for(const n of e)s===t.length?t.push(r=new Ge(this.O(We()),this.O(We()),this,this.options)):r=t[s],r._$AI(n),s++;s<t.length&&(this._$AR(r&&r._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class dt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,s,n){this.type=1,this._$AH=V,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=V}_$AI(e,t=this,r,s){const n=this.strings;let o=!1;if(n===void 0)e=Re(this,e,t,0),o=!ze(e)||e!==this._$AH&&e!==be,o&&(this._$AH=e);else{const l=e;let u,f;for(e=n[0],u=0;u<n.length-1;u++)f=Re(this,l[r+u],t,u),f===be&&(f=this._$AH[u]),o||=!ze(f)||f!==this._$AH[u],f===V?e=V:e!==V&&(e+=(f??"")+n[u+1]),this._$AH[u]=f}o&&!s&&this.j(e)}j(e){e===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Or extends dt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===V?void 0:e}}class Nr extends dt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==V)}}class Ir extends dt{constructor(e,t,r,s,n){super(e,t,r,s,n),this.type=5}_$AI(e,t=this){if((e=Re(this,e,t,0)??V)===be)return;const r=this._$AH,s=e===V&&r!==V||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==V&&(r===V||s);s&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Pr{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Re(this,e)}}const Rr={I:Ge},Gr=It.litHtmlPolyfillSupport;Gr?.(je,Ge),(It.litHtmlVersions??=[]).push("3.3.1");const Ur=(i,e,t)=>{const r=t?.renderBefore??e;let s=r._$litPart$;if(s===void 0){const n=t?.renderBefore??null;r._$litPart$=s=new Ge(e.insertBefore(We(),n),n,void 0,t??{})}return s._$AI(i),s};/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2017 Google LLC
|
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
+
*/const Gt=globalThis;let oe=class extends Pe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ur(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return be}};oe._$litElement$=!0,oe.finalized=!0,Gt.litElementHydrateSupport?.({LitElement:oe});const Br=Gt.litElementPolyfillSupport;Br?.({LitElement:oe}),(Gt.litElementVersions??=[]).push("4.2.1");/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/const _e=i=>(e,t)=>{t!==void 0?t.addInitializer((()=>{customElements.define(i,e)})):customElements.define(i,e)};/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2017 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
+
*/const Dr={attribute:!0,type:String,converter:ht,reflect:!1,hasChanged:Nt},Fr=(i=Dr,e,t)=>{const{kind:r,metadata:s}=t;let n=globalThis.litPropertyMetadata.get(s);if(n===void 0&&globalThis.litPropertyMetadata.set(s,n=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),n.set(t.name,i),r==="accessor"){const{name:o}=t;return{set(l){const u=e.get.call(this);e.set.call(this,l),this.requestUpdate(o,u,i)},init(l){return l!==void 0&&this.C(o,void 0,i,l),l}}}if(r==="setter"){const{name:o}=t;return function(l){const u=this[o];e.call(this,l),this.requestUpdate(o,u,i)}}throw Error("Unsupported decorator location: "+r)};function I(i){return(e,t)=>typeof t=="object"?Fr(i,e,t):((r,s,n)=>{const o=s.hasOwnProperty(n);return s.constructor.createProperty(n,r),o?Object.getOwnPropertyDescriptor(s,n):void 0})(i,e,t)}/**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright 2017 Google LLC
|
|
30
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
+
*/function ie(i){return I({...i,state:!0,attribute:!1})}/**
|
|
32
|
+
* @license
|
|
33
|
+
* Copyright 2017 Google LLC
|
|
34
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
+
*/const Wr=(i,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(i,e,t),t);/**
|
|
36
|
+
* @license
|
|
37
|
+
* Copyright 2017 Google LLC
|
|
38
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
+
*/function zr(i,e){return(t,r,s)=>{const n=o=>o.renderRoot?.querySelector(i)??null;return Wr(t,r,{get(){return n(this)}})}}var qr=Object.getOwnPropertyDescriptor,Hr=(i,e,t,r)=>{for(var s=r>1?void 0:r?qr(e,t):e,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=o(s)||s);return s};$.MaptilerGeocodeClearIconElement=class extends oe{render(){return He`
|
|
40
|
+
<svg viewBox="0 0 14 14" width="13" height="13">
|
|
41
|
+
<path
|
|
42
|
+
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"
|
|
43
|
+
/>
|
|
44
|
+
</svg>
|
|
45
|
+
`}},$.MaptilerGeocodeClearIconElement.styles=Se`
|
|
46
|
+
svg {
|
|
47
|
+
display: block;
|
|
48
|
+
fill: var(--color-icon-button);
|
|
49
|
+
}
|
|
50
|
+
`,$.MaptilerGeocodeClearIconElement=Hr([_e("maptiler-geocode-clear-icon")],$.MaptilerGeocodeClearIconElement);var jr=Object.getOwnPropertyDescriptor,Vr=(i,e,t,r)=>{for(var s=r>1?void 0:r?jr(e,t):e,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=o(s)||s);return s};$.MaptilerGeocodeFailIconElement=class extends oe{render(){return He`
|
|
51
|
+
<svg viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
52
|
+
<path
|
|
53
|
+
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"
|
|
54
|
+
/>
|
|
55
|
+
</svg>
|
|
56
|
+
`}},$.MaptilerGeocodeFailIconElement.styles=Se`
|
|
57
|
+
svg {
|
|
58
|
+
display: block;
|
|
59
|
+
fill: #e15042;
|
|
60
|
+
}
|
|
61
|
+
`,$.MaptilerGeocodeFailIconElement=Vr([_e("maptiler-geocode-fail-icon")],$.MaptilerGeocodeFailIconElement);var Kr=Object.getOwnPropertyDescriptor,Zr=(i,e,t,r)=>{for(var s=r>1?void 0:r?Kr(e,t):e,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=o(s)||s);return s};$.MaptilerGeocodeLoadingIconElement=class extends oe{render(){return K`
|
|
62
|
+
<div>
|
|
63
|
+
<svg viewBox="0 0 18 18" width="24" height="24" class="loading-icon">
|
|
64
|
+
<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" />
|
|
65
|
+
<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" />
|
|
66
|
+
</svg>
|
|
67
|
+
</div>
|
|
68
|
+
`}},$.MaptilerGeocodeLoadingIconElement.styles=Se`
|
|
69
|
+
div {
|
|
70
|
+
position: absolute;
|
|
71
|
+
left: 50%;
|
|
72
|
+
top: 50%;
|
|
73
|
+
transform: translate(-50%, -50%);
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.loading-icon {
|
|
81
|
+
animation: rotate 0.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@keyframes rotate {
|
|
85
|
+
from {
|
|
86
|
+
-webkit-transform: rotate(0);
|
|
87
|
+
transform: rotate(0);
|
|
88
|
+
}
|
|
89
|
+
to {
|
|
90
|
+
-webkit-transform: rotate(360deg);
|
|
91
|
+
transform: rotate(360deg);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
`,$.MaptilerGeocodeLoadingIconElement=Zr([_e("maptiler-geocode-loading-icon")],$.MaptilerGeocodeLoadingIconElement);var Yr=Object.getOwnPropertyDescriptor,Xr=(i,e,t,r)=>{for(var s=r>1?void 0:r?Yr(e,t):e,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=o(s)||s);return s};$.MaptilerGeocodeReverseGeocodingIconElement=class extends oe{render(){return He`
|
|
95
|
+
<svg viewBox="0 0 60.006 21.412" width="14" height="20">
|
|
96
|
+
<path
|
|
97
|
+
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"
|
|
98
|
+
/>
|
|
99
|
+
</svg>
|
|
100
|
+
`}},$.MaptilerGeocodeReverseGeocodingIconElement.styles=Se`
|
|
101
|
+
svg {
|
|
102
|
+
display: block;
|
|
103
|
+
fill: var(--color-icon-button);
|
|
104
|
+
}
|
|
105
|
+
`,$.MaptilerGeocodeReverseGeocodingIconElement=Xr([_e("maptiler-geocode-reverse-geocoding-icon")],$.MaptilerGeocodeReverseGeocodingIconElement);var Qr=Object.getOwnPropertyDescriptor,Jr=(i,e,t,r)=>{for(var s=r>1?void 0:r?Qr(e,t):e,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=o(s)||s);return s};$.MaptilerGeocodeSearchIconElement=class extends oe{render(){return He`
|
|
106
|
+
<svg
|
|
107
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
108
|
+
width="13"
|
|
109
|
+
height="13"
|
|
110
|
+
viewBox="0 0 13 13"
|
|
111
|
+
>
|
|
112
|
+
<circle cx="4.789" cy="4.787" r="3.85" />
|
|
113
|
+
<path d="M12.063 12.063 7.635 7.635" />
|
|
114
|
+
</svg>
|
|
115
|
+
`}},$.MaptilerGeocodeSearchIconElement.styles=Se`
|
|
116
|
+
circle {
|
|
117
|
+
stroke-width: 1.875;
|
|
118
|
+
fill: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
path {
|
|
122
|
+
stroke-width: 1.875;
|
|
123
|
+
stroke-linecap: round;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
svg {
|
|
127
|
+
display: block;
|
|
128
|
+
stroke: var(--color-icon-button);
|
|
129
|
+
}
|
|
130
|
+
`,$.MaptilerGeocodeSearchIconElement=Jr([_e("maptiler-geocode-search-icon")],$.MaptilerGeocodeSearchIconElement);const es=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i,Ti=/^([+-]?[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,})$/,Ai=/^(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,Ci=/^(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,ki=/^(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,Oi=/^(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 ts(i){if(!["DMS","DM","DD"].includes(i))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){const e=this.decimalCoordinates.split(",").map(M=>Number(M.trim())),t=Number(e[0]),r=Number(e[1]),s=Math.abs(t),n=Math.abs(r),o=t>0?"N":"S",l=r>0?"E":"W";let u;i=="DD"&&(u=`${s}° ${o}, ${n}° ${l}`);const f=Math.floor(s),x=Math.floor(n),w=(s-f)*60,_=(n-x)*60;if(i=="DM"){let M=Ni(w,3).toFixed(3).padStart(6,"0"),T=Ni(_,3).toFixed(3).padStart(6,"0");M.endsWith(".000")&&T.endsWith(".000")&&(M=M.replace(/\.000$/,""),T=T.replace(/\.000$/,"")),u=`${f}° ${M}' ${o}, ${x}° ${T}' ${l}`}if(i=="DMS"){const M=Math.floor(w),T=Math.floor(_);let G=((w-M)*60).toFixed(1).padStart(4,"0"),N=((_-T)*60).toFixed(1).padStart(4,"0");const W=M.toString().padStart(2,"0"),L=T.toString().padStart(2,"0");G.endsWith(".0")&&N.endsWith(".0")&&(G=G.replace(/\.0$/,""),N=N.replace(/\.0$/,"")),u=`${f}° ${W}' ${G}" ${o}, ${x}° ${L}' ${N}" ${l}`}return u}else throw new Error("no decimal coordinates to convert")}function Ni(i,e){const t=Math.pow(10,e);return Math.round((i+Number.EPSILON)*t)/t}function Ut(i,e){e||(e=5),i=i.replace(/\s+/g," ").trim();let t=null,r=null,s="",n="",o=null,l=[],u=!1;if(es.test(i))throw new Error("invalid coordinate value");if(Ti.test(i))if(l=Ti.exec(i),u=Ve(l),u)t=Math.abs(l[1])+l[2]/60,Number(l[1])<0&&(t*=-1),r=Math.abs(l[3])+l[4]/60,Number(l[3])<0&&(r*=-1),o="DM";else throw new Error("invalid coordinate format");else if(Ai.test(i))if(l=Ai.exec(i),u=Ve(l),u){if(t=l[2],r=l[6],t.includes(",")&&(t=t.replace(",",".")),r.includes(",")&&(r=r.replace(",",".")),o="DD",Number(Math.round(t))==Number(t))throw new Error("integer only coordinate provided");if(Number(Math.round(r))==Number(r))throw new Error("integer only coordinate provided");l[1]?(s=l[1],n=l[5]):l[4]&&(s=l[4],n=l[8])}else throw new Error("invalid decimal coordinate format");else if(Ci.test(i))if(l=Ci.exec(i),u=Ve(l),u)t=Math.abs(parseInt(l[2])),l[4]&&(t+=l[4]/60,o="DM"),l[6]&&(t+=l[6].replace(",",".")/3600,o="DMS"),parseInt(l[2])<0&&(t=-1*t),r=Math.abs(parseInt(l[9])),l[11]&&(r+=l[11]/60),l[13]&&(r+=l[13].replace(",",".")/3600),parseInt(l[9])<0&&(r=-1*r),l[1]?(s=l[1],n=l[8]):l[7]&&(s=l[7],n=l[14]);else throw new Error("invalid DMS coordinates format");else if(ki.test(i))if(l=ki.exec(i),u=Ve(l),u)t=Math.abs(parseInt(l[2])),l[4]&&(t+=l[4]/60,o="DM"),l[6]&&(t+=l[6]/3600,o="DMS"),parseInt(l[2])<0&&(t=-1*t),r=Math.abs(parseInt(l[10])),l[12]&&(r+=l[12]/60),l[14]&&(r+=l[14]/3600),parseInt(l[10])<0&&(r=-1*r),l[1]?(s=l[1],n=l[9]):l[8]&&(s=l[8],n=l[16]);else throw new Error("invalid DMS coordinates format");else if(Oi.test(i)){if(l=Oi.exec(i),u=Ve(l),l.filter(f=>f).length<=5)throw new Error("invalid coordinates format");if(u)t=Math.abs(parseInt(l[2])),l[4]&&(t+=l[4].replace(",",".")/60,o="DM"),l[6]&&(t+=l[6].replace(",",".")/3600,o="DMS"),parseInt(l[2])<0&&(t=-1*t),r=Math.abs(parseInt(l[10])),l[12]&&(r+=l[12].replace(",",".")/60),l[14]&&(r+=l[14].replace(",",".")/3600),parseInt(l[10])<0&&(r=-1*r),l[1]?(s=l[1],n=l[9]):l[8]&&(s=l[8],n=l[16]);else throw new Error("invalid coordinates format")}if(u){if(Math.abs(r)>=180)throw new Error("invalid longitude value");if(Math.abs(t)>=90)throw new Error("invalid latitude value");if(s&&!n||!s&&n)throw new Error("invalid coordinates value");if(s&&s==n)throw new Error("invalid coordinates format");t.toString().includes(",")&&(t=t.replace(",",".")),r.toString().includes(",")&&(r=r.replace(",","."));let f=/S|SOUTH/i;f.test(s)&&t>0&&(t=-1*t),f=/W|WEST/i,f.test(n)&&r>0&&(r=-1*r);const x=l[0].trim();let w,_;const M=/[,/;\u0020]/g,T=x.match(M);if(T==null){const W=Math.floor(i.length/2);w=x.substring(0,W).trim(),_=x.substring(W).trim()}else{let W;T.length%2==1?W=Math.floor(T.length/2):W=T.length/2-1;let L=0;if(W==0)L=x.indexOf(T[0]),w=x.substring(0,L).trim(),_=x.substring(L+1).trim();else{let Q=0,ne=0;for(;Q<=W;)L=x.indexOf(T[Q],ne),ne=L+1,Q++;w=x.substring(0,L).trim(),_=x.substring(L+1).trim()}}const G=w.split(".");if(G.length==2&&G[1]==0&&G[1].length!=2)throw new Error("invalid coordinates format");const N=_.split(".");if(N.length==2&&N[1]==0&&N[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(w)||/^\d+$/.test(_))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),r=Number(Number(r).toFixed(e)),Object.freeze({verbatimCoordinates:x,verbatimLatitude:w,verbatimLongitude:_,decimalLatitude:t,decimalLongitude:r,decimalCoordinates:`${t},${r}`,originalFormat:o,closeEnough:is,toCoordinateFormat:ts})}else throw new Error("coordinates pattern match failed")}function Ve(i){if(!isNaN(i[0]))return!1;const e=[...i];if(e.shift(),e.length%2>0)return!1;const t=/^[-+]?\d+([\.,]\d+)?$/,r=/[eastsouthnorthwest]+/i,s=e.length/2;for(let n=0;n<s;n++){const o=e[n],l=e[n+s],u=t.test(o)&&t.test(l),f=r.test(o)&&r.test(l),x=o==l;if(!(o==null&&l==null)){if(o==null||l==null)return!1;if(u||f||x)continue;return!1}}return!0}function Ii(i,e){const t=Math.abs(i-e);return Number(t.toFixed(6))<=1e-5}function is(i){if(!i)throw new Error("coords must be provided");if(i.includes(",")){const e=i.split(",");if(Number(e[0])==NaN||Number(e[1])==NaN)throw new Error("coords are not valid decimals");return Ii(this.decimalLatitude,Number(e[0]))&&Ii(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const rs=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Ut.to=rs;const ss=[{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"}],ns={decimalLatitude:40.123,decimalLongitude:-74.123},os=[{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}],ls=[{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},{verbatimCoordinates:"1.23456, 18.33453",verbatimLatitude:"1.23456",verbatimLongitude:"18.33453",decimalLatitude:1.23456,decimalLongitude:18.33453}];function as(){const i=[];return ss.forEach(e=>{e.decimalLatitude?i.push(e):i.push({...e,...ns})}),[...i,...os,...ls]}const cs=as();Ut.formats=cs.map(i=>i.verbatimCoordinates);const hs=Ut;/**
|
|
131
|
+
* @license
|
|
132
|
+
* Copyright 2017 Google LLC
|
|
133
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
134
|
+
*/const Bt={ATTRIBUTE:1,CHILD:2},Dt=i=>(...e)=>({_$litDirective$:i,values:e});let Ft=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
|
|
135
|
+
* @license
|
|
136
|
+
* Copyright 2018 Google LLC
|
|
137
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
138
|
+
*/const ft=Dt(class extends Ft{constructor(i){if(super(i),i.type!==Bt.ATTRIBUTE||i.name!=="class"||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter((e=>i[e])).join(" ")+" "}update(i,[e]){if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in e)e[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(e)}const t=i.element.classList;for(const r of this.st)r in e||(t.remove(r),this.st.delete(r));for(const r in e){const s=!!e[r];s===this.st.has(r)||this.nt?.has(r)||(s?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return be}});/**
|
|
139
|
+
* @license
|
|
140
|
+
* Copyright 2020 Google LLC
|
|
141
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
142
|
+
*/const{I:us}=Rr,Pi=()=>document.createComment(""),Ke=(i,e,t)=>{const r=i._$AA.parentNode,s=e===void 0?i._$AB:e._$AA;if(t===void 0){const n=r.insertBefore(Pi(),s),o=r.insertBefore(Pi(),s);t=new us(n,o,i,i.options)}else{const n=t._$AB.nextSibling,o=t._$AM,l=o!==i;if(l){let u;t._$AQ?.(i),t._$AM=i,t._$AP!==void 0&&(u=i._$AU)!==o._$AU&&t._$AP(u)}if(n!==s||l){let u=t._$AA;for(;u!==n;){const f=u.nextSibling;r.insertBefore(u,s),u=f}}}return t},Oe=(i,e,t=i)=>(i._$AI(e,t),i),ds={},fs=(i,e=ds)=>i._$AH=e,ps=i=>i._$AH,Wt=i=>{i._$AR(),i._$AA.remove()};/**
|
|
143
|
+
* @license
|
|
144
|
+
* Copyright 2017 Google LLC
|
|
145
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
146
|
+
*/const Ri=(i,e,t)=>{const r=new Map;for(let s=e;s<=t;s++)r.set(i[s],s);return r},ms=Dt(class extends Ft{constructor(i){if(super(i),i.type!==Bt.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,e,t){let r;t===void 0?t=e:e!==void 0&&(r=e);const s=[],n=[];let o=0;for(const l of i)s[o]=r?r(l,o):o,n[o]=t(l,o),o++;return{values:n,keys:s}}render(i,e,t){return this.dt(i,e,t).values}update(i,[e,t,r]){const s=ps(i),{values:n,keys:o}=this.dt(e,t,r);if(!Array.isArray(s))return this.ut=o,n;const l=this.ut??=[],u=[];let f,x,w=0,_=s.length-1,M=0,T=n.length-1;for(;w<=_&&M<=T;)if(s[w]===null)w++;else if(s[_]===null)_--;else if(l[w]===o[M])u[M]=Oe(s[w],n[M]),w++,M++;else if(l[_]===o[T])u[T]=Oe(s[_],n[T]),_--,T--;else if(l[w]===o[T])u[T]=Oe(s[w],n[T]),Ke(i,u[T+1],s[w]),w++,T--;else if(l[_]===o[M])u[M]=Oe(s[_],n[M]),Ke(i,s[w],s[_]),_--,M++;else if(f===void 0&&(f=Ri(o,M,T),x=Ri(l,w,_)),f.has(l[w]))if(f.has(l[_])){const G=x.get(o[M]),N=G!==void 0?s[G]:null;if(N===null){const W=Ke(i,s[w]);Oe(W,n[M]),u[M]=W}else u[M]=Oe(N,n[M]),Ke(i,s[w],N),s[G]=null;M++}else Wt(s[_]),_--;else Wt(s[w]),w++;for(;M<=T;){const G=Ke(i,u[T+1]);Oe(G,n[M]),u[M++]=G}for(;w<=_;){const G=s[w++];G!==null&&Wt(G)}return this.ut=o,fs(i,u),be}});function gs(i,e,t){const r=e[1],s=e[0],n=r-s;return i===r&&t?i:((i-s)%n+n)%n+s}function pt(i){const e=[...i];return e[2]<e[0]&&(Math.abs((e[0]+e[2]+360)/2)>Math.abs((e[0]-360+e[2])/2)?e[0]-=360:e[2]+=360),e}let Ze;async function ys(i,e,t){for(const r of e??[])if(!(i&&(r.minZoom!=null&&r.minZoom>i[0]||r.maxZoom!=null&&r.maxZoom<i[0]))){if(r.type==="fixed")return r.coordinates.join(",");if(r.type==="client-geolocation")if(Ze&&r.cachedLocationExpiry&&Ze.time+r.cachedLocationExpiry>Date.now()){if(Ze.coords)return Ze.coords}else{let s;try{return s=await new Promise((n,o)=>{t.signal.addEventListener("abort",()=>{o(Error("aborted"))}),navigator.geolocation.getCurrentPosition(l=>{n([l.coords.longitude,l.coords.latitude].map(u=>u.toFixed(6)).join(","))},l=>{o(l)},r)}),s}catch{}finally{r.cachedLocationExpiry&&(Ze={time:Date.now(),coords:s})}if(t.signal.aborted)return}if(r.type==="server-geolocation")return"ip";if(i&&r.type==="map-center")return i[1].toFixed(6)+","+i[2].toFixed(6)}}/**
|
|
147
|
+
* @license
|
|
148
|
+
* Copyright 2018 Google LLC
|
|
149
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
150
|
+
*/const Gi="important",vs=" !"+Gi,bs=Dt(class extends Ft{constructor(i){if(super(i),i.type!==Bt.ATTRIBUTE||i.name!=="style"||i.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce(((e,t)=>{const r=i[t];return r==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(i,[e]){const{style:t}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(const r in e){const s=e[r];if(s!=null){this.ft.add(r);const n=typeof s=="string"&&s.endsWith(vs);r.includes("-")||n?t.setProperty(r,n?s.slice(0,-11):s,n?Gi:""):t[r]=s}}return be}}),Es=".sprite-icon{align-self:center;justify-self:center;opacity:.75;background-repeat:no-repeat}li{text-align:left;cursor:default;display:grid;grid-template-columns:40px 1fr;color:var(--color-text);padding:8px 0;font-size:14px;line-height:18px;min-width:fit-content;outline:0}li:first-child{padding-top:10px}li:last-child{padding-bottom:10px}li.picked{background-color:#e7edff}li.picked .secondary{color:#96a4c7;padding-left:4px}li.picked .line2{color:#96a4c7}li.selected{background-color:#f3f6ff;animation:backAndForth 5s linear infinite}li.selected .primary{color:#2b8bfb}li.selected .secondary{color:#a2adc7;padding-left:4px}li.selected .line2{color:#a2adc7}li>img{align-self:center;justify-self:center;opacity:.75}.texts{padding:0 17px 0 0}.texts>*{white-space:nowrap;display:block;min-width:fit-content}.primary{font-weight:600}.secondary{color:#aeb6c7;padding-left:4px}.line2{color:#aeb6c7}@keyframes backAndForth{0%{transform:translate(0)}10%{transform:translate(0)}45%{transform:translate(calc(-100% + 270px))}55%{transform:translate(calc(-100% + 270px))}90%{transform:translate(0)}to{transform:translate(0)}}";var ws=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,Ui=i=>{throw TypeError(i)},pe=(i,e,t,r)=>{for(var s=r>1?void 0:r?xs(e,t):e,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=(r?o(e,t,s):o(s))||s);return r&&s&&ws(e,t,s),s},Bi=(i,e,t)=>e.has(i)||Ui("Cannot "+t),z=(i,e,t)=>(Bi(i,e,"read from private field"),t?t.call(i):e.get(i)),Ss=(i,e,t)=>e.has(i)?Ui("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Ue=(i,e,t)=>(Bi(i,e,"access private method"),t),B,mt,Ye,Y,Di,Fi,zt,qt;const Wi=typeof devicePixelRatio>"u"||devicePixelRatio>1.25,zi=Wi?"@2x":"",Be=Wi?2:1;let Ne,qi,le=class extends oe{constructor(){super(...arguments),Ss(this,B),this.itemStyle="default",this.showPlaceType="if-needed",this.missingIconsCache=new Set,this.iconsBaseUrl="",this.index=0}willUpdate(i){i.has("feature")&&z(this,B,mt)&&(this.index=z(this,B,mt).length,Ue(this,B,zt).call(this))}render(){return K`
|
|
151
|
+
<li
|
|
152
|
+
tabindex="-1"
|
|
153
|
+
role="option"
|
|
154
|
+
aria-selected=${this.itemStyle==="selected"}
|
|
155
|
+
aria-checked=${this.itemStyle==="picked"}
|
|
156
|
+
class=${this.itemStyle}
|
|
157
|
+
@click=${()=>this.dispatchEvent(new CustomEvent("select"))}
|
|
158
|
+
>
|
|
159
|
+
${Ne&&this.spriteIcon?K`
|
|
160
|
+
<div
|
|
161
|
+
class="sprite-icon"
|
|
162
|
+
style=${bs({width:`${this.spriteIcon.width/Be}px`,height:`${this.spriteIcon.height/Be}px`,backgroundImage:`url(${this.iconsBaseUrl}sprite${zi}.png)`,backgroundPosition:`-${this.spriteIcon.x/Be}px -${this.spriteIcon.y/Be}px`,backgroundSize:`${Ne.width/Be}px ${Ne.height/Be}px`})}
|
|
163
|
+
title=${z(this,B,Y)}
|
|
164
|
+
/>
|
|
165
|
+
`:this.imageUrl?K` <img src=${this.imageUrl} alt=${this.category} title=${z(this,B,Y)} @error=${Ue(this,B,Fi)} />`:this.feature?.address?K` <img src=${this.iconsBaseUrl+"housenumber.svg"} alt=${z(this,B,Y)} title=${z(this,B,Y)} /> `:this.feature?.id.startsWith("road.")?K` <img src=${this.iconsBaseUrl+"road.svg"} alt=${z(this,B,Y)} title=${z(this,B,Y)} /> `:this.feature?.id.startsWith("address.")?K` <img src=${this.iconsBaseUrl+"street.svg"} alt=${z(this,B,Y)} title=${z(this,B,Y)} /> `:this.feature?.id.startsWith("postal_code.")?K` <img src=${this.iconsBaseUrl+"postal_code.svg"} alt=${z(this,B,Y)} title=${z(this,B,Y)} /> `:this.feature?.id.startsWith("poi.")?K` <img src=${this.iconsBaseUrl+"poi.svg"} alt=${z(this,B,Y)} title=${z(this,B,Y)} /> `:z(this,B,Ye)?K` <img src=${this.iconsBaseUrl+"reverse.svg"} alt=${z(this,B,Y)} title=${z(this,B,Y)} /> `:K` <img src=${this.iconsBaseUrl+"area.svg"} alt=${z(this,B,Y)} title=${z(this,B,Y)} /> `}
|
|
166
|
+
|
|
167
|
+
<span class="texts">
|
|
168
|
+
<span>
|
|
169
|
+
<span class="primary"> ${z(this,B,Ye)?this.feature?.place_name:this.feature?.place_name.replace(/,.*/,"")} </span>
|
|
170
|
+
|
|
171
|
+
${this.showPlaceType==="always"||this.showPlaceType!=="never"&&!this.feature?.address&&!this.feature?.id.startsWith("road.")&&!this.feature?.id.startsWith("address.")&&!this.feature?.id.startsWith("postal_code.")&&(!this.feature?.id.startsWith("poi.")||!this.imageUrl)&&!z(this,B,Ye)?K` <span class="secondary"> ${z(this,B,Y)} </span> `:V}
|
|
172
|
+
</span>
|
|
173
|
+
|
|
174
|
+
<span class="line2"> ${z(this,B,Ye)?this.feature?.text:this.feature?.place_name.replace(/[^,]*,?s*/,"")} </span>
|
|
175
|
+
</span>
|
|
176
|
+
</li>
|
|
177
|
+
`}};B=new WeakSet,mt=function(){return this.feature?.properties?.categories},Ye=function(){return this.feature?.place_type[0]==="reverse"},Y=function(){return this.feature?.properties?.categories?.join(", ")??this.feature?.place_type_name?.[0]??this.feature?.place_type[0]},Di=function(){qi??=fetch(`${this.iconsBaseUrl}sprite${zi}.json`).then(i=>i.json()).then(i=>{Ne=i}).catch(()=>{Ne=null})},Fi=function(){this.imageUrl&&this.missingIconsCache.add(this.imageUrl),Ue(this,B,zt).call(this)},zt=function(){Ne!==void 0?Ue(this,B,qt).call(this):(Ue(this,B,Di).call(this),qi?.then(()=>{Ue(this,B,qt).call(this)}))},qt=function(){do{if(this.index--,this.category=z(this,B,mt)?.[this.index],this.spriteIcon=this.category?Ne?.icons[this.category]:void 0,this.spriteIcon)break;this.imageUrl=this.category?this.iconsBaseUrl+this.category.replace(/ /g,"_")+".svg":void 0}while(this.index>-1&&(!this.imageUrl||this.missingIconsCache.has(this.imageUrl)))},le.styles=Se`
|
|
178
|
+
${at(Es)}
|
|
179
|
+
`,pe([I({type:Object})],le.prototype,"feature",2),pe([I({type:String})],le.prototype,"itemStyle",2),pe([I({type:String})],le.prototype,"showPlaceType",2),pe([I({attribute:!1})],le.prototype,"missingIconsCache",2),pe([I({type:String})],le.prototype,"iconsBaseUrl",2),pe([ie()],le.prototype,"category",2),pe([ie()],le.prototype,"imageUrl",2),pe([ie()],le.prototype,"spriteIcon",2),pe([ie()],le.prototype,"index",2),le=pe([_e("maptiler-geocoder-feature-item")],le);const Ls="form{font-family:Open Sans,Ubuntu,Helvetica Neue,Arial,Helvetica,sans-serif;position:relative;background-color:#fff;z-index:10;border-radius:4px;margin:0;transition:max-width .25s;box-shadow:0 2px 5px #33335926;--color-text: #444952;--color-icon-button: #444952;pointer-events:all}form,form *,form *:after,form *:before{box-sizing:border-box}form.can-collapse{max-width:29px}form.can-collapse input::placeholder{transition:opacity .25s;opacity:0}form{width:270px;max-width:270px}form:focus-within,form:hover{width:270px;max-width:270px}form input::placeholder,form:focus-within input::placeholder,form:hover input::placeholder{opacity:1}input{font:inherit;font-size:14px;flex-grow:1;min-height:29px;background-color:transparent;color:#444952;white-space:nowrap;overflow:hidden;border:0;margin:0;padding:0}input:focus{color:#444952;outline:0;outline:none;box-shadow:none}ul,div.error,div.no-results{background-color:#fff;border-radius:4px;left:0;list-style:none;margin:0;padding:0;position:absolute;width:100%;top:calc(100% + 6px);overflow:hidden}ul{font-size:14px;line-height:16px;box-shadow:0 5px 10px #33335926}div.error,div.no-results{font:inherit;line-height:18px;font-size:12px;display:flex;gap:16px}div.error{padding:16px;font-weight:600;color:#e25041;background-color:#fbeae8}div.error div{flex-grow:1}div.error maptiler-geocode-fail-icon{flex-shrink:0;width:20px;height:20px}div.error button{flex-shrink:0}div.error button maptiler-geocode-clear-icon{--color-icon-button: #e25041}div.error button:hover maptiler-geocode-clear-icon,div.error button:active maptiler-geocode-clear-icon{--color-icon-button: inherit}div.no-results{padding:14px 24px 14px 16px;font-weight:400;color:#6b7c93;box-shadow:0 5px 10px #33335926}div.no-results maptiler-geocode-fail-icon{margin-top:4px;flex-shrink:0;width:20px;height:20px}ul.options.open-on-top{top:auto;bottom:calc(100% + 6px)}button{padding:0;margin:0;border:0;background-color:transparent;height:auto;width:auto}button:hover{background-color:transparent}button:hover,button:active{--color-icon-button: #2b8bfb}.input-group{display:flex;align-items:stretch;gap:7px;padding-inline:8px;border-radius:4px;overflow:hidden}.input-group:focus-within{outline:#2b8bfb solid 2px}.search-button{flex-shrink:0}.clear-button-container{display:flex;display:none;position:relative;align-items:stretch}.clear-button-container.displayable{display:flex;flex-shrink:0}:host(.maptiler-geocoder):not(:empty){box-shadow:none}:host(.maptiler-geocoder) .input-group{border:white solid 2px}:host(.maptiler-geocoder) .input-group:focus-within{border:#2b8bfb solid 2px;outline:0;outline:none}:host(.maptiler-geocoder) form.can-collapse{max-width:33px}:host(.maptiler-geocoder) form,:host(.maptiler-geocoder) form:focus-within,:host(.maptiler-geocoder) form:hover{width:270px;max-width:270px}:host(.leaflet-geocoder) .input-group{border:white solid 1px}:host(.leaflet-geocoder) form.can-collapse{max-width:30px}";var _s=Object.defineProperty,$s=Object.getOwnPropertyDescriptor,Hi=i=>{throw TypeError(i)},O=(i,e,t,r)=>{for(var s=r>1?void 0:r?$s(e,t):e,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=(r?o(e,t,s):o(s))||s);return r&&s&&_s(e,t,s),s},Ht=(i,e,t)=>e.has(i)||Hi("Cannot "+t),re=(i,e,t)=>(Ht(i,e,"read from private field"),t?t.call(i):e.get(i)),De=(i,e,t)=>e.has(i)?Hi("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),gt=(i,e,t,r)=>(Ht(i,e,"write to private field"),e.set(i,t),t),P=(i,e,t)=>(Ht(i,e,"access private method"),t),yt,vt,Xe,jt,Qe,k,bt,ji,Vi,Vt,ee,Kt,Et,Zt,Yt,$e,Xt,wt,Ki,Qt,Zi,Yi,Xi,Qi,Ji;$.MaptilerGeocoderElement=class extends oe{constructor(){super(...arguments),De(this,k),this.clearListOnPick=!1,this.clearOnBlur=!1,this.collapsed=!1,this.excludeTypes=!1,this.exhaustiveReverseGeocoding=!1,this.fetchFullGeometryOnPick=!1,this.keepListOpen=!1,this.openListOnTop=!1,this.reverseActive=!1,this.searchValue="",this.selectedItemIndex=-1,this.cachedFeatures=[],this.lastSearchUrl="",this.focused=!1,this.focusedDelayed=!1,De(this,yt,!1),De(this,vt,!1),De(this,Xe),De(this,jt,new Set),De(this,Qe)}firstUpdated(){gt(this,yt,!0)}setOptions(e){const t={...e};for(const r of Object.keys(t))Ms.includes(r)||delete t[r];Object.assign(this,t)}setQuery(e){P(this,k,Yt).call(this,e),P(this,k,Zt).call(this)}submitQuery(e){P(this,k,Xt).call(this,e)}clearList(){P(this,k,$e).call(this),this.picked=void 0,this.selectedItemIndex=-1}focus(e){this.input.focus(e)}blur(){this.input.blur()}addEventListener(e,t,r){super.addEventListener(e,t,r)}removeEventListener(e,t,r){super.removeEventListener(e,t,r)}handleMapChange(e){gt(this,Qe,e)}handleMapClick(e){this.reverseActive&&P(this,k,Ki).call(this,e)}willUpdate(e){e.has("error")&&this.error&&console.error("[MapTilerGeocodingControl] Error:",this.error),e.has("enableReverse")&&(this.reverseActive=this.enableReverse==="always"),["picked"].some(t=>e.has(t))&&this.picked&&(this.clearListOnPick&&P(this,k,$e).call(this),this.selectedItemIndex=-1),["searchValue","minLength"].some(t=>e.has(t))&&re(this,k,Vt)&&(P(this,k,$e).call(this),this.error=void 0),["focused"].some(t=>e.has(t))&&setTimeout(()=>{this.focusedDelayed=this.focused,this.clearOnBlur&&!this.focused&&(this.searchValue="")},100),["selectFirst","listFeatures","selectedItemIndex","picked"].some(t=>e.has(t))&&this.selectFirst!==!1&&this.listFeatures?.length&&this.selectedItemIndex==-1&&!this.picked&&(this.selectedItemIndex=0),["listFeatures","selectedItemIndex"].some(t=>e.has(t))&&P(this,k,ee).call(this,"select",{feature:re(this,k,bt)}),["picked"].some(t=>e.has(t))&&this.picked&&this.picked.id!==e.get("picked")?.id&&(this.fetchFullGeometryOnPick&&!this.picked.address&&this.picked.geometry.type==="Point"&&this.picked.place_type[0]!=="reverse"?P(this,k,wt).call(this,this.picked.id,{byId:!0}):Promise.resolve()).then(()=>{P(this,k,ee).call(this,"pick",{feature:this.picked})},t=>{t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"||(this.error=t,P(this,k,ee).call(this,"pick",{feature:this.picked}))}),["listFeatures","focusedDelayed"].some(t=>e.has(t))&&(re(this,k,ji)?(P(this,k,ee).call(this,"featuresshow"),gt(this,vt,!0)):re(this,vt)&&P(this,k,ee).call(this,"featureshide")),["reverseActive"].some(t=>e.has(t))&&P(this,k,ee).call(this,"reversetoggle",{reverse:this.reverseActive})}render(){return K`
|
|
180
|
+
<form @submit=${P(this,k,Kt)} class=${ft({"can-collapse":this.collapsed&&this.searchValue===""})}>
|
|
181
|
+
<div class="input-group">
|
|
182
|
+
<button
|
|
183
|
+
class="search-button"
|
|
184
|
+
type="button"
|
|
185
|
+
@click=${()=>{this.input.focus()}}
|
|
186
|
+
>
|
|
187
|
+
<maptiler-geocode-search-icon></maptiler-geocode-search-icon>
|
|
188
|
+
</button>
|
|
189
|
+
|
|
190
|
+
<input
|
|
191
|
+
.value=${this.searchValue}
|
|
192
|
+
@focus=${()=>this.focused=!0}
|
|
193
|
+
@blur=${()=>this.focused=!1}
|
|
194
|
+
@click=${()=>this.focused=!0}
|
|
195
|
+
@keydown=${P(this,k,Qt)}
|
|
196
|
+
@input=${P(this,k,Zi)}
|
|
197
|
+
@change=${()=>this.picked=void 0}
|
|
198
|
+
placeholder=${this.placeholder??"Search"}
|
|
199
|
+
aria-label=${this.placeholder??"Search"}
|
|
200
|
+
/>
|
|
201
|
+
|
|
202
|
+
<div class="clear-button-container ${ft({displayable:this.searchValue!==""})}">
|
|
203
|
+
${re(this,k,Vi)?K`<maptiler-geocode-loading-icon></maptiler-geocode-loading-icon>`:K`
|
|
204
|
+
<button type="button" @click=${P(this,k,Ji)} title=${this.clearButtonTitle??"clear"}>
|
|
205
|
+
<maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
|
|
206
|
+
</button>
|
|
207
|
+
`}
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
${this.enableReverse==="button"?K`
|
|
211
|
+
<button
|
|
212
|
+
type="button"
|
|
213
|
+
class=${ft({active:this.reverseActive})}
|
|
214
|
+
title=${this.reverseButtonTitle??"toggle reverse geocoding"}
|
|
215
|
+
@click=${()=>this.reverseActive=!this.reverseActive}
|
|
216
|
+
>
|
|
217
|
+
<maptiler-geocode-reverse-geocoding-icon></maptiler-geocode-reverse-geocoding-icon>
|
|
218
|
+
</button>
|
|
219
|
+
`:V}
|
|
220
|
+
|
|
221
|
+
<!-- <slot /> -->
|
|
222
|
+
</div>
|
|
223
|
+
|
|
224
|
+
${this.error?K`
|
|
225
|
+
<div class="error">
|
|
226
|
+
<maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>
|
|
227
|
+
|
|
228
|
+
<div>${this.errorMessage??"Something went wrong…"}</div>
|
|
229
|
+
|
|
230
|
+
<button @click=${()=>this.error=void 0}>
|
|
231
|
+
<maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
|
|
232
|
+
</button>
|
|
233
|
+
</div>
|
|
234
|
+
`:!this.focusedDelayed&&!this.keepListOpen||this.listFeatures===void 0?V:this.listFeatures.length===0?K`
|
|
235
|
+
<div class="no-results">
|
|
236
|
+
<maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>
|
|
237
|
+
|
|
238
|
+
<div>
|
|
239
|
+
${this.noResultsMessage??"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!"}
|
|
240
|
+
</div>
|
|
241
|
+
</div>
|
|
242
|
+
`:K`
|
|
243
|
+
<ul class="options ${ft({"open-on-top":this.openListOnTop})}" @mouseleave=${P(this,k,Qi)} @keydown=${P(this,k,Qt)} role="listbox">
|
|
244
|
+
${ms(this.listFeatures,e=>e.id+(e.address?","+e.address:""),(e,t)=>K`
|
|
245
|
+
<maptiler-geocoder-feature-item
|
|
246
|
+
.feature=${e}
|
|
247
|
+
.showPlaceType=${this.showPlaceType??"if-needed"}
|
|
248
|
+
itemStyle=${this.selectedItemIndex===t?"selected":this.picked?.id===e.id?"picked":"default"}
|
|
249
|
+
@mouseenter=${()=>{P(this,k,Xi).call(this,t)}}
|
|
250
|
+
@select=${()=>{P(this,k,Yi).call(this,e)}}
|
|
251
|
+
.missingIconsCache=${re(this,jt)}
|
|
252
|
+
.iconsBaseUrl=${this.iconsBaseUrl??"https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.2/icons/"}
|
|
253
|
+
>
|
|
254
|
+
${e.place_name}
|
|
255
|
+
</maptiler-geocoder-feature-item>
|
|
256
|
+
`)}
|
|
257
|
+
</ul>
|
|
258
|
+
`}
|
|
259
|
+
</form>
|
|
260
|
+
`}},yt=new WeakMap,vt=new WeakMap,Xe=new WeakMap,jt=new WeakMap,Qe=new WeakMap,k=new WeakSet,bt=function(){return this.listFeatures?.[this.selectedItemIndex]},ji=function(){return!!this.listFeatures?.length&&(this.focusedDelayed||this.keepListOpen)},Vi=function(){return this.abortController!==void 0},Vt=function(){return this.searchValue.length<(this.minLength??2)},ee=function(i,...[e]){re(this,yt)&&this.dispatchEvent(new CustomEvent(i,{bubbles:!0,composed:!0,detail:e}))},Kt=function(i){i?.preventDefault(),this.focused=!1,clearTimeout(re(this,Xe)),this.selectedItemIndex>-1&&this.listFeatures?(this.picked=this.listFeatures[this.selectedItemIndex],this.searchValue=this.picked.place_type[0]==="reverse"?this.picked.place_name:this.picked.place_name.replace(/,.*/,""),this.error=void 0,this.selectedItemIndex=-1):this.searchValue&&P(this,k,wt).call(this,this.searchValue,{exact:!0}).then(()=>{this.picked=void 0}).catch(e=>this.error=e)},Et=function(i){try{return hs(i,6)}catch{return!1}},Zt=function(){setTimeout(()=>{this.input.focus(),this.focused=!0,this.input.select()})},Yt=function(i){if(this.searchValue=i,P(this,k,ee).call(this,"querychange",{query:this.searchValue,reverseCoords:P(this,k,Et).call(this,i)}),this.error=void 0,this.picked=void 0,this.showResultsWhileTyping!==!1){if(clearTimeout(re(this,Xe)),re(this,k,Vt))return;const e=this.searchValue;gt(this,Xe,window.setTimeout(()=>{P(this,k,wt).call(this,e).catch(t=>this.error=t)},this.debounceSearch??200))}else P(this,k,$e).call(this)},$e=function(){this.listFeatures!==void 0&&(this.listFeatures=void 0,P(this,k,ee).call(this,"featuresclear"))},Xt=function(i){this.searchValue=i,P(this,k,ee).call(this,"querychange",{query:this.searchValue,reverseCoords:P(this,k,Et).call(this,i)}),this.selectedItemIndex=-1,P(this,k,Kt).call(this)},wt=async function(i,{byId:e=!1,exact:t=!1}={}){this.error=void 0,this.abortController?.abort();const r=new AbortController;this.abortController=r;try{const s=this.apiUrl??"https://api.maptiler.com/geocoding",n=P(this,k,Et).call(this,i),o=new URL(s+"/"+encodeURIComponent(n?`${n.decimalLongitude},${n.decimalLatitude}`:i)+".json"),l=o.searchParams;this.language!==void 0&&l.set("language",Array.isArray(this.language)?this.language.join(","):this.language??"");const[u]=re(this,Qe)??[void 0];let f=(!n||this.reverseGeocodingTypes===void 0?this.types:this.reverseGeocodingTypes)?.map(N=>typeof N=="string"?N:u===void 0||(N[0]??0)<=u&&u<(N[1]??1/0)?N[2]:void 0).filter(N=>N!==void 0);f&&(f=[...new Set(f)],l.set("types",f.join(",")));const x=!n||this.reverseGeocodingExcludeTypes===void 0?this.excludeTypes:this.reverseGeocodingExcludeTypes;if(x&&l.set("excludeTypes",String(x)),this.bbox&&l.set("bbox",this.bbox.map(N=>N.toFixed(6)).join(",")),this.country&&l.set("country",Array.isArray(this.country)?this.country.join(","):this.country),this.worldview&&l.set("worldview",this.worldview),!e&&!n){const N=this.proximity??[{type:"server-geolocation"}],W=await ys(re(this,Qe),N,r);W&&l.set("proximity",W),(t||this.showResultsWhileTyping===!1)&&l.set("autocomplete","false"),l.set("fuzzyMatch",String(this.fuzzyMatch!==!1))}const w=this.limit??5,_=this.reverseGeocodingLimit??w;_>1&&f?.length!==1&&console.warn("[MapTilerGeocodingControl] Warning: For reverse geocoding when limit > 1 then types must contain single value."),n?(_===1||this.exhaustiveReverseGeocoding||f?.length===1)&&l.set("limit",String(_)):l.set("limit",String(w)),this.apiKey&&l.set("key",this.apiKey),this.adjustUrl?.(o);const M=o.searchParams.get("types")===""&&o.searchParams.get("excludeTypes")!=="true",T=o.toString();if(T===this.lastSearchUrl){e?(this.clearListOnPick&&P(this,k,$e).call(this),this.picked=this.cachedFeatures[0]):(this.listFeatures=this.cachedFeatures,P(this,k,ee).call(this,"featureslisted",{features:this.listFeatures}),this.listFeatures[this.selectedItemIndex]?.id!==re(this,k,bt)?.id&&(this.selectedItemIndex=-1));return}P(this,k,ee).call(this,"request",{urlObj:o}),this.lastSearchUrl=T;let G;if(M)G={type:"FeatureCollection",features:[]};else{const N=await fetch(T,{signal:r.signal,...this.fetchParameters});if(!N.ok)throw new Error(await N.text());G=await N.json()}P(this,k,ee).call(this,"response",{url:T,featureCollection:G}),e?(this.clearListOnPick&&P(this,k,$e).call(this),this.picked=G.features[0],this.cachedFeatures=[this.picked]):(this.listFeatures=G.features.filter(this.filter??(()=>!0)),n&&this.listFeatures.unshift({type:"Feature",properties:{},id:`reverse_${n.decimalLongitude}_${n.decimalLatitude}`,text:`${n.decimalLatitude}, ${n.decimalLongitude}`,place_name:n.toCoordinateFormat("DMS"),place_type:["reverse"],place_type_name:["reverse"],center:[n.decimalLongitude,n.decimalLatitude],bbox:[n.decimalLongitude,n.decimalLatitude,n.decimalLongitude,n.decimalLatitude],geometry:{type:"Point",coordinates:[n.decimalLongitude,n.decimalLatitude]}}),P(this,k,ee).call(this,"featureslisted",{features:this.listFeatures}),this.cachedFeatures=this.listFeatures,this.listFeatures[this.selectedItemIndex]?.id!==re(this,k,bt)?.id&&(this.selectedItemIndex=-1),n&&this.input.focus())}catch(s){if(s&&typeof s=="object"&&"name"in s&&s.name==="AbortError")return;throw s}finally{r===this.abortController&&(this.abortController=void 0)}},Ki=function(i){this.reverseActive=this.enableReverse==="always",P(this,k,$e).call(this),this.picked=void 0,P(this,k,Xt).call(this,`${i[1].toFixed(6)}, ${gs(i[0],[-180,180],!0).toFixed(6)}`),P(this,k,Zt).call(this)},Qt=function(i){if(!this.listFeatures)return;const e=i.key==="ArrowDown"?1:i.key==="ArrowUp"?-1:0;e&&(this.input.focus(),this.focused=!0,i.preventDefault(),this.picked&&this.selectedItemIndex===-1&&(this.selectedItemIndex=this.listFeatures.findIndex(t=>t.id===this.picked?.id)),this.selectedItemIndex===(this.picked||this.selectFirst!==!1?0:-1)&&e===-1&&(this.selectedItemIndex=this.listFeatures.length),this.selectedItemIndex+=e,this.selectedItemIndex>=this.listFeatures.length&&(this.selectedItemIndex=-1),this.selectedItemIndex<0&&(this.picked||this.selectFirst!==!1)&&(this.selectedItemIndex=0))},Zi=function(i){P(this,k,Yt).call(this,i.target.value)},Yi=function(i){(!this.picked||this.picked.id!==i.id)&&(this.picked=i,this.searchValue=i.place_name)},Xi=function(i){this.selectedItemIndex=i},Qi=function(){(!this.selectFirst||this.picked)&&(this.selectedItemIndex=-1)},Ji=function(){this.searchValue="",P(this,k,ee).call(this,"queryclear"),this.picked=void 0,this.input.focus()},$.MaptilerGeocoderElement.styles=Se`
|
|
261
|
+
${at(Ls)}
|
|
262
|
+
`,O([I({attribute:!1})],$.MaptilerGeocoderElement.prototype,"adjustUrl",2),O([I({type:String})],$.MaptilerGeocoderElement.prototype,"apiKey",2),O([I({type:String})],$.MaptilerGeocoderElement.prototype,"apiUrl",2),O([I({type:Array})],$.MaptilerGeocoderElement.prototype,"bbox",2),O([I({type:String})],$.MaptilerGeocoderElement.prototype,"clearButtonTitle",2),O([I({type:Boolean})],$.MaptilerGeocoderElement.prototype,"clearListOnPick",2),O([I({type:Boolean})],$.MaptilerGeocoderElement.prototype,"clearOnBlur",2),O([I({type:Boolean})],$.MaptilerGeocoderElement.prototype,"collapsed",2),O([I({attribute:!1})],$.MaptilerGeocoderElement.prototype,"country",2),O([I({type:Number})],$.MaptilerGeocoderElement.prototype,"debounceSearch",2),O([I({type:String})],$.MaptilerGeocoderElement.prototype,"enableReverse",2),O([I({type:String})],$.MaptilerGeocoderElement.prototype,"errorMessage",2),O([I({type:Boolean})],$.MaptilerGeocoderElement.prototype,"excludeTypes",2),O([I({type:Boolean})],$.MaptilerGeocoderElement.prototype,"exhaustiveReverseGeocoding",2),O([I({type:Boolean})],$.MaptilerGeocoderElement.prototype,"fetchFullGeometryOnPick",2),O([I({type:Object})],$.MaptilerGeocoderElement.prototype,"fetchParameters",2),O([I({attribute:!1})],$.MaptilerGeocoderElement.prototype,"filter",2),O([I({type:Object})],$.MaptilerGeocoderElement.prototype,"fuzzyMatch",2),O([I({type:String})],$.MaptilerGeocoderElement.prototype,"iconsBaseUrl",2),O([I({type:Boolean})],$.MaptilerGeocoderElement.prototype,"keepListOpen",2),O([I({attribute:!1})],$.MaptilerGeocoderElement.prototype,"language",2),O([I({type:Number})],$.MaptilerGeocoderElement.prototype,"limit",2),O([I({type:Number})],$.MaptilerGeocoderElement.prototype,"minLength",2),O([I({type:String})],$.MaptilerGeocoderElement.prototype,"noResultsMessage",2),O([I({type:Boolean})],$.MaptilerGeocoderElement.prototype,"openListOnTop",2),O([I({type:String})],$.MaptilerGeocoderElement.prototype,"placeholder",2),O([I({type:Array})],$.MaptilerGeocoderElement.prototype,"proximity",2),O([I({type:Boolean})],$.MaptilerGeocoderElement.prototype,"reverseActive",2),O([I({type:String})],$.MaptilerGeocoderElement.prototype,"reverseButtonTitle",2),O([I({type:Object})],$.MaptilerGeocoderElement.prototype,"reverseGeocodingExcludeTypes",2),O([I({type:Number})],$.MaptilerGeocoderElement.prototype,"reverseGeocodingLimit",2),O([I({type:Array})],$.MaptilerGeocoderElement.prototype,"reverseGeocodingTypes",2),O([I({type:Object})],$.MaptilerGeocoderElement.prototype,"selectFirst",2),O([I({type:String})],$.MaptilerGeocoderElement.prototype,"showPlaceType",2),O([I({type:Object})],$.MaptilerGeocoderElement.prototype,"showResultsWhileTyping",2),O([I({type:Array})],$.MaptilerGeocoderElement.prototype,"types",2),O([I({type:String})],$.MaptilerGeocoderElement.prototype,"worldview",2),O([zr("input")],$.MaptilerGeocoderElement.prototype,"input",2),O([ie()],$.MaptilerGeocoderElement.prototype,"searchValue",2),O([ie()],$.MaptilerGeocoderElement.prototype,"listFeatures",2),O([ie()],$.MaptilerGeocoderElement.prototype,"selectedItemIndex",2),O([ie()],$.MaptilerGeocoderElement.prototype,"picked",2),O([ie()],$.MaptilerGeocoderElement.prototype,"cachedFeatures",2),O([ie()],$.MaptilerGeocoderElement.prototype,"lastSearchUrl",2),O([ie()],$.MaptilerGeocoderElement.prototype,"error",2),O([ie()],$.MaptilerGeocoderElement.prototype,"abortController",2),O([ie()],$.MaptilerGeocoderElement.prototype,"focused",2),O([ie()],$.MaptilerGeocoderElement.prototype,"focusedDelayed",2),$.MaptilerGeocoderElement=O([_e("maptiler-geocoder")],$.MaptilerGeocoderElement);const Ms=["adjustUrl","apiKey","apiUrl","bbox","clearButtonTitle","clearListOnPick","clearOnBlur","collapsed","country","debounceSearch","enableReverse","errorMessage","excludeTypes","reverseGeocodingExcludeTypes","exhaustiveReverseGeocoding","fetchParameters","fetchFullGeometryOnPick","filter","fuzzyMatch","iconsBaseUrl","keepListOpen","language","limit","reverseGeocodingLimit","minLength","noResultsMessage","openListOnTop","placeholder","proximity","reverseActive","reverseButtonTitle","selectFirst","showPlaceType","showResultsWhileTyping","types","reverseGeocodingTypes","worldview"],Ts="svg{display:block;fill:var(--maptiler-geocode-marker-fill, #3170fe);stroke:var(--maptiler-geocode-marker-stroke, #3170fe);height:30px}:host(.marker-selected){z-index:2}:host(.marker-selected) svg path{fill:var(--maptiler-geocode-marker-selected-fill, #98b7ff);stroke:var(--maptiler-geocode-marker-selected-stroke, #3170fe)}:host(.marker-reverse) svg path{fill:var(--maptiler-geocode-marker-reverse-fill, silver);stroke:var(--maptiler-geocode-marker-reverse-stroke, gray)}:host(.marker-interactive){cursor:pointer!important}:host(.marker-fuzzy) svg path{fill:var(--maptiler-geocode-marker-fuzzy-fill, silver);stroke:var(--maptiler-geocode-marker-fuzzy-stroke, gray)}:host(.marker-fuzzy.marker-selected) svg path{fill:var(--maptiler-geocode-marker-selected-fuzzy-fill, #ddd);stroke:var(--maptiler-geocode-marker-selected-fuzzy-stroke, silver)}";var As=Object.getOwnPropertyDescriptor,Cs=(i,e,t,r)=>{for(var s=r>1?void 0:r?As(e,t):e,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=o(s)||s);return s};$.MaptilerGeocodeMarkerElement=class extends oe{render(){return He`
|
|
263
|
+
<svg
|
|
264
|
+
viewBox="0 0 70 85"
|
|
265
|
+
fill="none"
|
|
266
|
+
class:in-map={displayIn !== "list"}
|
|
267
|
+
>
|
|
268
|
+
<path
|
|
269
|
+
stroke-width="4"
|
|
270
|
+
d="M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"
|
|
271
|
+
/>
|
|
272
|
+
</svg>
|
|
273
|
+
`}},$.MaptilerGeocodeMarkerElement.styles=Se`
|
|
274
|
+
${at(Ts)}
|
|
275
|
+
`,$.MaptilerGeocodeMarkerElement=Cs([_e("maptiler-geocode-marker")],$.MaptilerGeocodeMarkerElement);function Je(i,e,t={}){const r={type:"Feature"};return(t.id===0||t.id)&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.properties=e||{},r.geometry=i,r}function Jt(i,e,t={}){for(const s of i){if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(s[s.length-1].length!==s[0].length)throw new Error("First and last Position are not equivalent.");for(let n=0;n<s[s.length-1].length;n++)if(s[s.length-1][n]!==s[0][n])throw new Error("First and last Position are not equivalent.")}return Je({type:"Polygon",coordinates:i},e,t)}function et(i,e={}){const t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=i,t}function er(i,e,t={}){return Je({type:"MultiPolygon",coordinates:i},e,t)}var ks=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,ei=Math.ceil,ae=Math.floor,se="[BigNumber Error] ",tr=se+"Number primitive has more than 15 significant digits: ",fe=1e14,R=14,ti=9007199254740991,ii=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Me=1e7,X=1e9;function ir(i){var e,t,r,s=L.prototype={constructor:L,toString:null,valueOf:null},n=new L(1),o=20,l=4,u=-7,f=21,x=-1e7,w=1e7,_=!1,M=1,T=0,G={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},N="0123456789abcdefghijklmnopqrstuvwxyz",W=!0;function L(a,c){var h,v,p,g,E,d,m,b,y=this;if(!(y instanceof L))return new L(a,c);if(c==null){if(a&&a._isBigNumber===!0){y.s=a.s,!a.c||a.e>w?y.c=y.e=null:a.e<x?y.c=[y.e=0]:(y.e=a.e,y.c=a.c.slice());return}if((d=typeof a=="number")&&a*0==0){if(y.s=1/a<0?(a=-a,-1):1,a===~~a){for(g=0,E=a;E>=10;E/=10,g++);g>w?y.c=y.e=null:(y.e=g,y.c=[a]);return}b=String(a)}else{if(!ks.test(b=String(a)))return r(y,b,d);y.s=b.charCodeAt(0)==45?(b=b.slice(1),-1):1}(g=b.indexOf("."))>-1&&(b=b.replace(".","")),(E=b.search(/e/i))>0?(g<0&&(g=E),g+=+b.slice(E+1),b=b.substring(0,E)):g<0&&(g=b.length)}else{if(q(c,2,N.length,"Base"),c==10&&W)return y=new L(a),ue(y,o+y.e+1,l);if(b=String(a),d=typeof a=="number"){if(a*0!=0)return r(y,b,d,c);if(y.s=1/a<0?(b=b.slice(1),-1):1,L.DEBUG&&b.replace(/^0\.0*|\./,"").length>15)throw Error(tr+a)}else y.s=b.charCodeAt(0)===45?(b=b.slice(1),-1):1;for(h=N.slice(0,c),g=E=0,m=b.length;E<m;E++)if(h.indexOf(v=b.charAt(E))<0){if(v=="."){if(E>g){g=m;continue}}else if(!p&&(b==b.toUpperCase()&&(b=b.toLowerCase())||b==b.toLowerCase()&&(b=b.toUpperCase()))){p=!0,E=-1,g=0;continue}return r(y,String(a),d,c)}d=!1,b=t(b,c,10,y.s),(g=b.indexOf("."))>-1?b=b.replace(".",""):g=b.length}for(E=0;b.charCodeAt(E)===48;E++);for(m=b.length;b.charCodeAt(--m)===48;);if(b=b.slice(E,++m)){if(m-=E,d&&L.DEBUG&&m>15&&(a>ti||a!==ae(a)))throw Error(tr+y.s*a);if((g=g-E-1)>w)y.c=y.e=null;else if(g<x)y.c=[y.e=0];else{if(y.e=g,y.c=[],E=(g+1)%R,g<0&&(E+=R),E<m){for(E&&y.c.push(+b.slice(0,E)),m-=R;E<m;)y.c.push(+b.slice(E,E+=R));E=R-(b=b.slice(E)).length}else E-=m;for(;E--;b+="0");y.c.push(+b)}}else y.c=[y.e=0]}L.clone=ir,L.ROUND_UP=0,L.ROUND_DOWN=1,L.ROUND_CEIL=2,L.ROUND_FLOOR=3,L.ROUND_HALF_UP=4,L.ROUND_HALF_DOWN=5,L.ROUND_HALF_EVEN=6,L.ROUND_HALF_CEIL=7,L.ROUND_HALF_FLOOR=8,L.EUCLID=9,L.config=L.set=function(a){var c,h;if(a!=null)if(typeof a=="object"){if(a.hasOwnProperty(c="DECIMAL_PLACES")&&(h=a[c],q(h,0,X,c),o=h),a.hasOwnProperty(c="ROUNDING_MODE")&&(h=a[c],q(h,0,8,c),l=h),a.hasOwnProperty(c="EXPONENTIAL_AT")&&(h=a[c],h&&h.pop?(q(h[0],-X,0,c),q(h[1],0,X,c),u=h[0],f=h[1]):(q(h,-X,X,c),u=-(f=h<0?-h:h))),a.hasOwnProperty(c="RANGE"))if(h=a[c],h&&h.pop)q(h[0],-X,-1,c),q(h[1],1,X,c),x=h[0],w=h[1];else if(q(h,-X,X,c),h)x=-(w=h<0?-h:h);else throw Error(se+c+" cannot be zero: "+h);if(a.hasOwnProperty(c="CRYPTO"))if(h=a[c],h===!!h)if(h)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))_=h;else throw _=!h,Error(se+"crypto unavailable");else _=h;else throw Error(se+c+" not true or false: "+h);if(a.hasOwnProperty(c="MODULO_MODE")&&(h=a[c],q(h,0,9,c),M=h),a.hasOwnProperty(c="POW_PRECISION")&&(h=a[c],q(h,0,X,c),T=h),a.hasOwnProperty(c="FORMAT"))if(h=a[c],typeof h=="object")G=h;else throw Error(se+c+" not an object: "+h);if(a.hasOwnProperty(c="ALPHABET"))if(h=a[c],typeof h=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(h))W=h.slice(0,10)=="0123456789",N=h;else throw Error(se+c+" invalid: "+h)}else throw Error(se+"Object expected: "+a);return{DECIMAL_PLACES:o,ROUNDING_MODE:l,EXPONENTIAL_AT:[u,f],RANGE:[x,w],CRYPTO:_,MODULO_MODE:M,POW_PRECISION:T,FORMAT:G,ALPHABET:N}},L.isBigNumber=function(a){if(!a||a._isBigNumber!==!0)return!1;if(!L.DEBUG)return!0;var c,h,v=a.c,p=a.e,g=a.s;e:if({}.toString.call(v)=="[object Array]"){if((g===1||g===-1)&&p>=-X&&p<=X&&p===ae(p)){if(v[0]===0){if(p===0&&v.length===1)return!0;break e}if(c=(p+1)%R,c<1&&(c+=R),String(v[0]).length==c){for(c=0;c<v.length;c++)if(h=v[c],h<0||h>=fe||h!==ae(h))break e;if(h!==0)return!0}}}else if(v===null&&p===null&&(g===null||g===1||g===-1))return!0;throw Error(se+"Invalid BigNumber: "+a)},L.maximum=L.max=function(){return ne(arguments,-1)},L.minimum=L.min=function(){return ne(arguments,1)},L.random=(function(){var a=9007199254740992,c=Math.random()*a&2097151?function(){return ae(Math.random()*a)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(h){var v,p,g,E,d,m=0,b=[],y=new L(n);if(h==null?h=o:q(h,0,X),E=ei(h/R),_)if(crypto.getRandomValues){for(v=crypto.getRandomValues(new Uint32Array(E*=2));m<E;)d=v[m]*131072+(v[m+1]>>>11),d>=9e15?(p=crypto.getRandomValues(new Uint32Array(2)),v[m]=p[0],v[m+1]=p[1]):(b.push(d%1e14),m+=2);m=E/2}else if(crypto.randomBytes){for(v=crypto.randomBytes(E*=7);m<E;)d=(v[m]&31)*281474976710656+v[m+1]*1099511627776+v[m+2]*4294967296+v[m+3]*16777216+(v[m+4]<<16)+(v[m+5]<<8)+v[m+6],d>=9e15?crypto.randomBytes(7).copy(v,m):(b.push(d%1e14),m+=7);m=E/7}else throw _=!1,Error(se+"crypto unavailable");if(!_)for(;m<E;)d=c(),d<9e15&&(b[m++]=d%1e14);for(E=b[--m],h%=R,E&&h&&(d=ii[R-h],b[m]=ae(E/d)*d);b[m]===0;b.pop(),m--);if(m<0)b=[g=0];else{for(g=-1;b[0]===0;b.splice(0,1),g-=R);for(m=1,d=b[0];d>=10;d/=10,m++);m<R&&(g-=R-m)}return y.e=g,y.c=b,y}})(),L.sum=function(){for(var a=1,c=arguments,h=new L(c[0]);a<c.length;)h=h.plus(c[a++]);return h},t=(function(){var a="0123456789";function c(h,v,p,g){for(var E,d=[0],m,b=0,y=h.length;b<y;){for(m=d.length;m--;d[m]*=v);for(d[0]+=g.indexOf(h.charAt(b++)),E=0;E<d.length;E++)d[E]>p-1&&(d[E+1]==null&&(d[E+1]=0),d[E+1]+=d[E]/p|0,d[E]%=p)}return d.reverse()}return function(h,v,p,g,E){var d,m,b,y,S,A,C,D,H=h.indexOf("."),Z=o,U=l;for(H>=0&&(y=T,T=0,h=h.replace(".",""),D=new L(v),A=D.pow(h.length-H),T=y,D.c=c(Ee(he(A.c),A.e,"0"),10,p,a),D.e=D.c.length),C=c(h,v,p,E?(d=N,a):(d=a,N)),b=y=C.length;C[--y]==0;C.pop());if(!C[0])return d.charAt(0);if(H<0?--b:(A.c=C,A.e=b,A.s=g,A=e(A,D,Z,U,p),C=A.c,S=A.r,b=A.e),m=b+Z+1,H=C[m],y=p/2,S=S||m<0||C[m+1]!=null,S=U<4?(H!=null||S)&&(U==0||U==(A.s<0?3:2)):H>y||H==y&&(U==4||S||U==6&&C[m-1]&1||U==(A.s<0?8:7)),m<1||!C[0])h=S?Ee(d.charAt(1),-Z,d.charAt(0)):d.charAt(0);else{if(C.length=m,S)for(--p;++C[--m]>p;)C[m]=0,m||(++b,C=[1].concat(C));for(y=C.length;!C[--y];);for(H=0,h="";H<=y;h+=d.charAt(C[H++]));h=Ee(h,b,d.charAt(0))}return h}})(),e=(function(){function a(v,p,g){var E,d,m,b,y=0,S=v.length,A=p%Me,C=p/Me|0;for(v=v.slice();S--;)m=v[S]%Me,b=v[S]/Me|0,E=C*m+b*A,d=A*m+E%Me*Me+y,y=(d/g|0)+(E/Me|0)+C*b,v[S]=d%g;return y&&(v=[y].concat(v)),v}function c(v,p,g,E){var d,m;if(g!=E)m=g>E?1:-1;else for(d=m=0;d<g;d++)if(v[d]!=p[d]){m=v[d]>p[d]?1:-1;break}return m}function h(v,p,g,E){for(var d=0;g--;)v[g]-=d,d=v[g]<p[g]?1:0,v[g]=d*E+v[g]-p[g];for(;!v[0]&&v.length>1;v.splice(0,1));}return function(v,p,g,E,d){var m,b,y,S,A,C,D,H,Z,U,F,J,At,ci,hi,ve,nt,de=v.s==p.s?1:-1,te=v.c,j=p.c;if(!te||!te[0]||!j||!j[0])return new L(!v.s||!p.s||(te?j&&te[0]==j[0]:!j)?NaN:te&&te[0]==0||!j?de*0:de/0);for(H=new L(de),Z=H.c=[],b=v.e-p.e,de=g+b+1,d||(d=fe,b=ce(v.e/R)-ce(p.e/R),de=de/R|0),y=0;j[y]==(te[y]||0);y++);if(j[y]>(te[y]||0)&&b--,de<0)Z.push(1),S=!0;else{for(ci=te.length,ve=j.length,y=0,de+=2,A=ae(d/(j[0]+1)),A>1&&(j=a(j,A,d),te=a(te,A,d),ve=j.length,ci=te.length),At=ve,U=te.slice(0,ve),F=U.length;F<ve;U[F++]=0);nt=j.slice(),nt=[0].concat(nt),hi=j[0],j[1]>=d/2&&hi++;do{if(A=0,m=c(j,U,ve,F),m<0){if(J=U[0],ve!=F&&(J=J*d+(U[1]||0)),A=ae(J/hi),A>1)for(A>=d&&(A=d-1),C=a(j,A,d),D=C.length,F=U.length;c(C,U,D,F)==1;)A--,h(C,ve<D?nt:j,D,d),D=C.length,m=1;else A==0&&(m=A=1),C=j.slice(),D=C.length;if(D<F&&(C=[0].concat(C)),h(U,C,F,d),F=U.length,m==-1)for(;c(j,U,ve,F)<1;)A++,h(U,ve<F?nt:j,F,d),F=U.length}else m===0&&(A++,U=[0]);Z[y++]=A,U[0]?U[F++]=te[At]||0:(U=[te[At]],F=1)}while((At++<ci||U[0]!=null)&&de--);S=U[0]!=null,Z[0]||Z.splice(0,1)}if(d==fe){for(y=1,de=Z[0];de>=10;de/=10,y++);ue(H,g+(H.e=y+b*R-1)+1,E,S)}else H.e=b,H.r=+S;return H}})();function Q(a,c,h,v){var p,g,E,d,m;if(h==null?h=l:q(h,0,8),!a.c)return a.toString();if(p=a.c[0],E=a.e,c==null)m=he(a.c),m=v==1||v==2&&(E<=u||E>=f)?St(m,E):Ee(m,E,"0");else if(a=ue(new L(a),c,h),g=a.e,m=he(a.c),d=m.length,v==1||v==2&&(c<=g||g<=u)){for(;d<c;m+="0",d++);m=St(m,g)}else if(c-=E+(v===2&&g>E),m=Ee(m,g,"0"),g+1>d){if(--c>0)for(m+=".";c--;m+="0");}else if(c+=g-d,c>0)for(g+1==d&&(m+=".");c--;m+="0");return a.s<0&&p?"-"+m:m}function ne(a,c){for(var h,v,p=1,g=new L(a[0]);p<a.length;p++)v=new L(a[p]),(!v.s||(h=Ie(g,v))===c||h===0&&g.s===c)&&(g=v);return g}function ye(a,c,h){for(var v=1,p=c.length;!c[--p];c.pop());for(p=c[0];p>=10;p/=10,v++);return(h=v+h*R-1)>w?a.c=a.e=null:h<x?a.c=[a.e=0]:(a.e=h,a.c=c),a}r=(function(){var a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,h=/^\.([^.]+)$/,v=/^-?(Infinity|NaN)$/,p=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(g,E,d,m){var b,y=d?E:E.replace(p,"");if(v.test(y))g.s=isNaN(y)?null:y<0?-1:1;else{if(!d&&(y=y.replace(a,function(S,A,C){return b=(C=C.toLowerCase())=="x"?16:C=="b"?2:8,!m||m==b?A:S}),m&&(b=m,y=y.replace(c,"$1").replace(h,"0.$1")),E!=y))return new L(y,b);if(L.DEBUG)throw Error(se+"Not a"+(m?" base "+m:"")+" number: "+E);g.s=null}g.c=g.e=null}})();function ue(a,c,h,v){var p,g,E,d,m,b,y,S=a.c,A=ii;if(S){e:{for(p=1,d=S[0];d>=10;d/=10,p++);if(g=c-p,g<0)g+=R,E=c,m=S[b=0],y=ae(m/A[p-E-1]%10);else if(b=ei((g+1)/R),b>=S.length)if(v){for(;S.length<=b;S.push(0));m=y=0,p=1,g%=R,E=g-R+1}else break e;else{for(m=d=S[b],p=1;d>=10;d/=10,p++);g%=R,E=g-R+p,y=E<0?0:ae(m/A[p-E-1]%10)}if(v=v||c<0||S[b+1]!=null||(E<0?m:m%A[p-E-1]),v=h<4?(y||v)&&(h==0||h==(a.s<0?3:2)):y>5||y==5&&(h==4||v||h==6&&(g>0?E>0?m/A[p-E]:0:S[b-1])%10&1||h==(a.s<0?8:7)),c<1||!S[0])return S.length=0,v?(c-=a.e+1,S[0]=A[(R-c%R)%R],a.e=-c||0):S[0]=a.e=0,a;if(g==0?(S.length=b,d=1,b--):(S.length=b+1,d=A[R-g],S[b]=E>0?ae(m/A[p-E]%A[E])*d:0),v)for(;;)if(b==0){for(g=1,E=S[0];E>=10;E/=10,g++);for(E=S[0]+=d,d=1;E>=10;E/=10,d++);g!=d&&(a.e++,S[0]==fe&&(S[0]=1));break}else{if(S[b]+=d,S[b]!=fe)break;S[b--]=0,d=1}for(g=S.length;S[--g]===0;S.pop());}a.e>w?a.c=a.e=null:a.e<x&&(a.c=[a.e=0])}return a}function xe(a){var c,h=a.e;return h===null?a.toString():(c=he(a.c),c=h<=u||h>=f?St(c,h):Ee(c,h,"0"),a.s<0?"-"+c:c)}return s.absoluteValue=s.abs=function(){var a=new L(this);return a.s<0&&(a.s=1),a},s.comparedTo=function(a,c){return Ie(this,new L(a,c))},s.decimalPlaces=s.dp=function(a,c){var h,v,p,g=this;if(a!=null)return q(a,0,X),c==null?c=l:q(c,0,8),ue(new L(g),a+g.e+1,c);if(!(h=g.c))return null;if(v=((p=h.length-1)-ce(this.e/R))*R,p=h[p])for(;p%10==0;p/=10,v--);return v<0&&(v=0),v},s.dividedBy=s.div=function(a,c){return e(this,new L(a,c),o,l)},s.dividedToIntegerBy=s.idiv=function(a,c){return e(this,new L(a,c),0,1)},s.exponentiatedBy=s.pow=function(a,c){var h,v,p,g,E,d,m,b,y,S=this;if(a=new L(a),a.c&&!a.isInteger())throw Error(se+"Exponent not an integer: "+xe(a));if(c!=null&&(c=new L(c)),d=a.e>14,!S.c||!S.c[0]||S.c[0]==1&&!S.e&&S.c.length==1||!a.c||!a.c[0])return y=new L(Math.pow(+xe(S),d?a.s*(2-xt(a)):+xe(a))),c?y.mod(c):y;if(m=a.s<0,c){if(c.c?!c.c[0]:!c.s)return new L(NaN);v=!m&&S.isInteger()&&c.isInteger(),v&&(S=S.mod(c))}else{if(a.e>9&&(S.e>0||S.e<-1||(S.e==0?S.c[0]>1||d&&S.c[1]>=24e7:S.c[0]<8e13||d&&S.c[0]<=9999975e7)))return g=S.s<0&&xt(a)?-0:0,S.e>-1&&(g=1/g),new L(m?1/g:g);T&&(g=ei(T/R+2))}for(d?(h=new L(.5),m&&(a.s=1),b=xt(a)):(p=Math.abs(+xe(a)),b=p%2),y=new L(n);;){if(b){if(y=y.times(S),!y.c)break;g?y.c.length>g&&(y.c.length=g):v&&(y=y.mod(c))}if(p){if(p=ae(p/2),p===0)break;b=p%2}else if(a=a.times(h),ue(a,a.e+1,1),a.e>14)b=xt(a);else{if(p=+xe(a),p===0)break;b=p%2}S=S.times(S),g?S.c&&S.c.length>g&&(S.c.length=g):v&&(S=S.mod(c))}return v?y:(m&&(y=n.div(y)),c?y.mod(c):g?ue(y,T,l,E):y)},s.integerValue=function(a){var c=new L(this);return a==null?a=l:q(a,0,8),ue(c,c.e+1,a)},s.isEqualTo=s.eq=function(a,c){return Ie(this,new L(a,c))===0},s.isFinite=function(){return!!this.c},s.isGreaterThan=s.gt=function(a,c){return Ie(this,new L(a,c))>0},s.isGreaterThanOrEqualTo=s.gte=function(a,c){return(c=Ie(this,new L(a,c)))===1||c===0},s.isInteger=function(){return!!this.c&&ce(this.e/R)>this.c.length-2},s.isLessThan=s.lt=function(a,c){return Ie(this,new L(a,c))<0},s.isLessThanOrEqualTo=s.lte=function(a,c){return(c=Ie(this,new L(a,c)))===-1||c===0},s.isNaN=function(){return!this.s},s.isNegative=function(){return this.s<0},s.isPositive=function(){return this.s>0},s.isZero=function(){return!!this.c&&this.c[0]==0},s.minus=function(a,c){var h,v,p,g,E=this,d=E.s;if(a=new L(a,c),c=a.s,!d||!c)return new L(NaN);if(d!=c)return a.s=-c,E.plus(a);var m=E.e/R,b=a.e/R,y=E.c,S=a.c;if(!m||!b){if(!y||!S)return y?(a.s=-c,a):new L(S?E:NaN);if(!y[0]||!S[0])return S[0]?(a.s=-c,a):new L(y[0]?E:l==3?-0:0)}if(m=ce(m),b=ce(b),y=y.slice(),d=m-b){for((g=d<0)?(d=-d,p=y):(b=m,p=S),p.reverse(),c=d;c--;p.push(0));p.reverse()}else for(v=(g=(d=y.length)<(c=S.length))?d:c,d=c=0;c<v;c++)if(y[c]!=S[c]){g=y[c]<S[c];break}if(g&&(p=y,y=S,S=p,a.s=-a.s),c=(v=S.length)-(h=y.length),c>0)for(;c--;y[h++]=0);for(c=fe-1;v>d;){if(y[--v]<S[v]){for(h=v;h&&!y[--h];y[h]=c);--y[h],y[v]+=fe}y[v]-=S[v]}for(;y[0]==0;y.splice(0,1),--b);return y[0]?ye(a,y,b):(a.s=l==3?-1:1,a.c=[a.e=0],a)},s.modulo=s.mod=function(a,c){var h,v,p=this;return a=new L(a,c),!p.c||!a.s||a.c&&!a.c[0]?new L(NaN):!a.c||p.c&&!p.c[0]?new L(p):(M==9?(v=a.s,a.s=1,h=e(p,a,0,3),a.s=v,h.s*=v):h=e(p,a,0,M),a=p.minus(h.times(a)),!a.c[0]&&M==1&&(a.s=p.s),a)},s.multipliedBy=s.times=function(a,c){var h,v,p,g,E,d,m,b,y,S,A,C,D,H,Z,U=this,F=U.c,J=(a=new L(a,c)).c;if(!F||!J||!F[0]||!J[0])return!U.s||!a.s||F&&!F[0]&&!J||J&&!J[0]&&!F?a.c=a.e=a.s=null:(a.s*=U.s,!F||!J?a.c=a.e=null:(a.c=[0],a.e=0)),a;for(v=ce(U.e/R)+ce(a.e/R),a.s*=U.s,m=F.length,S=J.length,m<S&&(D=F,F=J,J=D,p=m,m=S,S=p),p=m+S,D=[];p--;D.push(0));for(H=fe,Z=Me,p=S;--p>=0;){for(h=0,A=J[p]%Z,C=J[p]/Z|0,E=m,g=p+E;g>p;)b=F[--E]%Z,y=F[E]/Z|0,d=C*b+y*A,b=A*b+d%Z*Z+D[g]+h,h=(b/H|0)+(d/Z|0)+C*y,D[g--]=b%H;D[g]=h}return h?++v:D.splice(0,1),ye(a,D,v)},s.negated=function(){var a=new L(this);return a.s=-a.s||null,a},s.plus=function(a,c){var h,v=this,p=v.s;if(a=new L(a,c),c=a.s,!p||!c)return new L(NaN);if(p!=c)return a.s=-c,v.minus(a);var g=v.e/R,E=a.e/R,d=v.c,m=a.c;if(!g||!E){if(!d||!m)return new L(p/0);if(!d[0]||!m[0])return m[0]?a:new L(d[0]?v:p*0)}if(g=ce(g),E=ce(E),d=d.slice(),p=g-E){for(p>0?(E=g,h=m):(p=-p,h=d),h.reverse();p--;h.push(0));h.reverse()}for(p=d.length,c=m.length,p-c<0&&(h=m,m=d,d=h,c=p),p=0;c;)p=(d[--c]=d[c]+m[c]+p)/fe|0,d[c]=fe===d[c]?0:d[c]%fe;return p&&(d=[p].concat(d),++E),ye(a,d,E)},s.precision=s.sd=function(a,c){var h,v,p,g=this;if(a!=null&&a!==!!a)return q(a,1,X),c==null?c=l:q(c,0,8),ue(new L(g),a,c);if(!(h=g.c))return null;if(p=h.length-1,v=p*R+1,p=h[p]){for(;p%10==0;p/=10,v--);for(p=h[0];p>=10;p/=10,v++);}return a&&g.e+1>v&&(v=g.e+1),v},s.shiftedBy=function(a){return q(a,-ti,ti),this.times("1e"+a)},s.squareRoot=s.sqrt=function(){var a,c,h,v,p,g=this,E=g.c,d=g.s,m=g.e,b=o+4,y=new L("0.5");if(d!==1||!E||!E[0])return new L(!d||d<0&&(!E||E[0])?NaN:E?g:1/0);if(d=Math.sqrt(+xe(g)),d==0||d==1/0?(c=he(E),(c.length+m)%2==0&&(c+="0"),d=Math.sqrt(+c),m=ce((m+1)/2)-(m<0||m%2),d==1/0?c="5e"+m:(c=d.toExponential(),c=c.slice(0,c.indexOf("e")+1)+m),h=new L(c)):h=new L(d+""),h.c[0]){for(m=h.e,d=m+b,d<3&&(d=0);;)if(p=h,h=y.times(p.plus(e(g,p,b,1))),he(p.c).slice(0,d)===(c=he(h.c)).slice(0,d))if(h.e<m&&--d,c=c.slice(d-3,d+1),c=="9999"||!v&&c=="4999"){if(!v&&(ue(p,p.e+o+2,0),p.times(p).eq(g))){h=p;break}b+=4,d+=4,v=1}else{(!+c||!+c.slice(1)&&c.charAt(0)=="5")&&(ue(h,h.e+o+2,1),a=!h.times(h).eq(g));break}}return ue(h,h.e+o+1,l,a)},s.toExponential=function(a,c){return a!=null&&(q(a,0,X),a++),Q(this,a,c,1)},s.toFixed=function(a,c){return a!=null&&(q(a,0,X),a=a+this.e+1),Q(this,a,c)},s.toFormat=function(a,c,h){var v,p=this;if(h==null)a!=null&&c&&typeof c=="object"?(h=c,c=null):a&&typeof a=="object"?(h=a,a=c=null):h=G;else if(typeof h!="object")throw Error(se+"Argument not an object: "+h);if(v=p.toFixed(a,c),p.c){var g,E=v.split("."),d=+h.groupSize,m=+h.secondaryGroupSize,b=h.groupSeparator||"",y=E[0],S=E[1],A=p.s<0,C=A?y.slice(1):y,D=C.length;if(m&&(g=d,d=m,m=g,D-=g),d>0&&D>0){for(g=D%d||d,y=C.substr(0,g);g<D;g+=d)y+=b+C.substr(g,d);m>0&&(y+=b+C.slice(g)),A&&(y="-"+y)}v=S?y+(h.decimalSeparator||"")+((m=+h.fractionGroupSize)?S.replace(new RegExp("\\d{"+m+"}\\B","g"),"$&"+(h.fractionGroupSeparator||"")):S):y}return(h.prefix||"")+v+(h.suffix||"")},s.toFraction=function(a){var c,h,v,p,g,E,d,m,b,y,S,A,C=this,D=C.c;if(a!=null&&(d=new L(a),!d.isInteger()&&(d.c||d.s!==1)||d.lt(n)))throw Error(se+"Argument "+(d.isInteger()?"out of range: ":"not an integer: ")+xe(d));if(!D)return new L(C);for(c=new L(n),b=h=new L(n),v=m=new L(n),A=he(D),g=c.e=A.length-C.e-1,c.c[0]=ii[(E=g%R)<0?R+E:E],a=!a||d.comparedTo(c)>0?g>0?c:b:d,E=w,w=1/0,d=new L(A),m.c[0]=0;y=e(d,c,0,1),p=h.plus(y.times(v)),p.comparedTo(a)!=1;)h=v,v=p,b=m.plus(y.times(p=b)),m=p,c=d.minus(y.times(p=c)),d=p;return p=e(a.minus(h),v,0,1),m=m.plus(p.times(b)),h=h.plus(p.times(v)),m.s=b.s=C.s,g=g*2,S=e(b,v,g,l).minus(C).abs().comparedTo(e(m,h,g,l).minus(C).abs())<1?[b,v]:[m,h],w=E,S},s.toNumber=function(){return+xe(this)},s.toPrecision=function(a,c){return a!=null&&q(a,1,X),Q(this,a,c,2)},s.toString=function(a){var c,h=this,v=h.s,p=h.e;return p===null?v?(c="Infinity",v<0&&(c="-"+c)):c="NaN":(a==null?c=p<=u||p>=f?St(he(h.c),p):Ee(he(h.c),p,"0"):a===10&&W?(h=ue(new L(h),o+p+1,l),c=Ee(he(h.c),h.e,"0")):(q(a,2,N.length,"Base"),c=t(Ee(he(h.c),p,"0"),10,a,v,!0)),v<0&&h.c[0]&&(c="-"+c)),c},s.valueOf=s.toJSON=function(){return xe(this)},s._isBigNumber=!0,s[Symbol.toStringTag]="BigNumber",s[Symbol.for("nodejs.util.inspect.custom")]=s.valueOf,i!=null&&L.set(i),L}function ce(i){var e=i|0;return i>0||i===e?e:e-1}function he(i){for(var e,t,r=1,s=i.length,n=i[0]+"";r<s;){for(e=i[r++]+"",t=R-e.length;t--;e="0"+e);n+=e}for(s=n.length;n.charCodeAt(--s)===48;);return n.slice(0,s+1||1)}function Ie(i,e){var t,r,s=i.c,n=e.c,o=i.s,l=e.s,u=i.e,f=e.e;if(!o||!l)return null;if(t=s&&!s[0],r=n&&!n[0],t||r)return t?r?0:-l:o;if(o!=l)return o;if(t=o<0,r=u==f,!s||!n)return r?0:!s^t?1:-1;if(!r)return u>f^t?1:-1;for(l=(u=s.length)<(f=n.length)?u:f,o=0;o<l;o++)if(s[o]!=n[o])return s[o]>n[o]^t?1:-1;return u==f?0:u>f^t?1:-1}function q(i,e,t,r){if(i<e||i>t||i!==ae(i))throw Error(se+(r||"Argument")+(typeof i=="number"?i<e||i>t?" out of range: ":" not an integer: ":" not a primitive number: ")+String(i))}function xt(i){var e=i.c.length-1;return ce(i.e/R)==e&&i.c[e]%2!=0}function St(i,e){return(i.length>1?i.charAt(0)+"."+i.slice(1):i)+(e<0?"e":"e+")+e}function Ee(i,e,t){var r,s;if(e<0){for(s=t+".";++e;s+=t);i=s+i}else if(r=i.length,++e>r){for(s=t,e-=r;--e;s+=t);i+=s}else e<r&&(i=i.slice(0,e)+"."+i.slice(e));return i}var me=ir(),Os=class{key;left=null;right=null;constructor(i){this.key=i}},tt=class extends Os{constructor(i){super(i)}},Ns=class{size=0;modificationCount=0;splayCount=0;splay(i){const e=this.root;if(e==null)return this.compare(i,i),-1;let t=null,r=null,s=null,n=null,o=e;const l=this.compare;let u;for(;;)if(u=l(o.key,i),u>0){let f=o.left;if(f==null||(u=l(f.key,i),u>0&&(o.left=f.right,f.right=o,o=f,f=o.left,f==null)))break;t==null?r=o:t.left=o,t=o,o=f}else if(u<0){let f=o.right;if(f==null||(u=l(f.key,i),u<0&&(o.right=f.left,f.left=o,o=f,f=o.right,f==null)))break;s==null?n=o:s.right=o,s=o,o=f}else break;return s!=null&&(s.right=o.left,o.left=n),t!=null&&(t.left=o.right,o.right=r),this.root!==o&&(this.root=o,this.splayCount++),u}splayMin(i){let e=i,t=e.left;for(;t!=null;){const r=t;e.left=r.right,r.right=e,e=r,t=e.left}return e}splayMax(i){let e=i,t=e.right;for(;t!=null;){const r=t;e.right=r.left,r.left=e,e=r,t=e.right}return e}_delete(i){if(this.root==null||this.splay(i)!=0)return null;let t=this.root;const r=t,s=t.left;if(this.size--,s==null)this.root=t.right;else{const n=t.right;t=this.splayMax(s),t.right=n,this.root=t}return this.modificationCount++,r}addNewRoot(i,e){this.size++,this.modificationCount++;const t=this.root;if(t==null){this.root=i;return}e<0?(i.left=t,i.right=t.right,t.right=null):(i.right=t,i.left=t.left,t.left=null),this.root=i}_first(){const i=this.root;return i==null?null:(this.root=this.splayMin(i),this.root)}_last(){const i=this.root;return i==null?null:(this.root=this.splayMax(i),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(i){return this.validKey(i)&&this.splay(i)==0}defaultCompare(){return(i,e)=>i<e?-1:i>e?1:0}wrap(){return{getRoot:()=>this.root,setRoot:i=>{this.root=i},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:i=>{this.splayCount=i},splay:i=>this.splay(i),has:i=>this.has(i)}}},Lt=class ot extends Ns{root=null;compare;validKey;constructor(e,t){super(),this.compare=e??this.defaultCompare(),this.validKey=t??(r=>r!=null&&r!=null)}delete(e){return this.validKey(e)?this._delete(e)!=null:!1}deleteAll(e){for(const t of e)this.delete(t)}forEach(e){const t=this[Symbol.iterator]();let r;for(;r=t.next(),!r.done;)e(r.value,r.value,this)}add(e){const t=this.splay(e);return t!=0&&this.addNewRoot(new tt(e),t),this}addAndReturn(e){const t=this.splay(e);return t!=0&&this.addNewRoot(new tt(e),t),this.root.key}addAll(e){for(const t of e)this.add(t)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(this.size==0)throw"Bad state: No element";return this._first().key}last(){if(this.size==0)throw"Bad state: No element";return this._last().key}lastBefore(e){if(e==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(e)<0)return this.root.key;let r=this.root.left;if(r==null)return null;let s=r.right;for(;s!=null;)r=s,s=r.right;return r.key}firstAfter(e){if(e==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(e)>0)return this.root.key;let r=this.root.right;if(r==null)return null;let s=r.left;for(;s!=null;)r=s,s=r.left;return r.key}retainAll(e){const t=new ot(this.compare,this.validKey),r=this.modificationCount;for(const s of e){if(r!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(s)&&this.splay(s)==0&&t.add(this.root.key)}t.size!=this.size&&(this.root=t.root,this.size=t.size,this.modificationCount++)}lookup(e){return!this.validKey(e)||this.splay(e)!=0?null:this.root.key}intersection(e){const t=new ot(this.compare,this.validKey);for(const r of this)e.has(r)&&t.add(r);return t}difference(e){const t=new ot(this.compare,this.validKey);for(const r of this)e.has(r)||t.add(r);return t}union(e){const t=this.clone();return t.addAll(e),t}clone(){const e=new ot(this.compare,this.validKey);return e.size=this.size,e.root=this.copyNode(this.root),e}copyNode(e){if(e==null)return null;function t(s,n){let o,l;do{if(o=s.left,l=s.right,o!=null){const u=new tt(o.key);n.left=u,t(o,u)}if(l!=null){const u=new tt(l.key);n.right=u,s=l,n=u}}while(l!=null)}const r=new tt(e.key);return t(e,r),r}toSet(){return this.clone()}entries(){return new Ps(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[Symbol.iterator](){return new Is(this.wrap())}[Symbol.toStringTag]="[object Set]"},rr=class{tree;path=new Array;modificationCount=null;splayCount;constructor(i){this.tree=i,this.splayCount=i.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;const i=this.path[this.path.length-1];return this.getValue(i)}rebuildPath(i){this.path.splice(0,this.path.length),this.tree.splay(i),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(i){for(;i!=null;)this.path.push(i),i=i.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let t=this.tree.getRoot();for(;t!=null;)this.path.push(t),t=t.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let i=this.path[this.path.length-1],e=i.right;if(e!=null){for(;e!=null;)this.path.push(e),e=e.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===i;)i=this.path.pop();return this.path.length>0}},Is=class extends rr{getValue(i){return i.key}},Ps=class extends rr{getValue(i){return[i.key,i.key]}},sr=i=>()=>i,ri=i=>{const e=i?(t,r)=>r.minus(t).abs().isLessThanOrEqualTo(i):sr(!1);return(t,r)=>e(t,r)?0:t.comparedTo(r)};function Rs(i){const e=i?(t,r,s,n,o)=>t.exponentiatedBy(2).isLessThanOrEqualTo(n.minus(r).exponentiatedBy(2).plus(o.minus(s).exponentiatedBy(2)).times(i)):sr(!1);return(t,r,s)=>{const n=t.x,o=t.y,l=s.x,u=s.y,f=o.minus(u).times(r.x.minus(l)).minus(n.minus(l).times(r.y.minus(u)));return e(f,n,o,l,u)?0:f.comparedTo(0)}}var Gs=i=>i,Us=i=>{if(i){const e=new Lt(ri(i)),t=new Lt(ri(i)),r=(n,o)=>o.addAndReturn(n),s=n=>({x:r(n.x,e),y:r(n.y,t)});return s({x:new me(0),y:new me(0)}),s}return Gs},si=i=>({set:e=>{we=si(e)},reset:()=>si(i),compare:ri(i),snap:Us(i),orient:Rs(i)}),we=si(),it=(i,e)=>i.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(i.ur.x)&&i.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(i.ur.y),ni=(i,e)=>{if(e.ur.x.isLessThan(i.ll.x)||i.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(i.ll.y)||i.ur.y.isLessThan(e.ll.y))return null;const t=i.ll.x.isLessThan(e.ll.x)?e.ll.x:i.ll.x,r=i.ur.x.isLessThan(e.ur.x)?i.ur.x:e.ur.x,s=i.ll.y.isLessThan(e.ll.y)?e.ll.y:i.ll.y,n=i.ur.y.isLessThan(e.ur.y)?i.ur.y:e.ur.y;return{ll:{x:t,y:s},ur:{x:r,y:n}}},_t=(i,e)=>i.x.times(e.y).minus(i.y.times(e.x)),nr=(i,e)=>i.x.times(e.x).plus(i.y.times(e.y)),$t=i=>nr(i,i).sqrt(),Bs=(i,e,t)=>{const r={x:e.x.minus(i.x),y:e.y.minus(i.y)},s={x:t.x.minus(i.x),y:t.y.minus(i.y)};return _t(s,r).div($t(s)).div($t(r))},Ds=(i,e,t)=>{const r={x:e.x.minus(i.x),y:e.y.minus(i.y)},s={x:t.x.minus(i.x),y:t.y.minus(i.y)};return nr(s,r).div($t(s)).div($t(r))},or=(i,e,t)=>e.y.isZero()?null:{x:i.x.plus(e.x.div(e.y).times(t.minus(i.y))),y:t},lr=(i,e,t)=>e.x.isZero()?null:{x:t,y:i.y.plus(e.y.div(e.x).times(t.minus(i.x)))},Fs=(i,e,t,r)=>{if(e.x.isZero())return lr(t,r,i.x);if(r.x.isZero())return lr(i,e,t.x);if(e.y.isZero())return or(t,r,i.y);if(r.y.isZero())return or(i,e,t.y);const s=_t(e,r);if(s.isZero())return null;const n={x:t.x.minus(i.x),y:t.y.minus(i.y)},o=_t(n,e).div(s),l=_t(n,r).div(s),u=i.x.plus(l.times(e.x)),f=t.x.plus(o.times(r.x)),x=i.y.plus(l.times(e.y)),w=t.y.plus(o.times(r.y)),_=u.plus(f).div(2),M=x.plus(w).div(2);return{x:_,y:M}},ge=class vr{point;isLeft;segment;otherSE;consumedBy;static compare(e,t){const r=vr.comparePoints(e.point,t.point);return r!==0?r:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:Tt.compare(e.segment,t.segment))}static comparePoints(e,t){return e.x.isLessThan(t.x)?-1:e.x.isGreaterThan(t.x)?1:e.y.isLessThan(t.y)?-1:e.y.isGreaterThan(t.y)?1:0}constructor(e,t){e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}link(e){if(e.point===this.point)throw new Error("Tried to link already linked events");const t=e.point.events;for(let r=0,s=t.length;r<s;r++){const n=t[r];this.point.events.push(n),n.point=this.point}this.checkForConsuming()}checkForConsuming(){const e=this.point.events.length;for(let t=0;t<e;t++){const r=this.point.events[t];if(r.segment.consumedBy===void 0)for(let s=t+1;s<e;s++){const n=this.point.events[s];n.consumedBy===void 0&&r.otherSE.point.events===n.otherSE.point.events&&r.segment.consume(n.segment)}}}getAvailableLinkedEvents(){const e=[];for(let t=0,r=this.point.events.length;t<r;t++){const s=this.point.events[t];s!==this&&!s.segment.ringOut&&s.segment.isInResult()&&e.push(s)}return e}getLeftmostComparator(e){const t=new Map,r=s=>{const n=s.otherSE;t.set(s,{sine:Bs(this.point,e.point,n.point),cosine:Ds(this.point,e.point,n.point)})};return(s,n)=>{t.has(s)||r(s),t.has(n)||r(n);const{sine:o,cosine:l}=t.get(s),{sine:u,cosine:f}=t.get(n);return o.isGreaterThanOrEqualTo(0)&&u.isGreaterThanOrEqualTo(0)?l.isLessThan(f)?1:l.isGreaterThan(f)?-1:0:o.isLessThan(0)&&u.isLessThan(0)?l.isLessThan(f)?-1:l.isGreaterThan(f)?1:0:u.isLessThan(o)?-1:u.isGreaterThan(o)?1:0}}},Ws=class ui{events;poly;_isExteriorRing;_enclosingRing;static factory(e){const t=[];for(let r=0,s=e.length;r<s;r++){const n=e[r];if(!n.isInResult()||n.ringOut)continue;let o=null,l=n.leftSE,u=n.rightSE;const f=[l],x=l.point,w=[];for(;o=l,l=u,f.push(l),l.point!==x;)for(;;){const _=l.getAvailableLinkedEvents();if(_.length===0){const G=f[0].point,N=f[f.length-1].point;throw new Error(`Unable to complete output ring starting at [${G.x}, ${G.y}]. Last matching segment found ends at [${N.x}, ${N.y}].`)}if(_.length===1){u=_[0].otherSE;break}let M=null;for(let G=0,N=w.length;G<N;G++)if(w[G].point===l.point){M=G;break}if(M!==null){const G=w.splice(M)[0],N=f.splice(G.index);N.unshift(N[0].otherSE),t.push(new ui(N.reverse()));continue}w.push({index:f.length,point:l.point});const T=l.getLeftmostComparator(o);u=_.sort(T)[0].otherSE;break}t.push(new ui(f))}return t}constructor(e){this.events=e;for(let t=0,r=e.length;t<r;t++)e[t].segment.ringOut=this;this.poly=null}getGeom(){let e=this.events[0].point;const t=[e];for(let f=1,x=this.events.length-1;f<x;f++){const w=this.events[f].point,_=this.events[f+1].point;we.orient(w,e,_)!==0&&(t.push(w),e=w)}if(t.length===1)return null;const r=t[0],s=t[1];we.orient(r,e,s)===0&&t.shift(),t.push(t[0]);const n=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:t.length-1,l=this.isExteriorRing()?t.length:-1,u=[];for(let f=o;f!=l;f+=n)u.push([t[f].x.toNumber(),t[f].y.toNumber()]);return u}isExteriorRing(){if(this._isExteriorRing===void 0){const e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let e=this.events[0];for(let s=1,n=this.events.length;s<n;s++){const o=this.events[s];ge.compare(e,o)>0&&(e=o)}let t=e.segment.prevInResult(),r=t?t.prevInResult():null;for(;;){if(!t)return null;if(!r)return t.ringOut;if(r.ringOut!==t.ringOut)return r.ringOut?.enclosingRing()!==t.ringOut?t.ringOut:t.ringOut?.enclosingRing();t=r.prevInResult(),r=t?t.prevInResult():null}}},ar=class{exteriorRing;interiorRings;constructor(i){this.exteriorRing=i,i.poly=this,this.interiorRings=[]}addInterior(i){this.interiorRings.push(i),i.poly=this}getGeom(){const i=this.exteriorRing.getGeom();if(i===null)return null;const e=[i];for(let t=0,r=this.interiorRings.length;t<r;t++){const s=this.interiorRings[t].getGeom();s!==null&&e.push(s)}return e}},zs=class{rings;polys;constructor(i){this.rings=i,this.polys=this._composePolys(i)}getGeom(){const i=[];for(let e=0,t=this.polys.length;e<t;e++){const r=this.polys[e].getGeom();r!==null&&i.push(r)}return i}_composePolys(i){const e=[];for(let t=0,r=i.length;t<r;t++){const s=i[t];if(!s.poly)if(s.isExteriorRing())e.push(new ar(s));else{const n=s.enclosingRing();n?.poly||e.push(new ar(n)),n?.poly?.addInterior(s)}}return e}},qs=class{queue;tree;segments;constructor(i,e=Tt.compare){this.queue=i,this.tree=new Lt(e),this.segments=[]}process(i){const e=i.segment,t=[];if(i.consumedBy)return i.isLeft?this.queue.delete(i.otherSE):this.tree.delete(e),t;i.isLeft&&this.tree.add(e);let r=e,s=e;do r=this.tree.lastBefore(r);while(r!=null&&r.consumedBy!=null);do s=this.tree.firstAfter(s);while(s!=null&&s.consumedBy!=null);if(i.isLeft){let n=null;if(r){const l=r.getIntersection(e);if(l!==null&&(e.isAnEndpoint(l)||(n=l),!r.isAnEndpoint(l))){const u=this._splitSafely(r,l);for(let f=0,x=u.length;f<x;f++)t.push(u[f])}}let o=null;if(s){const l=s.getIntersection(e);if(l!==null&&(e.isAnEndpoint(l)||(o=l),!s.isAnEndpoint(l))){const u=this._splitSafely(s,l);for(let f=0,x=u.length;f<x;f++)t.push(u[f])}}if(n!==null||o!==null){let l=null;n===null?l=o:o===null?l=n:l=ge.comparePoints(n,o)<=0?n:o,this.queue.delete(e.rightSE),t.push(e.rightSE);const u=e.split(l);for(let f=0,x=u.length;f<x;f++)t.push(u[f])}t.length>0?(this.tree.delete(e),t.push(i)):(this.segments.push(e),e.prev=r)}else{if(r&&s){const n=r.getIntersection(s);if(n!==null){if(!r.isAnEndpoint(n)){const o=this._splitSafely(r,n);for(let l=0,u=o.length;l<u;l++)t.push(o[l])}if(!s.isAnEndpoint(n)){const o=this._splitSafely(s,n);for(let l=0,u=o.length;l<u;l++)t.push(o[l])}}}this.tree.delete(e)}return t}_splitSafely(i,e){this.tree.delete(i);const t=i.rightSE;this.queue.delete(t);const r=i.split(e);return r.push(t),i.consumedBy===void 0&&this.tree.add(i),r}},Hs=class{type;numMultiPolys;run(i,e,t){rt.type=i;const r=[new hr(e,!0)];for(let f=0,x=t.length;f<x;f++)r.push(new hr(t[f],!1));if(rt.numMultiPolys=r.length,rt.type==="difference"){const f=r[0];let x=1;for(;x<r.length;)ni(r[x].bbox,f.bbox)!==null?x++:r.splice(x,1)}if(rt.type==="intersection")for(let f=0,x=r.length;f<x;f++){const w=r[f];for(let _=f+1,M=r.length;_<M;_++)if(ni(w.bbox,r[_].bbox)===null)return[]}const s=new Lt(ge.compare);for(let f=0,x=r.length;f<x;f++){const w=r[f].getSweepEvents();for(let _=0,M=w.length;_<M;_++)s.add(w[_])}const n=new qs(s);let o=null;for(s.size!=0&&(o=s.first(),s.delete(o));o;){const f=n.process(o);for(let x=0,w=f.length;x<w;x++){const _=f[x];_.consumedBy===void 0&&s.add(_)}s.size!=0?(o=s.first(),s.delete(o)):o=null}we.reset();const l=Ws.factory(n.segments);return new zs(l).getGeom()}},rt=new Hs,Mt=rt,js=0,Tt=class Ct{id;leftSE;rightSE;rings;windings;ringOut;consumedBy;prev;_prevInResult;_beforeState;_afterState;_isInResult;static compare(e,t){const r=e.leftSE.point.x,s=t.leftSE.point.x,n=e.rightSE.point.x,o=t.rightSE.point.x;if(o.isLessThan(r))return 1;if(n.isLessThan(s))return-1;const l=e.leftSE.point.y,u=t.leftSE.point.y,f=e.rightSE.point.y,x=t.rightSE.point.y;if(r.isLessThan(s)){if(u.isLessThan(l)&&u.isLessThan(f))return 1;if(u.isGreaterThan(l)&&u.isGreaterThan(f))return-1;const w=e.comparePoint(t.leftSE.point);if(w<0)return 1;if(w>0)return-1;const _=t.comparePoint(e.rightSE.point);return _!==0?_:-1}if(r.isGreaterThan(s)){if(l.isLessThan(u)&&l.isLessThan(x))return-1;if(l.isGreaterThan(u)&&l.isGreaterThan(x))return 1;const w=t.comparePoint(e.leftSE.point);if(w!==0)return w;const _=e.comparePoint(t.rightSE.point);return _<0?1:_>0?-1:1}if(l.isLessThan(u))return-1;if(l.isGreaterThan(u))return 1;if(n.isLessThan(o)){const w=t.comparePoint(e.rightSE.point);if(w!==0)return w}if(n.isGreaterThan(o)){const w=e.comparePoint(t.rightSE.point);if(w<0)return 1;if(w>0)return-1}if(!n.eq(o)){const w=f.minus(l),_=n.minus(r),M=x.minus(u),T=o.minus(s);if(w.isGreaterThan(_)&&M.isLessThan(T))return 1;if(w.isLessThan(_)&&M.isGreaterThan(T))return-1}return n.isGreaterThan(o)?1:n.isLessThan(o)||f.isLessThan(x)?-1:f.isGreaterThan(x)?1:e.id<t.id?-1:e.id>t.id?1:0}constructor(e,t,r,s){this.id=++js,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=r,this.windings=s}static fromRing(e,t,r){let s,n,o;const l=ge.comparePoints(e,t);if(l<0)s=e,n=t,o=1;else if(l>0)s=t,n=e,o=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const u=new ge(s,!0),f=new ge(n,!1);return new Ct(u,f,[r],[o])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e.isLessThan(t)?e:t},ur:{x:this.rightSE.point.x,y:e.isGreaterThan(t)?e:t}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(e){return e.x.eq(this.leftSE.point.x)&&e.y.eq(this.leftSE.point.y)||e.x.eq(this.rightSE.point.x)&&e.y.eq(this.rightSE.point.y)}comparePoint(e){return we.orient(this.leftSE.point,e,this.rightSE.point)}getIntersection(e){const t=this.bbox(),r=e.bbox(),s=ni(t,r);if(s===null)return null;const n=this.leftSE.point,o=this.rightSE.point,l=e.leftSE.point,u=e.rightSE.point,f=it(t,l)&&this.comparePoint(l)===0,x=it(r,n)&&e.comparePoint(n)===0,w=it(t,u)&&this.comparePoint(u)===0,_=it(r,o)&&e.comparePoint(o)===0;if(x&&f)return _&&!w?o:!_&&w?u:null;if(x)return w&&n.x.eq(u.x)&&n.y.eq(u.y)?null:n;if(f)return _&&o.x.eq(l.x)&&o.y.eq(l.y)?null:l;if(_&&w)return null;if(_)return o;if(w)return u;const M=Fs(n,this.vector(),l,e.vector());return M===null||!it(s,M)?null:we.snap(M)}split(e){const t=[],r=e.events!==void 0,s=new ge(e,!0),n=new ge(e,!1),o=this.rightSE;this.replaceRightSE(n),t.push(n),t.push(s);const l=new Ct(s,o,this.rings.slice(),this.windings.slice());return ge.comparePoints(l.leftSE.point,l.rightSE.point)>0&&l.swapEvents(),ge.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(s.checkForConsuming(),n.checkForConsuming()),t}swapEvents(){const e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,r=this.windings.length;t<r;t++)this.windings[t]*=-1}consume(e){let t=this,r=e;for(;t.consumedBy;)t=t.consumedBy;for(;r.consumedBy;)r=r.consumedBy;const s=Ct.compare(t,r);if(s!==0){if(s>0){const n=t;t=r,r=n}if(t.prev===r){const n=t;t=r,r=n}for(let n=0,o=r.rings.length;n<o;n++){const l=r.rings[n],u=r.windings[n],f=t.rings.indexOf(l);f===-1?(t.rings.push(l),t.windings.push(u)):t.windings[f]+=u}r.rings=null,r.windings=null,r.consumedBy=t,r.leftSE.consumedBy=t.leftSE,r.rightSE.consumedBy=t.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};const t=this._afterState.rings,r=this._afterState.windings,s=this._afterState.multiPolys;for(let l=0,u=this.rings.length;l<u;l++){const f=this.rings[l],x=this.windings[l],w=t.indexOf(f);w===-1?(t.push(f),r.push(x)):r[w]+=x}const n=[],o=[];for(let l=0,u=t.length;l<u;l++){if(r[l]===0)continue;const f=t[l],x=f.poly;if(o.indexOf(x)===-1)if(f.isExterior)n.push(x);else{o.indexOf(x)===-1&&o.push(x);const w=n.indexOf(f.poly);w!==-1&&n.splice(w,1)}}for(let l=0,u=n.length;l<u;l++){const f=n[l].multiPoly;s.indexOf(f)===-1&&s.push(f)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(Mt.type){case"union":{const r=e.length===0,s=t.length===0;this._isInResult=r!==s;break}case"intersection":{let r,s;e.length<t.length?(r=e.length,s=t.length):(r=t.length,s=e.length),this._isInResult=s===Mt.numMultiPolys&&r<s;break}case"xor":{const r=Math.abs(e.length-t.length);this._isInResult=r%2===1;break}case"difference":{const r=s=>s.length===1&&s[0].isSubject;this._isInResult=r(e)!==r(t);break}}return this._isInResult}},cr=class{poly;isExterior;segments;bbox;constructor(i,e,t){if(!Array.isArray(i)||i.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=t,this.segments=[],typeof i[0][0]!="number"||typeof i[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const r=we.snap({x:new me(i[0][0]),y:new me(i[0][1])});this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};let s=r;for(let n=1,o=i.length;n<o;n++){if(typeof i[n][0]!="number"||typeof i[n][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const l=we.snap({x:new me(i[n][0]),y:new me(i[n][1])});l.x.eq(s.x)&&l.y.eq(s.y)||(this.segments.push(Tt.fromRing(s,l,this)),l.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=l.x),l.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=l.y),l.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=l.x),l.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=l.y),s=l)}(!r.x.eq(s.x)||!r.y.eq(s.y))&&this.segments.push(Tt.fromRing(s,r,this))}getSweepEvents(){const i=[];for(let e=0,t=this.segments.length;e<t;e++){const r=this.segments[e];i.push(r.leftSE),i.push(r.rightSE)}return i}},Vs=class{multiPoly;exteriorRing;interiorRings;bbox;constructor(i,e){if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new cr(i[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let t=1,r=i.length;t<r;t++){const s=new cr(i[t],this,!1);s.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=e}getSweepEvents(){const i=this.exteriorRing.getSweepEvents();for(let e=0,t=this.interiorRings.length;e<t;e++){const r=this.interiorRings[e].getSweepEvents();for(let s=0,n=r.length;s<n;s++)i.push(r[s])}return i}},hr=class{isSubject;polys;bbox;constructor(i,e){if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof i[0][0][0]=="number"&&(i=[i])}catch{}this.polys=[],this.bbox={ll:{x:new me(Number.POSITIVE_INFINITY),y:new me(Number.POSITIVE_INFINITY)},ur:{x:new me(Number.NEGATIVE_INFINITY),y:new me(Number.NEGATIVE_INFINITY)}};for(let t=0,r=i.length;t<r;t++){const s=new Vs(i[t],this);s.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=e}getSweepEvents(){const i=[];for(let e=0,t=this.polys.length;e<t;e++){const r=this.polys[e].getSweepEvents();for(let s=0,n=r.length;s<n;s++)i.push(r[s])}return i}},Ks=(i,...e)=>Mt.run("union",i,e),Zs=(i,...e)=>Mt.run("difference",i,e);we.set;function ur(i,e,t){if(i!==null)for(var r,s,n,o,l,u,f,x=0,w=0,_,M=i.type,T=M==="FeatureCollection",G=M==="Feature",N=T?i.features.length:1,W=0;W<N;W++){f=T?i.features[W].geometry:G?i.geometry:i,_=f?f.type==="GeometryCollection":!1,l=_?f.geometries.length:1;for(var L=0;L<l;L++){var Q=0,ne=0;if(o=_?f.geometries[L]:f,o!==null){u=o.coordinates;var ye=o.type;switch(x=0,ye){case null:break;case"Point":if(e(u,w,W,Q,ne)===!1)return!1;w++,Q++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(e(u[r],w,W,Q,ne)===!1)return!1;w++,ye==="MultiPoint"&&Q++}ye==="LineString"&&Q++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(s=0;s<u[r].length-x;s++){if(e(u[r][s],w,W,Q,ne)===!1)return!1;w++}ye==="MultiLineString"&&Q++,ye==="Polygon"&&ne++}ye==="Polygon"&&Q++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(ne=0,s=0;s<u[r].length;s++){for(n=0;n<u[r][s].length-x;n++){if(e(u[r][s][n],w,W,Q,ne)===!1)return!1;w++}ne++}Q++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(ur(o.geometries[r],e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function oi(i,e){var t,r,s,n,o,l,u,f,x,w,_=0,M=i.type==="FeatureCollection",T=i.type==="Feature",G=M?i.features.length:1;for(t=0;t<G;t++){for(l=M?i.features[t].geometry:T?i.geometry:i,f=M?i.features[t].properties:T?i.properties:{},x=M?i.features[t].bbox:T?i.bbox:void 0,w=M?i.features[t].id:T?i.id:void 0,u=l?l.type==="GeometryCollection":!1,o=u?l.geometries.length:1,s=0;s<o;s++){if(n=u?l.geometries[s]:l,n===null){if(e(null,_,f,x,w)===!1)return!1;continue}switch(n.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(n,_,f,x,w)===!1)return!1;break}case"GeometryCollection":{for(r=0;r<n.geometries.length;r++)if(e(n.geometries[r],_,f,x,w)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}_++}}function Ys(i,e){oi(i,function(t,r,s,n,o){var l=t===null?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return e(Je(t,s,{bbox:n,id:o}),r,0)===!1?!1:void 0}var u;switch(l){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var f=0;f<t.coordinates.length;f++){var x=t.coordinates[f],w={type:u,coordinates:x};if(e(Je(w,s),r,f)===!1)return!1}})}function Xs(i,e={}){const t=[];if(oi(i,s=>{t.push(s.coordinates)}),t.length<2)throw new Error("Must have at least 2 geometries");const r=Ks(t[0],...t.slice(1));return r.length===0?null:r.length===1?Jt(r[0],e.properties):er(r,e.properties)}var dr=Xs;function Qs(i,e={}){if(i.bbox!=null&&e.recompute!==!0)return i.bbox;const t=[1/0,1/0,-1/0,-1/0];return ur(i,r=>{t[0]>r[0]&&(t[0]=r[0]),t[1]>r[1]&&(t[1]=r[1]),t[2]<r[0]&&(t[2]=r[0]),t[3]<r[1]&&(t[3]=r[1])}),t}var fr=Qs;function Js(i){const e=[];if(oi(i,s=>{e.push(s.coordinates)}),e.length<2)throw new Error("Must have at least two features");const t=i.features[0].properties||{},r=Zs(e[0],...e.slice(1));return r.length===0?null:r.length===1?Jt(r[0],t):er(r,t)}var en=Js;function tn(i){if(!i)throw new Error("geojson is required");var e=[];return Ys(i,function(t){e.push(t)}),et(e)}var rn=tn;function pr(i){const e=en(et([Jt([[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]),i]));if(!e)return;e.properties={isMask:!0};const t=pt(fr(i)),r=(t[2]-t[0])/360/1e3,s=t[0]<-180,n=t[2]>180,o=rn(i);if(o.features.length>1&&(s||n))for(const l of o.features){const u=pt(fr(l));if(n&&u[0]<-180+r)for(const f of l.geometry.coordinates)for(const x of f)x[0]+=360-r;if(s&&u[2]>180-r)for(const f of l.geometry.coordinates)for(const x of f)x[0]-=360-r}return et([o.features.length<2?i:dr(o)??i,e])}const mr={continental_marine:4,country:4,major_landform:8,region:5,subregion:6,county:7,joint_municipality:8,joint_submunicipality:9,municipality:10,municipal_district:11,locality:12,neighbourhood:13,place:14,postal_code:14,road:16,poi:17,address:18,"poi.peak":15,"poi.shop":18,"poi.cafe":18,"poi.restaurant":18,"poi.aerodrome":13},gr={fill:{paint:{"fill-color":"#000","fill-opacity":.1},filter:["all",["==",["geometry-type"],"Polygon"],["has","isMask"]]},line:{layout:{"line-cap":"square"},paint:{"line-width":["case",["==",["geometry-type"],"Polygon"],2,3],"line-dasharray":[1,1],"line-color":"#3170fe"},filter:["!",["has","isMask"]]}},st="mtlr-gc-full-geom",li="mtlr-gc-full-geom-fill",ai="mtlr-gc-full-geom-line",sn=Te.Evented,nn=Te.Marker,on=Te.Popup;class yr extends sn{#e;#t;#i;constructor(e={}){super(),this.#e=e}onAdd(e){if(this.#t=e,this.#i=e._container.ownerDocument.createElement("maptiler-geocoder"),this.#i.classList.add("maplibregl-geocoder"),"getSdkConfig"in e&&typeof e.getSdkConfig=="function"){const{primaryLanguage:r,apiKey:s}=e.getSdkConfig();if(this.#e.apiKey===void 0&&(this.#e.apiKey=s),this.#e.language===void 0){const n=r.code?.match(/^([a-z]{2,3})($|_|-)/);n&&(this.#e.language=n[1])}this.#i.classList.add("maptiler-geocoder")}this.#v(),this.#x();const t=e._container.ownerDocument.createElement("div");return t.classList.add("maplibregl-ctrl-geocoder","maplibregl-ctrl","maplibregl-ctrl-group"),t.style.position="relative",t.style.zIndex="3",t.appendChild(this.#i),setTimeout(()=>this.#i?.setOptions({openListOnTop:t.matches(".maplibregl-ctrl-bottom-left *, .maplibregl-ctrl-bottom-right *")})),t}onRemove(){this.#S(),this.#t=void 0,this.#i=void 0}setOptions(e){Object.assign(this.#e,e),this.#v()}setQuery(e){this.#i?.setQuery(e)}submitQuery(e){this.#i?.submitQuery(e)}clearMap(){this.#n=[],this.#u(void 0,void 0)}clearList(){this.#i?.clearList()}setReverseMode(e){this.setOptions({reverseActive:e})}focus(e){this.#i?.focus(e)}blur(){this.#i?.blur()}#l=new Map;#c;#s;#n;#o;#m;#g={reversetoggle:e=>{const t=this.#t?.getCanvasContainer();t&&(t.style.cursor=e.detail.reverse?"crosshair":""),this.#r("reversetoggle",e.detail)},querychange:e=>{const t=e.detail.reverseCoords;this.#w(t?[t.decimalLongitude,t.decimalLatitude]:void 0),this.#r("querychange",e.detail)},queryclear:()=>{this.#w(void 0),this.#r("queryclear")},request:e=>{this.#r("request",e.detail)},response:e=>{this.#r("response",e.detail)},select:e=>{const t=e.detail.feature;t&&this.#d&&this.#e.flyToSelected&&this.#b(t.center,this.#h(t)),this.#n&&t&&this.#T(t),this.#r("select",e.detail)},pick:e=>{const t=e.detail.feature;t&&t.id!==this.#m&&this.#d&&(this.#L(t),this.#u(this.#n,t)),this.#m=t?.id,this.#r("pick",e.detail)},featuresshow:()=>{this.#r("featuresshow")},featureshide:()=>{this.#r("featureshide")},featureslisted:e=>{const t=e.detail.features;this.#n=t,this.#u(this.#n,void 0),this.#_(t),this.#r("featureslisted",e.detail)},featuresclear:()=>{this.#n=void 0,this.#u(void 0,void 0),this.#r("featuresclear")},focusin:()=>{this.#r("focusin")},focusout:()=>{this.#r("focusout")}};#y={render:()=>{const e=this.#t?.getZoom(),t=this.#t?.getCenter();this.#i?.handleMapChange(e&&t?[e,t.lng,t.lat]:void 0)},click:e=>{this.#i?.handleMapClick([e.lngLat.lng,e.lngLat.lat])},styledata:()=>{setTimeout(()=>{this.#o&&this.#f()})}};#v(){this.#i&&(this.#i.setOptions(this.#e),this.#i.fetchFullGeometryOnPick=this.#e.pickedResultStyle!=="marker-only")}#x(){if(!(!this.#i||!this.#t)){for(const[e,t]of Object.entries(this.#g))this.#i.addEventListener(e,t);for(const[e,t]of Object.entries(this.#y))this.#t.on(e,t)}}#S(){if(!(!this.#i||!this.#t)){for(const[e,t]of Object.entries(this.#g))this.#i.removeEventListener(e,t);for(const[e,t]of Object.entries(this.#y))this.#t.off(e,t)}}#r(e,t){return super.fire({type:e,...t??{}})}#L(e){e.bbox[0]===e.bbox[2]&&e.bbox[1]===e.bbox[3]?this.#b(e.center,this.#h(e)):this.#E(pt(e.bbox),50,this.#h(e))}#_(e){if(!e||e.length===0||!this.#d)return;const t=e.every(n=>n.matching_text),r=e.reduce((n,o)=>t||!o.matching_text?[Math.min(n[0],o.bbox[0]),Math.min(n[1],o.bbox[1]),Math.max(n[2],o.bbox[2]),Math.max(n[3],o.bbox[3])]:n,[180,90,-180,-90]),s=e.map(n=>this.#h(n)).filter(n=>n!==void 0).reduce((n,o)=>n===void 0?o:Math.max(n,o),void 0);this.#E(pt(r),50,s)}#h(e){if(e.bbox[0]!==e.bbox[2]||e.bbox[1]!==e.bbox[3])return;const t=e.id.replace(/\..*/,""),r=this.#e.zoom??mr;return(Array.isArray(e.properties?.categories)?e.properties.categories.reduce((s,n)=>{const o=r[t+"."+n];return s===void 0?o:o===void 0?s:Math.max(s,o)},void 0):void 0)??r[t]}get#d(){return!!this.#e.flyTo||this.#e.flyTo===void 0}get#$(){return typeof this.#e.flyTo=="boolean"?{}:this.#e.flyTo}get#M(){return typeof this.#e.flyTo=="boolean"?{}:this.#e.flyTo}#b(e,t){this.#t?.flyTo({center:e,...t?{zoom:t}:{},...this.#$})}#E(e,t,r){this.#t?.fitBounds([[e[0],e[1]],[e[2],e[3]]],{padding:t,...r?{maxZoom:r}:{},...this.#M})}#w(e){if(!(this.#e.marker===!1||this.#e.marker===null||!this.#t)){if(!e){this.#s?.remove(),this.#s=void 0;return}this.#s||(this.#e.marker instanceof Function?this.#s=this.#e.marker(this.#t)??void 0:(this.#s=this.#p(this.#e.marker).setLngLat(e).addTo(this.#t),this.#s.getElement().classList.add("marker-reverse"))),this.#s?.setLngLat(e)}}#u(e,t){if(!this.#t)return;for(const s of this.#l.values())s.remove();this.#l=new Map,this.#a(void 0);const r=()=>{if(!t||!this.#t||this.#e.marker===!1||this.#e.marker===null)return;const s=this.#e.marker instanceof Function?this.#e.marker(this.#t,t):this.#p(this.#e.marker).setLngLat(t.center).addTo(this.#t);s&&this.#l.set(t,s)};if(t?.geometry.type==="GeometryCollection"){const s=t.geometry.geometries.filter(n=>n.type==="Polygon"||n.type==="MultiPolygon");if(s.length>0){const n=dr(et(s.map(o=>Je(o))));if(n){const o=pr({...t,geometry:n.geometry});o&&this.#a(o)}}else{const n=t.geometry.geometries.filter(o=>o.type==="LineString"||o.type==="MultiLineString");n.length>0&&this.#a({...t,geometry:{type:"GeometryCollection",geometries:n}})}}else if(t?.geometry.type.endsWith("Polygon")){const s=pr(t);s&&this.#a(s),this.#e.pickedResultStyle==="full-geometry-including-polygon-center-marker"&&r()}else t?.geometry.type.endsWith("LineString")?this.#a(t):t?.geometry.type.endsWith("Point")&&r();if(this.#e.showResultMarkers!==!1&&this.#e.showResultMarkers!==null)for(const s of e??[]){if(s.id===t?.id||s.place_type.includes("reverse"))continue;let n;if(this.#e.showResultMarkers instanceof Function){if(n=this.#e.showResultMarkers(this.#t,s),!n)continue}else n=this.#p(this.#e.showResultMarkers).setLngLat(s.center).setPopup(new on({offset:[1,-27],closeButton:!1,closeOnMove:!0,className:"maptiler-gc-popup"}).setText(s.place_type[0]==="reverse"?s.place_name:s.place_name.replace(/,.*/,""))).addTo(this.#t),n.getElement().classList.add("marker-interactive");const o=n.getElement();o.addEventListener("click",l=>{l.stopPropagation(),this.#r("markerclick",{feature:s,marker:n})}),o.addEventListener("mouseenter",()=>{this.#r("markermouseenter",{feature:s,marker:n}),n.togglePopup()}),o.addEventListener("mouseleave",()=>{this.#r("markermouseleave",{feature:s,marker:n}),n.togglePopup()}),o.classList.toggle("marker-fuzzy",!!s.matching_text),this.#l.set(s,n)}}#T(e){this.#c?.getElement().classList.toggle("marker-selected",!1),this.#c=void 0,this.#e.markerOnSelected!==!1&&(this.#c=this.#l.get(e),this.#c?.getElement().classList.toggle("marker-selected",!0))}#f(){if(!this.#t?.loaded){this.#t?.once("load",()=>{this.#f()});return}const e=this.#A(),t=this.#t.getSource(st);!e?.fill&&!e?.line||!t&&!this.#o||(t?t.setData(this.#o??et([])):this.#o&&this.#t.addSource(st,{type:"geojson",data:this.#o}),!this.#t.getLayer(li)&&e.fill&&this.#t.addLayer({...e.fill,id:li,type:"fill",source:st}),!this.#t.getLayer(ai)&&e.line&&this.#t.addLayer({...e.line,id:ai,type:"line",source:st}))}#a(e){this.#o=e,this.#f()}#p(e){return typeof e!="object"&&(e={element:this.#t?._container.ownerDocument.createElement("maptiler-geocode-marker"),offset:[1,-13]}),new nn(e)}#A(){const{fullGeometryStyle:e}=this.#e;if(e===!0||e===void 0)return gr;if(!(e===!1||e===null))return e}}$.DEFAULT_GEOMETRY_STYLE=gr,$.GeocodingControl=yr,$.MaplibreglGeocodingControl=yr,$.RESULT_LAYER_FILL=li,$.RESULT_LAYER_LINE=ai,$.RESULT_SOURCE=st,$.ZOOM_DEFAULTS=mr,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})}));
|
|
276
|
+
//# sourceMappingURL=maplibregl.umd.js.map
|