@mapsindoors/map-template 1.96.24 → 1.97.0

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.
@@ -42,7 +42,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
42
42
  maneuver-description-distance-border`})))):null}renderToggleButton(){var e;return((e=this.stepData.steps)===null||e===void 0?void 0:e.length)<=0||!this.showToggleButton?null:ut("span",{class:"step__toggle",onClick:()=>this.toggleSubsteps()},ut("mi-icon",this.substepsAreOpen?{part:"step-toggle","icon-name":"chevron-up"}:{part:"step-toggle","icon-name":"chevron-down"}))}renderDistance(){return ut("span",{part:"step-info",class:"step__distance-duration"},ut("mi-distance",{meters:this.stepData.distance.value,unit:this.unit}),ut("br",null))}showSubsteps(){return ut("div",{class:"step__details"},this.renderSubsteps())}renderDrivingStep(){return ut("div",{class:"step",onClick:e=>this.stepClickHandler(e)},this.showHeader?ut("div",{class:"step__info"},ut("div",{part:"step-heading",class:"step__heading"},this.getStepHeading()),this.renderToggleButton()):null,this.showSubsteps())}getStepHeading(){var e;return!((e=this.stepData.steps[0])===null||e===void 0)&&e.instructions?this.stepData.steps[0].instructions:{driving:this.translationsData.drive,walking:this.translationsData.walk,bicycling:this.translationsData.bike}[this.stepData.travel_mode.toLowerCase()]}renderWalkingStep(){let e;return e=this.stepData.parking===!0?`${this.translationsData.park} ${this.stepData.label?` ${this.translationsData.at} `+this.stepData.label:""}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="STEPS"?`${this.translationsData.takeStaircaseToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="LADDER"?`${this.translationsData.takeLadderToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="ESCALATOR"?`${this.translationsData.takeEscalatorToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="WHEELCHAIRRAMP"?`${this.translationsData.takeWheelchairRampToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="WHEELCHAIRLIFT"?`${this.translationsData.takeWheelchairLiftToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="ELEVATOR"?`${this.translationsData.takeElevatorToLevel} ${this.stepData.end_location.floor_name}`:this.fromRouteContext==="InsideBuilding"&&this.stepData.route_context==="Outside"?this.addStepContextNameToHeading(this.translationsData.exit,this.stepData.start_context):this.fromRouteContext==="InsideBuilding"&&this.stepData.route_context==="InsideBuilding"?this.getStepHeading():this.fromRouteContext==="Outside"&&this.stepData.route_context==="Outside"&&this.fromTravelMode.toUpperCase()==="TRANSIT"?this.fromTransitStop:this.fromRouteContext==="Outside"&&this.stepData.route_context==="Outside"?this.getStepHeading():this.fromRouteContext==="Outside"&&this.stepData.route_context==="InsideBuilding"?this.addStepContextNameToHeading(this.translationsData.enter,this.stepData.end_context):this.fromRouteContext==="InsideBuilding"?"Inside Building":this.fromRouteContext,ut("div",{class:"step",onClick:n=>this.stepClickHandler(n)},this.showHeader?ut("div",{class:"step__info"},ut("div",{part:"step-heading",class:"step__heading"},e),this.renderToggleButton()):null,this.showSubsteps())}addStepContextNameToHeading(e,n){return n&&(n.building?e+=` ${n.building.buildingInfo.name} ${this.translationsData.building}`:n.venue&&(e+=` ${n.venue.venueInfo.name} ${this.translationsData.venue}`)),e}renderBicyclingStep(){return ut("div",{class:"step",onClick:e=>this.stepClickHandler(e)},this.showHeader?ut("div",{class:"step__info"},ut("div",{part:"step-heading",class:"step__heading"},this.getStepHeading()),this.renderToggleButton()):null,this.showSubsteps())}renderTransitStep(){var e,n,s,l,h,m,_,i,I,C,S,L,R,U,W,le,pe,ie,Y,q,ue,me,ne,De,Me,Ee,ge,Re,Oe;return ut("div",{class:"step",onClick:Ne=>this.stepClickHandler(Ne)},this.showHeader?ut("div",{class:"step__info"},ut("h3",{part:"step-heading",class:"step__heading"},this.stepData.travel_mode==="TRANSIT"?""+this.translationsData.rideTheBus:(e=this.stepData)===null||e===void 0?void 0:e.instructions),this.renderToggleButton()):null,this.renderTravelMode(),ut("div",{part:"step-description",class:"step__description"},!((l=(s=(n=this.stepData)===null||n===void 0?void 0:n.transit_information)===null||s===void 0?void 0:s.line)===null||l===void 0)&&l.short_name?ut("span",{class:"step__short-name",style:{backgroundColor:!((_=(m=(h=this.stepData)===null||h===void 0?void 0:h.transit_information)===null||m===void 0?void 0:m.line)===null||_===void 0)&&_.color?(C=(I=(i=this.stepData)===null||i===void 0?void 0:i.transit_information)===null||I===void 0?void 0:I.line)===null||C===void 0?void 0:C.color:null,color:!((R=(L=(S=this.stepData)===null||S===void 0?void 0:S.transit_information)===null||L===void 0?void 0:L.line)===null||R===void 0)&&R.text_color?(le=(W=(U=this.stepData)===null||U===void 0?void 0:U.transit_information)===null||W===void 0?void 0:W.line)===null||le===void 0?void 0:le.text_color:null}},(Y=(ie=(pe=this.stepData)===null||pe===void 0?void 0:pe.transit_information)===null||ie===void 0?void 0:ie.line)===null||Y===void 0?void 0:Y.short_name):null,!((ue=(q=this.stepData)===null||q===void 0?void 0:q.transit_information)===null||ue===void 0)&&ue.headsign?(ne=(me=this.stepData)===null||me===void 0?void 0:me.transit_information)===null||ne===void 0?void 0:ne.headsign:null,ut("br",null),ut("span",{part:"step-info",class:"step__distance-duration"},ut("mi-time",{seconds:(Me=(De=this.stepData)===null||De===void 0?void 0:De.duration)===null||Me===void 0?void 0:Me.value,translations:`{"days":"${this.translationsData.days}","hours":"${this.translationsData.hours}","minutes":"${this.translationsData.minutes}"}`})," · ",!((ge=(Ee=this.stepData)===null||Ee===void 0?void 0:Ee.transit_information)===null||ge===void 0)&&ge.num_stops?(Oe=(Re=this.stepData)===null||Re===void 0?void 0:Re.transit_information)===null||Oe===void 0?void 0:Oe.num_stops:null," ",this.translationsData.stops?this.translationsData.stops:null)),this.showSubsteps())}static get watchers(){return{step:[{parseStepProp:0}],translations:[{parseTranslationsProp:0}]}}static get style(){return'.sc-mi-route-instructions-step-h{display:block;font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.step.sc-mi-route-instructions-step{display:grid;gap:16px;justify-items:center}.step__info.sc-mi-route-instructions-step{display:grid;grid-auto-flow:column;align-items:center;justify-content:space-between;width:100%;position:sticky;top:50px;background:white;z-index:1000;padding-bottom:8px}.step__destination.sc-mi-route-instructions-step{display:grid;gap:8px;align-items:center;justify-content:center;grid-auto-flow:column}.step__heading.sc-mi-route-instructions-step{font-weight:500;font-size:1.25rem;margin:0}.step__heading.sc-mi-route-instructions-step>span.sc-mi-route-instructions-step{font-size:0.875rem;color:#6b7280}.step__travel-mode.sc-mi-route-instructions-step{display:flex;justify-content:center;align-items:center;position:relative;min-height:72px}.step__travel-mode.sc-mi-route-instructions-step::before{position:absolute;width:calc(50% - 2px);left:0;height:100%;content:""}.step__travel-mode--dotted.sc-mi-route-instructions-step::before{border-right:4px dotted #bfdbfe}.step__travel-mode--solid.sc-mi-route-instructions-step::before{border-right:4px solid #bfdbfe}.step__travel-mode-icon.sc-mi-route-instructions-step{position:absolute;left:50%;top:24px;transform:translateX(-50%);background-color:#fcfcfc;padding:3px;border-radius:4px}.step__travel-mode-icon.sc-mi-route-instructions-step mi-icon.sc-mi-route-instructions-step{width:16px;height:16px;background-color:#6b7280;display:block}.step__short-name.sc-mi-route-instructions-step{margin-right:4px;padding:2px 4px;font-size:0.875rem;color:#fcfcfc;background-color:#6b7280;border-radius:2px}.step__distance-duration.sc-mi-route-instructions-step{color:#6b7280;font-size:0.875rem}.step__transit-action.sc-mi-route-instructions-step{font-weight:400;font-size:0.875rem;color:#6b7280}.step__toggle.sc-mi-route-instructions-step{display:grid;justify-content:center}.step__toggle.sc-mi-route-instructions-step mi-icon.sc-mi-route-instructions-step{width:24px;height:24px;display:block}.step__details.sc-mi-route-instructions-step{display:grid;gap:24px;width:100%}'}},[2,"mi-route-instructions-step",{step:[1],hideIndoorSubsteps:[4,"hide-indoor-substeps"],fromRouteContext:[1,"from-route-context"],fromTravelMode:[1,"from-travel-mode"],fromTransitStop:[1,"from-transit-stop"],unit:[1],showToggleButton:[4,"show-toggle-button"],showHeader:[4,"show-header"],translations:[1],stepData:[32],translationsData:[32],substepsAreOpen:[32],openSubsteps:[64],closeSubsteps:[64]},void 0,{step:[{parseStepProp:0}],translations:[{parseTranslationsProp:0}]}]),oZ=rZ,sZ=dr(class extends hr{constructor(e){super(),e!==!1&&this.__registerHost(),this.substepsToggled=Er(this,"substepsToggled",7),this.fromRouteContext="",this.showToggleButton=!0,this.substepsAreOpen=!1}parseStepProp(){this.step&&(this.stepData=JSON.parse(this.step))}parseTranslationsProp(){this.translations&&(this.translationsData=JSON.parse(this.translations))}async openSubsteps(){this.substepsAreOpen=!0}async closeSubsteps(){this.substepsAreOpen=!1}componentWillLoad(){this.parseStepProp(),this.parseTranslationsProp()}toggleSubsteps(){this.substepsToggled.emit(),this.substepsAreOpen=!this.substepsAreOpen}renderToggleButton(){var e,n;return((n=(e=this.stepData)===null||e===void 0?void 0:e.steps)===null||n===void 0?void 0:n.length)<=0||!this.showToggleButton?null:ut("span",{class:"step-header__toggle",onClick:()=>this.toggleSubsteps()},ut("mi-icon",{part:"step-toggle","icon-name":this.substepsAreOpen?"chevron-down":"chevron-up"}))}addStepContextNameToHeading(e,n){return n&&(n.building?e+=` ${n.building.buildingInfo.name} ${this.translationsData.building}`:n.venue&&(e+=` ${n.venue.venueInfo.name} ${this.translationsData.venue}`)),e}getStepHeading(){var e,n;return!((n=(e=this.stepData.steps)===null||e===void 0?void 0:e[0])===null||n===void 0)&&n.instructions?this.stepData.steps[0].instructions:{driving:this.translationsData.drive,walking:this.translationsData.walk,bicycling:this.translationsData.bike}[this.stepData.travel_mode.toLowerCase()]}getHeading(){var e,n,s;return this.stepData&&this.translationsData?((e=this.stepData.travel_mode)===null||e===void 0?void 0:e.toUpperCase())==="TRANSIT"?this.translationsData.rideTheBus:((n=this.stepData.travel_mode)===null||n===void 0?void 0:n.toUpperCase())!=="WALKING"?this.getStepHeading():this.stepData.parking===!0?`${this.translationsData.park} ${this.stepData.label?` ${this.translationsData.at} `+this.stepData.label:""}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="STEPS"?`${this.translationsData.takeStaircaseToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="LADDER"?`${this.translationsData.takeLadderToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="ESCALATOR"?`${this.translationsData.takeEscalatorToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="WHEELCHAIRRAMP"?`${this.translationsData.takeWheelchairRampToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="WHEELCHAIRLIFT"?`${this.translationsData.takeWheelchairLiftToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="ELEVATOR"?`${this.translationsData.takeElevatorToLevel} ${this.stepData.end_location.floor_name}`:this.fromRouteContext==="InsideBuilding"&&this.stepData.route_context==="Outside"?this.addStepContextNameToHeading(this.translationsData.exit,this.stepData.start_context):this.fromRouteContext==="InsideBuilding"&&this.stepData.route_context==="InsideBuilding"?this.getStepHeading():this.fromRouteContext==="Outside"&&this.stepData.route_context==="Outside"&&((s=this.fromTravelMode)===null||s===void 0?void 0:s.toUpperCase())==="TRANSIT"?this.fromTransitStop:this.fromRouteContext==="Outside"&&this.stepData.route_context==="Outside"?this.getStepHeading():this.fromRouteContext==="Outside"&&this.stepData.route_context==="InsideBuilding"?this.addStepContextNameToHeading(this.translationsData.enter,this.stepData.end_context):this.fromRouteContext==="InsideBuilding"?"Inside Building":this.fromRouteContext:""}render(){return this.stepData&&this.translationsData?ut("div",{class:"step-header__info"},ut("div",{part:"step-heading",class:"step-header__heading"},this.getHeading()),this.renderToggleButton()):null}static get watchers(){return{step:[{parseStepProp:0}],translations:[{parseTranslationsProp:0}]}}static get style(){return".sc-mi-route-instructions-step-header-h{display:block}.step-header__info.sc-mi-route-instructions-step-header{display:grid;grid-auto-flow:column;align-items:center;justify-content:space-between;width:100%;padding-bottom:8px}.step-header__heading.sc-mi-route-instructions-step-header{font-weight:500;font-size:1.25rem;margin:0}.step-header__toggle.sc-mi-route-instructions-step-header{display:grid;justify-content:center}.step-header__toggle.sc-mi-route-instructions-step-header mi-icon.sc-mi-route-instructions-step-header{width:24px;height:24px;display:block}"}},[2,"mi-route-instructions-step-header",{step:[1],fromRouteContext:[1,"from-route-context"],fromTravelMode:[1,"from-travel-mode"],fromTransitStop:[1,"from-transit-stop"],showToggleButton:[4,"show-toggle-button"],translations:[1],stepData:[32],translationsData:[32],substepsAreOpen:[32],openSubsteps:[64],closeSubsteps:[64]},void 0,{step:[{parseStepProp:0}],translations:[{parseTranslationsProp:0}]}]),aZ=sZ,lZ=K$,cZ=sG;var PS,RS,BS={},FS={},uZ=W1((RS||(RS=1,(function(e){function n(h,m){for(var _=Object.getOwnPropertyNames(m),i=0;i<_.length;i++){var I=_[i],C=Object.getOwnPropertyDescriptor(m,I);C&&C.configurable&&h[I]===void 0&&Object.defineProperty(h,I,C)}return h}Object.defineProperty(e,"__esModule",{value:!0});var s=(PS||(PS=1,(function(h){Object.defineProperty(h,"__esModule",{value:!0}),h.default=function(i){return function(I,C,S){return{configurable:!0,enumerable:S.enumerable,get:function(){return Object.defineProperty(this,C,{configurable:!0,enumerable:S.enumerable,value:_(S.value,i)}),this[C]}}}},h.debounce=_;var m=500;function _(i){var I=arguments.length<=1||arguments[1]===void 0?m:arguments[1],C=void 0;function S(){for(var L=this,R=arguments.length,U=Array(R),W=0;W<R;W++)U[W]=arguments[W];S.clear(),C=setTimeout((function(){C=null,i.apply(L,U)}),I)}return S.clear=function(){C&&(clearTimeout(C),C=null)},S}h.DEFAULT_DEBOUNCE_DURATION=m})(FS)),FS),l=(function(h){return h&&h.__esModule?h:{default:h}})(s);e.default=l.default,n(e,(function(h,m){var _=m({},h);return delete _.default,_})(s,n))})(BS)),BS));const US=dr(class extends hr{constructor(e){super(),e!==!1&&this.__registerHost(),this.results=Er(this,"results",7),this.cleared=Er(this,"cleared",7),this.componentRendered=Er(this,"componentRendered",7),this.shortInput=Er(this,"shortInput",7),this.changed=Er(this,"changed",7),this.focused=Er(this,"focused",7),this.placeholder="",this.idAttribute="",this.dataAttributes={},this.mapsindoors=!1,this.google=!1,this.mapbox=!1,this.language="en",this.miFields="name,description,aliases,categories,externalId",this.disabled=!1,this.preventSearch=!1}valueChange(e){e&&this.inputElement&&e!==this.inputElement.value&&(this.inputElement.value=e,this.preventSearch||this.inputChanged())}async clear(){this.inputElement&&(this.inputElement.value="",this.value="",this.lastRequested=null,this.cleared.emit())}async triggerSearch(){this.inputElement&&this.search(this.inputElement.value)}async setDisplayText(e){this.inputElement&&(this.preventSearch=!0,this.inputElement.value=e,this.value=e,this.preventSearch=!1)}async focusInput(){this.inputElement&&this.inputElement.focus({preventScroll:!0})}async getInputField(){return this.inputElement?this.inputElement:null}search(e){Promise.all([this.makeMapsIndoorsQuery(e),this.makeGooglePlacesQuery(e),this.getMapboxSearchResults(e)]).then((n=>{this.lastRequested=e,this.google?this.pushResults(n[0].concat(n[1])):this.mapbox&&mapboxgl.accessToken?this.pushResults(n[0].concat(n[2])):this.pushResults(n[0])}))}inputChanged(){const e=this.inputElement.value;if(this.value=e,!this.preventSearch){if(e.length<2)return this.lastRequested=null,void(e.length===1?this.shortInput.emit():this.clear());e.length>1&&e!==this.lastRequested&&this.search(e),this.changed.emit()}}pushResults(e){this.results.emit(e)}makeMapsIndoorsQuery(e){if(!this.mapsindoors)return Promise.resolve([]);let n;if(this.miNear&&(n=this.miNear,/^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$/.test(this.miNear))){const s=this.miNear.split(",");n={lat:parseFloat(s[0]),lng:parseFloat(s[1])}}return mapsindoors.services.LocationsService.getLocations({q:e.trim(),fields:this.miFields,take:this.miTake,skip:this.miSkip,orderBy:this.miOrder,near:n,venue:this.miVenue,categories:this.miCategories})}makeGooglePlacesQuery(e){return this.google?this.googleAutocompleteService||(this.googleAutocompleteService=new google.maps.places.AutocompleteService):this.googleAutocompleteService=null,this.googleAutocompleteService?new Promise((n=>{const s={input:e,language:this.language};this.gmCountryCode&&(s.componentRestrictions={country:this.gmCountryCode}),this.googleAutocompleteService.getPlacePredictions(s,(l=>{const h=(l||[]).map((m=>({id:m.place_id,type:"Feature",properties:{type:"google_places",placeId:m.place_id,name:m.structured_formatting.main_text,subtitle:m.structured_formatting.secondary_text||"",floor:0}})));n(h)}))})):Promise.resolve([])}getMapboxSearchResults(e){return this.mapbox&&mapboxgl.accessToken?e?new Promise((n=>{const s=this.language.split("-")[0];let l=`https://api.mapbox.com/search/searchbox/v1/suggest?q=${e}&session_token=${this.sessionToken}&access_token=${mapboxgl.accessToken}&language=${s}`;this.userPosition&&(l=l.concat("&proximity="+this.userPosition)),fetch(l).then((h=>h.json())).then((h=>{const m=h.suggestions.map((_=>({id:_.mapbox_id,type:"Feature",properties:{type:"mapbox_places",placeId:_.mapbox_id,name:_.name,subtitle:_.place_formatted||"",floor:0}})));n(m)})).catch((()=>{n([])}))})):void 0:Promise.resolve([])}componentDidRender(){if(this.inputElement){if(this.dataAttributes)for(const e in this.dataAttributes)this.inputElement.setAttribute(e,this.dataAttributes[e]);this.componentRendered.emit()}}render(){var e;return ut(ko,{key:"de346bfb7dc453a0fdf2b1fed365eb7b14e69820"},ut("input",{key:"2d57e039d0ee7538f01bc46bfff246288cd25e93",disabled:this.disabled,id:this.idAttribute?this.idAttribute:null,type:"search",ref:n=>this.inputElement=n,onInput:()=>this.inputChanged(),onFocus:()=>{this.focused.emit()},placeholder:this.placeholder,autocomplete:"off"}),((e=this.inputElement)===null||e===void 0?void 0:e.value)&&ut("button",{key:"4da48a3c74a375a0243f6c70133cc2d078be8e42",type:"button",onClick:()=>this.clear(),"aria-label":"Clear"},ut("svg",{key:"9e615f21836cea8735758d35eec6e083f2b68019",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ut("path",{key:"9dc95ad27e8777c349785046748e0487d6df0892",d:"M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z"}))))}static get watchers(){return{value:[{valueChange:0}]}}static get style(){return'@charset "UTF-8";mi-search{display:block;position:relative;}mi-search input[type=search]{border-radius:8px;background-color:#ffffff;padding-left:2.5rem;min-height:3rem;height:auto;font-size:1rem;padding-right:2.5rem;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;position:relative;background-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMS43MSAxMUgxMi41TDE3LjQ5IDE2TDE2IDE3LjQ5TDExIDEyLjVWMTEuNzFMMTAuNzMgMTEuNDNDOS41OSAxMi40MSA4LjExIDEzIDYuNSAxM0MyLjkxIDEzIDAgMTAuMDkgMCA2LjVDMCAyLjkxIDIuOTEgMCA2LjUgMEMxMC4wOSAwIDEzIDIuOTEgMTMgNi41QzEzIDguMTEgMTIuNDEgOS41OSAxMS40MyAxMC43M0wxMS43MSAxMVpNMiA2LjVDMiA4Ljk5IDQuMDEgMTEgNi41IDExQzguOTkgMTEgMTEgOC45OSAxMSA2LjVDMTEgNC4wMSA4Ljk5IDIgNi41IDJDNC4wMSAyIDIgNC4wMSAyIDYuNVoiIGZpbGw9IiM4RDk4QUEiLz4KPC9zdmc+Cg==");background-repeat:no-repeat;background-position:1rem center;background-size:1.125rem 1.125rem;border-color:#E6E6E6;color:var(--tailwind-colors-neutral-500);border:1px solid var(--tailwind-colors-gray-200)}mi-search input[type=search]:-moz-placeholder-shown{padding-right:0.875rem}mi-search input[type=search]:placeholder-shown{padding-right:0.875rem}mi-search input[type=search]:focus{border-color:#3b82f6;box-shadow:0 0 0 2px #cfe0fc;}mi-search input[type=search][disabled]{pointer-events:none}mi-search input::-webkit-search-cancel-button{-webkit-appearance:none}mi-search input::-ms-clear{display:none}mi-search input::-moz-search-clear-button{-moz-appearance:none}mi-search button{position:absolute;right:0.875rem;top:50%;transform:translateY(-50%);width:1.25rem;height:1.25rem;background-color:#6b7280;border-radius:50%;padding:0;border-width:0;display:flex;align-items:center;justify-content:center}mi-search button:focus{outline:0}mi-search button svg{fill:white;width:0.625rem;height:0.625rem}'}},[0,"mi-search",{placeholder:[1],idAttribute:[1,"id-attribute"],dataAttributes:[16],mapsindoors:[4],google:[4],mapbox:[4],language:[1],miFields:[1,"mi-fields"],miTake:[2,"mi-take"],miSkip:[2,"mi-skip"],miOrder:[1,"mi-order"],miCategories:[1,"mi-categories"],miNear:[1,"mi-near"],miVenue:[1,"mi-venue"],gmCountryCode:[1,"gm-country-code"],value:[1537],disabled:[4],sessionToken:[1,"session-token"],userPosition:[1,"user-position"],clear:[64],triggerSearch:[64],setDisplayText:[64],focusInput:[64],getInputField:[64]},void 0,{value:[{valueChange:0}]}]);(function(e,n,s,l){var h,m=arguments.length,_=m<3?n:l===null?l=Object.getOwnPropertyDescriptor(n,s):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(e,n,s,l);else for(var i=e.length-1;i>=0;i--)(h=e[i])&&(_=(m<3?h(_):m>3?h(n,s,_):h(n,s))||_);m>3&&_&&Object.defineProperty(n,s,_)})([uZ(500)],US.prototype,"inputChanged",null);const hZ=US,dZ=dr(class extends hr{constructor(e){super(),e!==!1&&this.__registerHost(),this.successfullySent=Er(this,"successfullySent",7),this.unsuccessfullySent=Er(this,"unsuccessfullySent",7),this.countryCode="1",this.phoneNumberInputPlaceholder="Enter phone number",this.submitButtonLabel="Send SMS",this.submitFormHandler=n=>{n.preventDefault();const s=!!(this.venueId&&this.originLocationId&&this.destinationLocationId);if(!this.formElement.checkValidity()||!s)return this.countryCodeInputElement.validity.valid||this.countryCodeInputElement.focus(),void(this.phoneNumberInputElement.validity.valid||this.phoneNumberInputElement.focus());mapsindoors.services.ShareService.directionsToPhone(this.venueId,this.originLocationId,this.destinationLocationId,this.countryCodeInputElement.value,this.phoneNumberInputElement.value).then((()=>this.successfullySent.emit())).catch((l=>this.unsuccessfullySent.emit(l)))}}componentDidRender(){this.countryCodeInputElement&&this.countryCode&&(this.countryCodeInputElement.value=this.countryCode)}componentDidLoad(){this.addIntersectionObserver()}addIntersectionObserver(){this.intersectionObserver=new IntersectionObserver((e=>{e[0].intersectionRatio<=0||(this.phoneNumberInputElement.focus(),this.intersectionObserver.disconnect())})),this.intersectionObserver.observe(this.phoneNumberInputElement)}setKeyboardInputElement(e){this.miKeyboardElement.inputElement=e.target}updateFormValidity(){this.submitButtonElement.disabled=!this.formElement.checkValidity()}render(){return ut("form",{key:"6b95e4a70dd312d48820f1ab7d097f5015fbcd82",onSubmit:this.submitFormHandler,ref:e=>this.formElement=e},ut("div",{key:"a1d9078dcf9edea773fff8437117fabd96cee74d",class:"inputs"},ut("span",{key:"79d9bc0cdee2f4a8d950f912ed384cb91fa9c651",class:"plus-sign"},"+"),ut("input",{key:"803a9d46a87d0984401995ba6c999dc6e349664a",id:"country-code",class:"country-code",pattern:"[0-9]{1,3}",required:!0,autocomplete:"off",type:"text",placeholder:this.countryCode,ref:e=>this.countryCodeInputElement=e,onInput:()=>this.updateFormValidity(),onFocus:e=>this.setKeyboardInputElement(e)}),ut("input",{key:"6b2276bafe173ceebbe3b4e878f5db6081d536fe",id:"phone-number",class:"phone-number",pattern:"[0-9]{6,10}",required:!0,autocomplete:"off",type:"text",placeholder:this.phoneNumberInputPlaceholder,ref:e=>this.phoneNumberInputElement=e,onInput:()=>this.updateFormValidity(),onFocus:e=>this.setKeyboardInputElement(e)})),ut("mi-keyboard",{key:"d6f440ff7123ce57e02a6831aa9907048b9b59fa",layout:"numeric",ref:e=>this.miKeyboardElement=e}),ut("div",{key:"d86ec402d9aa5c457d26b6ab26bdf292f088e3be",class:"flex justify-center"},ut("button",{key:"70b53db06f85c5e463b84189731e1d479b0cdf77",type:"submit",disabled:!0,class:"mi-button mi-button--primary",ref:e=>this.submitButtonElement=e},this.submitButtonLabel)))}static get style(){return'a.mi-button{cursor:default}.mi-button{border-radius:4px;border-width:1px;border-style:solid;font-family:Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:500;padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;display:inline-flex;align-items:center}.mi-button:disabled{opacity:0.48;cursor:not-allowed}.mi-button object{filter:invert(9%) sepia(13%) saturate(692%) hue-rotate(185deg) brightness(98%) contrast(91%);width:16px;height:16px}.mi-button--small{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;font-size:0.875rem;height:32px}.mi-button--small object{width:16px;height:16px}.mi-button--large{padding-left:16px;padding-right:16px;font-size:1.25rem}.mi-button--large object{width:20px;height:20px}.mi-button--full-width{width:100%;justify-content:center}.mi-button--icon-left{padding-left:12px}.mi-button--icon-left object{margin-right:8px}.mi-button--icon-right{padding-right:12px}.mi-button--icon-right object{margin-left:8px}.mi-button--icon-both{padding-top:12px;padding-bottom:12px}.mi-button--icon-both object:first-of-type{margin-right:8px}.mi-button--icon-both object:last-of-type{margin-left:8px}.mi-button--base{background:linear-gradient(#f5f7fa, #ebeff5);color:#1e2025;border-color:#c8d0e0}.mi-button--base:not(:disabled):hover{background:linear-gradient(#ebeff5, #dee3ed);border-color:#aeb9cb}.mi-button--base:not(:disabled):active{background:linear-gradient(#dee3ed, #ebeff5)}.mi-button--primary{color:#ffffff;border-color:#20693e;background:linear-gradient(#3ba064, #2a844e)}.mi-button--primary object{filter:invert(100%) sepia(93%) saturate(0%) hue-rotate(201deg) brightness(106%) contrast(106%)}.mi-button--primary:not(:disabled):hover{background:linear-gradient(#2a844e, #20693e)}.mi-button--primary:not(:disabled):active{background:linear-gradient(#20693e, #2a844e)}.mi-button--delete{background:linear-gradient(#f55151, #de1b1b);color:#ffffff;border-color:#ba0d0d}.mi-button--delete object{filter:invert(100%) sepia(93%) saturate(0%) hue-rotate(201deg) brightness(106%) contrast(106%)}.mi-button--delete:not(:disabled):hover{background:linear-gradient(#de1b1b, #ba0d0d)}.mi-button--delete:not(:disabled):active{background:linear-gradient(#ba0d0d, #de1b1b)}.mi-button--outline{color:#3071d9;border-color:#3071d9;background-color:transparent}.mi-button--outline object{filter:invert(38%) sepia(97%) saturate(742%) hue-rotate(188deg) brightness(86%) contrast(97%)}.mi-button--outline:not(:disabled):hover{color:#1d5bbf;border-color:#1d5bbf;background-color:#eef4fc}.mi-button--outline:not(:disabled):active{color:#1d5bbf;border-color:#1d5bbf;background-color:#cfe0fc}.mi-button--link{color:#3071d9;border-style:none;background-color:transparent;cursor:pointer}.mi-button--link object{filter:invert(38%) sepia(97%) saturate(742%) hue-rotate(188deg) brightness(86%) contrast(97%)}.mi-button--link:not(:disabled):hover{color:#1d5bbf;border-color:#1d5bbf;background-color:#eef4fc}.mi-button--link:disabled:hover{cursor:not-allowed}.mi-button--link:not(:disabled):active{color:#1d5bbf;border-color:#1d5bbf;background-color:#cfe0fc}.width-none{width:0}.width-xxx-small{width:2px}.width-xx-small{width:4px}.width-x-small{width:8px}.width-small{width:12px}.width-medium{width:16px}.width-large{width:24px}.width-x-large{width:32px}.width-xx-large{width:40px}.width-xxx-large{width:48px}.width-xxxx-large{width:64px}.min-width-none{min-width:0}.min-width-xxx-small{min-width:2px}.min-width-xx-small{min-width:4px}.min-width-x-small{min-width:8px}.min-width-small{min-width:12px}.min-width-medium{min-width:16px}.min-width-large{min-width:24px}.min-width-x-large{min-width:32px}.min-width-xx-large{min-width:40px}.min-width-xxx-large{min-width:48px}.min-width-xxxx-large{min-width:64px}.max-width-none{max-width:0}.max-width-xxx-small{max-width:2px}.max-width-xx-small{max-width:4px}.max-width-x-small{max-width:8px}.max-width-small{max-width:12px}.max-width-medium{max-width:16px}.max-width-large{max-width:24px}.max-width-x-large{max-width:32px}.max-width-xx-large{max-width:40px}.max-width-xxx-large{max-width:48px}.max-width-xxxx-large{max-width:64px}.height-none{height:0}.height-xxx-small{height:2px}.height-xx-small{height:4px}.height-x-small{height:8px}.height-small{height:12px}.height-medium{height:16px}.height-large{height:24px}.height-x-large{height:32px}.height-xx-large{height:40px}.height-xxx-large{height:48px}.height-xxxx-large{height:64px}.min-height-none{min-height:0}.min-height-xxx-small{min-height:2px}.min-height-xx-small{min-height:4px}.min-height-x-small{min-height:8px}.min-height-small{min-height:12px}.min-height-medium{min-height:16px}.min-height-large{min-height:24px}.min-height-x-large{min-height:32px}.min-height-xx-large{min-height:40px}.min-height-xxx-large{min-height:48px}.min-height-xxxx-large{min-height:64px}.max-height-none{max-height:0}.max-height-xxx-small{max-height:2px}.max-height-xx-small{max-height:4px}.max-height-x-small{max-height:8px}.max-height-small{max-height:12px}.max-height-medium{max-height:16px}.max-height-large{max-height:24px}.max-height-x-large{max-height:32px}.max-height-xx-large{max-height:40px}.max-height-xxx-large{max-height:48px}.max-height-xxxx-large{max-height:64px}.debug *{outline:1px solid gold}.flex{display:flex;flex:1}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.display-block{display:block}.display-inline-block{display:inline-block}.display-inline{display:inline}.display-none{display:none}.text-decoration-none{text-decoration:none}.text-right{text-align:right}.text-left{text-align:left}.text-center{text-align:center}.margin-auto{margin-left:auto;margin-right:auto}form .inputs{margin:0 auto;width:80%;padding-top:32px;padding-bottom:32px;position:relative;display:flex;flex-direction:row;align-items:center}form .inputs span.plus-sign{position:absolute;left:16px;display:block;font-size:1rem;font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#1c1917;top:50%;transform:translateY(-50%)}form .inputs input{padding-left:12px;padding-right:12px;background-color:#ffffff;border-style:solid;border-width:1px;border-radius:8px;height:48px;font-size:1.25rem;font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#1c1917;box-sizing:border-box}form .inputs input:focus{border-color:#3b82f6;box-shadow:0 0 0 2px #dbeafe}form .inputs input.country-code{width:15%;min-width:88px;margin-right:16px;padding-left:32px}form .inputs input.phone-number{width:85%}form button{margin-top:32px;margin-bottom:24px}'}},[0,"mi-share-sms",{venueId:[1,"venue"],originLocationId:[1,"origin"],destinationLocationId:[1,"destination"],countryCode:[1,"country-code"],phoneNumberInputPlaceholder:[1,"input-placeholder"],submitButtonLabel:[1,"submit-button-label"]}]),fZ=dZ,pZ=U$,gZ=dr(class extends hr{constructor(e){super(),e!==!1&&this.__registerHost(),this.__attachShadow(),this.stepIndexChanged=Er(this,"stepIndexChanged",7),this.steps=[],this.stepIndex=0}setStepIndex(e){this.stepIndex=e,this.stepIndexChanged.emit(this.stepIndex)}render(){return ut(ko,{key:"1e395bce6f748cccf4dbbfd779698021b053898d"},ut("button",{key:"b519a479608fdb32b3093a7afb1594a1ef07a0d6",type:"button",disabled:this.steps.length===0||this.stepIndex===0,onClick:()=>this.setStepIndex(this.stepIndex-1)},ut("svg",{key:"f76750f1dee589871fdb3ec6cb0b9997899d17f5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24px",height:"24px"},ut("path",{key:"1f00900037a228cde36ff1162ccbceadd2fac043",d:"M0 0h24v24H0V0z",fill:"none"}),ut("path",{key:"06bb8082e8c1847ac8c6189f98b938ffb4e68434",d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}))),ut("div",{key:"96dffdb02ac846d3d3c077464b112a9c6fc18038",class:"steps"},this.heading?ut("p",{part:"heading"},this.heading):null,ut("div",{key:"6dc56a58ca81214d85c32775b59874ecaf77afdd",class:"steps__dots"},this.steps.map(((e,n)=>{const s=this.stepIndex===n;return ut("span",{part:s?"active-dot":"dot",class:{active:s}})})))),ut("button",{key:"5c8a8344ee80fd9a9405bfe9951b23b2fa56ac58",type:"button",disabled:this.steps.length===0||this.stepIndex===this.steps.length-1,onClick:()=>this.setStepIndex(this.stepIndex+1)},ut("svg",{key:"86d476332a460a49beb2791578c3d4d71890b94c",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24px",height:"24px"},ut("path",{key:"c2d9e3b32289adb5990736677bb756a89546adeb",d:"M0 0h24v24H0V0z",fill:"none"}),ut("path",{key:"8bbdf7b1b80e768a538df7b2e3cf5bd7ac5acb68",d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}))))}static get style(){return":host{display:flex}button{padding:16px;background-color:transparent;border:none}button:disabled svg{fill:#d1d5db}button svg{fill:#1f2937}div.steps{padding-top:12px;padding-bottom:12px;padding-left:4px;padding-right:4px;display:flex;flex-grow:1;flex-direction:column;vertical-align:center;justify-content:center}div.steps p{margin:0;padding-bottom:8px;color:#1c1917;font-size:1rem;font-weight:500;line-height:1.25rem;text-align:center}div.steps__dots{display:flex;justify-content:center}div.steps__dots span{width:8px;height:8px;margin-right:8px;float:left;background-color:#d1d5db;border-radius:50%}div.steps__dots span.active{background-color:#1f2937}div.steps__dots span:last-child{margin-right:0px}"}},[1,"mi-step-switcher",{heading:[1],steps:[16],stepIndex:[514,"step-index"]}]),mZ=gZ,yZ=dr(class extends hr{constructor(e){super(),e!==!1&&this.__registerHost(),this.__attachShadow()}render(){}},[1,"mi-tab",{label:[1],tabFor:[1,"tab-for"]}]),_Z=yZ,vZ=dr(class extends hr{constructor(e){super(),e!==!1&&this.__registerHost(),this.__attachShadow(),this.isActive=!1}async active(e){return e!==void 0&&(this.isActive=!!e),this.isActive}render(){return ut("div",{key:"5ab9e40be53f24513cf2864e1cdc9ac78c73bc8a",class:{active:this.isActive}},ut("slot",{key:"a845f4a8d286200a463309cb8de2362cdc4065d2"}))}static get style(){return'div{display:none}div.active{font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";flex-shrink:0;flex-grow:1;display:block}'}},[257,"mi-tab-panel",{isActive:[32],active:[64]}]),xZ=vZ,bZ=dr(class extends hr{constructor(e){super(),e!==!1&&this.__registerHost(),this.__attachShadow(),this.active=0,this.bordered=!1}connectedCallback(){new MutationObserver(this.componentWillRender.bind(this)).observe(this.el,{childList:!0})}componentWillRender(){const e=this.el.querySelectorAll("mi-tab");this.tabs=Array.from(e).reduce(((n,s)=>{const l=Array.from(this.el.getElementsByTagName("mi-tab-panel")).find((h=>h.id===s.tabFor));return l&&n.push({label:s.label,content:l}),n}),[])}componentDidRender(){this.selectTab(this.active)}async selectTab(e){await this.tabs[e].content.active()||(this.active=e,this.tabs.forEach(((n,s)=>n.content.active(s===e))))}render(){return ut(ko,{key:"cfda4988c7be231b136bb7e2e29f57e5f69bc31d"},ut("nav",{key:"5f4682c587caaba179dbf186af270d69c3f5e739",class:"nav "+(this.bordered===!0?"nav--borderless-bottom":"")},ut("ul",{key:"828e348d49f83a96cd36dd08690bc8eb990c9329"},this.tabs.map(((e,n)=>ut("li",{class:this.active===n?"active":"",onClick:()=>{this.selectTab(n)}}," ",e.label," "))))),ut("section",{key:"c9b6a595f575534ec720331401bc620c9b06125e",class:"content "+(this.bordered===!0?"content--bordered":"")},ut("slot",{key:"e52795c27ad173b657b003016a9fa378641abe35"})))}get el(){return this}static get style(){return':host{font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";flex-shrink:0;flex-grow:1}:host .nav{border:none;border-bottom:solid;border-color:#d1d5db;border-width:1px;padding-left:24px}:host .nav--borderless-bottom{border-bottom:0}:host .nav ul{display:flex;flex-direction:row;padding:0;margin:0;margin-bottom:-1px}:host .nav ul li{list-style:none;text-align:center;cursor:pointer;padding:16px;border-width:1px;border-style:solid;border-color:rgba(0, 0, 0, 0)}:host .nav ul li.active{background-color:#f9fafb;border-color:#d1d5db;border-width:1px;border-style:solid;border-bottom:none;border-top-left-radius:4px;border-top-right-radius:4px;font-weight:600}:host .content{display:block;padding:16px;background-color:#f9fafb}:host .content--bordered{border-width:1px;border-color:#d1d5db;border-style:solid;border-radius:4px}'}},[257,"mi-tabs",{active:[2],bordered:[4],tabs:[32]}]),wZ=bZ,MZ=q$,VS=e=>{typeof customElements<"u"&&[IY,TY,CY,SY,NY,RY,BY,HY,YY,$Y,ZY,oG,lG,uG,fG,E$,N$,j$,F$,H$,G$,Z$,J$,tZ,nZ,iZ,oZ,aZ,lZ,cZ,hZ,fZ,pZ,mZ,_Z,xZ,wZ,MZ].forEach((n=>{customElements.get(n.is)||customElements.define(n.is,n,e)}))},IZ={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,n){console&&console[e]&&console[e].apply(console,n)}};class zy{constructor(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(n,s)}init(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=s.prefix||"i18next:",this.logger=n||IZ,this.options=s,this.debug=s.debug}log(){for(var n=arguments.length,s=new Array(n),l=0;l<n;l++)s[l]=arguments[l];return this.forward(s,"log","",!0)}warn(){for(var n=arguments.length,s=new Array(n),l=0;l<n;l++)s[l]=arguments[l];return this.forward(s,"warn","",!0)}error(){for(var n=arguments.length,s=new Array(n),l=0;l<n;l++)s[l]=arguments[l];return this.forward(s,"error","")}deprecate(){for(var n=arguments.length,s=new Array(n),l=0;l<n;l++)s[l]=arguments[l];return this.forward(s,"warn","WARNING DEPRECATED: ",!0)}forward(n,s,l,h){return h&&!this.debug?null:(typeof n[0]=="string"&&(n[0]=`${l}${this.prefix} ${n[0]}`),this.logger[s](n))}create(n){return new zy(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new zy(this.logger,n)}}var gl=new zy;class Oy{constructor(){this.observers={}}on(n,s){return n.split(" ").forEach(l=>{this.observers[l]=this.observers[l]||[],this.observers[l].push(s)}),this}off(n,s){if(this.observers[n]){if(!s){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(l=>l!==s)}}emit(n){for(var s=arguments.length,l=new Array(s>1?s-1:0),h=1;h<s;h++)l[h-1]=arguments[h];this.observers[n]&&[].concat(this.observers[n]).forEach(_=>{_(...l)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(_=>{_.apply(_,[n,...l])})}}function Kp(){let e,n;const s=new Promise((l,h)=>{e=l,n=h});return s.resolve=e,s.reject=n,s}function HS(e){return e==null?"":""+e}function TZ(e,n,s){e.forEach(l=>{n[l]&&(s[l]=n[l])})}function AM(e,n,s){function l(_){return _&&_.indexOf("###")>-1?_.replace(/###/g,"."):_}function h(){return!e||typeof e=="string"}const m=typeof n!="string"?[].concat(n):n.split(".");for(;m.length>1;){if(h())return{};const _=l(m.shift());!e[_]&&s&&(e[_]=new s),Object.prototype.hasOwnProperty.call(e,_)?e=e[_]:e={}}return h()?{}:{obj:e,k:l(m.shift())}}function QS(e,n,s){const{obj:l,k:h}=AM(e,n,Object);l[h]=s}function AZ(e,n,s,l){const{obj:h,k:m}=AM(e,n,Object);h[m]=h[m]||[],h[m].push(s)}function jy(e,n){const{obj:s,k:l}=AM(e,n);if(s)return s[l]}function CZ(e,n,s){const l=jy(e,s);return l!==void 0?l:jy(n,s)}function YS(e,n,s){for(const l in n)l!=="__proto__"&&l!=="constructor"&&(l in e?typeof e[l]=="string"||e[l]instanceof String||typeof n[l]=="string"||n[l]instanceof String?s&&(e[l]=n[l]):YS(e[l],n[l],s):e[l]=n[l]);return e}function yd(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var DZ={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function SZ(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,n=>DZ[n]):e}const EZ=[" ",",","?","!",";"];function NZ(e,n,s){n=n||"",s=s||"";const l=EZ.filter(_=>n.indexOf(_)<0&&s.indexOf(_)<0);if(l.length===0)return!0;const h=new RegExp(`(${l.map(_=>_==="?"?"\\?":_).join("|")})`);let m=!h.test(e);if(!m){const _=e.indexOf(s);_>0&&!h.test(e.substring(0,_))&&(m=!0)}return m}function Py(e,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[n])return e[n];const l=n.split(s);let h=e;for(let m=0;m<l.length;++m){if(!h||typeof h[l[m]]=="string"&&m+1<l.length)return;if(h[l[m]]===void 0){let _=2,i=l.slice(m,m+_).join(s),I=h[i];for(;I===void 0&&l.length>m+_;)_++,i=l.slice(m,m+_).join(s),I=h[i];if(I===void 0)return;if(I===null)return null;if(n.endsWith(i)){if(typeof I=="string")return I;if(i&&typeof I[i]=="string")return I[i]}const C=l.slice(m+_).join(s);return C?Py(I,C,s):void 0}h=h[l[m]]}return h}function Ry(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class GS extends Oy{constructor(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=n||{},this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}removeNamespaces(n){const s=this.options.ns.indexOf(n);s>-1&&this.options.ns.splice(s,1)}getResource(n,s,l){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const m=h.keySeparator!==void 0?h.keySeparator:this.options.keySeparator,_=h.ignoreJSONStructure!==void 0?h.ignoreJSONStructure:this.options.ignoreJSONStructure;let i=[n,s];l&&typeof l!="string"&&(i=i.concat(l)),l&&typeof l=="string"&&(i=i.concat(m?l.split(m):l)),n.indexOf(".")>-1&&(i=n.split("."));const I=jy(this.data,i);return I||!_||typeof l!="string"?I:Py(this.data&&this.data[n]&&this.data[n][s],l,m)}addResource(n,s,l,h){let m=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const _=m.keySeparator!==void 0?m.keySeparator:this.options.keySeparator;let i=[n,s];l&&(i=i.concat(_?l.split(_):l)),n.indexOf(".")>-1&&(i=n.split("."),h=s,s=i[1]),this.addNamespaces(s),QS(this.data,i,h),m.silent||this.emit("added",n,s,l,h)}addResources(n,s,l){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const m in l)(typeof l[m]=="string"||Object.prototype.toString.apply(l[m])==="[object Array]")&&this.addResource(n,s,m,l[m],{silent:!0});h.silent||this.emit("added",n,s,l)}addResourceBundle(n,s,l,h,m){let _=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},i=[n,s];n.indexOf(".")>-1&&(i=n.split("."),h=l,l=s,s=i[1]),this.addNamespaces(s);let I=jy(this.data,i)||{};h?YS(I,l,m):I={...I,...l},QS(this.data,i,I),_.silent||this.emit("added",n,s,l)}removeResourceBundle(n,s){this.hasResourceBundle(n,s)&&delete this.data[n][s],this.removeNamespaces(s),this.emit("removed",n,s)}hasResourceBundle(n,s){return this.getResource(n,s)!==void 0}getResourceBundle(n,s){return s||(s=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(n,s)}:this.getResource(n,s)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const s=this.getDataByLanguage(n);return!!(s&&Object.keys(s)||[]).find(h=>s[h]&&Object.keys(s[h]).length>0)}toJSON(){return this.data}}var $S={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,n,s,l,h){return e.forEach(m=>{this.processors[m]&&(n=this.processors[m].process(n,s,l,h))}),n}};const ZS={};class By extends Oy{constructor(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),TZ(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=gl.create("translator")}changeLanguage(n){n&&(this.language=n)}exists(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(n==null)return!1;const l=this.resolve(n,s);return l&&l.res!==void 0}extractFromKey(n,s){let l=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const h=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let m=s.ns||this.options.defaultNS||[];const _=l&&n.indexOf(l)>-1,i=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!NZ(n,l,h);if(_&&!i){const I=n.match(this.interpolator.nestingRegexp);if(I&&I.length>0)return{key:n,namespaces:m};const C=n.split(l);(l!==h||l===h&&this.options.ns.indexOf(C[0])>-1)&&(m=C.shift()),n=C.join(h)}return typeof m=="string"&&(m=[m]),{key:n,namespaces:m}}translate(n,s,l){if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),n==null)return"";Array.isArray(n)||(n=[String(n)]);const h=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,m=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:_,namespaces:i}=this.extractFromKey(n[n.length-1],s),I=i[i.length-1],C=s.lng||this.language,S=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(C&&C.toLowerCase()==="cimode"){if(S){const ue=s.nsSeparator||this.options.nsSeparator;return h?{res:`${I}${ue}${_}`,usedKey:_,exactUsedKey:_,usedLng:C,usedNS:I,usedParams:this.getUsedParamsDetails(s)}:`${I}${ue}${_}`}return h?{res:_,usedKey:_,exactUsedKey:_,usedLng:C,usedNS:I,usedParams:this.getUsedParamsDetails(s)}:_}const L=this.resolve(n,s);let R=L&&L.res;const U=L&&L.usedKey||_,W=L&&L.exactUsedKey||_,le=Object.prototype.toString.apply(R),pe=["[object Number]","[object Function]","[object RegExp]"],ie=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,Y=!this.i18nFormat||this.i18nFormat.handleAsObject;if(Y&&R&&(typeof R!="string"&&typeof R!="boolean"&&typeof R!="number")&&pe.indexOf(le)<0&&!(typeof ie=="string"&&le==="[object Array]")){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ue=this.options.returnedObjectHandler?this.options.returnedObjectHandler(U,R,{...s,ns:i}):`key '${_} (${this.language})' returned an object instead of string.`;return h?(L.res=ue,L.usedParams=this.getUsedParamsDetails(s),L):ue}if(m){const ue=le==="[object Array]",me=ue?[]:{},ne=ue?W:U;for(const De in R)if(Object.prototype.hasOwnProperty.call(R,De)){const Me=`${ne}${m}${De}`;me[De]=this.translate(Me,{...s,joinArrays:!1,ns:i}),me[De]===Me&&(me[De]=R[De])}R=me}}else if(Y&&typeof ie=="string"&&le==="[object Array]")R=R.join(ie),R&&(R=this.extendTranslation(R,n,s,l));else{let ue=!1,me=!1;const ne=s.count!==void 0&&typeof s.count!="string",De=By.hasDefaultValue(s),Me=ne?this.pluralResolver.getSuffix(C,s.count,s):"",Ee=s.ordinal&&ne?this.pluralResolver.getSuffix(C,s.count,{ordinal:!1}):"",ge=s[`defaultValue${Me}`]||s[`defaultValue${Ee}`]||s.defaultValue;!this.isValidLookup(R)&&De&&(ue=!0,R=ge),this.isValidLookup(R)||(me=!0,R=_);const Oe=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&me?void 0:R,Ne=De&&ge!==R&&this.options.updateMissing;if(me||ue||Ne){if(this.logger.log(Ne?"updateKey":"missingKey",C,I,_,Ne?ge:R),m){const re=this.resolve(_,{...s,keySeparator:!1});re&&re.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let tt=[];const dt=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&dt&&dt[0])for(let re=0;re<dt.length;re++)tt.push(dt[re]);else this.options.saveMissingTo==="all"?tt=this.languageUtils.toResolveHierarchy(s.lng||this.language):tt.push(s.lng||this.language);const Nt=(re,_e,D)=>{const P=De&&D!==R?D:Oe;this.options.missingKeyHandler?this.options.missingKeyHandler(re,I,_e,P,Ne,s):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(re,I,_e,P,Ne,s),this.emit("missingKey",re,I,_e,R)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ne?tt.forEach(re=>{this.pluralResolver.getSuffixes(re,s).forEach(_e=>{Nt([re],_+_e,s[`defaultValue${_e}`]||ge)})}):Nt(tt,_,ge))}R=this.extendTranslation(R,n,s,L,l),me&&R===_&&this.options.appendNamespaceToMissingKey&&(R=`${I}:${_}`),(me||ue)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?R=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${I}:${_}`:_,ue?R:void 0):R=this.options.parseMissingKeyHandler(R))}return h?(L.res=R,L.usedParams=this.getUsedParamsDetails(s),L):R}extendTranslation(n,s,l,h,m){var _=this;if(this.i18nFormat&&this.i18nFormat.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...l},l.lng||this.language||h.usedLng,h.usedNS,h.usedKey,{resolved:h});else if(!l.skipInterpolation){l.interpolation&&this.interpolator.init({...l,interpolation:{...this.options.interpolation,...l.interpolation}});const C=typeof n=="string"&&(l&&l.interpolation&&l.interpolation.skipOnVariables!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let S;if(C){const R=n.match(this.interpolator.nestingRegexp);S=R&&R.length}let L=l.replace&&typeof l.replace!="string"?l.replace:l;if(this.options.interpolation.defaultVariables&&(L={...this.options.interpolation.defaultVariables,...L}),n=this.interpolator.interpolate(n,L,l.lng||this.language,l),C){const R=n.match(this.interpolator.nestingRegexp),U=R&&R.length;S<U&&(l.nest=!1)}!l.lng&&this.options.compatibilityAPI!=="v1"&&h&&h.res&&(l.lng=h.usedLng),l.nest!==!1&&(n=this.interpolator.nest(n,function(){for(var R=arguments.length,U=new Array(R),W=0;W<R;W++)U[W]=arguments[W];return m&&m[0]===U[0]&&!l.context?(_.logger.warn(`It seems you are nesting recursively key: ${U[0]} in key: ${s[0]}`),null):_.translate(...U,s)},l)),l.interpolation&&this.interpolator.reset()}const i=l.postProcess||this.options.postProcess,I=typeof i=="string"?[i]:i;return n!=null&&I&&I.length&&l.applyPostProcessor!==!1&&(n=$S.handle(I,n,s,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...h,usedParams:this.getUsedParamsDetails(l)},...l}:l,this)),n}resolve(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,h,m,_,i;return typeof n=="string"&&(n=[n]),n.forEach(I=>{if(this.isValidLookup(l))return;const C=this.extractFromKey(I,s),S=C.key;h=S;let L=C.namespaces;this.options.fallbackNS&&(L=L.concat(this.options.fallbackNS));const R=s.count!==void 0&&typeof s.count!="string",U=R&&!s.ordinal&&s.count===0&&this.pluralResolver.shouldUseIntlApi(),W=s.context!==void 0&&(typeof s.context=="string"||typeof s.context=="number")&&s.context!=="",le=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);L.forEach(pe=>{this.isValidLookup(l)||(i=pe,!ZS[`${le[0]}-${pe}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(ZS[`${le[0]}-${pe}`]=!0,this.logger.warn(`key "${h}" for languages "${le.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),le.forEach(ie=>{if(this.isValidLookup(l))return;_=ie;const Y=[S];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(Y,S,ie,pe,s);else{let ue;R&&(ue=this.pluralResolver.getSuffix(ie,s.count,s));const me=`${this.options.pluralSeparator}zero`,ne=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(R&&(Y.push(S+ue),s.ordinal&&ue.indexOf(ne)===0&&Y.push(S+ue.replace(ne,this.options.pluralSeparator)),U&&Y.push(S+me)),W){const De=`${S}${this.options.contextSeparator}${s.context}`;Y.push(De),R&&(Y.push(De+ue),s.ordinal&&ue.indexOf(ne)===0&&Y.push(De+ue.replace(ne,this.options.pluralSeparator)),U&&Y.push(De+me))}}let q;for(;q=Y.pop();)this.isValidLookup(l)||(m=q,l=this.getResource(ie,pe,q,s))}))})}),{res:l,usedKey:h,exactUsedKey:m,usedLng:_,usedNS:i}}isValidLookup(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}getResource(n,s,l){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(n,s,l,h):this.resourceStore.getResource(n,s,l,h)}getUsedParamsDetails(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],l=n.replace&&typeof n.replace!="string";let h=l?n.replace:n;if(l&&typeof n.count<"u"&&(h.count=n.count),this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),!l){h={...h};for(const m of s)delete h[m]}return h}static hasDefaultValue(n){const s="defaultValue";for(const l in n)if(Object.prototype.hasOwnProperty.call(n,l)&&s===l.substring(0,s.length)&&n[l]!==void 0)return!0;return!1}}function CM(e){return e.charAt(0).toUpperCase()+e.slice(1)}class WS{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=gl.create("languageUtils")}getScriptPartFromCode(n){if(n=Ry(n),!n||n.indexOf("-")<0)return null;const s=n.split("-");return s.length===2||(s.pop(),s[s.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(s.join("-"))}getLanguagePartFromCode(n){if(n=Ry(n),!n||n.indexOf("-")<0)return n;const s=n.split("-");return this.formatLanguageCode(s[0])}formatLanguageCode(n){if(typeof n=="string"&&n.indexOf("-")>-1){const s=["hans","hant","latn","cyrl","cans","mong","arab"];let l=n.split("-");return this.options.lowerCaseLng?l=l.map(h=>h.toLowerCase()):l.length===2?(l[0]=l[0].toLowerCase(),l[1]=l[1].toUpperCase(),s.indexOf(l[1].toLowerCase())>-1&&(l[1]=CM(l[1].toLowerCase()))):l.length===3&&(l[0]=l[0].toLowerCase(),l[1].length===2&&(l[1]=l[1].toUpperCase()),l[0]!=="sgn"&&l[2].length===2&&(l[2]=l[2].toUpperCase()),s.indexOf(l[1].toLowerCase())>-1&&(l[1]=CM(l[1].toLowerCase())),s.indexOf(l[2].toLowerCase())>-1&&(l[2]=CM(l[2].toLowerCase()))),l.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}getBestMatchFromCodes(n){if(!n)return null;let s;return n.forEach(l=>{if(s)return;const h=this.formatLanguageCode(l);(!this.options.supportedLngs||this.isSupportedCode(h))&&(s=h)}),!s&&this.options.supportedLngs&&n.forEach(l=>{if(s)return;const h=this.getLanguagePartFromCode(l);if(this.isSupportedCode(h))return s=h;s=this.options.supportedLngs.find(m=>{if(m===h)return m;if(!(m.indexOf("-")<0&&h.indexOf("-")<0)&&m.indexOf(h)===0)return m})}),s||(s=this.getFallbackCodes(this.options.fallbackLng)[0]),s}getFallbackCodes(n,s){if(!n)return[];if(typeof n=="function"&&(n=n(s)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!s)return n.default||[];let l=n[s];return l||(l=n[this.getScriptPartFromCode(s)]),l||(l=n[this.formatLanguageCode(s)]),l||(l=n[this.getLanguagePartFromCode(s)]),l||(l=n.default),l||[]}toResolveHierarchy(n,s){const l=this.getFallbackCodes(s||this.options.fallbackLng||[],n),h=[],m=_=>{_&&(this.isSupportedCode(_)?h.push(_):this.logger.warn(`rejecting language code not found in supportedLngs: ${_}`))};return typeof n=="string"&&(n.indexOf("-")>-1||n.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&m(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&m(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&m(this.getLanguagePartFromCode(n))):typeof n=="string"&&m(this.formatLanguageCode(n)),l.forEach(_=>{h.indexOf(_)<0&&m(this.formatLanguageCode(_))}),h}}let LZ=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],kZ={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const zZ=["v1","v2","v3"],OZ=["v4"],qS={zero:0,one:1,two:2,few:3,many:4,other:5};function jZ(){const e={};return LZ.forEach(n=>{n.lngs.forEach(s=>{e[s]={numbers:n.nr,plurals:kZ[n.fc]}})}),e}class PZ{constructor(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=n,this.options=s,this.logger=gl.create("pluralResolver"),(!this.options.compatibilityJSON||OZ.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=jZ()}addRule(n,s){this.rules[n]=s}getRule(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Ry(n),{type:s.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}needsPlural(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const l=this.getRule(n,s);return this.shouldUseIntlApi()?l&&l.resolvedOptions().pluralCategories.length>1:l&&l.numbers.length>1}getPluralFormsOfKey(n,s){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,l).map(h=>`${s}${h}`)}getSuffixes(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const l=this.getRule(n,s);return l?this.shouldUseIntlApi()?l.resolvedOptions().pluralCategories.sort((h,m)=>qS[h]-qS[m]).map(h=>`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${h}`):l.numbers.map(h=>this.getSuffix(n,h,s)):[]}getSuffix(n,s){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const h=this.getRule(n,l);return h?this.shouldUseIntlApi()?`${this.options.prepend}${l.ordinal?`ordinal${this.options.prepend}`:""}${h.select(s)}`:this.getSuffixRetroCompatible(h,s):(this.logger.warn(`no plural rule found for: ${n}`),"")}getSuffixRetroCompatible(n,s){const l=n.noAbs?n.plurals(s):n.plurals(Math.abs(s));let h=n.numbers[l];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(h===2?h="plural":h===1&&(h=""));const m=()=>this.options.prepend&&h.toString()?this.options.prepend+h.toString():h.toString();return this.options.compatibilityJSON==="v1"?h===1?"":typeof h=="number"?`_plural_${h.toString()}`:m():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?m():this.options.prepend&&l.toString()?this.options.prepend+l.toString():l.toString()}shouldUseIntlApi(){return!zZ.includes(this.options.compatibilityJSON)}}function KS(e,n,s){let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,m=CZ(e,n,s);return!m&&h&&typeof s=="string"&&(m=Py(e,s,l),m===void 0&&(m=Py(n,s,l))),m}class RZ{constructor(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=gl.create("interpolator"),this.options=n,this.format=n.interpolation&&n.interpolation.format||(s=>s),this.init(n)}init(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});const s=n.interpolation;this.escape=s.escape!==void 0?s.escape:SZ,this.escapeValue=s.escapeValue!==void 0?s.escapeValue:!0,this.useRawValueToEscape=s.useRawValueToEscape!==void 0?s.useRawValueToEscape:!1,this.prefix=s.prefix?yd(s.prefix):s.prefixEscaped||"{{",this.suffix=s.suffix?yd(s.suffix):s.suffixEscaped||"}}",this.formatSeparator=s.formatSeparator?s.formatSeparator:s.formatSeparator||",",this.unescapePrefix=s.unescapeSuffix?"":s.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":s.unescapeSuffix||"",this.nestingPrefix=s.nestingPrefix?yd(s.nestingPrefix):s.nestingPrefixEscaped||yd("$t("),this.nestingSuffix=s.nestingSuffix?yd(s.nestingSuffix):s.nestingSuffixEscaped||yd(")"),this.nestingOptionsSeparator=s.nestingOptionsSeparator?s.nestingOptionsSeparator:s.nestingOptionsSeparator||",",this.maxReplaces=s.maxReplaces?s.maxReplaces:1e3,this.alwaysFormat=s.alwaysFormat!==void 0?s.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(n,"g");const s=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(s,"g");const l=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(l,"g")}interpolate(n,s,l,h){let m,_,i;const I=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function C(W){return W.replace(/\$/g,"$$$$")}const S=W=>{if(W.indexOf(this.formatSeparator)<0){const Y=KS(s,I,W,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(Y,void 0,l,{...h,...s,interpolationkey:W}):Y}const le=W.split(this.formatSeparator),pe=le.shift().trim(),ie=le.join(this.formatSeparator).trim();return this.format(KS(s,I,pe,this.options.keySeparator,this.options.ignoreJSONStructure),ie,l,{...h,...s,interpolationkey:pe})};this.resetRegExp();const L=h&&h.missingInterpolationHandler||this.options.missingInterpolationHandler,R=h&&h.interpolation&&h.interpolation.skipOnVariables!==void 0?h.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:W=>C(W)},{regex:this.regexp,safeValue:W=>this.escapeValue?C(this.escape(W)):C(W)}].forEach(W=>{for(i=0;m=W.regex.exec(n);){const le=m[1].trim();if(_=S(le),_===void 0)if(typeof L=="function"){const ie=L(n,m,h);_=typeof ie=="string"?ie:""}else if(h&&Object.prototype.hasOwnProperty.call(h,le))_="";else if(R){_=m[0];continue}else this.logger.warn(`missed to pass in variable ${le} for interpolating ${n}`),_="";else typeof _!="string"&&!this.useRawValueToEscape&&(_=HS(_));const pe=W.safeValue(_);if(n=n.replace(m[0],pe),R?(W.regex.lastIndex+=_.length,W.regex.lastIndex-=m[0].length):W.regex.lastIndex=0,i++,i>=this.maxReplaces)break}}),n}nest(n,s){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h,m,_;function i(I,C){const S=this.nestingOptionsSeparator;if(I.indexOf(S)<0)return I;const L=I.split(new RegExp(`${S}[ ]*{`));let R=`{${L[1]}`;I=L[0],R=this.interpolate(R,_);const U=R.match(/'/g),W=R.match(/"/g);(U&&U.length%2===0&&!W||W.length%2!==0)&&(R=R.replace(/'/g,'"'));try{_=JSON.parse(R),C&&(_={...C,..._})}catch(le){return this.logger.warn(`failed parsing options string in nesting for key ${I}`,le),`${I}${S}${R}`}return delete _.defaultValue,I}for(;h=this.nestingRegexp.exec(n);){let I=[];_={...l},_=_.replace&&typeof _.replace!="string"?_.replace:_,_.applyPostProcessor=!1,delete _.defaultValue;let C=!1;if(h[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(h[1])){const S=h[1].split(this.formatSeparator).map(L=>L.trim());h[1]=S.shift(),I=S,C=!0}if(m=s(i.call(this,h[1].trim(),_),_),m&&h[0]===n&&typeof m!="string")return m;typeof m!="string"&&(m=HS(m)),m||(this.logger.warn(`missed to resolve ${h[1]} for nesting ${n}`),m=""),C&&(m=I.reduce((S,L)=>this.format(S,L,l.lng,{...l,interpolationkey:h[1].trim()}),m.trim())),n=n.replace(h[0],m),this.regexp.lastIndex=0}return n}}function BZ(e){let n=e.toLowerCase().trim();const s={};if(e.indexOf("(")>-1){const l=e.split("(");n=l[0].toLowerCase().trim();const h=l[1].substring(0,l[1].length-1);n==="currency"&&h.indexOf(":")<0?s.currency||(s.currency=h.trim()):n==="relativetime"&&h.indexOf(":")<0?s.range||(s.range=h.trim()):h.split(";").forEach(_=>{if(!_)return;const[i,...I]=_.split(":"),C=I.join(":").trim().replace(/^'+|'+$/g,"");s[i.trim()]||(s[i.trim()]=C),C==="false"&&(s[i.trim()]=!1),C==="true"&&(s[i.trim()]=!0),isNaN(C)||(s[i.trim()]=parseInt(C,10))})}return{formatName:n,formatOptions:s}}function _d(e){const n={};return function(l,h,m){const _=h+JSON.stringify(m);let i=n[_];return i||(i=e(Ry(h),m),n[_]=i),i(l)}}class FZ{constructor(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=gl.create("formatter"),this.options=n,this.formats={number:_d((s,l)=>{const h=new Intl.NumberFormat(s,{...l});return m=>h.format(m)}),currency:_d((s,l)=>{const h=new Intl.NumberFormat(s,{...l,style:"currency"});return m=>h.format(m)}),datetime:_d((s,l)=>{const h=new Intl.DateTimeFormat(s,{...l});return m=>h.format(m)}),relativetime:_d((s,l)=>{const h=new Intl.RelativeTimeFormat(s,{...l});return m=>h.format(m,l.range||"day")}),list:_d((s,l)=>{const h=new Intl.ListFormat(s,{...l});return m=>h.format(m)})},this.init(n)}init(n){const l=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=l.formatSeparator?l.formatSeparator:l.formatSeparator||","}add(n,s){this.formats[n.toLowerCase().trim()]=s}addCached(n,s){this.formats[n.toLowerCase().trim()]=_d(s)}format(n,s,l){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return s.split(this.formatSeparator).reduce((i,I)=>{const{formatName:C,formatOptions:S}=BZ(I);if(this.formats[C]){let L=i;try{const R=h&&h.formatParams&&h.formatParams[h.interpolationkey]||{},U=R.locale||R.lng||h.locale||h.lng||l;L=this.formats[C](i,U,{...S,...h,...R})}catch(R){this.logger.warn(R)}return L}else this.logger.warn(`there was no format function for ${C}`);return i},n)}}function UZ(e,n){e.pending[n]!==void 0&&(delete e.pending[n],e.pendingCount--)}class VZ extends Oy{constructor(n,s,l){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=n,this.store=s,this.services=l,this.languageUtils=l.languageUtils,this.options=h,this.logger=gl.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=h.maxParallelReads||10,this.readingCalls=0,this.maxRetries=h.maxRetries>=0?h.maxRetries:5,this.retryTimeout=h.retryTimeout>=1?h.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(l,h.backend,h)}queueLoad(n,s,l,h){const m={},_={},i={},I={};return n.forEach(C=>{let S=!0;s.forEach(L=>{const R=`${C}|${L}`;!l.reload&&this.store.hasResourceBundle(C,L)?this.state[R]=2:this.state[R]<0||(this.state[R]===1?_[R]===void 0&&(_[R]=!0):(this.state[R]=1,S=!1,_[R]===void 0&&(_[R]=!0),m[R]===void 0&&(m[R]=!0),I[L]===void 0&&(I[L]=!0)))}),S||(i[C]=!0)}),(Object.keys(m).length||Object.keys(_).length)&&this.queue.push({pending:_,pendingCount:Object.keys(_).length,loaded:{},errors:[],callback:h}),{toLoad:Object.keys(m),pending:Object.keys(_),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(I)}}loaded(n,s,l){const h=n.split("|"),m=h[0],_=h[1];s&&this.emit("failedLoading",m,_,s),l&&this.store.addResourceBundle(m,_,l),this.state[n]=s?-1:2;const i={};this.queue.forEach(I=>{AZ(I.loaded,[m],_),UZ(I,n),s&&I.errors.push(s),I.pendingCount===0&&!I.done&&(Object.keys(I.loaded).forEach(C=>{i[C]||(i[C]={});const S=I.loaded[C];S.length&&S.forEach(L=>{i[C][L]===void 0&&(i[C][L]=!0)})}),I.done=!0,I.errors.length?I.callback(I.errors):I.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(I=>!I.done)}read(n,s,l){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,m=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,_=arguments.length>5?arguments[5]:void 0;if(!n.length)return _(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:s,fcName:l,tried:h,wait:m,callback:_});return}this.readingCalls++;const i=(C,S)=>{if(this.readingCalls--,this.waitingReads.length>0){const L=this.waitingReads.shift();this.read(L.lng,L.ns,L.fcName,L.tried,L.wait,L.callback)}if(C&&S&&h<this.maxRetries){setTimeout(()=>{this.read.call(this,n,s,l,h+1,m*2,_)},m);return}_(C,S)},I=this.backend[l].bind(this.backend);if(I.length===2){try{const C=I(n,s);C&&typeof C.then=="function"?C.then(S=>i(null,S)).catch(i):i(null,C)}catch(C){i(C)}return}return I(n,s,i)}prepareLoading(n,s){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),h&&h();typeof n=="string"&&(n=this.languageUtils.toResolveHierarchy(n)),typeof s=="string"&&(s=[s]);const m=this.queueLoad(n,s,l,h);if(!m.toLoad.length)return m.pending.length||h(),null;m.toLoad.forEach(_=>{this.loadOne(_)})}load(n,s,l){this.prepareLoading(n,s,{},l)}reload(n,s,l){this.prepareLoading(n,s,{reload:!0},l)}loadOne(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const l=n.split("|"),h=l[0],m=l[1];this.read(h,m,"read",void 0,void 0,(_,i)=>{_&&this.logger.warn(`${s}loading namespace ${m} for language ${h} failed`,_),!_&&i&&this.logger.log(`${s}loaded namespace ${m} for language ${h}`,i),this.loaded(n,_,i)})}saveMissing(n,s,l,h,m){let _=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(s)){this.logger.warn(`did not save key "${l}" as the namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(l==null||l==="")){if(this.backend&&this.backend.create){const I={..._,isUpdate:m},C=this.backend.create.bind(this.backend);if(C.length<6)try{let S;C.length===5?S=C(n,s,l,h,I):S=C(n,s,l,h),S&&typeof S.then=="function"?S.then(L=>i(null,L)).catch(i):i(null,S)}catch(S){i(S)}else C(n,s,l,h,i,I)}!n||!n[0]||this.store.addResource(n[0],s,l,h)}}}function XS(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(n){let s={};if(typeof n[1]=="object"&&(s=n[1]),typeof n[1]=="string"&&(s.defaultValue=n[1]),typeof n[2]=="string"&&(s.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const l=n[3]||n[2];Object.keys(l).forEach(h=>{s[h]=l[h]})}return s},interpolation:{escapeValue:!0,format:(e,n,s,l)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function JS(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Fy(){}function HZ(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(s=>{typeof e[s]=="function"&&(e[s]=e[s].bind(e))})}class Xp extends Oy{constructor(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(super(),this.options=JS(n),this.services={},this.logger=gl,this.modules={external:[]},HZ(this),s&&!this.isInitialized&&!n.isClone){if(!this.options.initImmediate)return this.init(n,s),this;setTimeout(()=>{this.init(n,s)},0)}}init(){var n=this;let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=arguments.length>1?arguments[1]:void 0;typeof s=="function"&&(l=s,s={}),!s.defaultNS&&s.defaultNS!==!1&&s.ns&&(typeof s.ns=="string"?s.defaultNS=s.ns:s.ns.indexOf("translation")<0&&(s.defaultNS=s.ns[0]));const h=XS();this.options={...h,...this.options,...JS(s)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...h.interpolation,...this.options.interpolation}),s.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=s.keySeparator),s.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=s.nsSeparator);function m(S){return S?typeof S=="function"?new S:S:null}if(!this.options.isClone){this.modules.logger?gl.init(m(this.modules.logger),this.options):gl.init(null,this.options);let S;this.modules.formatter?S=this.modules.formatter:typeof Intl<"u"&&(S=FZ);const L=new WS(this.options);this.store=new GS(this.options.resources,this.options);const R=this.services;R.logger=gl,R.resourceStore=this.store,R.languageUtils=L,R.pluralResolver=new PZ(L,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),S&&(!this.options.interpolation.format||this.options.interpolation.format===h.interpolation.format)&&(R.formatter=m(S),R.formatter.init(R,this.options),this.options.interpolation.format=R.formatter.format.bind(R.formatter)),R.interpolator=new RZ(this.options),R.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},R.backendConnector=new VZ(m(this.modules.backend),R.resourceStore,R,this.options),R.backendConnector.on("*",function(U){for(var W=arguments.length,le=new Array(W>1?W-1:0),pe=1;pe<W;pe++)le[pe-1]=arguments[pe];n.emit(U,...le)}),this.modules.languageDetector&&(R.languageDetector=m(this.modules.languageDetector),R.languageDetector.init&&R.languageDetector.init(R,this.options.detection,this.options)),this.modules.i18nFormat&&(R.i18nFormat=m(this.modules.i18nFormat),R.i18nFormat.init&&R.i18nFormat.init(this)),this.translator=new By(this.services,this.options),this.translator.on("*",function(U){for(var W=arguments.length,le=new Array(W>1?W-1:0),pe=1;pe<W;pe++)le[pe-1]=arguments[pe];n.emit(U,...le)}),this.modules.external.forEach(U=>{U.init&&U.init(this)})}if(this.format=this.options.interpolation.format,l||(l=Fy),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const S=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);S.length>0&&S[0]!=="dev"&&(this.options.lng=S[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(S=>{this[S]=function(){return n.store[S](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(S=>{this[S]=function(){return n.store[S](...arguments),n}});const I=Kp(),C=()=>{const S=(L,R)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),I.resolve(R),l(L,R)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return S(null,this.t.bind(this));this.changeLanguage(this.options.lng,S)};return this.options.resources||!this.options.initImmediate?C():setTimeout(C,0),I}loadResources(n){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fy;const h=typeof n=="string"?n:this.language;if(typeof n=="function"&&(l=n),!this.options.resources||this.options.partialBundledLanguages){if(h&&h.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return l();const m=[],_=i=>{if(!i||i==="cimode")return;this.services.languageUtils.toResolveHierarchy(i).forEach(C=>{C!=="cimode"&&m.indexOf(C)<0&&m.push(C)})};h?_(h):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(I=>_(I)),this.options.preload&&this.options.preload.forEach(i=>_(i)),this.services.backendConnector.load(m,this.options.ns,i=>{!i&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),l(i)})}else l(null)}reloadResources(n,s,l){const h=Kp();return n||(n=this.languages),s||(s=this.options.ns),l||(l=Fy),this.services.backendConnector.reload(n,s,m=>{h.resolve(),l(m)}),h}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&$S.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(!(!n||!this.languages)&&!(["cimode","dev"].indexOf(n)>-1))for(let s=0;s<this.languages.length;s++){const l=this.languages[s];if(!(["cimode","dev"].indexOf(l)>-1)&&this.store.hasLanguageSomeTranslations(l)){this.resolvedLanguage=l;break}}}changeLanguage(n,s){var l=this;this.isLanguageChangingTo=n;const h=Kp();this.emit("languageChanging",n);const m=I=>{this.language=I,this.languages=this.services.languageUtils.toResolveHierarchy(I),this.resolvedLanguage=void 0,this.setResolvedLanguage(I)},_=(I,C)=>{C?(m(C),this.translator.changeLanguage(C),this.isLanguageChangingTo=void 0,this.emit("languageChanged",C),this.logger.log("languageChanged",C)):this.isLanguageChangingTo=void 0,h.resolve(function(){return l.t(...arguments)}),s&&s(I,function(){return l.t(...arguments)})},i=I=>{!n&&!I&&this.services.languageDetector&&(I=[]);const C=typeof I=="string"?I:this.services.languageUtils.getBestMatchFromCodes(I);C&&(this.language||m(C),this.translator.language||this.translator.changeLanguage(C),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(C)),this.loadResources(C,S=>{_(S,C)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(n),h}getFixedT(n,s,l){var h=this;const m=function(_,i){let I;if(typeof i!="object"){for(var C=arguments.length,S=new Array(C>2?C-2:0),L=2;L<C;L++)S[L-2]=arguments[L];I=h.options.overloadTranslationOptionHandler([_,i].concat(S))}else I={...i};I.lng=I.lng||m.lng,I.lngs=I.lngs||m.lngs,I.ns=I.ns||m.ns,I.keyPrefix=I.keyPrefix||l||m.keyPrefix;const R=h.options.keySeparator||".";let U;return I.keyPrefix&&Array.isArray(_)?U=_.map(W=>`${I.keyPrefix}${R}${W}`):U=I.keyPrefix?`${I.keyPrefix}${R}${_}`:_,h.t(U,I)};return typeof n=="string"?m.lng=n:m.lngs=n,m.ns=s,m.keyPrefix=l,m}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const l=s.lng||this.resolvedLanguage||this.languages[0],h=this.options?this.options.fallbackLng:!1,m=this.languages[this.languages.length-1];if(l.toLowerCase()==="cimode")return!0;const _=(i,I)=>{const C=this.services.backendConnector.state[`${i}|${I}`];return C===-1||C===2};if(s.precheck){const i=s.precheck(this,_);if(i!==void 0)return i}return!!(this.hasResourceBundle(l,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||_(l,n)&&(!h||_(m,n)))}loadNamespaces(n,s){const l=Kp();return this.options.ns?(typeof n=="string"&&(n=[n]),n.forEach(h=>{this.options.ns.indexOf(h)<0&&this.options.ns.push(h)}),this.loadResources(h=>{l.resolve(),s&&s(h)}),l):(s&&s(),Promise.resolve())}loadLanguages(n,s){const l=Kp();typeof n=="string"&&(n=[n]);const h=this.options.preload||[],m=n.filter(_=>h.indexOf(_)<0);return m.length?(this.options.preload=h.concat(m),this.loadResources(_=>{l.resolve(),s&&s(_)}),l):(s&&s(),Promise.resolve())}dir(n){if(n||(n=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!n)return"rtl";const s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],l=this.services&&this.services.languageUtils||new WS(XS());return s.indexOf(l.getLanguagePartFromCode(n))>-1||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;return new Xp(n,s)}cloneInstance(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fy;const l=n.forkResourceStore;l&&delete n.forkResourceStore;const h={...this.options,...n,isClone:!0},m=new Xp(h);return(n.debug!==void 0||n.prefix!==void 0)&&(m.logger=m.logger.clone(n)),["store","services","language"].forEach(i=>{m[i]=this[i]}),m.services={...this.services},m.services.utils={hasLoadedNamespace:m.hasLoadedNamespace.bind(m)},l&&(m.store=new GS(this.store.data,h),m.services.resourceStore=m.store),m.translator=new By(m.services,h),m.translator.on("*",function(i){for(var I=arguments.length,C=new Array(I>1?I-1:0),S=1;S<I;S++)C[S-1]=arguments[S];m.emit(i,...C)}),m.init(h,s),m.translator.options=h,m.translator.backendConnector.services.utils={hasLoadedNamespace:m.hasLoadedNamespace.bind(m)},m}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const zo=Xp.createInstance();zo.createInstance=Xp.createInstance,zo.createInstance,zo.dir,zo.init,zo.loadResources,zo.reloadResources,zo.use,zo.changeLanguage,zo.getFixedT;const eE=zo.t;zo.exists,zo.setDefaultNamespace,zo.hasLoadedNamespace,zo.loadNamespaces,zo.loadLanguages;function DM(){return DM=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var l in s)({}).hasOwnProperty.call(s,l)&&(e[l]=s[l])}return e},DM.apply(null,arguments)}function QZ(){if(console&&console.warn){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];typeof n[0]=="string"&&(n[0]=`react-i18next:: ${n[0]}`),console.warn(...n)}}const tE={};function SM(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];typeof n[0]=="string"&&tE[n[0]]||(typeof n[0]=="string"&&(tE[n[0]]=new Date),QZ(...n))}const nE=(e,n)=>()=>{if(e.isInitialized)n();else{const s=()=>{setTimeout(()=>{e.off("initialized",s)},0),n()};e.on("initialized",s)}};function iE(e,n,s){e.loadNamespaces(n,nE(e,s))}function rE(e,n,s,l){typeof s=="string"&&(s=[s]),s.forEach(h=>{e.options.ns.indexOf(h)<0&&e.options.ns.push(h)}),e.loadLanguages(n,nE(e,l))}function YZ(e,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const l=n.languages[0],h=n.options?n.options.fallbackLng:!1,m=n.languages[n.languages.length-1];if(l.toLowerCase()==="cimode")return!0;const _=(i,I)=>{const C=n.services.backendConnector.state[`${i}|${I}`];return C===-1||C===2};return s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!_(n.isLanguageChangingTo,e)?!1:!!(n.hasResourceBundle(l,e)||!n.services.backendConnector.backend||n.options.resources&&!n.options.partialBundledLanguages||_(l,e)&&(!h||_(m,e)))}function GZ(e,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!n.languages||!n.languages.length?(SM("i18n.languages were undefined or empty",n.languages),!0):n.options.ignoreJSONStructure!==void 0?n.hasLoadedNamespace(e,{lng:s.lng,precheck:(h,m)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&h.services.backendConnector.backend&&h.isLanguageChangingTo&&!m(h.isLanguageChangingTo,e))return!1}}):YZ(e,n,s)}const $Z=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ZZ={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},WZ=e=>ZZ[e];let EM={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace($Z,WZ)};function qZ(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};EM={...EM,...e}}function KZ(){return EM}let oE;function XZ(e){oE=e}function JZ(){return oE}const eW={type:"3rdParty",init(e){qZ(e.options.react),XZ(e)}},tW=ve.createContext();class nW{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const iW=(e,n)=>{const s=ve.useRef();return ve.useEffect(()=>{s.current=e},[e,n]),s.current};function oo(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:s}=n,{i18n:l,defaultNS:h}=ve.useContext(tW)||{},m=s||l||JZ();if(m&&!m.reportNamespaces&&(m.reportNamespaces=new nW),!m){SM("You will need to pass in an i18next instance by using initReactI18next");const q=(me,ne)=>typeof ne=="string"?ne:ne&&typeof ne=="object"&&typeof ne.defaultValue=="string"?ne.defaultValue:Array.isArray(me)?me[me.length-1]:me,ue=[q,{},!1];return ue.t=q,ue.i18n={},ue.ready=!1,ue}m.options.react&&m.options.react.wait!==void 0&&SM("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const _={...KZ(),...m.options.react,...n},{useSuspense:i,keyPrefix:I}=_;let C=h||m.options&&m.options.defaultNS;C=typeof C=="string"?[C]:C||["translation"],m.reportNamespaces.addUsedNamespaces&&m.reportNamespaces.addUsedNamespaces(C);const S=(m.isInitialized||m.initializedStoreOnce)&&C.every(q=>GZ(q,m,_));function L(){return m.getFixedT(n.lng||null,_.nsMode==="fallback"?C:C[0],I)}const[R,U]=ve.useState(L);let W=C.join();n.lng&&(W=`${n.lng}${W}`);const le=iW(W),pe=ve.useRef(!0);ve.useEffect(()=>{const{bindI18n:q,bindI18nStore:ue}=_;pe.current=!0,!S&&!i&&(n.lng?rE(m,n.lng,C,()=>{pe.current&&U(L)}):iE(m,C,()=>{pe.current&&U(L)})),S&&le&&le!==W&&pe.current&&U(L);function me(){pe.current&&U(L)}return q&&m&&m.on(q,me),ue&&m&&m.store.on(ue,me),()=>{pe.current=!1,q&&m&&q.split(" ").forEach(ne=>m.off(ne,me)),ue&&m&&ue.split(" ").forEach(ne=>m.store.off(ne,me))}},[m,W]);const ie=ve.useRef(!0);ve.useEffect(()=>{pe.current&&!ie.current&&U(L),ie.current=!1},[m,I]);const Y=[R,m,S];if(Y.t=R,Y.i18n=m,Y.ready=S,S||!S&&!i)return Y;throw new Promise(q=>{n.lng?rE(m,n.lng,C,()=>q()):iE(m,C,()=>q())})}const rW={Close:"Close",From:"From",To:"To",Distance:"Distance","Estimated time":"Estimated time",Level:"Level","Search by name, category, building...":"Search by name, category, building...","Show legend":"Show legend","Ask with AI":"Ask with AI","Nothing was found":"Nothing was found",d:"d",h:"h",min:"min",Walk:"Walk",Bike:"Bike",Transit:"Transit",Drive:"Drive","Start wayfinding":"Start wayfinding","Read full description":"Read full description",Locations:"Locations","Directions not available":"Directions not available","Start directions":"Start directions",Previous:"Previous",Next:"Next",StepYofX:"Step {{activeStep}} of {{totalSteps}}","You have arrived":"You have arrived",Leave:"Leave",Park:"Park",at:"at",Building:"Building",Venue:"Venue","Take staircase to level":"Take staircase to level","Take the ladder to level":"Take the ladder to level","Take elevator to level":"Take elevator to level","Take escalator to level":"Take escalator to level","Take wheelchair lift to level":"Take wheelchair lift to level","Take wheelchair ramp to level":"Take wheelchair ramp to level",Exit:"Exit",Enter:"Enter",stops:"stops","and continue":"and continue","Continue straight ahead":"Continue straight ahead","Go left":"Go left","Go sharp left":"Go sharp left","Go slight left":"Go slight left","Go right":"Go right","Go sharp right":"Go sharp right","Go slight right":"Go slight right","Turn around":"Turn around",Switch:"Switch","Avoid stairs and escalators":"Avoid stairs and escalators","Include bus transportation":"Include bus transportation","No route found":"No route found","My position":"My position","Go!":"Go!",Directions:"Directions","Choose departure":"Choose departure","Choose destination":"Choose destination",Venues:"Venues","Select venue":"Select venue",Current:"Current","Scan QR code":"Scan QR code","Scan the QR code to see the route on your phone":"Scan the QR code to see the route on your phone",Done:"Done","Cancel route":"Cancel route","Finish route":"Finish route",Share:"Share","Copy link":"Copy link","QR Code":"QR Code",Open:"Open",Closed:"Closed","Expand opening hours":"Expand opening hours","Collapse opening hours":"Collapse opening hours","Go to view":"Go to view","Close view selector":"Close view selector","Select language":"Select language","Increase text size to 200%":"Increase text size to 200%","Decrease text size to 100%":"Decrease text size to 100%","Zoom in":"Zoom in","Zoom out":"Zoom out","Enter fullscreen":"Enter fullscreen","Exit fullscreen":"Exit fullscreen","Usage consent title":"Ask with AI - Usage Consent","Usage consent message":"Ask with AI helps you find places and navigate this venue using Artificial Intelligence (AI). While we strive for accuracy, the AI may sometimes get things wrong. Please double-check important details before heading out.","Usage consent accept":"I understand","Usage consent decline":"Decline","AI disclaimer":"Ask with AI may make mistakes. Double-check important details before heading out.","Location consent message":"To provide personalized directions and help you discover what's nearby, Ask with AI would like to access your location. The chat will still work without knowing your location, but instead you'll need to specify a start point.","Location consent accept":"Allow","Location consent decline":"Decline"},oW={Close:"Luk",From:"Fra",To:"Til",Distance:"Distance","Estimated time":"Forventet tid",Level:"Etage","Search by name, category, building...":"Søg efter navn, kategori, bygning...","Show legend":"Vis forklaring","Ask with AI":"Spørg med AI","Nothing was found":"Intet fundet",d:"d",h:"t",min:"min",Walk:"Til fods",Bike:"Cykling",Transit:"Offentlig transport",Drive:"Kørsel","Start wayfinding":"Start rutebeskrivelse","Read full description":"Læs hel beskrivelse",Locations:"Lokationer","Directions not available":"Rutevejledning ikke tilgængelig","Start directions":"Start rutevejledning",Previous:"Forrige",Next:"Næste",StepYofX:"Trin {{activeStep}} ud af {{totalSteps}}","You have arrived":"Du er ankommet",Leave:"Forlad",Park:"Parkér",at:"ved",Building:"Bygning",Venue:"Venue","Take staircase to level":"Tag trappen til etage","Take the ladder to level":"Tag stigen til etage","Take elevator to level":"Tag elevatoren til etage","Take escalator to level":"Tag rulletrappen til etage","Take wheelchair lift to level":"Tag kørestolsliften til etage","Take wheelchair ramp to level":"Tag kørestolsrampen til etage",Exit:"Forlad",Enter:"Gå ind i",stops:"stop","and continue":"og fortsæt","Continue straight ahead":"Fortsæt ligeud","Go left":"Drej til venstre","Go sharp left":"Drej skarpt til venstre","Go slight left":"Drej en smule til venstre","Go right":"Drej til højre","Go sharp right":"Drej skarpt til højre","Go slight right":"Drej en smule til højre","Turn around":"Vend om",Switch:"Skift","Avoid stairs and escalators":"Undgå trapper og rulletrapper","Include bus transportation":"Inkluder bus transport","No route found":"Ingen rute fundet","My position":"Min position","Go!":"Go!",Directions:"Rutevejledning","Choose departure":"Vælg startpunkt","Choose destination":"Vælg destination",Venues:"Venues","Select venue":"Vælg venue",Current:"Valgt","Scan QR code":"Scan QR-kode","Scan the QR code to see the route on your phone":"Scan QR-koden for at se ruten på din mobil",Done:"Afslut","Cancel route":"Annullér ruten","Finish route":"Afslut ruten",Share:"Del","Copy link":"Kopiér link","QR Code":"QR-kode",Open:"Åben",Closed:"Lukket","Expand opening hours":"Udvid åbningstider","Collapse opening hours":"Skjul åbningstider","Go to view":"Vis lokation","Close view selector":"Luk visningsvælger","Select language":"Vælg sprog","Increase text size to 200%":"Forøg tekststørrelse til 200%","Decrease text size to 100%":"Formindsk tekststørrelse til 100%","Zoom in":"Zoom ind","Zoom out":"Zoom ud","Enter fullscreen":"Gå til fuld skærm","Exit fullscreen":"Afslut fuld skærm","Usage consent title":"Ask with AI - Samtykkeerklæring","Usage consent message":"Ask with AI hjælper dig med at finde steder og navigere på dette sted ved hjælp af Kunstig Intelligens (AI). Selvom vi stræber efter nøjagtighed, kan AI'en til tider tage fejl. Dobbelttjek venligst vigtige detaljer, inden du begiver dig af sted.","Usage consent accept":"Jeg forstår","Usage consent decline":"Afvis","AI disclaimer":"Ask with AI kan begå fejl. Dobbelttjek vigtige detaljer, inden du begiver dig af sted.","Location consent message":"For at give personlige rutevejledninger og hjælpe dig med at opdage, hvad der er i nærheden, vil Ask with AI gerne have adgang til din placering. Chatten fungerer stadig uden at kende din placering, men i stedet skal du angive et startpunkt.","Location consent accept":"Tillad","Location consent decline":"Afvis"},sW={Close:"Schließen",From:"Von",To:"Nach",Distance:"Distanz","Estimated time":"Geschätzte Zeit",Level:"Etage","Search by name, category, building...":"Nach Name, Kategorie, Gebäude suchen...","Show legend":"Legende anzeigen","Ask with AI":"Mit KI fragen","Nothing was found":"Keine Suchtreffer",d:"d",h:"h",min:"min",Walk:"Zu Fuß",Bike:"Fahrrad",Transit:"Öffentliche Verkehrsmittel",Drive:"Auto","Start wayfinding":"Starte Navigation","Read full description":"Beschreibung öffnen",Locations:"Locations","Directions not available":"Wegbeschreibung nicht verfügbar","Start directions":"Starte Wegbeschreibung",Previous:"Zurück",Next:"Weiter",StepYofX:"Schritt {{activeStep}} von {{totalSteps}}","You have arrived":"Sie haben Ihr Ziel erreicht",Leave:"Verlassen",Park:"Parken",at:"bei",Building:"Gebäude",Venue:"Standort","Take staircase to level":"Nutzen Sie die Treppe zur Etage","Take the ladder to level":"Nutzen Sie die Leiter zur Etage","Take elevator to level":"Nutzen Sie den Aufzug zur Etage","Take escalator to level":"Nutzen Sie die Rolltreppe zur Etage","Take wheelchair lift to level":"Nutzen Sie den Rollstuhllift zur Etage","Take wheelchair ramp to level":"Nutzen Sie die Rollstuhlrampe zur Etage",Exit:"Verlassen Sie das",Enter:"Gehe Sie in das",stops:"Zwischenstopps","and continue":"und Weg fortsetzen","Continue straight ahead":"Weiter geradeaus","Go left":"Links abbiegen","Go sharp left":"Scharf links abbiegen","Go slight left":"Leicht links abbiegen","Go right":"Rechts abbiegen","Go sharp right":"Scharf rechts abbiegen","Go slight right":"Leicht rechts abbiegen","Turn around":"Umdrehen",Switch:"Umkehren","Avoid stairs and escalators":"Treppen und Rolltreppen vermeiden","Include bus transportation":"Busverkehr einbeziehen","No route found":"Keine Route gefunden","My position":"Meine Position","Go!":"Los!",Directions:"Wegbeschreibung","Choose departure":"Startpunkt wählen","Choose destination":"Ziel wählen",Venues:"Standorte","Select venue":"Standort wählen",Current:"Aktuell","Scan QR code":"QR-Code scannen","Scan the QR code to see the route on your phone":"Scannen Sie den QR-Code, um die Route auf Ihrem Smartphone anzuzeigen",Done:"Schließen","Cancel route":"Route abbrechen","Finish route":"Route beenden",Share:"Teilen","Copy link":"Link kopieren","QR Code":"QR code",Open:"Geöffnet",Closed:"Geschlossen","Expand opening hours":"Öffnungszeiten erweitern","Collapse opening hours":"Öffnungszeiten reduzieren","Go to view":"Ansicht wechseln","Close view selector":"Ansichtsauswahl schließen","Select language":"Sprache auswählen","Increase text size to 200%":"Textgröße auf 200% erhöhen","Decrease text size to 100%":"Textgröße auf 100% verringern","Zoom in":"Vergrößern","Zoom out":"Verkleinern","Enter fullscreen":"Vollbild","Exit fullscreen":"Vollbild beenden","Usage consent title":"Ask with AI - Nutzungszustimmung","Usage consent message":"Ask with AI hilft Ihnen, Orte zu finden und sich in diesem Gebäude mithilfe von Künstlicher Intelligenz (KI) zurechtzufinden. Obwohl wir nach Genauigkeit streben, kann die KI manchmal Fehler machen. Bitte überprüfen Sie wichtige Details, bevor Sie losgehen.","Usage consent accept":"Ich verstehe","Usage consent decline":"Ablehnen","AI disclaimer":"Ask with AI kann Fehler machen. Überprüfen Sie wichtige Details, bevor Sie losgehen.","Location consent message":"Um personalisierte Wegbeschreibungen bereitzustellen und Ihnen zu helfen, Orte in der Nähe zu entdecken, möchte Ask with AI auf Ihren Standort zugreifen. Der Chat funktioniert auch ohne Ihren Standort, aber Sie müssen dann einen Startpunkt angeben.","Location consent accept":"Erlauben","Location consent decline":"Ablehnen"},aW={Close:"Fermer",From:"De",To:"À",Distance:"Distance","Estimated time":"Heure d'arrivée estimée",Level:"Niveau","Search by name, category, building...":"Recherche par nom, catégorie, bâtiment...","Show legend":"Afficher la légende","Ask with AI":"Demander à l'IA","Nothing was found":"Rien n'a été trouvé",d:"d",h:"h",min:"min",Walk:"À pied",Bike:"À vélo",Transit:"En transports",Drive:"Voiture","Start wayfinding":"Commencer la navigation","Read full description":"Lire la description complète",Locations:"Emplacements","Directions not available":"Itinéraire non disponible","Start directions":"Commencer la navigation",Previous:"Précédent",Next:"Suivant",StepYofX:"Étape {{activeStep}} sur {{totalSteps}}","You have arrived":"Vous êtes arrivé",Leave:"Départ",Park:"Parc",at:"à",Building:"Bâtiment",Venue:"Lieu","Take staircase to level":"Prenez l'escalier jusqu'au niveau","Take the ladder to level":"Empruntez l'escalier pour rejoindre le niveau","Take elevator to level":"Prenez l'ascenseur jusqu'au niveau","Take escalator to level":"Empruntez l'escalier roulant jusqu'au niveau","Take wheelchair lift to level":"Prenez l'élévateur pour fauteuil roulant jusqu'au niveau","Take wheelchair ramp to level":"Prenez la rampe pour fauteuil roulant jusqu'au niveau",Exit:"Partir",Enter:"Entrer",stops:"arrêts","and continue":"et continuez","Continue straight ahead":"Continuez tout droit","Go left":"Tournez a gauche","Go sharp left":"Allez directement à gauche","Go slight left":"Allez légèrement à gauche","Go right":"Allez à droite","Go sharp right":"Allez directement à droite","Go slight right":"Allez légèrement à droite","Turn around":"Faite demi-tour",Switch:"Changer","Avoid stairs and escalators":"Éviter les escaliers et les escalators","Include bus transportation":"Inclure le transport en bus","No route found":"Aucun itinéraire trouvé","My position":"Ma position","Go!":"C'est parti!",Directions:"Instructions","Choose departure":"Choisir le départ","Choose destination":"Choisir la destination",Venues:"Lieux","Select venue":"Sélectionner le lieu",Current:"Actuel","Scan QR code":"Scanne le code QR","Scan the QR code to see the route on your phone":"Scannez le code QR pour voir l'itinéraire sur votre téléphone",Done:"Fini","Cancel route":"Annuler l'itinéraire","Finish route":"Terminer l'itinéraire",Share:"Partager","Copy link":"Copier le lien","QR Code":"Code QR",Open:"Ouvert",Closed:"Fermé","Expand opening hours":"Développer les heures d'ouverture","Collapse opening hours":"Réduire les heures d'ouverture","Go to view":"Afficher le plan","Close view selector":"Fermer le sélecteur de vue","Select language":"Sélectionner langue","Increase text size to 200%":"Augmenter la taille du texte à 200%","Decrease text size to 100%":"Réduire la taille du texte à 100%","Zoom in":"Zoom avant","Zoom out":"Zoom arrière","Enter fullscreen":"Plein écran","Exit fullscreen":"Quitter le plein écran","Usage consent title":"Ask with AI - Consentement d'utilisation","Usage consent message":"Ask with AI vous aide à trouver des lieux et à vous orienter dans ce site grâce à l'Intelligence Artificielle (IA). Bien que nous nous efforcions d'être précis, l'IA peut parfois se tromper. Veuillez vérifier les détails importants avant de vous mettre en route.","Usage consent accept":"Je comprends","Usage consent decline":"Refuser","AI disclaimer":"Ask with AI peut faire des erreurs. Vérifiez les détails importants avant de vous mettre en route.","Location consent message":"Pour fournir des itinéraires personnalisés et vous aider à découvrir ce qui se trouve à proximité, Ask with AI souhaite accéder à votre position. Le chat fonctionnera toujours sans connaître votre position, mais vous devrez spécifier un point de départ.","Location consent accept":"Autoriser","Location consent decline":"Refuser"},lW={Close:"Chiudi",From:"Da",To:"A",Distance:"Distanza","Estimated time":"Tempo stimato",Level:"Piano","Search by name, category, building...":"Cerca per nome, categoria, edificio...","Show legend":"Mostra legenda","Ask with AI":"Chiedi all'IA","Nothing was found":"Non è stato trovato nulla",d:"g",h:"o",min:"min",Walk:"A piedi",Bike:"Bicicletta",Transit:"Trasporto pubblico",Drive:"In auto","Start wayfinding":"Inizia percorso","Read full description":"Leggi la descrizione completa",Locations:"Luoghi","Directions not available":"Indicazioni non disponibili","Start directions":"Calcola il Percorso",Previous:"Precedente",Next:"Prossimo",StepYofX:"Passaggio {{activeStep}} di {{totalSteps}}","You have arrived":"Sei a destinazione",Leave:"Parti",Park:"Parcheggia",at:"a",Building:"Edificio",Venue:"Luogo","Take staircase to level":"Prendi le scale fino al piano","Take the ladder to level":"Prendi la scala fino al piano","Take elevator to level":"Prendi l'ascensore fino al piano","Take escalator to level":"Prendi la scala mobile fino al piano","Take wheelchair lift to level":"Prendi il montascale fino al piano","Take wheelchair ramp to level":"Prendi la rampa per sedie a rotelle fino al piano",Exit:"Esci",Enter:"Entra in",stops:"fermate","and continue":"e continua","Continue straight ahead":"Continua dritto","Go left":"Gira a sinistra","Go sharp left":"Svolta a sinistra","Go slight left":"Gira leggermente a sinistra","Go right":"Gira a destra","Go sharp right":"Svolta a destra","Go slight right":"Gira leggermente a destra","Turn around":"Girati",Switch:"Inverti","Avoid stairs and escalators":"Evita scale e scale mobili","Include bus transportation":"Includi trasporto in autobus","No route found":"Nessun percorso trovato","My position":"La mia posizione","Go!":"Vai!",Directions:"Indicazioni","Choose departure":"Scegli la partenza","Choose destination":"Scegli destinazione",Venues:"Luoghi","Select venue":"Seleziona luogo",Current:"Attuale","Scan QR code":"Scansiona il codice QR","Scan the QR code to see the route on your phone":"Scansiona il codice QR per vedere il percorso sul tuo telefono",Done:"Fatto","Cancel route":"Annulla percorso","Finish route":"Termina percorso",Share:"Condividi","Copy link":"Copia il collegamento","QR Code":"Codice QR",Open:"Aperto",Closed:"Chiuso","Expand opening hours":"Espandi orari di apertura","Collapse opening hours":"Comprimi orari di apertura","Go to view":"Mostra posizione","Close view selector":"Chiudi selettore vista","Select language":"Seleziona lingua","Increase text size to 200%":"Aumenta la dimensione del testo al 200%","Decrease text size to 100%":"Riduci la dimensione del testo al 100%","Zoom in":"Ingrandisci","Zoom out":"Riduci","Enter fullscreen":"Schermo intero","Exit fullscreen":"Esci da schermo intero","Usage consent title":"Ask with AI - Consenso all'utilizzo","Usage consent message":"Ask with AI ti aiuta a trovare luoghi e a orientarti in questa struttura utilizzando l'Intelligenza Artificiale (IA). Sebbene ci impegniamo per garantire la precisione, l'IA potrebbe talvolta commettere errori. Ti preghiamo di verificare i dettagli importanti prima di metterti in cammino.","Usage consent accept":"Ho capito","Usage consent decline":"Rifiuta","AI disclaimer":"Ask with AI potrebbe commettere errori. Verifica i dettagli importanti prima di metterti in cammino.","Location consent message":"Per fornirti indicazioni personalizzate e aiutarti a scoprire cosa c'è nelle vicinanze, Ask with AI vorrebbe accedere alla tua posizione. La chat funzionerà comunque senza conoscere la tua posizione, ma dovrai specificare un punto di partenza.","Location consent accept":"Consenti","Location consent decline":"Rifiuta"},cW={Close:"Cerca",From:"Desde",To:"A",Distance:"Distancia","Estimated time":"Hora Prevista",Level:"Nivel","Search by name, category, building...":"Busca por nombre, categoría, edificio...","Show legend":"Mostrar leyenda","Ask with AI":"Preguntar con IA","Nothing was found":"No se encontró nada",d:"d",h:"h",min:"mín",Walk:"Caminar",Bike:"Bicicleta",Transit:"Transporte público",Drive:"Conducir","Start wayfinding":"Iniciar la navegación","Read full description":"Leer descripción completa",Locations:"Ubicaciones","Directions not available":"Direcciones no disponibles","Start directions":"Comenzar direcciones",Previous:"Previo",Next:"Próximo",StepYofX:"Paso {{activeStep}} de {{totalSteps}}","You have arrived":"Has llegado",Leave:"Dejar",Park:"Estacionar",at:"en",Building:"Edificio",Venue:"Evento","Take staircase to level":"Tome la escaleras al nivel","Take the ladder to level":"Tome la escalera al nivel","Take elevator to level":"Tome el ascensor hasta el nivel","Take escalator to level":"Tome la escalera mecánica al nivel","Take wheelchair lift to level":"Tome el elevador de sillas de ruedas hasta el nivel","Take wheelchair ramp to level":"Tome la rampa para sillas de ruedas hasta nivelar",Exit:"Salida",Enter:"Ingresar",stops:"paradas","and continue":"y continuar","Continue straight ahead":"Continúe recto","Go left":"Ve a la izquierda","Go sharp left":"Vaya bruscamente a la izquierda","Go slight left":"Vaya ligeramente a la izquierda","Go right":"Ve a la derecha","Go sharp right":"Vaya bruscamente a la derecha","Go slight right":"Vaya ligeramente a la derecha","Turn around":"Giro de vuelta",Switch:"Cambiar","Avoid stairs and escalators":"Evitar escaleras y escaleras mecánicas","Include bus transportation":"Incluir transporte en autobús","No route found":"No se encontró ninguna ruta","My position":"Mi posición","Go!":"¡Ir!",Directions:"Instrucciones","Choose departure":"Elige la salida","Choose destination":"Elige destino",Venues:"Lugares","Select venue":"Seleccionar lugar",Current:"Actual","Scan QR code":"Escanear código QR","Scan the QR code to see the route on your phone":"Escanea el código QR para ver la ruta en tu teléfono",Done:"Finalizado","Cancel route":"Cancelar ruta","Finish route":"Finalizar ruta",Share:"Compartir","Copy link":"Copiar link","QR Code":"Código QR",Open:"Abierto",Closed:"Cerrado","Expand opening hours":"Expandir horario de apertura","Collapse opening hours":"Contraer horario de apertura","Go to view":"Ver ubicación","Close view selector":"Cerrar selector de vista","Select language":"Seleccionar idioma","Increase text size to 200%":"Aumentar el tamaño del texto al 200%","Decrease text size to 100%":"Reducir el tamaño del texto al 100%","Zoom in":"Acercar","Zoom out":"Alejar","Enter fullscreen":"Pantalla completa","Exit fullscreen":"Salir de pantalla completa","Usage consent title":"Ask with AI - Consentimiento de uso","Usage consent message":"Ask with AI te ayuda a encontrar lugares y navegar por este recinto utilizando Inteligencia Artificial (IA). Aunque nos esforzamos por ser precisos, la IA a veces puede cometer errores. Por favor, verifica los detalles importantes antes de ponerte en camino.","Usage consent accept":"Entendido","Usage consent decline":"Rechazar","AI disclaimer":"Ask with AI puede cometer errores. Verifica los detalles importantes antes de ponerte en camino.","Location consent message":"Para ofrecer indicaciones personalizadas y ayudarte a descubrir lo que hay cerca, Ask with AI necesita acceder a tu ubicación. El chat seguirá funcionando sin conocer tu ubicación, pero tendrás que especificar un punto de partida.","Location consent accept":"Permitir","Location consent decline":"Rechazar"},uW={Close:"Sluit",From:"Van",To:"Naar",Distance:"Afstand","Estimated time":"Geschatte tijd",Level:"Niveau","Search by name, category, building...":"Zoeken op naam, categorie, gebouw…","Show legend":"Legende weergeven","Ask with AI":"Vraag met AI","Nothing was found":"Er is niets gevonden",d:"d",h:"u",min:"min",Walk:"Wandelen",Bike:"Fietsen",Transit:"Overgang",Drive:"Rijden","Start wayfinding":"Begin met navigeren ","Read full description":"Lees de volledige beschrijving",Locations:"Locaties","Directions not available":"Routebeschrijving niet beschikbaar","Start directions":"Start routebeschrijving",Previous:"Vorig",Next:"Volgende",StepYofX:"Stap {{activeStep}} van {{totalSteps}}","You have arrived":"Je bent aangekomen",Leave:"Verlaat",Park:"Parkeer",at:"bij",Building:"Gebouw",Venue:"Locatie","Take staircase to level":"Neem de trap naar niveau","Take the ladder to level":"Neem de ladder naar niveau","Take elevator to level":"Neem de lift naar niveau","Take escalator to level":"Neem de roltrap naar niveau","Take wheelchair lift to level":"Neem de rolstoellift naar niveau ","Take wheelchair ramp to level":"Neem de rolstoelhelling naar niveau",Exit:"Verlaat",Enter:"Binnengaan",stops:"stopt","and continue":"en doorgaan","Continue straight ahead":"Ga rechtdoor","Go left":"Ga links","Go sharp left":"Ga scherp naar links","Go slight left":"Ga lichtjes naar links","Go right":"Ga rechts","Go sharp right":"Ga scherp naar rechts","Go slight right":"Ga lichtjes naar rechts","Turn around":"Draai je om",Switch:"Schakelaar","Avoid stairs and escalators":"Vermijd trappen en roltrappen","Include bus transportation":"Busvervoer opnemen","No route found":"Geen route gevonden","My position":"Mijn positie","Go!":"Gaan!",Directions:"Richtingen","Choose departure":"Kies vertrek","Choose destination":"Kies bestemming",Venues:"Locaties","Select venue":"Kies locatie",Current:"Huidige","Scan QR code":"QR-code scannen","Scan the QR code to see the route on your phone":"Scan de QR-code om de route op jouw telefoon te bekijken",Done:"Klaar","Cancel route":"Route annuleren","Finish route":"Route voltooien ",Share:"Deel","Copy link":"Link kopiëren","QR Code":"QR code",Open:"Open",Closed:"Gesloten","Expand opening hours":"Openingsuren uitklappen","Collapse opening hours":"Openingsuren inklappen","Go to view":"Toon locatie","Close view selector":"Sluiten weergavekiezer","Select language":"Selecteer taal","Increase text size to 200%":"Tekstgrootte verhogen naar 200%","Decrease text size to 100%":"Tekstgrootte verlagen naar 100%","Zoom in":"Inzoomen","Zoom out":"Uitzoomen","Enter fullscreen":"Volledig scherm","Exit fullscreen":"Volledig scherm afsluiten","Usage consent title":"Ask with AI - Toestemming voor gebruik","Usage consent message":"Ask with AI helpt je plaatsen te vinden en te navigeren in deze locatie met behulp van Kunstmatige Intelligentie (AI). Hoewel we streven naar nauwkeurigheid, kan de AI soms fouten maken. Controleer belangrijke details voordat je op weg gaat.","Usage consent accept":"Ik begrijp het","Usage consent decline":"Weigeren","AI disclaimer":"Ask with AI kan fouten maken. Controleer belangrijke details voordat je op weg gaat.","Location consent message":"Om gepersonaliseerde routebeschrijvingen te bieden en je te helpen ontdekken wat er in de buurt is, wil Ask with AI toegang tot je locatie. De chat werkt nog steeds zonder je locatie te kennen, maar je zult dan een startpunt moeten opgeven.","Location consent accept":"Toestaan","Location consent decline":"Weigeren"},hW={Close:"关闭",From:"从",To:"到",Distance:"距离","Estimated time":"预计时间",Level:"楼层","Search by name, category, building...":"按名称、类别、建筑物搜索...","Show legend":"显示图例","Ask with AI":"询问 AI","Nothing was found":"未找到任何结果",d:"天",h:"小时",min:"分钟",Walk:"步行",Bike:"骑车",Transit:"公交",Drive:"驾车","Start wayfinding":"开始导航","Read full description":"查看完整描述",Locations:"位置","Directions not available":"导航不可用","Start directions":"开始导航",Previous:"上一步",Next:"下一步",StepYofX:"第 {{activeStep}} 步,共 {{totalSteps}} 步","You have arrived":"您已到达",Leave:"离开",Park:"停车",at:"在",Building:"建筑",Venue:"场所","Take staircase to level":"走楼梯到","Take the ladder to level":"走梯子到","Take elevator to level":"乘电梯到","Take escalator to level":"乘扶梯到","Take wheelchair lift to level":"乘轮椅升降机到","Take wheelchair ramp to level":"走轮椅坡道到",Exit:"离开",Enter:"进入",stops:"站","and continue":"然后继续","Continue straight ahead":"直行","Go left":"向左","Go sharp left":"急转左","Go slight left":"稍向左","Go right":"向右","Go sharp right":"急转右","Go slight right":"稍向右","Turn around":"掉头",Switch:"切换","Avoid stairs and escalators":"避开楼梯和扶梯","Include bus transportation":"包含公交交通","No route found":"未找到路线","My position":"我的位置","Go!":"出发!",Directions:"导航","Choose departure":"选择出发地","Choose destination":"选择目的地",Venues:"场所","Select venue":"选择场所",Current:"当前","Scan QR code":"扫描二维码","Scan the QR code to see the route on your phone":"扫描二维码在手机上查看路线",Done:"完成","Cancel route":"取消路线","Finish route":"完成路线",Share:"分享","Copy link":"复制链接","QR Code":"二维码",Open:"营业中",Closed:"已关闭","Expand opening hours":"展开营业时间","Collapse opening hours":"收起营业时间","Go to view":"定位到","Select language":"选择语言","Increase text size to 200%":"将文本大小增加到 200%","Decrease text size to 100%":"将文本大小减少到 100%","Zoom in":"放大","Zoom out":"缩小","Enter fullscreen":"进入全屏","Exit fullscreen":"退出全屏","Usage consent title":"Ask with AI - 使用须知","Usage consent message":"Ask with AI 利用人工智能(AI)帮助您查找地点并在此场所内导航。尽管我们力求准确,但 AI 有时可能会出错。请在出发前仔细核实重要信息。","Usage consent accept":"我已了解","Usage consent decline":"拒绝","AI disclaimer":"Ask with AI 可能会出错。请在出发前仔细核实重要信息。","Location consent message":"为了提供个性化的路线指引并帮助您发现附近的地点,Ask with AI 需要访问您的位置信息。即使不提供位置信息,聊天功能仍然可用,但您需要手动指定起点。","Location consent accept":"允许","Location consent decline":"拒绝"};function dW(e){zo.use(eW).init({resources:{en:{translation:rW},da:{translation:oW},de:{translation:sW},fr:{translation:aW},it:{translation:lW},es:{translation:cW},nl:{translation:uW},zh:{translation:hW}},lng:e,fallbackLng:"en",interpolation:{escapeValue:!1}})}const sE=[{code:"en",label:"English"},{code:"da",label:"Dansk"},{code:"de",label:"Deutsch"},{code:"fr",label:"Français"},{code:"it",label:"Italiano"},{code:"es",label:"Español"},{code:"nl",label:"Nederlands"},{code:"zh",label:"中文"}],vd={SetCurrentLocation:"setCurrentLocation",SetWayfindingLocation:"setWayfindingLocation",None:"none"};var NM={exports:{}},LM,aE;function fW(){if(aE)return LM;aE=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return LM=e,LM}var kM,lE;function pW(){if(lE)return kM;lE=1;var e=fW();function n(){}function s(){}return s.resetWarningCache=n,kM=function(){function l(_,i,I,C,S,L){if(L!==e){var R=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw R.name="Invariant Violation",R}}l.isRequired=l;function h(){return l}var m={array:l,bigint:l,bool:l,func:l,number:l,object:l,string:l,symbol:l,any:l,arrayOf:h,element:l,elementType:l,instanceOf:h,node:l,objectOf:h,oneOf:h,oneOfType:h,shape:h,exact:h,checkPropTypes:s,resetWarningCache:n};return m.PropTypes=m,m},kM}var cE;function gW(){return cE||(cE=1,NM.exports=pW()()),NM.exports}var mW=gW();const ft=nd(mW),yW=e=>{const[n,s]=ve.useState(window.matchMedia(e).matches);return ve.useEffect(()=>{const l=window.matchMedia(e);l.matches!==n&&s(l.matches);const h=()=>s(l.matches);return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[n,e]),n},Xo=()=>yW("(min-width: 992px)");function _W({floorSelectorRef:e,setIsFloorSelectorExpanded:n,measureOverlap:s,mapsIndoorsInstance:l,mapInstance:h}){const m=ve.useRef(null),_=ve.useRef(!1);return ve.useEffect(()=>{const i=e.current;if(!i)return;const I=()=>{m.current&&clearTimeout(m.current);const S=i.querySelector(".mi-floor-selector__button");if(!S)return;const L=S.classList.contains("mi-floor-selector__button--open");if(_.current=L,!L){n(!1);return}m.current=setTimeout(s,50)},C=new MutationObserver(I);return C.observe(i,{subtree:!0,attributes:!0,attributeFilter:["class"]}),()=>{C.disconnect(),m.current&&clearTimeout(m.current)}},[e,n,s,l,h]),_}class vW{constructor(n={}){this._currentPosition=null,this._listeners=new Map;const{maxAccuracy:s=100}=n;this._maxAccuracy=s}get currentPosition(){return this._currentPosition}hasValidPosition(){const n=this._maxAccuracy;return this._currentPosition!==null&&this._currentPosition.coords&&this._currentPosition.coords.accuracy>=0&&this._currentPosition.coords.accuracy<=n}on(n,s){this._listeners.has(n)||this._listeners.set(n,[]),this._listeners.get(n).push(s)}off(n,s){const l=this._listeners.get(n);l&&this._listeners.set(n,l.filter(h=>h!==s))}setPosition(n){let s;if(n.coords&&n.timestamp)s={coords:{latitude:n.coords.latitude,longitude:n.coords.longitude,accuracy:n.coords.accuracy,altitude:n.coords.altitude??null,altitudeAccuracy:n.coords.altitudeAccuracy??null,heading:n.coords.heading??null,speed:n.coords.speed??null},timestamp:n.timestamp,floorIndex:n.floorIndex??null};else{const h={message:"[CustomPositionProvider] Invalid position object received. The object must be at minimum: { coords: { latitude: number, longitude: number, accuracy: number }, timestamp: number }.",received:n};return this.emitError(h),!1}return s.coords.accuracy>this._maxAccuracy?(console.warn(`[CustomPositionProvider] Position accuracy (${s.coords.accuracy}m) exceeds maxAccuracy (${this._maxAccuracy}m). Position dropped, keeping previous position.`),!1):(this._currentPosition=s,(this._listeners.get("position_received")||[]).forEach(h=>{h.call(null,{position:s})}),!0)}emitError(n){this._currentPosition=null,console.warn("[CustomPositionProvider] position_error:",n),(this._listeners.get("position_error")||[]).forEach(l=>{l.call(null,n)})}}const xW=e=>jn.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M0.833344 10C0.833344 10.3315 0.96504 10.6495 1.19946 10.8839C1.43388 11.1183 1.75182 11.25 2.08334 11.25H8.54168C8.59693 11.25 8.64992 11.2719 8.68899 11.311C8.72806 11.3501 8.75001 11.4031 8.75001 11.4583V17.9167C8.75001 18.2482 8.88171 18.5661 9.11613 18.8005C9.35055 19.035 9.66849 19.1667 10 19.1667C10.3315 19.1667 10.6495 19.035 10.8839 18.8005C11.1183 18.5661 11.25 18.2482 11.25 17.9167V11.4583C11.25 11.4031 11.272 11.3501 11.311 11.311C11.3501 11.2719 11.4031 11.25 11.4583 11.25H17.9167C18.2482 11.25 18.5661 11.1183 18.8006 10.8839C19.035 10.6495 19.1667 10.3315 19.1667 10C19.1667 9.66848 19.035 9.35054 18.8006 9.11612C18.5661 8.88169 18.2482 8.75 17.9167 8.75H11.4583C11.4031 8.75 11.3501 8.72805 11.311 8.68898C11.272 8.64991 11.25 8.59692 11.25 8.54167V2.08333C11.25 1.75181 11.1183 1.43387 10.8839 1.19945C10.6495 0.965029 10.3315 0.833333 10 0.833333C9.66849 0.833333 9.35055 0.965029 9.11613 1.19945C8.88171 1.43387 8.75001 1.75181 8.75001 2.08333V8.54167C8.75001 8.59692 8.72806 8.64991 8.68899 8.68898C8.64992 8.72805 8.59693 8.75 8.54168 8.75H2.08334C1.75182 8.75 1.43388 8.88169 1.19946 9.11612C0.96504 9.35054 0.833344 9.66848 0.833344 10Z",fill:"#78716C"})),bW=e=>jn.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M2.08333 11.6667H17.9167C18.2482 11.6667 18.5661 11.535 18.8005 11.3006C19.035 11.0661 19.1667 10.7482 19.1667 10.4167C19.1667 10.0851 19.035 9.7672 18.8005 9.53278C18.5661 9.29836 18.2482 9.16667 17.9167 9.16667H2.08333C1.75181 9.16667 1.43387 9.29836 1.19945 9.53278C0.965029 9.7672 0.833333 10.0851 0.833333 10.4167C0.833333 10.7482 0.965029 11.0661 1.19945 11.3006C1.43387 11.535 1.75181 11.6667 2.08333 11.6667Z",fill:"#78716C"}));zM.propTypes={mapType:ft.oneOf(["google","mapbox"]).isRequired,mapInstance:ft.object.isRequired};function zM({mapType:e,mapInstance:n}){const{t:s}=oo(),l=Xo(),h=ve.useCallback(()=>{const _=n?.getMap();if(_)switch(e){case"mapbox":_.zoomIn();break;case"google":{const i=_.getZoom();_.setZoom(i+1);break}}},[e,n]),m=ve.useCallback(()=>{const _=n?.getMap();if(_)switch(e){case"mapbox":_.zoomOut();break;case"google":{const i=_.getZoom();_.setZoom(i-1);break}}},[e,n]);return l?Le.jsxs("div",{className:"map-zoom-control",children:[Le.jsx("button",{type:"button",className:"map-zoom-control__button",onClick:h,"aria-label":s("Zoom in"),children:Le.jsx(xW,{})}),Le.jsx("button",{type:"button",className:"map-zoom-control__button",onClick:m,"aria-label":s("Zoom out"),children:Le.jsx(bW,{})})]}):null}const wW=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M10 4C9.44771 4 9 4.44772 9 5C9 5.55228 9.44771 6 10 6H15V20C15 20.5523 15.4477 21 16 21C16.5523 21 17 20.5523 17 20V6H22C22.5523 6 23 5.55228 23 5C23 4.44772 22.5523 4 22 4H10Z",fill:"#78706C",style:{fill:"#78706C",fill:"color(display-p3 0.4706 0.4392 0.4235)",fillOpacity:1}}),jn.createElement("path",{d:"M5.92676 20V12H2C1.44772 12 1 11.5523 1 11C1 10.4477 1.44772 10 2 10H6.88216C6.89695 9.99935 6.91181 9.99902 6.92676 9.99902C6.9417 9.99902 6.95657 9.99935 6.97135 10H12C12.5523 10 13 10.4477 13 11C13 11.5523 12.5523 12 12 12H7.92676V20C7.92676 20.5523 7.47904 21 6.92676 21C6.37447 21 5.92676 20.5523 5.92676 20Z",fill:"#78706C",style:{fill:"#78706C",fill:"color(display-p3 0.4706 0.4392 0.4235)",fillOpacity:1}}));uE.propTypes={mapsIndoorsInstance:ft.object.isRequired};function uE({mapsIndoorsInstance:e}){const{t:n}=oo(),s=Xo(),[l,h]=ve.useState(!1),m=ve.useCallback(i=>{i?(document.documentElement.style.fontSize="200%",document.documentElement.dataset.fontScaled="true",e?.getMapView()?.setLabelTextSizeMultiplier(2)):(document.documentElement.style.fontSize="",delete document.documentElement.dataset.fontScaled,e?.getMapView()?.resetLabelTextSize())},[e]);ve.useEffect(()=>(m(l),()=>{m(!1)}),[l,m]);const _=ve.useCallback(()=>{const i=!l;h(i),m(i)},[l,m]);return s?Le.jsx("button",{type:"button",className:`text-size-button ${l?"text-size-button--active":""}`,onClick:_,"aria-label":n(l?"Decrease text size to 100%":"Increase text size to 200%"),"aria-pressed":l,children:Le.jsx(wW,{})}):null}const MW=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M8 3H5C4.46957 3 3.96086 3.21071 3.58579 3.58579C3.21071 3.96086 3 4.46957 3 5V8M21 8V5C21 4.46957 20.7893 3.96086 20.4142 3.58579C20.0391 3.21071 19.5304 3 19 3H16M16 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V16M3 16V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),IW=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M8 3V6C8 6.53043 7.78929 7.03914 7.41421 7.41421C7.03914 7.78929 6.53043 8 6 8H3M21 8H18C17.4696 8 16.9609 7.78929 16.5858 7.41421C16.2107 7.03914 16 6.53043 16 6V3M16 21V18C16 17.4696 16.2107 16.9609 16.5858 16.5858C16.9609 16.2107 17.4696 16 18 16H21M3 16H6C6.53043 16 7.03914 16.2107 7.41421 16.5858C7.78929 16.9609 8 17.4696 8 18V21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function TW(){const{t:e}=oo(),[n,s]=ve.useState(!1),l=ve.useCallback(()=>{s(!!document.fullscreenElement)},[]);ve.useEffect(()=>(document.addEventListener("fullscreenchange",l),()=>document.removeEventListener("fullscreenchange",l)),[l]);const h=ve.useCallback(async()=>{try{document.fullscreenElement?await document.exitFullscreen():await(document.querySelector(".map-template")||document.documentElement).requestFullscreen()}catch(m){console.warn("Fullscreen request failed:",m)}},[]);return Le.jsx("button",{type:"button",className:"fullscreen-button",onClick:h,"aria-label":e(n?"Exit fullscreen":"Enter fullscreen"),title:e(n?"Exit fullscreen":"Enter fullscreen"),children:n?Le.jsx(IW,{}):Le.jsx(MW,{})})}const Uy={venueSelector:{key:"venue-selector",className:"venue-selector-portal"},viewSelector:{key:"view-selector",className:"view-selector-portal"},languageSelector:{key:"language-selector",className:"language-selector-portal"},viewModeSwitch:{key:"viewmode-switch",className:"viewmode-switch-portal"},myPosition:{key:"my-position",className:"my-position-element-portal"},floorSelector:{key:"floor-selector",className:"floor-selector-portal"},resetView:{key:"reset-view",className:"reset-view-portal"},chatButton:{key:"chat-button",className:"chat-button-portal"},zoomControls:{key:"zoom-controls",className:null},textSizeButton:{key:"text-size-button",className:null},fullScreenButton:{key:"fullscreen-button",className:null}};hE.propTypes={mapType:ft.oneOf(["google","mapbox"]).isRequired,mapsIndoorsInstance:ft.object.isRequired,mapInstance:ft.object.isRequired,onPositionControl:ft.func,brandingColor:ft.string,devicePosition:ft.object,excludedElements:ft.string,isKiosk:ft.bool,enableAccessibilityKioskControls:ft.bool,enableFullScreenButton:ft.bool};function hE({mapType:e,mapsIndoorsInstance:n,mapInstance:s,onPositionControl:l,brandingColor:h,devicePosition:m,excludedElements:_="",isKiosk:i,enableAccessibilityKioskControls:I=!1,enableFullScreenButton:C=!1}){const S=Xo(),L=ve.useRef(null),R=ve.useRef(null),U=ve.useRef(null),[W,le]=ve.useState(!1),pe=ve.useCallback(()=>{const me=U.current,ne=L.current;if(!me||!ne){le(!1);return}const Me=(ne.querySelector(".mi-floor-selector")||ne).getBoundingClientRect(),Ee=me.getBoundingClientRect();le(Me.bottom>Ee.top)},[]),ie=ve.useCallback(me=>!_||typeof _!="string"?!0:!_.split(",").map(De=>De.trim()).includes(me),[_]),Y=ve.useMemo(()=>{const me={};for(const[ne,De]of Object.entries(Uy))me[ne]=Le.jsx("div",{className:De.className},De.key);return me},[]),q=me=>{R.current.customPositionProvider.setPosition(me)&&R.current.watchPosition()};ve.useEffect(()=>{if(!(!n||!s)){if(!L.current){const me=document.createElement("mi-floor-selector");L.current=me}if(!R.current){const me=document.createElement("mi-my-position");R.current=me}L.current.mapsindoors=n,R.current.mapsindoors=n,h&&(L.current.primaryColor=h),l&&R.current&&l(R.current)}},[e,n,s,l,h]),ve.useEffect(()=>{if(R.current){if(R.current.stopListeningForPosition&&typeof R.current.stopListeningForPosition=="function"&&R.current.stopListeningForPosition(),m&&typeof m=="object"){if(R.current.customPositionProvider||(R.current.customPositionProvider=new vW),Object.keys(m).length===0)return;q(m)}return()=>{R.current&&R.current.stopListeningForPosition&&typeof R.current.stopListeningForPosition=="function"&&R.current.stopListeningForPosition()}}},[m]),ve.useEffect(()=>{if(!L.current||!R.current)return;const me=(ne,De)=>{const Me=document.querySelector(`.${De}`);Me&&!Me.contains(ne)&&(ne.remove(),Me.appendChild(ne))};requestAnimationFrame(()=>{ie("floorSelector")&&me(L.current,Uy.floorSelector.className),ie("myPosition")&&me(R.current,Uy.myPosition.className)})},[S,i,ie]),ve.useEffect(()=>{Object.entries(Uy).forEach(([me,ne])=>{if(!ne.className)return;const De=document.querySelector(`.${ne.className}`);De&&(ie(me)?De.style.display="":De.style.display="none")})},[_,ie,S]);const ue=_W({floorSelectorRef:L,setIsFloorSelectorExpanded:le,measureOverlap:pe,mapsIndoorsInstance:n,mapInstance:s});return ve.useEffect(()=>{const me=()=>{ue.current&&pe()};return window.addEventListener("resize",me),window.addEventListener("orientationchange",me),me(),()=>{window.removeEventListener("resize",me),window.removeEventListener("orientationchange",me)}},[S,i,pe]),i?I?Le.jsxs(Le.Fragment,{children:[Le.jsx("div",{className:"map-controls-container kiosk top-right"}),Le.jsxs("div",{className:"map-controls-container kiosk bottom-right",children:[Y.venueSelector,Y.viewSelector,Y.myPosition,ie("zoomControls")&&Le.jsx(zM,{mapType:e,mapInstance:s}),Y.languageSelector,ie("textSizeButton")&&Le.jsx(uE,{mapsIndoorsInstance:n}),Y.viewModeSwitch,Y.floorSelector,Y.resetView]})]}):Le.jsxs(Le.Fragment,{children:[Le.jsxs("div",{className:"map-controls-container kiosk top-right",children:[Y.venueSelector,Y.viewSelector,Y.languageSelector,Y.viewModeSwitch,Y.myPosition,Y.floorSelector]}),Le.jsx("div",{className:"map-controls-container kiosk bottom-right",children:Y.resetView})]}):S?Le.jsxs(Le.Fragment,{children:[Le.jsxs("div",{className:"map-controls-container desktop top-right",children:[Y.venueSelector,Y.viewSelector,Y.languageSelector,Y.viewModeSwitch,Y.myPosition,Y.chatButton,Y.floorSelector]}),Le.jsxs("div",{ref:U,className:`map-controls-container desktop bottom-right ${W?"map-controls-container--floor-selector-open":""}`,children:[ie("zoomControls")&&Le.jsx(zM,{mapType:e,mapInstance:s}),C&&ie("fullScreenButton")&&Le.jsx(TW,{}),Y.resetView]})]}):Le.jsxs(Le.Fragment,{children:[Le.jsxs("div",{className:"map-controls-left-column mobile-column",children:[Y.venueSelector,Y.viewModeSwitch,Y.viewSelector,Y.languageSelector]}),Le.jsxs("div",{className:"map-controls-right-column mobile-column",children:[Y.myPosition,Y.floorSelector]}),Le.jsx("div",{className:"map-controls-right-bottom mobile-column",children:Y.chatButton})]})}const AW=ve.memo(hE),so={Google:"google",Mapbox:"mapbox"},CW=ve.lazy(()=>Promise.resolve().then(()=>Oce)),DW=ve.lazy(()=>Promise.resolve().then(()=>Fce));dE.propTypes={apiKey:ft.string.isRequired,mapType:ft.string.isRequired,gmApiKey:ft.string,mapboxAccessToken:ft.string,center:ft.object,zoom:ft.number,bounds:ft.object,bearing:ft.number,pitch:ft.number,resetUICounter:ft.number,mapOptions:ft.object,onInitialized:ft.func,gmMapId:ft.string,devicePosition:ft.object,isKiosk:ft.bool};function dE({apiKey:e,mapType:n,gmApiKey:s,mapboxAccessToken:l,center:h,zoom:m,bounds:_,bearing:i,pitch:I,resetUICounter:C,mapOptions:S,onInitialized:L,gmMapId:R,devicePosition:U,isKiosk:W}){const[le,pe]=ve.useState(),[ie,Y]=ve.useState(),[q,ue]=ve.useState(),[me,ne]=ve.useState(),[De,Me]=ve.useState(),[Ee,ge]=ve.useState(),Re=ve.useMemo(()=>De?.appSettings?.excludeFromUI||"",[De?.appSettings?.excludeFromUI]);ve.useEffect(()=>{window.customElements.get("mi-floor-selector")||VS()},[]),ve.useEffect(()=>{e&&(window.mapsindoors.MapsIndoors.setMapsIndoorsApiKey(e),n===so.Mapbox&&(window.mapsindoors.services.SolutionsService.getSolution().then(Ne=>{ne(Ne)}),window.mapsindoors.services.AppConfigService.getConfig().then(Ne=>{Me(Ne)})))},[e,n]);const Oe=Ne=>{ge(Ne);const tt=new window.mapsindoors.MapsIndoors({mapView:Ne});tt.once("building_changed",dt=>{const Nt=tt.getVenue();dt&&Nt&&dt.venueId!==Nt.id&&tt.setVenue(dt.venueId)}),tt.on("mouseenter",()=>{tt.getHoveredLocation()?.properties.locationSettings?.selectable===!1&&tt.unhoverLocation()}),tt.setDisplayRule(["MI_BUILDING_OUTLINE"],{visible:!1}),pe(tt)};return ve.useEffect(()=>{typeof L=="function"&&le&&ie&&typeof q=="boolean"&&L(le,ie,q)},[le,ie,q]),ve.useEffect(()=>{me&&n===so.Mapbox&&["mapbox","3dwalls","floorplan"].every(Ne=>me.modules.map(tt=>tt.toLowerCase()).includes(Ne))?ue(!0):ue(!1)},[me,n]),Le.jsxs(Le.Fragment,{children:[n===so.Google&&Le.jsx(ve.Suspense,{children:Le.jsx(DW,{mapsIndoorsInstance:le,apiKey:s,onInitialized:Oe,center:h,zoom:m,mapOptions:S,heading:i,tilt:I,bounds:_,gmMapId:R})}),n===so.Mapbox&&Le.jsx(ve.Suspense,{children:Le.jsx(CW,{mapsIndoorsInstance:le,accessToken:l,onInitialized:Oe,center:h,zoom:m,mapOptions:S,bearing:i,pitch:I,bounds:_,resetViewMode:C,viewModeSwitchVisible:q,appConfig:De})}),le&&Ee&&n&&Le.jsx(AW,{mapType:n,mapsIndoorsInstance:le,mapInstance:Ee,onPositionControl:Y,brandingColor:S?.brandingColor,devicePosition:U,excludedElements:Re,isKiosk:W,enableAccessibilityKioskControls:!!De?.appSettings?.enableAccessibilityKioskControls,enableFullScreenButton:!!S?.enableFullScreenButton})]})}const as=pi({key:"mapsIndoorsInstance",default:null,dangerouslyAllowMutability:!0}),SW=e=>{const n=fn(as),s=ve.useRef(),[l,h]=ve.useState([]);ve.useEffect(()=>{(async()=>{if(n&&e){for(const i of l)s.current.disableLiveData(i);s.current=new window.mapsindoors.LiveDataManager(n);const _=await s.current.LiveDataInfo.activeDomainTypes();for(const i of _)await s.current.enableLiveData(i);h(_)}})()},[e,n])},xd=pi({key:"userPosition",default:null}),Vy=pi({key:"directionsService",default:null}),bd=pi({key:"mapType",default:void 0}),Hy=pi({key:"apiKey",default:null}),OM=pi({key:"gmApiKey",default:null}),Qy=pi({key:"mapboxAccessToken",default:null}),Jp=pi({key:"filteredLocations",default:void 0}),Yy=pi({key:"filteredLocationsByExternalID",default:void 0}),Qa=pi({key:"currentLocation",default:null}),fE=pi({key:"tileStyle",default:null}),pE=pi({key:"positionControl",default:null,dangerouslyAllowMutability:!0}),jM=pi({key:"bearing",default:0}),Gy=pi({key:"pitch",default:null}),gE=pi({key:"solution",default:null,dangerouslyAllowMutability:!0}),eg=pi({key:"notificationMessage",default:null});function tg(){return new Promise(e=>{const n=document.querySelector(".modal--open"),s=document.querySelector(".mapsindoors-map");if(n)e(s.offsetHeight-n?.offsetTop);else{const l=new MutationObserver(()=>{const h=document.querySelector(".modal--open");h&&(l.disconnect(),e(s.offsetHeight-h?.offsetTop))});l.observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}})}const ng=pi({key:"categories",default:[]}),PM=pi({key:"kioskOriginLocationId",default:void 0}),$y=pi({key:"locationId",default:void 0}),mE=pi({key:"startZoomLevel",default:null}),Ya=pi({key:"currentVenueName",default:null}),wd=pi({key:"venues",default:[]}),RM=pi({key:"venueWasSelected",default:!1}),Zy=pi({key:"isMapReady",default:!1});function Md(){return new Promise(e=>{const n=document.querySelector(".sheet--active"),s=document.querySelector(".mapsindoors-map");if(n)e(s.offsetHeight-n.offsetTop);else{const l=new MutationObserver(()=>{const h=document.querySelector(".sheet--active");h&&(l.disconnect(),e(s.offsetHeight-h.offsetTop))});l.observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}})}function Lc(){return new Promise(e=>{const n=document.querySelector(".modal--open");if(n)e(n?.offsetWidth+n?.offsetLeft*2);else{const s=new MutationObserver(()=>{const l=document.querySelector(".modal--open");l&&(s.disconnect(),e(l?.offsetWidth+l?.offsetLeft*2))});s.observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}})}const yE=pi({key:"timeout",default:void 0});function _E(){const[e,n]=ve.useState(!1),s=fn(Zy),l=fn(yE);return ve.useEffect(()=>{if(!s||!l)return;let h;const m=()=>{n(!1),window.clearTimeout(h),h=window.setTimeout(_,l*1e3)},_=()=>{n(!0)};return h=window.setTimeout(_,l*1e3),window.addEventListener("mousemove",m),window.addEventListener("mousedown",m),window.addEventListener("resize",m),window.addEventListener("keydown",m),window.addEventListener("touchstart",m),window.addEventListener("wheel",m),()=>{window.removeEventListener("mousemove",m),window.removeEventListener("mousedown",m),window.removeEventListener("resize",m),window.removeEventListener("keydown",m),window.removeEventListener("touchstart",m),window.removeEventListener("wheel",m),window.clearTimeout(h)}},[l,s]),e}const vE=pi({key:"mapboxViewMode",default:null}),BM=Object.freeze({initial3D:1,clicked3D:2,clicked2D:3}),EW=k1({key:"currentPitch",get:({get:e})=>{const n=e(Gy),s=e(vE);let l;switch(s){case BM.initial3D:l=n??45;break;case BM.clicked3D:l=45;break;case BM.clicked2D:l=0;break;default:l=n}return l}}),xE=pi({key:"center",default:null});function wr(e){return e==null}function Yu(e,n,s){s===void 0&&(s={});var l={type:"Feature"};return(s.id===0||s.id)&&(l.id=s.id),s.bbox&&(l.bbox=s.bbox),l.properties=n||{},l.geometry=e,l}function bE(e,n,s){if(s===void 0&&(s={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ME(e[0])||!ME(e[1]))throw new Error("coordinates must contain numbers");var l={type:"Point",coordinates:e};return Yu(l,n,s)}function wE(e,n,s){if(s===void 0&&(s={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");var l={type:"LineString",coordinates:e};return Yu(l,n,s)}function Wy(e,n){n===void 0&&(n={});var s={type:"FeatureCollection"};return n.id&&(s.id=n.id),n.bbox&&(s.bbox=n.bbox),s.features=e,s}function NW(e,n,s){s===void 0&&(s={});var l={type:"MultiLineString",coordinates:e};return Yu(l,n,s)}function ME(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function IE(e,n,s){if(e!==null)for(var l,h,m,_,i,I,C,S=0,L=0,R,U=e.type,W=U==="FeatureCollection",le=U==="Feature",pe=W?e.features.length:1,ie=0;ie<pe;ie++){C=W?e.features[ie].geometry:le?e.geometry:e,R=C?C.type==="GeometryCollection":!1,i=R?C.geometries.length:1;for(var Y=0;Y<i;Y++){var q=0,ue=0;if(_=R?C.geometries[Y]:C,_!==null){I=_.coordinates;var me=_.type;switch(S=0,me){case null:break;case"Point":if(n(I,L,ie,q,ue)===!1)return!1;L++,q++;break;case"LineString":case"MultiPoint":for(l=0;l<I.length;l++){if(n(I[l],L,ie,q,ue)===!1)return!1;L++,me==="MultiPoint"&&q++}me==="LineString"&&q++;break;case"Polygon":case"MultiLineString":for(l=0;l<I.length;l++){for(h=0;h<I[l].length-S;h++){if(n(I[l][h],L,ie,q,ue)===!1)return!1;L++}me==="MultiLineString"&&q++,me==="Polygon"&&ue++}me==="Polygon"&&q++;break;case"MultiPolygon":for(l=0;l<I.length;l++){for(ue=0,h=0;h<I[l].length;h++){for(m=0;m<I[l][h].length-S;m++){if(n(I[l][h][m],L,ie,q,ue)===!1)return!1;L++}ue++}q++}break;case"GeometryCollection":for(l=0;l<_.geometries.length;l++)if(IE(_.geometries[l],n)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function TE(e,n){if(e.type==="Feature")n(e,0);else if(e.type==="FeatureCollection")for(var s=0;s<e.features.length&&n(e.features[s],s)!==!1;s++);}function LW(e,n){var s,l,h,m,_,i,I,C,S,L,R=0,U=e.type==="FeatureCollection",W=e.type==="Feature",le=U?e.features.length:1;for(s=0;s<le;s++){for(i=U?e.features[s].geometry:W?e.geometry:e,C=U?e.features[s].properties:W?e.properties:{},S=U?e.features[s].bbox:W?e.bbox:void 0,L=U?e.features[s].id:W?e.id:void 0,I=i?i.type==="GeometryCollection":!1,_=I?i.geometries.length:1,h=0;h<_;h++){if(m=I?i.geometries[h]:i,m===null){if(n(null,R,C,S,L)===!1)return!1;continue}switch(m.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(n(m,R,C,S,L)===!1)return!1;break}case"GeometryCollection":{for(l=0;l<m.geometries.length;l++)if(n(m.geometries[l],R,C,S,L)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}R++}}function ig(e,n){LW(e,function(s,l,h,m,_){var i=s===null?null:s.type;switch(i){case null:case"Point":case"LineString":case"Polygon":return n(Yu(s,h,{bbox:m,id:_}),l,0)===!1?!1:void 0}var I;switch(i){case"MultiPoint":I="Point";break;case"MultiLineString":I="LineString";break;case"MultiPolygon":I="Polygon";break}for(var C=0;C<s.coordinates.length;C++){var S=s.coordinates[C],L={type:I,coordinates:S};if(n(Yu(L,h),l,C)===!1)return!1}})}function FM(e){var n=[1/0,1/0,-1/0,-1/0];return IE(e,function(s){n[0]>s[0]&&(n[0]=s[0]),n[1]>s[1]&&(n[1]=s[1]),n[2]<s[0]&&(n[2]=s[0]),n[3]<s[1]&&(n[3]=s[1])}),n}FM.default=FM;function kW(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if(e.type==="Feature"&&e.geometry!==null&&e.geometry.type==="Point")return e.geometry.coordinates;if(e.type==="Point")return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function rg(e){if(Array.isArray(e))return e;if(e.type==="Feature"){if(e.geometry!==null)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function qy(e){return e.type==="Feature"?e.geometry:e}function og(e,n,s){if(s===void 0&&(s={}),!e)throw new Error("point is required");if(!n)throw new Error("polygon is required");var l=kW(e),h=qy(n),m=h.type,_=n.bbox,i=h.coordinates;if(_&&zW(l,_)===!1)return!1;m==="Polygon"&&(i=[i]);for(var I=!1,C=0;C<i.length&&!I;C++)if(AE(l,i[C][0],s.ignoreBoundary)){for(var S=!1,L=1;L<i[C].length&&!S;)AE(l,i[C][L],!s.ignoreBoundary)&&(S=!0),L++;S||(I=!0)}return I}function AE(e,n,s){var l=!1;n[0][0]===n[n.length-1][0]&&n[0][1]===n[n.length-1][1]&&(n=n.slice(0,n.length-1));for(var h=0,m=n.length-1;h<n.length;m=h++){var _=n[h][0],i=n[h][1],I=n[m][0],C=n[m][1],S=e[1]*(_-I)+i*(I-e[0])+C*(e[0]-_)===0&&(_-e[0])*(I-e[0])<=0&&(i-e[1])*(C-e[1])<=0;if(S)return!s;var L=i>e[1]!=C>e[1]&&e[0]<(I-_)*(e[1]-i)/(C-i)+_;L&&(l=!l)}return l}function zW(e,n){return n[0]<=e[0]&&n[1]<=e[1]&&n[2]>=e[0]&&n[3]>=e[1]}function OW(e,n){n===void 0&&(n={});var s=FM(e),l=(s[0]+s[2])/2,h=(s[1]+s[3])/2;return bE([l,h],n.properties,n)}function CE(e){if(!e)throw new Error("geojson is required");var n=[];return ig(e,function(s){jW(s,n)}),Wy(n)}function jW(e,n){var s=[],l=e.geometry;if(l!==null){switch(l.type){case"Polygon":s=rg(l);break;case"LineString":s=[rg(l)]}s.forEach(function(h){var m=PW(h,e.properties);m.forEach(function(_){_.id=n.length,n.push(_)})})}}function PW(e,n){var s=[];return e.reduce(function(l,h){var m=wE([l,h],n);return m.bbox=RW(l,h),s.push(m),h}),s}function RW(e,n){var s=e[0],l=e[1],h=n[0],m=n[1],_=s<h?s:h,i=l<m?l:m,I=s>h?s:h,C=l>m?l:m;return[_,i,I,C]}var Ky={exports:{}},Xy={exports:{}},BW=Xy.exports,DE;function FW(){return DE||(DE=1,(function(e,n){(function(s,l){e.exports=l()})(BW,function(){function s(Y,q,ue,me,ne){(function De(Me,Ee,ge,Re,Oe){for(;Re>ge;){if(Re-ge>600){var Ne=Re-ge+1,tt=Ee-ge+1,dt=Math.log(Ne),Nt=.5*Math.exp(2*dt/3),re=.5*Math.sqrt(dt*Nt*(Ne-Nt)/Ne)*(tt-Ne/2<0?-1:1),_e=Math.max(ge,Math.floor(Ee-tt*Nt/Ne+re)),D=Math.min(Re,Math.floor(Ee+(Ne-tt)*Nt/Ne+re));De(Me,Ee,_e,D,Oe)}var P=Me[Ee],K=ge,H=Re;for(l(Me,ge,Ee),Oe(Me[Re],P)>0&&l(Me,ge,Re);K<H;){for(l(Me,K,H),K++,H--;Oe(Me[K],P)<0;)K++;for(;Oe(Me[H],P)>0;)H--}Oe(Me[ge],P)===0?l(Me,ge,H):l(Me,++H,Re),H<=Ee&&(ge=H+1),Ee<=H&&(Re=H-1)}})(Y,q,ue||0,me||Y.length-1,ne||h)}function l(Y,q,ue){var me=Y[q];Y[q]=Y[ue],Y[ue]=me}function h(Y,q){return Y<q?-1:Y>q?1:0}var m=function(Y){Y===void 0&&(Y=9),this._maxEntries=Math.max(4,Y),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function _(Y,q,ue){if(!ue)return q.indexOf(Y);for(var me=0;me<q.length;me++)if(ue(Y,q[me]))return me;return-1}function i(Y,q){I(Y,0,Y.children.length,q,Y)}function I(Y,q,ue,me,ne){ne||(ne=pe(null)),ne.minX=1/0,ne.minY=1/0,ne.maxX=-1/0,ne.maxY=-1/0;for(var De=q;De<ue;De++){var Me=Y.children[De];C(ne,Y.leaf?me(Me):Me)}return ne}function C(Y,q){return Y.minX=Math.min(Y.minX,q.minX),Y.minY=Math.min(Y.minY,q.minY),Y.maxX=Math.max(Y.maxX,q.maxX),Y.maxY=Math.max(Y.maxY,q.maxY),Y}function S(Y,q){return Y.minX-q.minX}function L(Y,q){return Y.minY-q.minY}function R(Y){return(Y.maxX-Y.minX)*(Y.maxY-Y.minY)}function U(Y){return Y.maxX-Y.minX+(Y.maxY-Y.minY)}function W(Y,q){return Y.minX<=q.minX&&Y.minY<=q.minY&&q.maxX<=Y.maxX&&q.maxY<=Y.maxY}function le(Y,q){return q.minX<=Y.maxX&&q.minY<=Y.maxY&&q.maxX>=Y.minX&&q.maxY>=Y.minY}function pe(Y){return{children:Y,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ie(Y,q,ue,me,ne){for(var De=[q,ue];De.length;)if(!((ue=De.pop())-(q=De.pop())<=me)){var Me=q+Math.ceil((ue-q)/me/2)*me;s(Y,Me,q,ue,ne),De.push(q,Me,Me,ue)}}return m.prototype.all=function(){return this._all(this.data,[])},m.prototype.search=function(Y){var q=this.data,ue=[];if(!le(Y,q))return ue;for(var me=this.toBBox,ne=[];q;){for(var De=0;De<q.children.length;De++){var Me=q.children[De],Ee=q.leaf?me(Me):Me;le(Y,Ee)&&(q.leaf?ue.push(Me):W(Y,Ee)?this._all(Me,ue):ne.push(Me))}q=ne.pop()}return ue},m.prototype.collides=function(Y){var q=this.data;if(!le(Y,q))return!1;for(var ue=[];q;){for(var me=0;me<q.children.length;me++){var ne=q.children[me],De=q.leaf?this.toBBox(ne):ne;if(le(Y,De)){if(q.leaf||W(Y,De))return!0;ue.push(ne)}}q=ue.pop()}return!1},m.prototype.load=function(Y){if(!Y||!Y.length)return this;if(Y.length<this._minEntries){for(var q=0;q<Y.length;q++)this.insert(Y[q]);return this}var ue=this._build(Y.slice(),0,Y.length-1,0);if(this.data.children.length)if(this.data.height===ue.height)this._splitRoot(this.data,ue);else{if(this.data.height<ue.height){var me=this.data;this.data=ue,ue=me}this._insert(ue,this.data.height-ue.height-1,!0)}else this.data=ue;return this},m.prototype.insert=function(Y){return Y&&this._insert(Y,this.data.height-1),this},m.prototype.clear=function(){return this.data=pe([]),this},m.prototype.remove=function(Y,q){if(!Y)return this;for(var ue,me,ne,De=this.data,Me=this.toBBox(Y),Ee=[],ge=[];De||Ee.length;){if(De||(De=Ee.pop(),me=Ee[Ee.length-1],ue=ge.pop(),ne=!0),De.leaf){var Re=_(Y,De.children,q);if(Re!==-1)return De.children.splice(Re,1),Ee.push(De),this._condense(Ee),this}ne||De.leaf||!W(De,Me)?me?(ue++,De=me.children[ue],ne=!1):De=null:(Ee.push(De),ge.push(ue),ue=0,me=De,De=De.children[0])}return this},m.prototype.toBBox=function(Y){return Y},m.prototype.compareMinX=function(Y,q){return Y.minX-q.minX},m.prototype.compareMinY=function(Y,q){return Y.minY-q.minY},m.prototype.toJSON=function(){return this.data},m.prototype.fromJSON=function(Y){return this.data=Y,this},m.prototype._all=function(Y,q){for(var ue=[];Y;)Y.leaf?q.push.apply(q,Y.children):ue.push.apply(ue,Y.children),Y=ue.pop();return q},m.prototype._build=function(Y,q,ue,me){var ne,De=ue-q+1,Me=this._maxEntries;if(De<=Me)return i(ne=pe(Y.slice(q,ue+1)),this.toBBox),ne;me||(me=Math.ceil(Math.log(De)/Math.log(Me)),Me=Math.ceil(De/Math.pow(Me,me-1))),(ne=pe([])).leaf=!1,ne.height=me;var Ee=Math.ceil(De/Me),ge=Ee*Math.ceil(Math.sqrt(Me));ie(Y,q,ue,ge,this.compareMinX);for(var Re=q;Re<=ue;Re+=ge){var Oe=Math.min(Re+ge-1,ue);ie(Y,Re,Oe,Ee,this.compareMinY);for(var Ne=Re;Ne<=Oe;Ne+=Ee){var tt=Math.min(Ne+Ee-1,Oe);ne.children.push(this._build(Y,Ne,tt,me-1))}}return i(ne,this.toBBox),ne},m.prototype._chooseSubtree=function(Y,q,ue,me){for(;me.push(q),!q.leaf&&me.length-1!==ue;){for(var ne=1/0,De=1/0,Me=void 0,Ee=0;Ee<q.children.length;Ee++){var ge=q.children[Ee],Re=R(ge),Oe=(Ne=Y,tt=ge,(Math.max(tt.maxX,Ne.maxX)-Math.min(tt.minX,Ne.minX))*(Math.max(tt.maxY,Ne.maxY)-Math.min(tt.minY,Ne.minY))-Re);Oe<De?(De=Oe,ne=Re<ne?Re:ne,Me=ge):Oe===De&&Re<ne&&(ne=Re,Me=ge)}q=Me||q.children[0]}var Ne,tt;return q},m.prototype._insert=function(Y,q,ue){var me=ue?Y:this.toBBox(Y),ne=[],De=this._chooseSubtree(me,this.data,q,ne);for(De.children.push(Y),C(De,me);q>=0&&ne[q].children.length>this._maxEntries;)this._split(ne,q),q--;this._adjustParentBBoxes(me,ne,q)},m.prototype._split=function(Y,q){var ue=Y[q],me=ue.children.length,ne=this._minEntries;this._chooseSplitAxis(ue,ne,me);var De=this._chooseSplitIndex(ue,ne,me),Me=pe(ue.children.splice(De,ue.children.length-De));Me.height=ue.height,Me.leaf=ue.leaf,i(ue,this.toBBox),i(Me,this.toBBox),q?Y[q-1].children.push(Me):this._splitRoot(ue,Me)},m.prototype._splitRoot=function(Y,q){this.data=pe([Y,q]),this.data.height=Y.height+1,this.data.leaf=!1,i(this.data,this.toBBox)},m.prototype._chooseSplitIndex=function(Y,q,ue){for(var me,ne,De,Me,Ee,ge,Re,Oe=1/0,Ne=1/0,tt=q;tt<=ue-q;tt++){var dt=I(Y,0,tt,this.toBBox),Nt=I(Y,tt,ue,this.toBBox),re=(ne=dt,De=Nt,Me=void 0,Ee=void 0,ge=void 0,Re=void 0,Me=Math.max(ne.minX,De.minX),Ee=Math.max(ne.minY,De.minY),ge=Math.min(ne.maxX,De.maxX),Re=Math.min(ne.maxY,De.maxY),Math.max(0,ge-Me)*Math.max(0,Re-Ee)),_e=R(dt)+R(Nt);re<Oe?(Oe=re,me=tt,Ne=_e<Ne?_e:Ne):re===Oe&&_e<Ne&&(Ne=_e,me=tt)}return me||ue-q},m.prototype._chooseSplitAxis=function(Y,q,ue){var me=Y.leaf?this.compareMinX:S,ne=Y.leaf?this.compareMinY:L;this._allDistMargin(Y,q,ue,me)<this._allDistMargin(Y,q,ue,ne)&&Y.children.sort(me)},m.prototype._allDistMargin=function(Y,q,ue,me){Y.children.sort(me);for(var ne=this.toBBox,De=I(Y,0,q,ne),Me=I(Y,ue-q,ue,ne),Ee=U(De)+U(Me),ge=q;ge<ue-q;ge++){var Re=Y.children[ge];C(De,Y.leaf?ne(Re):Re),Ee+=U(De)}for(var Oe=ue-q-1;Oe>=q;Oe--){var Ne=Y.children[Oe];C(Me,Y.leaf?ne(Ne):Ne),Ee+=U(Me)}return Ee},m.prototype._adjustParentBBoxes=function(Y,q,ue){for(var me=ue;me>=0;me--)C(q[me],Y)},m.prototype._condense=function(Y){for(var q=Y.length-1,ue=void 0;q>=0;q--)Y[q].children.length===0?q>0?(ue=Y[q-1].children).splice(ue.indexOf(Y[q]),1):this.clear():i(Y[q],this.toBBox)},m})})(Xy)),Xy.exports}var UM={},SE;function EE(){return SE||(SE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=63710088e-1,e.factors={centimeters:e.earthRadius*100,centimetres:e.earthRadius*100,degrees:e.earthRadius/111325,feet:e.earthRadius*3.28084,inches:e.earthRadius*39.37,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:e.earthRadius*1e3,millimetres:e.earthRadius*1e3,nauticalmiles:e.earthRadius/1852,radians:1,yards:e.earthRadius*1.0936},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function n(Re,Oe,Ne){Ne===void 0&&(Ne={});var tt={type:"Feature"};return(Ne.id===0||Ne.id)&&(tt.id=Ne.id),Ne.bbox&&(tt.bbox=Ne.bbox),tt.properties=Oe||{},tt.geometry=Re,tt}e.feature=n;function s(Re,Oe,Ne){switch(Re){case"Point":return l(Oe).geometry;case"LineString":return i(Oe).geometry;case"Polygon":return m(Oe).geometry;case"MultiPoint":return L(Oe).geometry;case"MultiLineString":return S(Oe).geometry;case"MultiPolygon":return R(Oe).geometry;default:throw new Error(Re+" is invalid")}}e.geometry=s;function l(Re,Oe,Ne){if(Ne===void 0&&(Ne={}),!Re)throw new Error("coordinates is required");if(!Array.isArray(Re))throw new Error("coordinates must be an Array");if(Re.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!De(Re[0])||!De(Re[1]))throw new Error("coordinates must contain numbers");var tt={type:"Point",coordinates:Re};return n(tt,Oe,Ne)}e.point=l;function h(Re,Oe,Ne){return Ne===void 0&&(Ne={}),C(Re.map(function(tt){return l(tt,Oe)}),Ne)}e.points=h;function m(Re,Oe,Ne){Ne===void 0&&(Ne={});for(var tt=0,dt=Re;tt<dt.length;tt++){var Nt=dt[tt];if(Nt.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var re=0;re<Nt[Nt.length-1].length;re++)if(Nt[Nt.length-1][re]!==Nt[0][re])throw new Error("First and last Position are not equivalent.")}var _e={type:"Polygon",coordinates:Re};return n(_e,Oe,Ne)}e.polygon=m;function _(Re,Oe,Ne){return Ne===void 0&&(Ne={}),C(Re.map(function(tt){return m(tt,Oe)}),Ne)}e.polygons=_;function i(Re,Oe,Ne){if(Ne===void 0&&(Ne={}),Re.length<2)throw new Error("coordinates must be an array of two or more positions");var tt={type:"LineString",coordinates:Re};return n(tt,Oe,Ne)}e.lineString=i;function I(Re,Oe,Ne){return Ne===void 0&&(Ne={}),C(Re.map(function(tt){return i(tt,Oe)}),Ne)}e.lineStrings=I;function C(Re,Oe){Oe===void 0&&(Oe={});var Ne={type:"FeatureCollection"};return Oe.id&&(Ne.id=Oe.id),Oe.bbox&&(Ne.bbox=Oe.bbox),Ne.features=Re,Ne}e.featureCollection=C;function S(Re,Oe,Ne){Ne===void 0&&(Ne={});var tt={type:"MultiLineString",coordinates:Re};return n(tt,Oe,Ne)}e.multiLineString=S;function L(Re,Oe,Ne){Ne===void 0&&(Ne={});var tt={type:"MultiPoint",coordinates:Re};return n(tt,Oe,Ne)}e.multiPoint=L;function R(Re,Oe,Ne){Ne===void 0&&(Ne={});var tt={type:"MultiPolygon",coordinates:Re};return n(tt,Oe,Ne)}e.multiPolygon=R;function U(Re,Oe,Ne){Ne===void 0&&(Ne={});var tt={type:"GeometryCollection",geometries:Re};return n(tt,Oe,Ne)}e.geometryCollection=U;function W(Re,Oe){if(Oe===void 0&&(Oe=0),Oe&&!(Oe>=0))throw new Error("precision must be a positive number");var Ne=Math.pow(10,Oe||0);return Math.round(Re*Ne)/Ne}e.round=W;function le(Re,Oe){Oe===void 0&&(Oe="kilometers");var Ne=e.factors[Oe];if(!Ne)throw new Error(Oe+" units is invalid");return Re*Ne}e.radiansToLength=le;function pe(Re,Oe){Oe===void 0&&(Oe="kilometers");var Ne=e.factors[Oe];if(!Ne)throw new Error(Oe+" units is invalid");return Re/Ne}e.lengthToRadians=pe;function ie(Re,Oe){return q(pe(Re,Oe))}e.lengthToDegrees=ie;function Y(Re){var Oe=Re%360;return Oe<0&&(Oe+=360),Oe}e.bearingToAzimuth=Y;function q(Re){var Oe=Re%(2*Math.PI);return Oe*180/Math.PI}e.radiansToDegrees=q;function ue(Re){var Oe=Re%360;return Oe*Math.PI/180}e.degreesToRadians=ue;function me(Re,Oe,Ne){if(Oe===void 0&&(Oe="kilometers"),Ne===void 0&&(Ne="kilometers"),!(Re>=0))throw new Error("length must be a positive number");return le(pe(Re,Oe),Ne)}e.convertLength=me;function ne(Re,Oe,Ne){if(Oe===void 0&&(Oe="meters"),Ne===void 0&&(Ne="kilometers"),!(Re>=0))throw new Error("area must be a positive number");var tt=e.areaFactors[Oe];if(!tt)throw new Error("invalid original units");var dt=e.areaFactors[Ne];if(!dt)throw new Error("invalid final units");return Re/tt*dt}e.convertArea=ne;function De(Re){return!isNaN(Re)&&Re!==null&&!Array.isArray(Re)}e.isNumber=De;function Me(Re){return!!Re&&Re.constructor===Object}e.isObject=Me;function Ee(Re){if(!Re)throw new Error("bbox is required");if(!Array.isArray(Re))throw new Error("bbox must be an Array");if(Re.length!==4&&Re.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");Re.forEach(function(Oe){if(!De(Oe))throw new Error("bbox must only contain numbers")})}e.validateBBox=Ee;function ge(Re){if(!Re)throw new Error("id is required");if(["string","number"].indexOf(typeof Re)===-1)throw new Error("id must be a number or a string")}e.validateId=ge})(UM)),UM}var Oo={},NE;function LE(){if(NE)return Oo;NE=1,Object.defineProperty(Oo,"__esModule",{value:!0});var e=EE();function n(Y,q,ue){if(Y!==null)for(var me,ne,De,Me,Ee,ge,Re,Oe=0,Ne=0,tt,dt=Y.type,Nt=dt==="FeatureCollection",re=dt==="Feature",_e=Nt?Y.features.length:1,D=0;D<_e;D++){Re=Nt?Y.features[D].geometry:re?Y.geometry:Y,tt=Re?Re.type==="GeometryCollection":!1,Ee=tt?Re.geometries.length:1;for(var P=0;P<Ee;P++){var K=0,H=0;if(Me=tt?Re.geometries[P]:Re,Me!==null){ge=Me.coordinates;var Q=Me.type;switch(Oe=ue&&(Q==="Polygon"||Q==="MultiPolygon")?1:0,Q){case null:break;case"Point":if(q(ge,Ne,D,K,H)===!1)return!1;Ne++,K++;break;case"LineString":case"MultiPoint":for(me=0;me<ge.length;me++){if(q(ge[me],Ne,D,K,H)===!1)return!1;Ne++,Q==="MultiPoint"&&K++}Q==="LineString"&&K++;break;case"Polygon":case"MultiLineString":for(me=0;me<ge.length;me++){for(ne=0;ne<ge[me].length-Oe;ne++){if(q(ge[me][ne],Ne,D,K,H)===!1)return!1;Ne++}Q==="MultiLineString"&&K++,Q==="Polygon"&&H++}Q==="Polygon"&&K++;break;case"MultiPolygon":for(me=0;me<ge.length;me++){for(H=0,ne=0;ne<ge[me].length;ne++){for(De=0;De<ge[me][ne].length-Oe;De++){if(q(ge[me][ne][De],Ne,D,K,H)===!1)return!1;Ne++}H++}K++}break;case"GeometryCollection":for(me=0;me<Me.geometries.length;me++)if(n(Me.geometries[me],q,ue)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function s(Y,q,ue,me){var ne=ue;return n(Y,function(De,Me,Ee,ge,Re){Me===0&&ue===void 0?ne=De:ne=q(ne,De,Me,Ee,ge,Re)},me),ne}function l(Y,q){var ue;switch(Y.type){case"FeatureCollection":for(ue=0;ue<Y.features.length&&q(Y.features[ue].properties,ue)!==!1;ue++);break;case"Feature":q(Y.properties,0);break}}function h(Y,q,ue){var me=ue;return l(Y,function(ne,De){De===0&&ue===void 0?me=ne:me=q(me,ne,De)}),me}function m(Y,q){if(Y.type==="Feature")q(Y,0);else if(Y.type==="FeatureCollection")for(var ue=0;ue<Y.features.length&&q(Y.features[ue],ue)!==!1;ue++);}function _(Y,q,ue){var me=ue;return m(Y,function(ne,De){De===0&&ue===void 0?me=ne:me=q(me,ne,De)}),me}function i(Y){var q=[];return n(Y,function(ue){q.push(ue)}),q}function I(Y,q){var ue,me,ne,De,Me,Ee,ge,Re,Oe,Ne,tt=0,dt=Y.type==="FeatureCollection",Nt=Y.type==="Feature",re=dt?Y.features.length:1;for(ue=0;ue<re;ue++){for(Ee=dt?Y.features[ue].geometry:Nt?Y.geometry:Y,Re=dt?Y.features[ue].properties:Nt?Y.properties:{},Oe=dt?Y.features[ue].bbox:Nt?Y.bbox:void 0,Ne=dt?Y.features[ue].id:Nt?Y.id:void 0,ge=Ee?Ee.type==="GeometryCollection":!1,Me=ge?Ee.geometries.length:1,ne=0;ne<Me;ne++){if(De=ge?Ee.geometries[ne]:Ee,De===null){if(q(null,tt,Re,Oe,Ne)===!1)return!1;continue}switch(De.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(q(De,tt,Re,Oe,Ne)===!1)return!1;break}case"GeometryCollection":{for(me=0;me<De.geometries.length;me++)if(q(De.geometries[me],tt,Re,Oe,Ne)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}tt++}}function C(Y,q,ue){var me=ue;return I(Y,function(ne,De,Me,Ee,ge){De===0&&ue===void 0?me=ne:me=q(me,ne,De,Me,Ee,ge)}),me}function S(Y,q){I(Y,function(ue,me,ne,De,Me){var Ee=ue===null?null:ue.type;switch(Ee){case null:case"Point":case"LineString":case"Polygon":return q(e.feature(ue,ne,{bbox:De,id:Me}),me,0)===!1?!1:void 0}var ge;switch(Ee){case"MultiPoint":ge="Point";break;case"MultiLineString":ge="LineString";break;case"MultiPolygon":ge="Polygon";break}for(var Re=0;Re<ue.coordinates.length;Re++){var Oe=ue.coordinates[Re],Ne={type:ge,coordinates:Oe};if(q(e.feature(Ne,ne),me,Re)===!1)return!1}})}function L(Y,q,ue){var me=ue;return S(Y,function(ne,De,Me){De===0&&Me===0&&ue===void 0?me=ne:me=q(me,ne,De,Me)}),me}function R(Y,q){S(Y,function(ue,me,ne){var De=0;if(ue.geometry){var Me=ue.geometry.type;if(!(Me==="Point"||Me==="MultiPoint")){var Ee,ge=0,Re=0,Oe=0;if(n(ue,function(Ne,tt,dt,Nt,re){if(Ee===void 0||me>ge||Nt>Re||re>Oe){Ee=Ne,ge=me,Re=Nt,Oe=re,De=0;return}var _e=e.lineString([Ee,Ne],ue.properties);if(q(_e,me,ne,re,De)===!1)return!1;De++,Ee=Ne})===!1)return!1}}})}function U(Y,q,ue){var me=ue,ne=!1;return R(Y,function(De,Me,Ee,ge,Re){ne===!1&&ue===void 0?me=De:me=q(me,De,Me,Ee,ge,Re),ne=!0}),me}function W(Y,q){if(!Y)throw new Error("geojson is required");S(Y,function(ue,me,ne){if(ue.geometry!==null){var De=ue.geometry.type,Me=ue.geometry.coordinates;switch(De){case"LineString":if(q(ue,me,ne,0,0)===!1)return!1;break;case"Polygon":for(var Ee=0;Ee<Me.length;Ee++)if(q(e.lineString(Me[Ee],ue.properties),me,ne,Ee)===!1)return!1;break}}})}function le(Y,q,ue){var me=ue;return W(Y,function(ne,De,Me,Ee){De===0&&ue===void 0?me=ne:me=q(me,ne,De,Me,Ee)}),me}function pe(Y,q){if(q=q||{},!e.isObject(q))throw new Error("options is invalid");var ue=q.featureIndex||0,me=q.multiFeatureIndex||0,ne=q.geometryIndex||0,De=q.segmentIndex||0,Me=q.properties,Ee;switch(Y.type){case"FeatureCollection":ue<0&&(ue=Y.features.length+ue),Me=Me||Y.features[ue].properties,Ee=Y.features[ue].geometry;break;case"Feature":Me=Me||Y.properties,Ee=Y.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":Ee=Y;break;default:throw new Error("geojson is invalid")}if(Ee===null)return null;var ge=Ee.coordinates;switch(Ee.type){case"Point":case"MultiPoint":return null;case"LineString":return De<0&&(De=ge.length+De-1),e.lineString([ge[De],ge[De+1]],Me,q);case"Polygon":return ne<0&&(ne=ge.length+ne),De<0&&(De=ge[ne].length+De-1),e.lineString([ge[ne][De],ge[ne][De+1]],Me,q);case"MultiLineString":return me<0&&(me=ge.length+me),De<0&&(De=ge[me].length+De-1),e.lineString([ge[me][De],ge[me][De+1]],Me,q);case"MultiPolygon":return me<0&&(me=ge.length+me),ne<0&&(ne=ge[me].length+ne),De<0&&(De=ge[me][ne].length-De-1),e.lineString([ge[me][ne][De],ge[me][ne][De+1]],Me,q)}throw new Error("geojson is invalid")}function ie(Y,q){if(q=q||{},!e.isObject(q))throw new Error("options is invalid");var ue=q.featureIndex||0,me=q.multiFeatureIndex||0,ne=q.geometryIndex||0,De=q.coordIndex||0,Me=q.properties,Ee;switch(Y.type){case"FeatureCollection":ue<0&&(ue=Y.features.length+ue),Me=Me||Y.features[ue].properties,Ee=Y.features[ue].geometry;break;case"Feature":Me=Me||Y.properties,Ee=Y.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":Ee=Y;break;default:throw new Error("geojson is invalid")}if(Ee===null)return null;var ge=Ee.coordinates;switch(Ee.type){case"Point":return e.point(ge,Me,q);case"MultiPoint":return me<0&&(me=ge.length+me),e.point(ge[me],Me,q);case"LineString":return De<0&&(De=ge.length+De),e.point(ge[De],Me,q);case"Polygon":return ne<0&&(ne=ge.length+ne),De<0&&(De=ge[ne].length+De),e.point(ge[ne][De],Me,q);case"MultiLineString":return me<0&&(me=ge.length+me),De<0&&(De=ge[me].length+De),e.point(ge[me][De],Me,q);case"MultiPolygon":return me<0&&(me=ge.length+me),ne<0&&(ne=ge[me].length+ne),De<0&&(De=ge[me][ne].length-De),e.point(ge[me][ne][De],Me,q)}throw new Error("geojson is invalid")}return Oo.coordAll=i,Oo.coordEach=n,Oo.coordReduce=s,Oo.featureEach=m,Oo.featureReduce=_,Oo.findPoint=ie,Oo.findSegment=pe,Oo.flattenEach=S,Oo.flattenReduce=L,Oo.geomEach=I,Oo.geomReduce=C,Oo.lineEach=W,Oo.lineReduce=le,Oo.propEach=l,Oo.propReduce=h,Oo.segmentEach=R,Oo.segmentReduce=U,Oo}var Jy={},kE;function UW(){if(kE)return Jy;kE=1,Object.defineProperty(Jy,"__esModule",{value:!0});var e=LE();function n(s){var l=[1/0,1/0,-1/0,-1/0];return e.coordEach(s,function(h){l[0]>h[0]&&(l[0]=h[0]),l[1]>h[1]&&(l[1]=h[1]),l[2]<h[0]&&(l[2]=h[0]),l[3]<h[1]&&(l[3]=h[1])}),l}return n.default=n,Jy.default=n,Jy}var zE;function VW(){if(zE)return Ky.exports;zE=1;var e=FW(),n=EE(),s=LE(),l=UW().default,h=s.featureEach;s.coordEach,n.polygon;var m=n.featureCollection;function _(i){var I=new e(i);return I.insert=function(C){if(C.type!=="Feature")throw new Error("invalid feature");return C.bbox=C.bbox?C.bbox:l(C),e.prototype.insert.call(this,C)},I.load=function(C){var S=[];return Array.isArray(C)?C.forEach(function(L){if(L.type!=="Feature")throw new Error("invalid features");L.bbox=L.bbox?L.bbox:l(L),S.push(L)}):h(C,function(L){if(L.type!=="Feature")throw new Error("invalid features");L.bbox=L.bbox?L.bbox:l(L),S.push(L)}),e.prototype.load.call(this,S)},I.remove=function(C,S){if(C.type!=="Feature")throw new Error("invalid feature");return C.bbox=C.bbox?C.bbox:l(C),e.prototype.remove.call(this,C,S)},I.clear=function(){return e.prototype.clear.call(this)},I.search=function(C){var S=e.prototype.search.call(this,this.toBBox(C));return m(S)},I.collides=function(C){return e.prototype.collides.call(this,this.toBBox(C))},I.all=function(){var C=e.prototype.all.call(this);return m(C)},I.toJSON=function(){return e.prototype.toJSON.call(this)},I.fromJSON=function(C){return e.prototype.fromJSON.call(this,C)},I.toBBox=function(C){var S;if(C.bbox)S=C.bbox;else if(Array.isArray(C)&&C.length===4)S=C;else if(Array.isArray(C)&&C.length===6)S=[C[0],C[1],C[3],C[4]];else if(C.type==="Feature")S=l(C);else if(C.type==="FeatureCollection")S=l(C);else throw new Error("invalid geojson");return{minX:S[0],minY:S[1],maxX:S[2],maxY:S[3]}},I}return Ky.exports=_,Ky.exports.default=_,Ky.exports}var HW=VW();const QW=nd(HW);function VM(e,n){var s={},l=[];if(e.type==="LineString"&&(e=Yu(e)),n.type==="LineString"&&(n=Yu(n)),e.type==="Feature"&&n.type==="Feature"&&e.geometry!==null&&n.geometry!==null&&e.geometry.type==="LineString"&&n.geometry.type==="LineString"&&e.geometry.coordinates.length===2&&n.geometry.coordinates.length===2){var h=OE(e,n);return h&&l.push(h),Wy(l)}var m=QW();return m.load(CE(n)),TE(CE(e),function(_){TE(m.search(_),function(i){var I=OE(_,i);if(I){var C=rg(I).join(",");s[C]||(s[C]=!0,l.push(I))}})}),Wy(l)}function OE(e,n){var s=rg(e),l=rg(n);if(s.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(l.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var h=s[0][0],m=s[0][1],_=s[1][0],i=s[1][1],I=l[0][0],C=l[0][1],S=l[1][0],L=l[1][1],R=(L-C)*(_-h)-(S-I)*(i-m),U=(S-I)*(m-C)-(L-C)*(h-I),W=(_-h)*(m-C)-(i-m)*(h-I);if(R===0)return null;var le=U/R,pe=W/R;if(le>=0&&le<=1&&pe>=0&&pe<=1){var ie=h+le*(_-h),Y=m+le*(i-m);return bE([ie,Y])}return null}function HM(e,n){n===void 0&&(n={});var s=qy(e);switch(!n.properties&&e.type==="Feature"&&(n.properties=e.properties),s.type){case"Polygon":return YW(s,n);case"MultiPolygon":return GW(s,n);default:throw new Error("invalid poly")}}function YW(e,n){n===void 0&&(n={});var s=qy(e),l=s.coordinates,h=n.properties?n.properties:e.type==="Feature"?e.properties:{};return jE(l,h)}function GW(e,n){n===void 0&&(n={});var s=qy(e),l=s.coordinates,h=n.properties?n.properties:e.type==="Feature"?e.properties:{},m=[];return l.forEach(function(_){m.push(jE(_,h))}),Wy(m)}function jE(e,n){return e.length>1?NW(e,n):wE(e[0],n)}function $W(e,n){var s=!0;return ig(e,function(l){ig(n,function(h){if(s===!1)return!1;s=ZW(l.geometry,h.geometry)})}),s}function ZW(e,n){switch(e.type){case"Point":switch(n.type){case"Point":return!XW(e.coordinates,n.coordinates);case"LineString":return!PE(n,e);case"Polygon":return!og(e,n)}break;case"LineString":switch(n.type){case"Point":return!PE(e,n);case"LineString":return!WW(e,n);case"Polygon":return!RE(n,e)}break;case"Polygon":switch(n.type){case"Point":return!og(n,e);case"LineString":return!RE(e,n);case"Polygon":return!qW(n,e)}}return!1}function PE(e,n){for(var s=0;s<e.coordinates.length-1;s++)if(KW(e.coordinates[s],e.coordinates[s+1],n.coordinates))return!0;return!1}function WW(e,n){var s=VM(e,n);return s.features.length>0}function RE(e,n){for(var s=0,l=n.coordinates;s<l.length;s++){var h=l[s];if(og(h,e))return!0}var m=VM(n,HM(e));return m.features.length>0}function qW(e,n){for(var s=0,l=e.coordinates[0];s<l.length;s++){var h=l[s];if(og(h,n))return!0}for(var m=0,_=n.coordinates[0];m<_.length;m++){var i=_[m];if(og(i,e))return!0}var I=VM(HM(e),HM(n));return I.features.length>0}function KW(e,n,s){var l=s[0]-e[0],h=s[1]-e[1],m=n[0]-e[0],_=n[1]-e[1],i=l*_-h*m;return i!==0?!1:Math.abs(m)>=Math.abs(_)?m>0?e[0]<=s[0]&&s[0]<=n[0]:n[0]<=s[0]&&s[0]<=e[0]:_>0?e[1]<=s[1]&&s[1]<=n[1]:n[1]<=s[1]&&s[1]<=e[1]}function XW(e,n){return e[0]===n[0]&&e[1]===n[1]}function JW(e,n){var s=!1;return ig(e,function(l){ig(n,function(h){if(s===!0)return!0;s=!$W(l.geometry,h.geometry)})}),s}const eq=()=>{const[e,n]=ve.useState(!1),[s,l]=ve.useState(!1),h=Xo(),m=_E(),_=fn(jM),i=fn(ng),I=fn(PM),C=fn($y),S=fn(as),L=fn(Gy),R=fn(mE),U=fn(wd),W=fn(EW),le=fn(RM),[pe,ie]=ve.useState(!1),[Y,q]=fr(Ya),ue=fr(Zy),[me]=fr(xE),[ne,De]=ve.useState({id:null,originalRule:null}),[Me,Ee]=ve.useState(null);ve.useEffect(()=>{m&&ge()},[m]),ve.useEffect(()=>{ge()},[S,Y,C,I,L,_,R,i,me]);function ge(){const tt=U.find(dt=>dt.name?.toLowerCase()===Y.toLowerCase());if(!I&&ne.id&&S&&pe&&(window.mapsindoors.services.LocationsService.getLocation(ne.id).then(dt=>{dt&&(S.setDisplayRule(dt.id,ne.originalRule||null),ie(!1))}),De({id:null,originalRule:null})),S&&tt){if(n(!0),I&&h)De(dt=>({...dt,id:I})),window.mapsindoors.services.LocationsService.getLocation(I).then(dt=>{if(dt){const Nt=dt.properties.floor;S.setFloor(Nt);const re=S.getDisplayRule(dt);De(_e=>({..._e,originalRule:{...re}})),Re(dt),tg().then(_e=>{l(dt.geometry),Aa(dt.geometry,S,_e,0,R?Ne(R):void 0,W,_)})}});else if(C&&!le){if(!Me&&S){const dt=S.getMapView().getCenter();Ee(dt)}wr(me)?window.mapsindoors.services.LocationsService.getLocation(C).then(dt=>{if(dt){const Nt=dt.properties.floor;S.setFloor(Nt),h?Lc().then(re=>{l(dt.geometry),Aa(dt.geometry,S,0,re,R?Ne(R):void 0,W,_)}):Md().then(re=>{l(dt.geometry),Aa(dt.geometry,S,re,0,R?Ne(R):void 0,W,_)})}}):window.mapsindoors.services.LocationsService.getLocation(C).then(dt=>{if(dt){const Nt=dt.properties.floor;S.setFloor(Nt),h?Lc().then(re=>{l(Oe().geometry),Aa(Oe().geometry,S,0,re,Ne(R),W,_)}):Md().then(re=>{l(Oe().geometry),Aa(Oe().geometry,S,re,0,Ne(R),W,_)})}})}else if(!C&&Me&&S)S.getMapView().setCenter(Me),Ee(null);else if(tt)if(le)h?(l(tt.geometry),Aa(tt.geometry,S,0,0,Ne(R),W,_)):Md().then(dt=>{l(tt.geometry),Aa(tt.geometry,S,dt,0,Ne(R),W,_)});else{const dt=U.find(Nt=>JW(Nt.geometry,Oe().geometry));wr(me)?(l(tt.geometry),Aa(tt.geometry,S,0,0,Ne(R),W,_)):wr(dt)?h?Lc().then(Nt=>{l(Oe().geometry),Aa(Oe().geometry,S,0,Nt,Ne(R),W,_)}):Md().then(Nt=>{l(Oe().geometry),Aa(Oe().geometry,S,Nt,0,Ne(R),W,_)}):(h?Lc().then(Nt=>{l(Oe().geometry),Aa(Oe().geometry,S,0,Nt,Ne(R),W,_)}):Md().then(Nt=>{l(Oe().geometry),Aa(Oe().geometry,S,Nt,0,Ne(R),W,_)}),ue&&q(dt.name))}}}function Re(tt){if(pe)return;const dt=S.getDisplayRule(tt);dt.visible=!0,dt.iconSize={width:dt.iconSize.width*2,height:dt.iconSize.height*2},dt.iconVisible=!0,dt.zoomFrom=0,dt.zoomTo=999,dt.clickable=!1,S.setDisplayRule(tt.id,dt),ie(!0)}function Oe(){const[tt,dt]=me?me.split(",").map(Number):[void 0,void 0];return{geometry:{type:"Point",coordinates:[tt,dt]}}}function Ne(tt){return wr(tt)?18:tt}return[e,s]};function Aa(e,n,s,l,h,m,_){const i=Number(m),I=Number(_),C=h!==void 0?Number(h):void 0;if(C===void 0)n.getMapView().tilt(i||0),n.getMapView().rotate(I||0),n.goTo({type:"Feature",geometry:e,properties:{}},{maxZoom:C??22,padding:{top:0,right:0,bottom:s,left:l}});else{const S=OW(e);n.getMapView().setCenter({lat:S.geometry.coordinates[1],lng:S.geometry.coordinates[0]}),n.getMapView().tilt(i||0),n.getMapView().rotate(I||0),n.setZoom(C)}}const BE=pi({key:"hideNonMatches",default:!1});function Id(e){const[n,s]=ve.useState(()=>document.querySelector(e));return ve.useEffect(()=>{if(n)return;const l=document.querySelector(e);if(l){s(l);return}const h=new MutationObserver(()=>{const m=document.querySelector(e);m&&(s(m),h.disconnect())});return h.observe(document.body,{childList:!0,subtree:!0}),()=>h.disconnect()},[e,n]),n}const tq=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 3H9V5H5V9H3V3ZM15 3H21V9H19V5H15V3ZM5 15V19H9V21H3V15H5ZM21 15V21H15V19H19V15H21Z",fill:"#666666",style:{fill:"#666666",fill:"color(display-p3 0.4000 0.4000 0.4000)",fillOpacity:1}}),jn.createElement("rect",{x:9,y:9,width:6,height:6,fill:"#666666",style:{fill:"#666666",fill:"color(display-p3 0.4000 0.4000 0.4000)",fillOpacity:1}})),Td=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M6 6L18 18",stroke:"#636971",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),jn.createElement("path",{d:"M18 6L6 18",stroke:"#636971",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));FE.propTypes={isViewSelectorDisabled:ft.bool,isViewSelectorVisible:ft.bool};function FE({isViewSelectorDisabled:e,isViewSelectorVisible:n}){const{t:s}=oo(),[l,h]=ve.useState(!1),[m,_]=ve.useState([]),[i,I]=ve.useState(null),C=Xo(),S=fn(as),L=fn(Ya),U=Id(".view-selector-portal"),W=ve.useRef(null),le=ve.useRef(null),pe=6,ie=60;ve.useEffect(()=>{if(S&&L){const De=S.getVenue()?.id;De&&I(De)}},[S,L]),ve.useEffect(()=>{S&&L&&window.mapsindoors.services.VenuesService.getVenues().then(De=>{const Me=De.find(Ee=>Ee.name.toLowerCase()===L.toLowerCase());Me?.id&&I(Me.id)})},[S,L]),ve.useEffect(()=>{i&&window.mapsindoors.services.VenuesService.getBuildings(i).then(De=>{_(De)})},[i]);const Y=ve.useMemo(()=>m.map(De=>({id:De.id,name:De.buildingInfo.name})),[m]),q=ve.useCallback(De=>{S.fitBuilding(De),h(!1)},[S]);if(ve.useEffect(()=>{if(!(l&&C))return;function De(Me){W.current&&!W.current.contains(Me.target)&&le.current&&!le.current.contains(Me.target)&&h(!1)}return document.addEventListener("mousedown",De),()=>{document.removeEventListener("mousedown",De)}},[l,C]),Y.length<=1||n===!1)return null;const ue=()=>Le.jsx("button",{ref:le,className:"view-selector__toggle-button",onClick:()=>h(!l),disabled:e,children:Le.jsx(tq,{})}),me=()=>{const De=ve.useMemo(()=>C&&Y.length>pe?{height:`${pe*ie}px`}:{},[C,Y.length]);return Le.jsx("div",{className:"building-list",style:De,children:Y.map(Me=>Le.jsx("button",{className:"building-list__item",onClick:()=>q(Me.id),children:Le.jsx("span",{children:Me.name})},Me.id))})},ne=Le.jsxs("div",{className:"view-selector",children:[!C&&l&&Le.jsxs("div",{className:"mobile-overlay",children:[Le.jsx("div",{className:"mobile-overlay__backdrop",onClick:()=>h(!1)}),Le.jsxs("div",{className:"view-selector__container view-selector__container--mobile",children:[Le.jsxs("div",{className:"mobile-overlay__header",children:[Le.jsx("button",{className:"mobile-overlay__exit-button",onClick:()=>h(!1),"aria-label":s("Close view selector"),children:Le.jsx(Td,{})}),Le.jsx("span",{children:s("Go to view")})]}),Le.jsx(me,{})]})]}),C?Le.jsxs("div",{className:"view-selector__button-container view-selector__button-container--desktop",children:[l&&Le.jsx("div",{ref:W,className:"view-selector__container view-selector__container--desktop",children:Le.jsx(me,{})}),Le.jsx(ue,{})]}):Le.jsx(ue,{})]});return U?os.createPortal(ne,U):null}const nq=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.00177 3V5H13.0018V7H11.3742C11.0618 8.91166 10.4455 10.5244 9.43896 11.8188C10.1899 12.3437 11.1128 12.7471 12.2443 13.0299L13.2145 13.2725L12.7294 15.2128L11.7593 14.9702C10.2984 14.605 9.04252 14.0424 8.00171 13.245C6.96091 14.0424 5.70503 14.6049 4.24428 14.9701L3.27413 15.2127L2.78906 13.2724L3.75921 13.0299C4.89067 12.747 5.81358 12.3436 6.56448 11.8188C5.55798 10.5244 4.94173 8.91163 4.62931 7H3.00177V5H7.00177V3H9.00177ZM6.65973 7C6.92571 8.41424 7.37545 9.52718 8.00174 10.4013C8.62805 9.52718 9.0778 8.41425 9.34379 7H6.65973ZM16.1161 10H17.8874L22.3317 19.481L20.5207 20.3299L19.4286 18H14.5749L13.4828 20.3299L11.6719 19.481L16.1161 10ZM15.5124 16H18.4911L17.0018 12.8227L15.5124 16Z",fill:"#666666",style:{fill:"#666666",fill:"color(display-p3 0.4000 0.4000 0.4000)",fillOpacity:1}}));function UE({toggleButtonRef:e,isExpanded:n,setIsExpanded:s}){return Le.jsx("button",{ref:e,className:"language-selector__toggle-button",onClick:()=>s(l=>!l),"aria-haspopup":"listbox","aria-expanded":n,"aria-label":"Select language",children:Le.jsx(nq,{})})}function VE({supportedLanguages:e,currentLanguage:n,setLanguage:s,setIsExpanded:l}){return Le.jsx("div",{className:"language-selector__list",children:e.map(h=>Le.jsx("button",{className:`language-selector__item${n===h.code?" language-selector__item--selected":""}`,onClick:()=>{s(h.code),l(!1)},children:h.label},h.code))})}function HE({currentLanguage:e,setLanguage:n,isVisible:s}){const{t:l}=oo(),[h,m]=ve.useState(!1),_=ve.useRef(null),i=ve.useRef(null),I=Id(".language-selector-portal"),C=Xo();return ve.useEffect(()=>{if(!(h&&C))return;function S(L){_.current&&!_.current.contains(L.target)&&i.current&&!i.current.contains(L.target)&&m(!1)}return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[h,C]),!s||!I?null:os.createPortal(C?Le.jsxs("div",{className:"language-selector__button-container",children:[h&&Le.jsx("div",{ref:_,className:"language-selector__container",children:Le.jsx(VE,{supportedLanguages:sE,currentLanguage:e,setLanguage:n,setIsExpanded:m})}),Le.jsx(UE,{toggleButtonRef:i,isExpanded:h,setIsExpanded:m})]}):Le.jsxs(Le.Fragment,{children:[Le.jsx(UE,{toggleButtonRef:i,isExpanded:h,setIsExpanded:m}),h&&Le.jsxs("div",{className:"language-selector-overlay",children:[Le.jsx("div",{className:"language-selector-overlay__backdrop",onClick:()=>m(!1)}),Le.jsxs("div",{className:"language-selector__container",children:[Le.jsxs("div",{className:"language-selector-overlay__header",children:[Le.jsx("button",{className:"language-selector-overlay__exit-button",onClick:()=>m(!1),"aria-label":"Close language selector",children:"×"}),Le.jsx("span",{children:l("Select language")})]}),Le.jsx(VE,{supportedLanguages:sE,currentLanguage:e,setLanguage:n,setIsExpanded:m})]})]})]}),I)}HE.propTypes={currentLanguage:ft.string,setLanguage:ft.func.isRequired,isVisible:ft.bool};const kc=pi({key:"appConfig",default:void 0}),iq=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M14.4978 10C14.4978 11.3807 13.3785 12.5 11.9978 12.5C10.6171 12.5 9.4978 11.3807 9.4978 10C9.4978 8.61929 10.6171 7.5 11.9978 7.5C13.3785 7.5 14.4978 8.61929 14.4978 10Z",stroke:"#78716C",strokeWidth:2,strokeLinejoin:"round"}),jn.createElement("path",{d:"M19 10C19 14.8354 14.2437 19.1734 12.5723 20.5484C12.2352 20.8258 11.7648 20.8258 11.4277 20.5484C9.75634 19.1734 5 14.8354 5 10C5 6.13401 8.13401 3 12 3C15.866 3 19 6.13401 19 10Z",stroke:"#78716C",strokeWidth:2,strokeLinejoin:"round"})),Ga=pi({key:"kioskLocation",default:null}),ec=()=>{const e=fn(Ga),n=Xo();return!(!e||e&&!n)};function QE(){const e=Id(".reset-view-portal"),n=ec(),s=fn(PM),l=fn(as),h=fn(Ya),m=fn(Ga),_=Xo();function i(){window.mapsindoors.services.LocationsService.getLocation(s).then(L=>{L&&I([L])}).catch(L=>{console.error("Error resetting map position:",L)})}function I(L){if(!l.goTo)return;const R=L.find(le=>le.id===s);if(R){const le=R.properties.floor;l.setFloor(le)}const U=l.getFloor(),W={type:"FeatureCollection",features:L.filter(le=>parseInt(le.properties.floor,10)===parseInt(U,10)).filter(le=>h&&le.properties.venueId.toLowerCase()===h.toLowerCase()).map(le=>({type:"Feature",geometry:le.geometry,properties:le.properties}))};W.features.length>0&&Promise.all([C(),S()]).then(([le,pe])=>{l.goTo(W,{maxZoom:22,padding:{bottom:le,left:pe,top:0,right:0}})})}function C(){return new Promise(L=>{_?m?tg().then(R=>L(R)):L(0):L(200)})}function S(){return new Promise(L=>{_?m?L(0):Lc().then(R=>L(R)):L(0)})}return!n||!e?null:os.createPortal(Le.jsx("button",{className:"reset-kiosk-view-button",onClick:i,title:"Reset to initial kiosk view","aria-label":"Reset to initial kiosk view",children:Le.jsx(iq,{})}),e)}QE.propTypes={onReset:ft.func,isVisible:ft.bool},YE.propTypes={onLocationClick:ft.func,onMapPositionKnown:ft.func.isRequired,useMapProviderModule:ft.bool.isRequired,onMapPositionInvestigating:ft.func.isRequired,onViewModeSwitchKnown:ft.func.isRequired,resetCount:ft.number.isRequired,mapOptions:ft.object,gmMapId:ft.string,isWayfindingOrDirections:ft.bool,currentLanguage:ft.string,setLanguage:ft.func,devicePosition:ft.object};let QM;function YE({onLocationClick:e,onMapPositionKnown:n,useMapProviderModule:s,onMapPositionInvestigating:l,onViewModeSwitchKnown:h,resetCount:m,mapOptions:_,gmMapId:i,isWayfindingOrDirections:I,currentLanguage:C,setLanguage:S,devicePosition:L}){const R=fn(Hy),U=fn(OM),W=fn(Qy),[le,pe]=fr(bd),[ie,Y]=fr(as),q=bi(xd),ue=bi(Vy),me=fn(Jp),ne=fn(Yy),De=fn(Qa),Me=fn(fE),Ee=fn(jM),ge=fn(Gy),Re=bi(pE),Oe=fn(gE),Ne=bi(eg),tt=fn(BE),dt=fn(kc),[Nt,re]=ve.useState(!1),[_e,D]=ve.useState(!1),P=ec();SW(R);const[K,H]=eq();ve.useEffect(()=>{if(!Oe||U===null&&W===null)return;let he;const Ie=Oe.modules.map(je=>je.toLowerCase()).includes("mapbox");s?Ie?W&&(he=so.Mapbox):U&&(he=so.Google):W?he=so.Mapbox:he=so.Google,he?pe(he):(Ne({text:"Please provide a Mapbox Access Token or Google Maps API key to show a map.",type:"error"}),pe(void 0))},[U,W,Oe]),ve.useEffect(()=>{K&&l()},[K]),ve.useEffect(()=>{H&&n()},[H]),ve.useEffect(()=>{if(!ie)return;const he=me||ne;if(De||!he||he.length===0){ie.highlight?.([]);return}const Ie=he?he.map(je=>je.id):[];tt||!ie.highlight?ie.filter(Ie):ie.highlight(Ie)},[me,ne,ie,tt,De]),ve.useEffect(()=>{ie&&(isNaN(parseInt(ge))||ie.getMapView().tilt(parseInt(ge)),isNaN(parseInt(Ee))||ie.getMapView().rotate(parseInt(Ee)))},[Ee,ge,ie]);const Q=he=>{de(he)},de=he=>{if(he&&QM){let Ie=he.getTileURL();if(Ie){Ie=he.getTileURL().replace("default",QM);const je=Ie?.replace("{floor}",he.getFloor());he.getMapView().setMapsIndoorsTileURL(je)}}},we=(he,Ie,je)=>{he.on("mouseenter",()=>{he.getHoveredLocation()?.properties.locationSettings?.selectable===!1&&he.unhoverLocation()}),he.setDisplayRule(["MI_BUILDING_OUTLINE"],{visible:!1}),he.on("click",it=>e(it)),he.once("building_changed",()=>Q(he)),he.on("floor_changed",()=>de(he)),Y(he),window.mapsIndoorsInstance=he;const Fe=new CustomEvent("mapsIndoorsInstanceAvailable");window.dispatchEvent(Fe);let Ue;le===so.Google?Ue=new window.mapsindoors.directions.GoogleMapsProvider:le===so.Mapbox&&(Ue=new window.mapsindoors.directions.MapboxProvider(W));const He=new window.mapsindoors.services.DirectionsService(Ue);ue(He),Y(he),Ie.nodeName==="MI-MY-POSITION"?(Ie.addEventListener("position_received",it=>{it.detail.accurate===!0&&q(it.detail.position)}),Ie.addEventListener("position_error",()=>{q(null)})):(Ie.on("position_received",it=>{it.accurate===!0&&q(it.position)}),Ie.on("position_error",()=>{q(null)})),Re(Ie),h(je)};return ve.useEffect(()=>{QM=Me||"default",de(ie)},[Me]),ve.useEffect(()=>{dt&&(wr(dt?.appSettings?.viewSelector)?re(!1):re(dt?.appSettings?.viewSelector.trim().toLowerCase()==="true"),wr(dt?.appSettings?.languageSelector)?D(!1):D(dt?.appSettings?.languageSelector.trim().toLowerCase()==="true"))},[dt]),Le.jsxs(Le.Fragment,{children:[R&&le&&Le.jsx(dE,{apiKey:R,mapType:le,mapboxAccessToken:le===so.Mapbox?W:void 0,gmApiKey:le===so.Google?U:void 0,onInitialized:we,resetUICounter:m,mapOptions:_,gmMapId:i,devicePosition:L,isKiosk:P}),R&&le&&Le.jsxs(Le.Fragment,{children:[Le.jsx(FE,{isViewSelectorVisible:Nt,isViewSelectorDisabled:I}),Le.jsx(HE,{currentLanguage:C,setLanguage:S,isVisible:_e&&!I}),Le.jsx(QE,{})]})]})}const oa=pi({key:"primaryColor",default:"#005655"}),YM=pi({key:"logo",default:void 0});function rq(){const e=fn(oa),n=fn(YM);return Le.jsx("div",{className:"splash-screen",children:Le.jsxs("div",{className:"splash-screen__container",children:[Le.jsx("img",{className:"splash-screen__logo "+(n?"splash-screen__logo--visible":""),src:n,alt:""}),Le.jsx("div",{className:"splash-screen__loader",style:{border:`8px solid ${e}33`,borderLeft:`8px solid ${e}`}})]})})}function GE(e,n){if(e==null)return{};var s={};for(var l in e)if({}.hasOwnProperty.call(e,l)){if(n.indexOf(l)!==-1)continue;s[l]=e[l]}return s}function GM(e,n){return GM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,l){return s.__proto__=l,s},GM(e,n)}function $E(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,GM(e,n)}function oq(e,n){return e.classList?!!n&&e.classList.contains(n):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+n+" ")!==-1}function sq(e,n){e.classList?e.classList.add(n):oq(e,n)||(typeof e.className=="string"?e.className=e.className+" "+n:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+n))}function ZE(e,n){return e.replace(new RegExp("(^|\\s)"+n+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function aq(e,n){e.classList?e.classList.remove(n):typeof e.className=="string"?e.className=ZE(e.className,n):e.setAttribute("class",ZE(e.className&&e.className.baseVal||"",n))}const WE={disabled:!1},qE=ve.createContext(null);var KE=function(n){return n.scrollTop},sg="unmounted",Gu="exited",$u="entering",Ad="entered",$M="exiting",tc=(function(e){$E(n,e);function n(l,h){var m;m=e.call(this,l,h)||this;var _=h,i=_&&!_.isMounting?l.enter:l.appear,I;return m.appearStatus=null,l.in?i?(I=Gu,m.appearStatus=$u):I=Ad:l.unmountOnExit||l.mountOnEnter?I=sg:I=Gu,m.state={status:I},m.nextCallback=null,m}n.getDerivedStateFromProps=function(h,m){var _=h.in;return _&&m.status===sg?{status:Gu}:null};var s=n.prototype;return s.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},s.componentDidUpdate=function(h){var m=null;if(h!==this.props){var _=this.state.status;this.props.in?_!==$u&&_!==Ad&&(m=$u):(_===$u||_===Ad)&&(m=$M)}this.updateStatus(!1,m)},s.componentWillUnmount=function(){this.cancelNextCallback()},s.getTimeouts=function(){var h=this.props.timeout,m,_,i;return m=_=i=h,h!=null&&typeof h!="number"&&(m=h.exit,_=h.enter,i=h.appear!==void 0?h.appear:_),{exit:m,enter:_,appear:i}},s.updateStatus=function(h,m){if(h===void 0&&(h=!1),m!==null)if(this.cancelNextCallback(),m===$u){if(this.props.unmountOnExit||this.props.mountOnEnter){var _=this.props.nodeRef?this.props.nodeRef.current:os.findDOMNode(this);_&&KE(_)}this.performEnter(h)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Gu&&this.setState({status:sg})},s.performEnter=function(h){var m=this,_=this.props.enter,i=this.context?this.context.isMounting:h,I=this.props.nodeRef?[i]:[os.findDOMNode(this),i],C=I[0],S=I[1],L=this.getTimeouts(),R=i?L.appear:L.enter;if(!h&&!_||WE.disabled){this.safeSetState({status:Ad},function(){m.props.onEntered(C)});return}this.props.onEnter(C,S),this.safeSetState({status:$u},function(){m.props.onEntering(C,S),m.onTransitionEnd(R,function(){m.safeSetState({status:Ad},function(){m.props.onEntered(C,S)})})})},s.performExit=function(){var h=this,m=this.props.exit,_=this.getTimeouts(),i=this.props.nodeRef?void 0:os.findDOMNode(this);if(!m||WE.disabled){this.safeSetState({status:Gu},function(){h.props.onExited(i)});return}this.props.onExit(i),this.safeSetState({status:$M},function(){h.props.onExiting(i),h.onTransitionEnd(_.exit,function(){h.safeSetState({status:Gu},function(){h.props.onExited(i)})})})},s.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},s.safeSetState=function(h,m){m=this.setNextCallback(m),this.setState(h,m)},s.setNextCallback=function(h){var m=this,_=!0;return this.nextCallback=function(i){_&&(_=!1,m.nextCallback=null,h(i))},this.nextCallback.cancel=function(){_=!1},this.nextCallback},s.onTransitionEnd=function(h,m){this.setNextCallback(m);var _=this.props.nodeRef?this.props.nodeRef.current:os.findDOMNode(this),i=h==null&&!this.props.addEndListener;if(!_||i){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var I=this.props.nodeRef?[this.nextCallback]:[_,this.nextCallback],C=I[0],S=I[1];this.props.addEndListener(C,S)}h!=null&&setTimeout(this.nextCallback,h)},s.render=function(){var h=this.state.status;if(h===sg)return null;var m=this.props,_=m.children;m.in,m.mountOnEnter,m.unmountOnExit,m.appear,m.enter,m.exit,m.timeout,m.addEndListener,m.onEnter,m.onEntering,m.onEntered,m.onExit,m.onExiting,m.onExited,m.nodeRef;var i=GE(m,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ve.createElement(qE.Provider,{value:null},typeof _=="function"?_(h,i):ve.cloneElement(ve.Children.only(_),i))},n})(ve.Component);tc.contextType=qE,tc.propTypes={};function Cd(){}tc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Cd,onEntering:Cd,onEntered:Cd,onExit:Cd,onExiting:Cd,onExited:Cd},tc.UNMOUNTED=sg,tc.EXITED=Gu,tc.ENTERING=$u,tc.ENTERED=Ad,tc.EXITING=$M;var lq=function(n,s){return n&&s&&s.split(" ").forEach(function(l){return sq(n,l)})},ZM=function(n,s){return n&&s&&s.split(" ").forEach(function(l){return aq(n,l)})},WM=(function(e){$E(n,e);function n(){for(var l,h=arguments.length,m=new Array(h),_=0;_<h;_++)m[_]=arguments[_];return l=e.call.apply(e,[this].concat(m))||this,l.appliedClasses={appear:{},enter:{},exit:{}},l.onEnter=function(i,I){var C=l.resolveArguments(i,I),S=C[0],L=C[1];l.removeClasses(S,"exit"),l.addClass(S,L?"appear":"enter","base"),l.props.onEnter&&l.props.onEnter(i,I)},l.onEntering=function(i,I){var C=l.resolveArguments(i,I),S=C[0],L=C[1],R=L?"appear":"enter";l.addClass(S,R,"active"),l.props.onEntering&&l.props.onEntering(i,I)},l.onEntered=function(i,I){var C=l.resolveArguments(i,I),S=C[0],L=C[1],R=L?"appear":"enter";l.removeClasses(S,R),l.addClass(S,R,"done"),l.props.onEntered&&l.props.onEntered(i,I)},l.onExit=function(i){var I=l.resolveArguments(i),C=I[0];l.removeClasses(C,"appear"),l.removeClasses(C,"enter"),l.addClass(C,"exit","base"),l.props.onExit&&l.props.onExit(i)},l.onExiting=function(i){var I=l.resolveArguments(i),C=I[0];l.addClass(C,"exit","active"),l.props.onExiting&&l.props.onExiting(i)},l.onExited=function(i){var I=l.resolveArguments(i),C=I[0];l.removeClasses(C,"exit"),l.addClass(C,"exit","done"),l.props.onExited&&l.props.onExited(i)},l.resolveArguments=function(i,I){return l.props.nodeRef?[l.props.nodeRef.current,i]:[i,I]},l.getClassNames=function(i){var I=l.props.classNames,C=typeof I=="string",S=C&&I?I+"-":"",L=C?""+S+i:I[i],R=C?L+"-active":I[i+"Active"],U=C?L+"-done":I[i+"Done"];return{baseClassName:L,activeClassName:R,doneClassName:U}},l}var s=n.prototype;return s.addClass=function(h,m,_){var i=this.getClassNames(m)[_+"ClassName"],I=this.getClassNames("enter"),C=I.doneClassName;m==="appear"&&_==="done"&&C&&(i+=" "+C),_==="active"&&h&&KE(h),i&&(this.appliedClasses[m][_]=i,lq(h,i))},s.removeClasses=function(h,m){var _=this.appliedClasses[m],i=_.base,I=_.active,C=_.done;this.appliedClasses[m]={},i&&ZM(h,i),I&&ZM(h,I),C&&ZM(h,C)},s.render=function(){var h=this.props;h.classNames;var m=GE(h,["classNames"]);return ve.createElement(tc,DM({},m,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},n})(ve.Component);WM.defaultProps={classNames:""},WM.propTypes={};const cq=e=>jn.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 1.66667C0 0.746192 0.746193 0 1.66667 0H11.6667C12.5872 0 13.3333 0.746193 13.3333 1.66667V20H8.33333V17.5C8.33333 16.5795 7.58714 15.8333 6.66667 15.8333C5.74619 15.8333 5 16.5795 5 17.5V20H0V1.66667ZM14.5833 8.33333H18.3333C19.2538 8.33333 20 9.0795 20 10V20H14.5833V8.33333ZM3.33333 2.5C2.8731 2.5 2.5 2.8731 2.5 3.33333V5.41667C2.5 5.8769 2.8731 6.25 3.33333 6.25H4.58333C5.04357 6.25 5.41667 5.8769 5.41667 5.41667V3.33333C5.41667 2.8731 5.04357 2.5 4.58333 2.5H3.33333ZM7.91667 3.33333C7.91667 2.8731 8.28977 2.5 8.75 2.5H10C10.4602 2.5 10.8333 2.8731 10.8333 3.33333V5.41667C10.8333 5.8769 10.4602 6.25 10 6.25H8.75C8.28976 6.25 7.91667 5.8769 7.91667 5.41667V3.33333ZM3.33333 9.58333C2.8731 9.58333 2.5 9.95642 2.5 10.4167V12.5C2.5 12.9602 2.8731 13.3333 3.33333 13.3333H4.58333C5.04357 13.3333 5.41667 12.9602 5.41667 12.5V10.4167C5.41667 9.95642 5.04357 9.58333 4.58333 9.58333H3.33333ZM7.91667 10.4167C7.91667 9.95642 8.28977 9.58333 8.75 9.58333H10C10.4602 9.58333 10.8333 9.95642 10.8333 10.4167V12.5C10.8333 12.9602 10.4602 13.3333 10 13.3333H8.75C8.28976 13.3333 7.91667 12.9602 7.91667 12.5V10.4167Z",fill:"#707070"}));XE.propTypes={venue:ft.object.isRequired,isCurrent:ft.bool,onVenueClicked:ft.func.isRequired};function XE({venue:e,isCurrent:n,onVenueClicked:s}){const{t:l}=oo(),[h,m]=ve.useState({});return ve.useEffect(()=>()=>{m({})},[]),ve.useEffect(()=>{const _={};e.image&&(_.backgroundImage=`url('${e.image}')`),m(_)},[e]),Le.jsxs("button",{className:"venue",onClick:()=>s(),children:[Le.jsx("div",{className:"venue__image",style:h}),Le.jsxs("div",{className:"venue__content",children:[Le.jsx("div",{children:e.venueInfo.name}),n&&Le.jsx("div",{className:"venue__current",children:l("Current")})]})]})}const ag=pi({key:"isLocationClicked",default:!1});JE.propTypes={onOpen:ft.func,onClose:ft.func,active:ft.bool};function JE({onOpen:e,onClose:n,active:s}){const{t:l}=oo(),h=ve.useRef(null),m=fn(wd),_=bi(RM),[i,I]=fr(Ya),C=bi(ag),S=Id(".venue-selector-portal"),L=W=>{_(!0),I(W.name),R()},R=()=>{s?n():e()};function U(W){L(W),C(!1)}return Le.jsxs(Le.Fragment,{children:[!s&&S&&os.createPortal(Le.jsx("button",{className:"venue-selector__button",onClick:()=>e(),"aria-label":l("Venues"),children:Le.jsx(cq,{})}),S),Le.jsx(WM,{in:s,nodeRef:h,timeout:400,classNames:"venue-selector__content",unmountOnExit:!0,children:Le.jsxs("div",{className:"venue-selector__content",ref:h,children:[Le.jsxs("div",{className:"venue-selector__header",children:[Le.jsx("h1",{children:l("Select venue")}),Le.jsx("button",{className:"venue-selector__button",onClick:()=>n(),"aria-label":l("Close"),children:Le.jsx(Td,{})})]}),Le.jsx("div",{className:"venue-selector__list",children:m.map(W=>Le.jsx(XE,{isCurrent:i?.toLowerCase()===W.name.toLowerCase(),venue:W,onVenueClicked:()=>U(W)},W.id))})]})})]})}const e6=ve.createContext({});function qM(e){const n=ve.useRef(null);return n.current===null&&(n.current=e()),n.current}const t6=typeof window<"u"?ve.useLayoutEffect:ve.useEffect,KM=ve.createContext(null);function XM(e,n){e.indexOf(n)===-1&&e.push(n)}function Dd(e,n){const s=e.indexOf(n);s>-1&&e.splice(s,1)}const ml=(e,n,s)=>s>n?n:s<e?e:s;let JM=()=>{};const zc={},n6=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function i6(e){return typeof e=="object"&&e!==null}const r6=e=>/^0[^.\s]+$/u.test(e);function o6(e){let n;return()=>(n===void 0&&(n=e()),n)}const Ca=e=>e,uq=(e,n)=>s=>n(e(s)),lg=(...e)=>e.reduce(uq),Sd=(e,n,s)=>{const l=n-e;return l===0?1:(s-e)/l};class e3{constructor(){this.subscriptions=[]}add(n){return XM(this.subscriptions,n),()=>Dd(this.subscriptions,n)}notify(n,s,l){const h=this.subscriptions.length;if(h)if(h===1)this.subscriptions[0](n,s,l);else for(let m=0;m<h;m++){const _=this.subscriptions[m];_&&_(n,s,l)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ws=e=>e*1e3,Da=e=>e/1e3;function s6(e,n){return n?e*(1e3/n):0}const hq=(e,n,s)=>{const l=n-e;return((s-e)%l+l)%l+e},a6=(e,n,s)=>(((1-3*s+3*n)*e+(3*s-6*n))*e+3*n)*e,dq=1e-7,fq=12;function pq(e,n,s,l,h){let m,_,i=0;do _=n+(s-n)/2,m=a6(_,l,h)-e,m>0?s=_:n=_;while(Math.abs(m)>dq&&++i<fq);return _}function cg(e,n,s,l){if(e===n&&s===l)return Ca;const h=m=>pq(m,0,1,e,s);return m=>m===0||m===1?m:a6(h(m),n,l)}const l6=e=>n=>n<=.5?e(2*n)/2:(2-e(2*(1-n)))/2,c6=e=>n=>1-e(1-n),u6=cg(.33,1.53,.69,.99),t3=c6(u6),h6=l6(t3),d6=e=>e>=1?1:(e*=2)<1?.5*t3(e):.5*(2-Math.pow(2,-10*(e-1))),n3=e=>1-Math.sin(Math.acos(e)),f6=c6(n3),p6=l6(n3),gq=cg(.42,0,1,1),mq=cg(0,0,.58,1),g6=cg(.42,0,.58,1),m6=e=>Array.isArray(e)&&typeof e[0]!="number";function y6(e,n){return m6(e)?e[hq(0,e.length,n)]:e}const _6=e=>Array.isArray(e)&&typeof e[0]=="number",yq={linear:Ca,easeIn:gq,easeInOut:g6,easeOut:mq,circIn:n3,circInOut:p6,circOut:f6,backIn:t3,backInOut:h6,backOut:u6,anticipate:d6},_q=e=>typeof e=="string",v6=e=>{if(_6(e)){JM(e.length===4);const[n,s,l,h]=e;return cg(n,s,l,h)}else if(_q(e))return yq[e];return e},e_=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function vq(e,n){let s=new Set,l=new Set,h=!1,m=!1;const _=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function I(S){_.has(S)&&(C.schedule(S),e()),S(i)}const C={schedule:(S,L=!1,R=!1)=>{const W=R&&h?s:l;return L&&_.add(S),W.add(S),S},cancel:S=>{l.delete(S),_.delete(S)},process:S=>{if(i=S,h){m=!0;return}h=!0;const L=s;s=l,l=L,s.forEach(I),s.clear(),h=!1,m&&(m=!1,C.process(S))}};return C}const xq=40;function x6(e,n){let s=!1,l=!0;const h={delta:0,timestamp:0,isProcessing:!1},m=()=>s=!0,_=e_.reduce((q,ue)=>(q[ue]=vq(m),q),{}),{setup:i,read:I,resolveKeyframes:C,preUpdate:S,update:L,preRender:R,render:U,postRender:W}=_,le=()=>{const q=zc.useManualTiming,ue=q?h.timestamp:performance.now();s=!1,q||(h.delta=l?1e3/60:Math.max(Math.min(ue-h.timestamp,xq),1)),h.timestamp=ue,h.isProcessing=!0,i.process(h),I.process(h),C.process(h),S.process(h),L.process(h),R.process(h),U.process(h),W.process(h),h.isProcessing=!1,s&&n&&(l=!1,e(le))},pe=()=>{s=!0,l=!0,h.isProcessing||e(le)};return{schedule:e_.reduce((q,ue)=>{const me=_[ue];return q[ue]=(ne,De=!1,Me=!1)=>(s||pe(),me.schedule(ne,De,Me)),q},{}),cancel:q=>{for(let ue=0;ue<e_.length;ue++)_[e_[ue]].cancel(q)},state:h,steps:_}}const{schedule:Rr,cancel:nc,state:ls,steps:i3}=x6(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ca,!0);let t_;function bq(){t_=void 0}const Ns={now:()=>(t_===void 0&&Ns.set(ls.isProcessing||zc.useManualTiming?ls.timestamp:performance.now()),t_),set:e=>{t_=e,queueMicrotask(bq)}},b6=e=>n=>typeof n=="string"&&n.startsWith(e),w6=b6("--"),wq=b6("var(--"),r3=e=>wq(e)?Mq.test(e.split("/*")[0].trim()):!1,Mq=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function M6(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ed={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ug={...Ed,transform:e=>ml(0,1,e)},n_={...Ed,default:1},hg=e=>Math.round(e*1e5)/1e5,o3=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Iq(e){return e==null}const Tq=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,s3=(e,n)=>s=>!!(typeof s=="string"&&Tq.test(s)&&s.startsWith(e)||n&&!Iq(s)&&Object.prototype.hasOwnProperty.call(s,n)),I6=(e,n,s)=>l=>{if(typeof l!="string")return l;const[h,m,_,i]=l.match(o3);return{[e]:parseFloat(h),[n]:parseFloat(m),[s]:parseFloat(_),alpha:i!==void 0?parseFloat(i):1}},Aq=e=>ml(0,255,e),a3={...Ed,transform:e=>Math.round(Aq(e))},Zu={test:s3("rgb","red"),parse:I6("red","green","blue"),transform:({red:e,green:n,blue:s,alpha:l=1})=>"rgba("+a3.transform(e)+", "+a3.transform(n)+", "+a3.transform(s)+", "+hg(ug.transform(l))+")"};function Cq(e){let n="",s="",l="",h="";return e.length>5?(n=e.substring(1,3),s=e.substring(3,5),l=e.substring(5,7),h=e.substring(7,9)):(n=e.substring(1,2),s=e.substring(2,3),l=e.substring(3,4),h=e.substring(4,5),n+=n,s+=s,l+=l,h+=h),{red:parseInt(n,16),green:parseInt(s,16),blue:parseInt(l,16),alpha:h?parseInt(h,16)/255:1}}const l3={test:s3("#"),parse:Cq,transform:Zu.transform},dg=e=>({test:n=>typeof n=="string"&&n.endsWith(e)&&n.split(" ").length===1,parse:parseFloat,transform:n=>`${n}${e}`}),Oc=dg("deg"),yl=dg("%"),fi=dg("px"),Dq=dg("vh"),Sq=dg("vw"),T6={...yl,parse:e=>yl.parse(e)/100,transform:e=>yl.transform(e*100)},Nd={test:s3("hsl","hue"),parse:I6("hue","saturation","lightness"),transform:({hue:e,saturation:n,lightness:s,alpha:l=1})=>"hsla("+Math.round(e)+", "+yl.transform(hg(n))+", "+yl.transform(hg(s))+", "+hg(ug.transform(l))+")"},jo={test:e=>Zu.test(e)||l3.test(e)||Nd.test(e),parse:e=>Zu.test(e)?Zu.parse(e):Nd.test(e)?Nd.parse(e):l3.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Zu.transform(e):Nd.transform(e),getAnimatableNone:e=>{const n=jo.parse(e);return n.alpha=0,jo.transform(n)}},Eq=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Nq(e){return isNaN(e)&&typeof e=="string"&&(e.match(o3)?.length||0)+(e.match(Eq)?.length||0)>0}const A6="number",C6="color",Lq="var",kq="var(",D6="${}",zq=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ld(e){const n=e.toString(),s=[],l={color:[],number:[],var:[]},h=[];let m=0;const i=n.replace(zq,I=>(jo.test(I)?(l.color.push(m),h.push(C6),s.push(jo.parse(I))):I.startsWith(kq)?(l.var.push(m),h.push(Lq),s.push(I)):(l.number.push(m),h.push(A6),s.push(parseFloat(I))),++m,D6)).split(D6);return{values:s,split:i,indexes:l,types:h}}function Oq(e){return Ld(e).values}function S6({split:e,types:n}){const s=e.length;return l=>{let h="";for(let m=0;m<s;m++)if(h+=e[m],l[m]!==void 0){const _=n[m];_===A6?h+=hg(l[m]):_===C6?h+=jo.transform(l[m]):h+=l[m]}return h}}function jq(e){return S6(Ld(e))}const Pq=e=>typeof e=="number"?0:jo.test(e)?jo.getAnimatableNone(e):e,Rq=(e,n)=>typeof e=="number"?n?.trim().endsWith("/")?e:0:Pq(e);function Bq(e){const n=Ld(e);return S6(n)(n.values.map((l,h)=>Rq(l,n.split[h])))}const $a={test:Nq,parse:Oq,createTransformer:jq,getAnimatableNone:Bq};function c3(e,n,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(n-e)*6*s:s<1/2?n:s<2/3?e+(n-e)*(2/3-s)*6:e}function Fq({hue:e,saturation:n,lightness:s,alpha:l}){e/=360,n/=100,s/=100;let h=0,m=0,_=0;if(!n)h=m=_=s;else{const i=s<.5?s*(1+n):s+n-s*n,I=2*s-i;h=c3(I,i,e+1/3),m=c3(I,i,e),_=c3(I,i,e-1/3)}return{red:Math.round(h*255),green:Math.round(m*255),blue:Math.round(_*255),alpha:l}}function i_(e,n){return s=>s>0?n:e}const Qr=(e,n,s)=>e+(n-e)*s,u3=(e,n,s)=>{const l=e*e,h=s*(n*n-l)+l;return h<0?0:Math.sqrt(h)},Uq=[l3,Zu,Nd],Vq=e=>Uq.find(n=>n.test(e));function E6(e){const n=Vq(e);if(!n)return!1;let s=n.parse(e);return n===Nd&&(s=Fq(s)),s}const N6=(e,n)=>{const s=E6(e),l=E6(n);if(!s||!l)return i_(e,n);const h={...s};return m=>(h.red=u3(s.red,l.red,m),h.green=u3(s.green,l.green,m),h.blue=u3(s.blue,l.blue,m),h.alpha=Qr(s.alpha,l.alpha,m),Zu.transform(h))},h3=new Set(["none","hidden"]);function Hq(e,n){return h3.has(e)?s=>s<=0?e:n:s=>s>=1?n:e}function Qq(e,n){return s=>Qr(e,n,s)}function d3(e){return typeof e=="number"?Qq:typeof e=="string"?r3(e)?i_:jo.test(e)?N6:$q:Array.isArray(e)?L6:typeof e=="object"?jo.test(e)?N6:Yq:i_}function L6(e,n){const s=[...e],l=s.length,h=e.map((m,_)=>d3(m)(m,n[_]));return m=>{for(let _=0;_<l;_++)s[_]=h[_](m);return s}}function Yq(e,n){const s={...e,...n},l={};for(const h in s)e[h]!==void 0&&n[h]!==void 0&&(l[h]=d3(e[h])(e[h],n[h]));return h=>{for(const m in l)s[m]=l[m](h);return s}}function Gq(e,n){const s=[],l={color:0,var:0,number:0};for(let h=0;h<n.values.length;h++){const m=n.types[h],_=e.indexes[m][l[m]],i=e.values[_]??0;s[h]=i,l[m]++}return s}const $q=(e,n)=>{const s=$a.createTransformer(n),l=Ld(e),h=Ld(n);return l.indexes.var.length===h.indexes.var.length&&l.indexes.color.length===h.indexes.color.length&&l.indexes.number.length>=h.indexes.number.length?h3.has(e)&&!h.values.length||h3.has(n)&&!l.values.length?Hq(e,n):lg(L6(Gq(l,h),h.values),s):i_(e,n)};function k6(e,n,s){return typeof e=="number"&&typeof n=="number"&&typeof s=="number"?Qr(e,n,s):d3(e)(e,n)}const Zq=e=>{const n=({timestamp:s})=>e(s);return{start:(s=!0)=>Rr.update(n,s),stop:()=>nc(n),now:()=>ls.isProcessing?ls.timestamp:Ns.now()}},z6=(e,n,s=10)=>{let l="";const h=Math.max(Math.round(n/s),2);for(let m=0;m<h;m++)l+=Math.round(e(m/(h-1))*1e4)/1e4+", ";return`linear(${l.substring(0,l.length-2)})`},r_=2e4;function f3(e){let n=0;const s=50;let l=e.next(n);for(;!l.done&&n<r_;)n+=s,l=e.next(n);return n>=r_?1/0:n}function O6(e,n=100,s){const l=s({...e,keyframes:[0,n]}),h=Math.min(f3(l),r_);return{type:"keyframes",ease:m=>l.next(h*m).value/n,duration:Da(h)}}const Mo={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function p3(e,n){return e*Math.sqrt(1-n*n)}const Wq=12;function qq(e,n,s){let l=s;for(let h=1;h<Wq;h++)l=l-e(l)/n(l);return l}const g3=.001;function Kq({duration:e=Mo.duration,bounce:n=Mo.bounce,velocity:s=Mo.velocity,mass:l=Mo.mass}){let h,m,_=1-n;_=ml(Mo.minDamping,Mo.maxDamping,_),e=ml(Mo.minDuration,Mo.maxDuration,Da(e)),_<1?(h=C=>{const S=C*_,L=S*e,R=S-s,U=p3(C,_),W=Math.exp(-L);return g3-R/U*W},m=C=>{const L=C*_*e,R=L*s+s,U=Math.pow(_,2)*Math.pow(C,2)*e,W=Math.exp(-L),le=p3(Math.pow(C,2),_);return(-h(C)+g3>0?-1:1)*((R-U)*W)/le}):(h=C=>{const S=Math.exp(-C*e),L=(C-s)*e+1;return-g3+S*L},m=C=>{const S=Math.exp(-C*e),L=(s-C)*(e*e);return S*L});const i=5/e,I=qq(h,m,i);if(e=Ws(e),isNaN(I))return{stiffness:Mo.stiffness,damping:Mo.damping,duration:e};{const C=Math.pow(I,2)*l;return{stiffness:C,damping:_*2*Math.sqrt(l*C),duration:e}}}const Xq=["duration","bounce"],Jq=["stiffness","damping","mass"];function j6(e,n){return n.some(s=>e[s]!==void 0)}function eK(e){let n={velocity:Mo.velocity,stiffness:Mo.stiffness,damping:Mo.damping,mass:Mo.mass,isResolvedFromDuration:!1,...e};if(!j6(e,Jq)&&j6(e,Xq))if(n.velocity=0,e.visualDuration){const s=e.visualDuration,l=2*Math.PI/(s*1.2),h=l*l,m=2*ml(.05,1,1-(e.bounce||0))*Math.sqrt(h);n={...n,mass:Mo.mass,stiffness:h,damping:m}}else{const s=Kq({...e,velocity:0});n={...n,...s,mass:Mo.mass},n.isResolvedFromDuration=!0}return n}function fg(e=Mo.visualDuration,n=Mo.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:n}:e;let{restSpeed:l,restDelta:h}=s;const m=s.keyframes[0],_=s.keyframes[s.keyframes.length-1],i={done:!1,value:m},{stiffness:I,damping:C,mass:S,duration:L,velocity:R,isResolvedFromDuration:U}=eK({...s,velocity:-Da(s.velocity||0)}),W=R||0,le=C/(2*Math.sqrt(I*S)),pe=_-m,ie=Da(Math.sqrt(I/S)),Y=Math.abs(pe)<5;l||(l=Y?Mo.restSpeed.granular:Mo.restSpeed.default),h||(h=Y?Mo.restDelta.granular:Mo.restDelta.default);let q,ue,me,ne,De,Me;if(le<1)me=p3(ie,le),ne=(W+le*ie*pe)/me,q=ge=>{const Re=Math.exp(-le*ie*ge);return _-Re*(ne*Math.sin(me*ge)+pe*Math.cos(me*ge))},De=le*ie*ne+pe*me,Me=le*ie*pe-ne*me,ue=ge=>Math.exp(-le*ie*ge)*(De*Math.sin(me*ge)+Me*Math.cos(me*ge));else if(le===1){q=Re=>_-Math.exp(-ie*Re)*(pe+(W+ie*pe)*Re);const ge=W+ie*pe;ue=Re=>Math.exp(-ie*Re)*(ie*ge*Re-W)}else{const ge=ie*Math.sqrt(le*le-1);q=tt=>{const dt=Math.exp(-le*ie*tt),Nt=Math.min(ge*tt,300);return _-dt*((W+le*ie*pe)*Math.sinh(Nt)+ge*pe*Math.cosh(Nt))/ge};const Re=(W+le*ie*pe)/ge,Oe=le*ie*Re-pe*ge,Ne=le*ie*pe-Re*ge;ue=tt=>{const dt=Math.exp(-le*ie*tt),Nt=Math.min(ge*tt,300);return dt*(Oe*Math.sinh(Nt)+Ne*Math.cosh(Nt))}}const Ee={calculatedDuration:U&&L||null,velocity:ge=>Ws(ue(ge)),next:ge=>{if(!U&&le<1){const Oe=Math.exp(-le*ie*ge),Ne=Math.sin(me*ge),tt=Math.cos(me*ge),dt=_-Oe*(ne*Ne+pe*tt),Nt=Ws(Oe*(De*Ne+Me*tt));return i.done=Math.abs(Nt)<=l&&Math.abs(_-dt)<=h,i.value=i.done?_:dt,i}const Re=q(ge);if(U)i.done=ge>=L;else{const Oe=Ws(ue(ge));i.done=Math.abs(Oe)<=l&&Math.abs(_-Re)<=h}return i.value=i.done?_:Re,i},toString:()=>{const ge=Math.min(f3(Ee),r_),Re=z6(Oe=>Ee.next(ge*Oe).value,ge,30);return ge+"ms "+Re},toTransition:()=>{}};return Ee}fg.applyToOptions=e=>{const n=O6(e,100,fg);return e.ease=n.ease,e.duration=Ws(n.duration),e.type="keyframes",e};const tK=5;function P6(e,n,s){const l=Math.max(n-tK,0);return s6(s-e(l),n-l)}function m3({keyframes:e,velocity:n=0,power:s=.8,timeConstant:l=325,bounceDamping:h=10,bounceStiffness:m=500,modifyTarget:_,min:i,max:I,restDelta:C=.5,restSpeed:S}){const L=e[0],R={done:!1,value:L},U=Me=>i!==void 0&&Me<i||I!==void 0&&Me>I,W=Me=>i===void 0?I:I===void 0||Math.abs(i-Me)<Math.abs(I-Me)?i:I;let le=s*n;const pe=L+le,ie=_===void 0?pe:_(pe);ie!==pe&&(le=ie-L);const Y=Me=>-le*Math.exp(-Me/l),q=Me=>ie+Y(Me),ue=Me=>{const Ee=Y(Me),ge=q(Me);R.done=Math.abs(Ee)<=C,R.value=R.done?ie:ge};let me,ne;const De=Me=>{U(R.value)&&(me=Me,ne=fg({keyframes:[R.value,W(R.value)],velocity:P6(q,Me,R.value),damping:h,stiffness:m,restDelta:C,restSpeed:S}))};return De(0),{calculatedDuration:null,next:Me=>{let Ee=!1;return!ne&&me===void 0&&(Ee=!0,ue(Me),De(Me)),me!==void 0&&Me>=me?ne.next(Me-me):(!Ee&&ue(Me),R)}}}function nK(e,n,s){const l=[],h=s||zc.mix||k6,m=e.length-1;for(let _=0;_<m;_++){let i=h(e[_],e[_+1]);if(n){const I=Array.isArray(n)?n[_]||Ca:n;i=lg(I,i)}l.push(i)}return l}function R6(e,n,{clamp:s=!0,ease:l,mixer:h}={}){const m=e.length;if(JM(m===n.length),m===1)return()=>n[0];if(m===2&&n[0]===n[1])return()=>n[1];const _=e[0]===e[1];e[0]>e[m-1]&&(e=[...e].reverse(),n=[...n].reverse());const i=nK(n,l,h),I=i.length,C=S=>{if(_&&S<e[0])return n[0];let L=0;if(I>1)for(;L<e.length-2&&!(S<e[L+1]);L++);const R=Sd(e[L],e[L+1],S);return i[L](R)};return s?S=>C(ml(e[0],e[m-1],S)):C}function B6(e,n){const s=e[e.length-1];for(let l=1;l<=n;l++){const h=Sd(0,n,l);e.push(Qr(s,1,h))}}function F6(e){const n=[0];return B6(n,e.length-1),n}function iK(e,n){return e.map(s=>s*n)}function rK(e,n){return e.map(()=>n||g6).splice(0,e.length-1)}function pg({duration:e=300,keyframes:n,times:s,ease:l="easeInOut"}){const h=m6(l)?l.map(v6):v6(l),m={done:!1,value:n[0]},_=iK(s&&s.length===n.length?s:F6(n),e),i=R6(_,n,{ease:Array.isArray(h)?h:rK(n,h)});return{calculatedDuration:e,next:I=>(m.value=i(I),m.done=I>=e,m)}}const oK=e=>e!==null;function o_(e,{repeat:n,repeatType:s="loop"},l,h=1){const m=e.filter(oK),i=h<0||n&&s!=="loop"&&n%2===1?0:m.length-1;return!i||l===void 0?m[i]:l}const sK={decay:m3,inertia:m3,tween:pg,keyframes:pg,spring:fg};function U6(e){typeof e.type=="string"&&(e.type=sK[e.type])}class y3{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(n=>{this.resolve=n})}notifyFinished(){this.resolve()}then(n,s){return this.finished.then(n,s)}}const aK=e=>e/100;class s_ extends y3{constructor(n){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==Ns.now()&&this.tick(Ns.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=n,this.initAnimation(),this.play(),n.autoplay===!1&&this.pause()}initAnimation(){const{options:n}=this;U6(n);const{type:s=pg,repeat:l=0,repeatDelay:h=0,repeatType:m,velocity:_=0}=n;let{keyframes:i}=n;const I=s||pg;I!==pg&&typeof i[0]!="number"&&(this.mixKeyframes=lg(aK,k6(i[0],i[1])),i=[0,100]);const C=I({...n,keyframes:i});m==="mirror"&&(this.mirroredGenerator=I({...n,keyframes:[...i].reverse(),velocity:-_})),C.calculatedDuration===null&&(C.calculatedDuration=f3(C));const{calculatedDuration:S}=C;this.calculatedDuration=S,this.resolvedDuration=S+h,this.totalDuration=this.resolvedDuration*(l+1)-h,this.generator=C}updateTime(n){const s=Math.round(n-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(n,s=!1){const{generator:l,totalDuration:h,mixKeyframes:m,mirroredGenerator:_,resolvedDuration:i,calculatedDuration:I}=this;if(this.startTime===null)return l.next(0);const{delay:C=0,keyframes:S,repeat:L,repeatType:R,repeatDelay:U,type:W,onUpdate:le,finalKeyframe:pe}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,n):this.speed<0&&(this.startTime=Math.min(n-h/this.speed,this.startTime)),s?this.currentTime=n:this.updateTime(n);const ie=this.currentTime-C*(this.playbackSpeed>=0?1:-1),Y=this.playbackSpeed>=0?ie<0:ie>h;this.currentTime=Math.max(ie,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=h);let q=this.currentTime,ue=l;if(L){const Me=Math.min(this.currentTime,h)/i;let Ee=Math.floor(Me),ge=Me%1;!ge&&Me>=1&&(ge=1),ge===1&&Ee--,Ee=Math.min(Ee,L+1),Ee%2&&(R==="reverse"?(ge=1-ge,U&&(ge-=U/i)):R==="mirror"&&(ue=_)),q=ml(0,1,ge)*i}let me;Y?(this.delayState.value=S[0],me=this.delayState):me=ue.next(q),m&&!Y&&(me.value=m(me.value));let{done:ne}=me;!Y&&I!==null&&(ne=this.playbackSpeed>=0?this.currentTime>=h:this.currentTime<=0);const De=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&ne);return De&&W!==m3&&(me.value=o_(S,this.options,pe,this.speed)),le&&le(me.value),De&&this.finish(),me}then(n,s){return this.finished.then(n,s)}get duration(){return Da(this.calculatedDuration)}get iterationDuration(){const{delay:n=0}=this.options||{};return this.duration+Da(n)}get time(){return Da(this.currentTime)}set time(n){n=Ws(n),this.currentTime=n,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=n:this.driver&&(this.startTime=this.driver.now()-n/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=n,this.tick(n))}getGeneratorVelocity(){const n=this.currentTime;if(n<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(n);const s=this.generator.next(n).value;return P6(l=>this.generator.next(l).value,n,s)}get speed(){return this.playbackSpeed}set speed(n){const s=this.playbackSpeed!==n;s&&this.driver&&this.updateTime(Ns.now()),this.playbackSpeed=n,s&&this.driver&&(this.time=Da(this.currentTime))}play(){if(this.isStopped)return;const{driver:n=Zq,startTime:s}=this.options;this.driver||(this.driver=n(h=>this.tick(h))),this.options.onPlay?.();const l=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=l):this.holdTime!==null?this.startTime=l-this.holdTime:this.startTime||(this.startTime=s??l),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ns.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(n){return this.startTime=0,this.tick(n,!0)}attachTimeline(n){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),n.observe(this)}}function lK(e){for(let n=1;n<e.length;n++)e[n]??(e[n]=e[n-1])}const Wu=e=>e*180/Math.PI,_3=e=>{const n=Wu(Math.atan2(e[1],e[0]));return v3(n)},cK={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:_3,rotateZ:_3,skewX:e=>Wu(Math.atan(e[1])),skewY:e=>Wu(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},v3=e=>(e=e%360,e<0&&(e+=360),e),V6=_3,H6=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Q6=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),uK={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:H6,scaleY:Q6,scale:e=>(H6(e)+Q6(e))/2,rotateX:e=>v3(Wu(Math.atan2(e[6],e[5]))),rotateY:e=>v3(Wu(Math.atan2(-e[2],e[0]))),rotateZ:V6,rotate:V6,skewX:e=>Wu(Math.atan(e[4])),skewY:e=>Wu(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function x3(e){return e.includes("scale")?1:0}function b3(e,n){if(!e||e==="none")return x3(n);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let l,h;if(s)l=uK,h=s;else{const i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);l=cK,h=i}if(!h)return x3(n);const m=l[n],_=h[1].split(",").map(dK);return typeof m=="function"?m(_):_[m]}const hK=(e,n)=>{const{transform:s="none"}=getComputedStyle(e);return b3(s,n)};function dK(e){return parseFloat(e.trim())}const kd=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zd=new Set(kd),Y6=e=>e===Ed||e===fi,fK=new Set(["x","y","z"]),pK=kd.filter(e=>!fK.has(e));function gK(e){const n=[];return pK.forEach(s=>{const l=e.getValue(s);l!==void 0&&(n.push([s,l.get()]),l.set(s.startsWith("scale")?1:0))}),n}const jc={width:({x:e},{paddingLeft:n="0",paddingRight:s="0",boxSizing:l})=>{const h=e.max-e.min;return l==="border-box"?h:h-parseFloat(n)-parseFloat(s)},height:({y:e},{paddingTop:n="0",paddingBottom:s="0",boxSizing:l})=>{const h=e.max-e.min;return l==="border-box"?h:h-parseFloat(n)-parseFloat(s)},top:(e,{top:n})=>parseFloat(n),left:(e,{left:n})=>parseFloat(n),bottom:({y:e},{top:n})=>parseFloat(n)+(e.max-e.min),right:({x:e},{left:n})=>parseFloat(n)+(e.max-e.min),x:(e,{transform:n})=>b3(n,"x"),y:(e,{transform:n})=>b3(n,"y")};jc.translateX=jc.x,jc.translateY=jc.y;const qu=new Set;let w3=!1,M3=!1,I3=!1;function G6(){if(M3){const e=Array.from(qu).filter(l=>l.needsMeasurement),n=new Set(e.map(l=>l.element)),s=new Map;n.forEach(l=>{const h=gK(l);h.length&&(s.set(l,h),l.render())}),e.forEach(l=>l.measureInitialState()),n.forEach(l=>{l.render();const h=s.get(l);h&&h.forEach(([m,_])=>{l.getValue(m)?.set(_)})}),e.forEach(l=>l.measureEndState()),e.forEach(l=>{l.suspendedScrollY!==void 0&&window.scrollTo(0,l.suspendedScrollY)})}M3=!1,w3=!1,qu.forEach(e=>e.complete(I3)),qu.clear()}function $6(){qu.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(M3=!0)})}function mK(){I3=!0,$6(),G6(),I3=!1}class T3{constructor(n,s,l,h,m,_=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...n],this.onComplete=s,this.name=l,this.motionValue=h,this.element=m,this.isAsync=_}scheduleResolve(){this.state="scheduled",this.isAsync?(qu.add(this),w3||(w3=!0,Rr.read($6),Rr.resolveKeyframes(G6))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:n,name:s,element:l,motionValue:h}=this;if(n[0]===null){const m=h?.get(),_=n[n.length-1];if(m!==void 0)n[0]=m;else if(l&&s){const i=l.readValue(s,_);i!=null&&(n[0]=i)}n[0]===void 0&&(n[0]=_),h&&m===void 0&&h.set(n[0])}lK(n)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(n=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,n),qu.delete(this)}cancel(){this.state==="scheduled"&&(qu.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const yK=e=>e.startsWith("--");function Z6(e,n,s){yK(n)?e.style.setProperty(n,s):e.style[n]=s}const _K={};function W6(e,n){const s=o6(e);return()=>_K[n]??s()}const vK=W6(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),q6=W6(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),gg=([e,n,s,l])=>`cubic-bezier(${e}, ${n}, ${s}, ${l})`,K6={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gg([0,.65,.55,1]),circOut:gg([.55,0,1,.45]),backIn:gg([.31,.01,.66,-.59]),backOut:gg([.33,1.53,.69,.99])};function X6(e,n){if(e)return typeof e=="function"?q6()?z6(e,n):"ease-out":_6(e)?gg(e):Array.isArray(e)?e.map(s=>X6(s,n)||K6.easeOut):K6[e]}function xK(e,n,s,{delay:l=0,duration:h=300,repeat:m=0,repeatType:_="loop",ease:i="easeOut",times:I}={},C=void 0){const S={[n]:s};I&&(S.offset=I);const L=X6(i,h);Array.isArray(L)&&(S.easing=L);const R={delay:l,duration:h,easing:Array.isArray(L)?"linear":L,fill:"both",iterations:m+1,direction:_==="reverse"?"alternate":"normal"};return C&&(R.pseudoElement=C),e.animate(S,R)}function A3(e){return typeof e=="function"&&"applyToOptions"in e}function bK({type:e,...n}){return A3(e)&&q6()?e.applyToOptions(n):(n.duration??(n.duration=300),n.ease??(n.ease="easeOut"),n)}class J6 extends y3{constructor(n){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!n)return;const{element:s,name:l,keyframes:h,pseudoElement:m,allowFlatten:_=!1,finalKeyframe:i,onComplete:I}=n;this.isPseudoElement=!!m,this.allowFlatten=_,this.options=n,JM(typeof n.type!="string");const C=bK(n);this.animation=xK(s,l,h,C,m),C.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!m){const S=o_(h,this.options,i,this.speed);this.updateMotionValue&&this.updateMotionValue(S),Z6(s,l,S),this.animation.cancel()}I?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:n}=this;n==="idle"||n==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const n=this.options?.element;!this.isPseudoElement&&n?.isConnected&&this.animation.commitStyles?.()}get duration(){const n=this.animation.effect?.getComputedTiming?.().duration||0;return Da(Number(n))}get iterationDuration(){const{delay:n=0}=this.options||{};return this.duration+Da(n)}get time(){return Da(Number(this.animation.currentTime)||0)}set time(n){const s=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ws(n),s&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(n){n<0&&(this.finishedTime=null),this.animation.playbackRate=n}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(n){this.manualStartTime=this.animation.startTime=n}attachTimeline({timeline:n,rangeStart:s,rangeEnd:l,observe:h}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,n&&vK()?(this.animation.timeline=n,s&&(this.animation.rangeStart=s),l&&(this.animation.rangeEnd=l),Ca):h(this)}}const eN={anticipate:d6,backInOut:h6,circInOut:p6};function wK(e){return e in eN}function MK(e){typeof e.ease=="string"&&wK(e.ease)&&(e.ease=eN[e.ease])}const C3=10;class IK extends J6{constructor(n){MK(n),U6(n),super(n),n.startTime!==void 0&&n.autoplay!==!1&&(this.startTime=n.startTime),this.options=n}updateMotionValue(n){const{motionValue:s,onUpdate:l,onComplete:h,element:m,..._}=this.options;if(!s)return;if(n!==void 0){s.set(n);return}const i=new s_({..._,autoplay:!1}),I=Math.max(C3,Ns.now()-this.startTime),C=ml(0,C3,I-C3),S=i.sample(I).value,{name:L}=this.options;m&&L&&Z6(m,L,S),s.setWithVelocity(i.sample(Math.max(0,I-C)).value,S,C),i.stop()}}const tN=(e,n)=>n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&($a.test(e)||e==="0")&&!e.startsWith("url("));function TK(e){const n=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==n)return!0}function AK(e,n,s,l){const h=e[0];if(h===null)return!1;if(n==="display"||n==="visibility")return!0;const m=e[e.length-1],_=tN(h,n),i=tN(m,n);return!_||!i?!1:TK(e)||(s==="spring"||A3(s))&&l}function D3(e){e.duration=0,e.type="keyframes"}const nN=new Set(["opacity","clipPath","filter","transform"]),CK=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function DK(e){for(let n=0;n<e.length;n++)if(typeof e[n]=="string"&&CK.test(e[n]))return!0;return!1}const SK=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),EK=o6(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function NK(e){const{motionValue:n,name:s,repeatDelay:l,repeatType:h,damping:m,type:_,keyframes:i}=e;if(!(n?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:C,transformTemplate:S}=n.owner.getProps();return EK()&&s&&(nN.has(s)||SK.has(s)&&DK(i))&&(s!=="transform"||!S)&&!C&&!l&&h!=="mirror"&&m!==0&&_!=="inertia"}const LK=40;class kK extends y3{constructor({autoplay:n=!0,delay:s=0,type:l="keyframes",repeat:h=0,repeatDelay:m=0,repeatType:_="loop",keyframes:i,name:I,motionValue:C,element:S,...L}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ns.now();const R={autoplay:n,delay:s,type:l,repeat:h,repeatDelay:m,repeatType:_,name:I,motionValue:C,element:S,...L},U=S?.KeyframeResolver||T3;this.keyframeResolver=new U(i,(W,le,pe)=>this.onKeyframesResolved(W,le,R,!pe),I,C,S),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(n,s,l,h){this.keyframeResolver=void 0;const{name:m,type:_,velocity:i,delay:I,isHandoff:C,onUpdate:S}=l;this.resolvedAt=Ns.now();let L=!0;AK(n,m,_,i)||(L=!1,(zc.instantAnimations||!I)&&S?.(o_(n,l,s)),n[0]=n[n.length-1],D3(l),l.repeat=0);const U={startTime:h?this.resolvedAt?this.resolvedAt-this.createdAt>LK?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...l,keyframes:n},W=L&&!C&&NK(U),le=U.motionValue?.owner?.current;let pe;if(W)try{pe=new IK({...U,element:le})}catch{pe=new s_(U)}else pe=new s_(U);pe.finished.then(()=>{this.notifyFinished()}).catch(Ca),this.pendingTimeline&&(this.stopTimeline=pe.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=pe}get finished(){return this._animation?this.animation.finished:this._finished}then(n,s){return this.finished.finally(n).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),mK()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(n){this.animation.time=n}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(n){this.animation.speed=n}get startTime(){return this.animation.startTime}attachTimeline(n){return this._animation?this.stopTimeline=this.animation.attachTimeline(n):this.pendingTimeline=n,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class zK{constructor(n){this.stop=()=>this.runAll("stop"),this.animations=n.filter(Boolean)}get finished(){return Promise.all(this.animations.map(n=>n.finished))}getAll(n){return this.animations[0][n]}setAll(n,s){for(let l=0;l<this.animations.length;l++)this.animations[l][n]=s}attachTimeline(n){const s=this.animations.map(l=>l.attachTimeline(n));return()=>{s.forEach((l,h)=>{l&&l(),this.animations[h].stop()})}}get time(){return this.getAll("time")}set time(n){this.setAll("time",n)}get speed(){return this.getAll("speed")}set speed(n){this.setAll("speed",n)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return iN(this.animations,"duration")}get iterationDuration(){return iN(this.animations,"iterationDuration")}runAll(n){this.animations.forEach(s=>s[n]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function iN(e,n){let s=0;for(let l=0;l<e.length;l++){const h=e[l][n];h!==null&&h>s&&(s=h)}return s}class OK extends zK{then(n,s){return this.finished.finally(n).then(()=>{})}}function rN(e,n,s,l=0,h=1){const m=Array.from(e).sort((C,S)=>C.sortNodePosition(S)).indexOf(n),_=e.size,i=(_-1)*l;return typeof s=="function"?s(m,_):h===1?m*l:i-m*l}const jK=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function PK(e){const n=jK.exec(e);if(!n)return[,];const[,s,l,h]=n;return[`--${s??l}`,h]}function oN(e,n,s=1){const[l,h]=PK(e);if(!l)return;const m=window.getComputedStyle(n).getPropertyValue(l);if(m){const _=m.trim();return n6(_)?parseFloat(_):_}return r3(h)?oN(h,n,s+1):h}const RK={type:"spring",stiffness:500,damping:25,restSpeed:10},BK=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),FK={type:"keyframes",duration:.8},UK={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},VK=(e,{keyframes:n})=>n.length>2?FK:zd.has(e)?e.startsWith("scale")?BK(n[1]):RK:UK;function sN(e,n){if(e?.inherit&&n){const{inherit:s,...l}=e;return{...n,...l}}return e}function S3(e,n){const s=e?.[n]??e?.default??e;return s!==e?sN(s,e):s}const HK=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function QK(e){for(const n in e)if(!HK.has(n))return!0;return!1}const E3=(e,n,s,l={},h,m)=>_=>{const i=S3(l,e)||{},I=i.delay||l.delay||0;let{elapsed:C=0}=l;C=C-Ws(I);const S={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:n.getVelocity(),...i,delay:-C,onUpdate:R=>{n.set(R),i.onUpdate&&i.onUpdate(R)},onComplete:()=>{_(),i.onComplete&&i.onComplete()},name:e,motionValue:n,element:m?void 0:h};QK(i)||Object.assign(S,VK(e,S)),S.duration&&(S.duration=Ws(S.duration)),S.repeatDelay&&(S.repeatDelay=Ws(S.repeatDelay)),S.from!==void 0&&(S.keyframes[0]=S.from);let L=!1;if((S.type===!1||S.duration===0&&!S.repeatDelay)&&(D3(S),S.delay===0&&(L=!0)),(zc.instantAnimations||zc.skipAnimations||h?.shouldSkipAnimations)&&(L=!0,D3(S),S.delay=0),S.allowFlatten=!i.type&&!i.ease,L&&!m&&n.get()!==void 0){const R=o_(S.keyframes,i);if(R!==void 0){Rr.update(()=>{S.onUpdate(R),S.onComplete()});return}}return i.isSync?new s_(S):new kK(S)};function aN(e){const n=[{},{}];return e?.values.forEach((s,l)=>{n[0][l]=s.get(),n[1][l]=s.getVelocity()}),n}function N3(e,n,s,l){if(typeof n=="function"){const[h,m]=aN(l);n=n(s!==void 0?s:e.custom,h,m)}if(typeof n=="string"&&(n=e.variants&&e.variants[n]),typeof n=="function"){const[h,m]=aN(l);n=n(s!==void 0?s:e.custom,h,m)}return n}function Ku(e,n,s){const l=e.getProps();return N3(l,n,s!==void 0?s:l.custom,e)}const lN=new Set(["width","height","top","left","right","bottom",...kd]),cN=30,YK=e=>!isNaN(parseFloat(e)),mg={current:void 0};class GK{constructor(n,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=l=>{const h=Ns.now();if(this.updatedAt!==h&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(l),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const m of this.dependents)m.dirty()},this.hasAnimated=!1,this.setCurrent(n),this.owner=s.owner}setCurrent(n){this.current=n,this.updatedAt=Ns.now(),this.canTrackVelocity===null&&n!==void 0&&(this.canTrackVelocity=YK(this.current))}setPrevFrameValue(n=this.current){this.prevFrameValue=n,this.prevUpdatedAt=this.updatedAt}onChange(n){return this.on("change",n)}on(n,s){this.events[n]||(this.events[n]=new e3);const l=this.events[n].add(s);return n==="change"?()=>{l(),Rr.read(()=>{this.events.change.getSize()||this.stop()})}:l}clearListeners(){for(const n in this.events)this.events[n].clear()}attach(n,s){this.passiveEffect=n,this.stopPassiveEffect=s}set(n){this.passiveEffect?this.passiveEffect(n,this.updateAndNotify):this.updateAndNotify(n)}setWithVelocity(n,s,l){this.set(s),this.prev=void 0,this.prevFrameValue=n,this.prevUpdatedAt=this.updatedAt-l}jump(n,s=!0){this.updateAndNotify(n),this.prev=n,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(n){this.dependents||(this.dependents=new Set),this.dependents.add(n)}removeDependent(n){this.dependents&&this.dependents.delete(n)}get(){return mg.current&&mg.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const n=Ns.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||n-this.updatedAt>cN)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,cN);return s6(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(n){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=n(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Pc(e,n){return new GK(e,n)}const L3=e=>Array.isArray(e);function $K(e,n,s){e.hasValue(n)?e.getValue(n).set(s):e.addValue(n,Pc(s))}function ZK(e){return L3(e)?e[e.length-1]||0:e}function WK(e,n){const s=Ku(e,n);let{transitionEnd:l={},transition:h={},...m}=s||{};m={...m,...l};for(const _ in m){const i=ZK(m[_]);$K(e,_,i)}}const Qo=e=>!!(e&&e.getVelocity);function qK(e){return!!(Qo(e)&&e.add)}function k3(e,n){const s=e.getValue("willChange");if(qK(s))return s.add(n);if(!s&&zc.WillChange){const l=new zc.WillChange("auto");e.addValue("willChange",l),l.add(n)}}function z3(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}const uN="data-"+z3("framerAppearId");function hN(e){return e.props[uN]}function KK({protectedKeys:e,needsAnimating:n},s){const l=e.hasOwnProperty(s)&&n[s]!==!0;return n[s]=!1,l}function O3(e,n,{delay:s=0,transitionOverride:l,type:h}={}){let{transition:m,transitionEnd:_,...i}=n;const I=e.getDefaultTransition();m=m?sN(m,I):I;const C=m?.reduceMotion;l&&(m=l);const S=[],L=h&&e.animationState&&e.animationState.getState()[h];for(const R in i){const U=e.getValue(R,e.latestValues[R]??null),W=i[R];if(W===void 0||L&&KK(L,R))continue;const le={delay:s,...S3(m||{},R)},pe=U.get();if(pe!==void 0&&!U.isAnimating()&&!Array.isArray(W)&&W===pe&&!le.velocity){Rr.update(()=>U.set(W));continue}let ie=!1;if(window.MotionHandoffAnimation){const ue=hN(e);if(ue){const me=window.MotionHandoffAnimation(ue,R,Rr);me!==null&&(le.startTime=me,ie=!0)}}k3(e,R);const Y=C??e.shouldReduceMotion;U.start(E3(R,U,W,Y&&lN.has(R)?{type:!1}:le,e,ie));const q=U.animation;q&&S.push(q)}if(_){const R=()=>Rr.update(()=>{_&&WK(e,_)});S.length?Promise.all(S).then(R):R()}return S}function j3(e,n,s={}){const l=Ku(e,n,s.type==="exit"?e.presenceContext?.custom:void 0);let{transition:h=e.getDefaultTransition()||{}}=l||{};s.transitionOverride&&(h=s.transitionOverride);const m=l?()=>Promise.all(O3(e,l,s)):()=>Promise.resolve(),_=e.variantChildren&&e.variantChildren.size?(I=0)=>{const{delayChildren:C=0,staggerChildren:S,staggerDirection:L}=h;return XK(e,n,I,C,S,L,s)}:()=>Promise.resolve(),{when:i}=h;if(i){const[I,C]=i==="beforeChildren"?[m,_]:[_,m];return I().then(()=>C())}else return Promise.all([m(),_(s.delay)])}function XK(e,n,s=0,l=0,h=0,m=1,_){const i=[];for(const I of e.variantChildren)I.notify("AnimationStart",n),i.push(j3(I,n,{..._,delay:s+(typeof l=="function"?0:l)+rN(e.variantChildren,I,l,h,m)}).then(()=>I.notify("AnimationComplete",n)));return Promise.all(i)}function JK(e,n,s={}){e.notify("AnimationStart",n);let l;if(Array.isArray(n)){const h=n.map(m=>j3(e,m,s));l=Promise.all(h)}else if(typeof n=="string")l=j3(e,n,s);else{const h=typeof n=="function"?Ku(e,n,s.custom):n;l=Promise.all(O3(e,h,s))}return l.then(()=>{e.notify("AnimationComplete",n)})}const eX={test:e=>e==="auto",parse:e=>e},dN=e=>n=>n.test(e),fN=[Ed,fi,yl,Oc,Sq,Dq,eX],pN=e=>fN.find(dN(e));function tX(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||r6(e):!0}const nX=new Set(["brightness","contrast","saturate","opacity"]);function iX(e){const[n,s]=e.slice(0,-1).split("(");if(n==="drop-shadow")return e;const[l]=s.match(o3)||[];if(!l)return e;const h=s.replace(l,"");let m=nX.has(n)?1:0;return l!==s&&(m*=100),n+"("+m+h+")"}const rX=/\b([a-z-]*)\(.*?\)/gu,P3={...$a,getAnimatableNone:e=>{const n=e.match(rX);return n?n.map(iX).join(" "):e}},R3={...$a,getAnimatableNone:e=>{const n=$a.parse(e);return $a.createTransformer(e)(n.map(l=>typeof l=="number"?0:typeof l=="object"?{...l,alpha:1}:l))}},gN={...Ed,transform:Math.round},B3={borderWidth:fi,borderTopWidth:fi,borderRightWidth:fi,borderBottomWidth:fi,borderLeftWidth:fi,borderRadius:fi,borderTopLeftRadius:fi,borderTopRightRadius:fi,borderBottomRightRadius:fi,borderBottomLeftRadius:fi,width:fi,maxWidth:fi,height:fi,maxHeight:fi,top:fi,right:fi,bottom:fi,left:fi,inset:fi,insetBlock:fi,insetBlockStart:fi,insetBlockEnd:fi,insetInline:fi,insetInlineStart:fi,insetInlineEnd:fi,padding:fi,paddingTop:fi,paddingRight:fi,paddingBottom:fi,paddingLeft:fi,paddingBlock:fi,paddingBlockStart:fi,paddingBlockEnd:fi,paddingInline:fi,paddingInlineStart:fi,paddingInlineEnd:fi,margin:fi,marginTop:fi,marginRight:fi,marginBottom:fi,marginLeft:fi,marginBlock:fi,marginBlockStart:fi,marginBlockEnd:fi,marginInline:fi,marginInlineStart:fi,marginInlineEnd:fi,fontSize:fi,backgroundPositionX:fi,backgroundPositionY:fi,...{rotate:Oc,rotateX:Oc,rotateY:Oc,rotateZ:Oc,scale:n_,scaleX:n_,scaleY:n_,scaleZ:n_,skew:Oc,skewX:Oc,skewY:Oc,distance:fi,translateX:fi,translateY:fi,translateZ:fi,x:fi,y:fi,z:fi,perspective:fi,transformPerspective:fi,opacity:ug,originX:T6,originY:T6,originZ:fi},zIndex:gN,fillOpacity:ug,strokeOpacity:ug,numOctaves:gN},oX={...B3,color:jo,backgroundColor:jo,outlineColor:jo,fill:jo,stroke:jo,borderColor:jo,borderTopColor:jo,borderRightColor:jo,borderBottomColor:jo,borderLeftColor:jo,filter:P3,WebkitFilter:P3,mask:R3,WebkitMask:R3},mN=e=>oX[e],sX=new Set([P3,R3]);function yN(e,n){let s=mN(e);return sX.has(s)||(s=$a),s.getAnimatableNone?s.getAnimatableNone(n):void 0}const aX=new Set(["auto","none","0"]);function lX(e,n,s){let l=0,h;for(;l<e.length&&!h;){const m=e[l];typeof m=="string"&&!aX.has(m)&&Ld(m).values.length&&(h=e[l]),l++}if(h&&s)for(const m of n)e[m]=yN(s,h)}class cX extends T3{constructor(n,s,l,h,m){super(n,s,l,h,m,!0)}readKeyframes(){const{unresolvedKeyframes:n,element:s,name:l}=this;if(!s||!s.current)return;super.readKeyframes();for(let S=0;S<n.length;S++){let L=n[S];if(typeof L=="string"&&(L=L.trim(),r3(L))){const R=oN(L,s.current);R!==void 0&&(n[S]=R),S===n.length-1&&(this.finalKeyframe=L)}}if(this.resolveNoneKeyframes(),!lN.has(l)||n.length!==2)return;const[h,m]=n,_=pN(h),i=pN(m),I=M6(h),C=M6(m);if(I!==C&&jc[l]){this.needsMeasurement=!0;return}if(_!==i)if(Y6(_)&&Y6(i))for(let S=0;S<n.length;S++){const L=n[S];typeof L=="string"&&(n[S]=parseFloat(L))}else jc[l]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:n,name:s}=this,l=[];for(let h=0;h<n.length;h++)(n[h]===null||tX(n[h]))&&l.push(h);l.length&&lX(n,l,s)}measureInitialState(){const{element:n,unresolvedKeyframes:s,name:l}=this;if(!n||!n.current)return;l==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=jc[l](n.measureViewportBox(),window.getComputedStyle(n.current)),s[0]=this.measuredOrigin;const h=s[s.length-1];h!==void 0&&n.getValue(l,h).jump(h,!1)}measureEndState(){const{element:n,name:s,unresolvedKeyframes:l}=this;if(!n||!n.current)return;const h=n.getValue(s);h&&h.jump(this.measuredOrigin,!1);const m=l.length-1,_=l[m];l[m]=jc[s](n.measureViewportBox(),window.getComputedStyle(n.current)),_!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=_),this.removedTransforms?.length&&this.removedTransforms.forEach(([i,I])=>{n.getValue(i).set(I)}),this.resolveNoneKeyframes()}}function F3(e,n,s){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let l=document;n&&(l=n.current);const h=s?.[e]??l.querySelectorAll(e);return h?Array.from(h):[]}return Array.from(e).filter(l=>l!=null)}const _N=(e,n)=>n&&typeof e=="number"?n.transform(e):e;function uX(e){return i6(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:U3}=x6(queueMicrotask,!1),Za={x:!1,y:!1};function vN(){return Za.x||Za.y}function hX(e){return e==="x"||e==="y"?Za[e]?null:(Za[e]=!0,()=>{Za[e]=!1}):Za.x||Za.y?null:(Za.x=Za.y=!0,()=>{Za.x=Za.y=!1})}function xN(e,n){const s=F3(e),l=new AbortController,h={passive:!0,...n,signal:l.signal};return[s,h,()=>l.abort()]}function dX(e){return!(e.pointerType==="touch"||vN())}function fX(e,n,s={}){const[l,h,m]=xN(e,s);return l.forEach(_=>{let i=!1,I=!1,C;const S=()=>{_.removeEventListener("pointerleave",W)},L=pe=>{C&&(C(pe),C=void 0),S()},R=pe=>{i=!1,window.removeEventListener("pointerup",R),window.removeEventListener("pointercancel",R),I&&(I=!1,L(pe))},U=()=>{i=!0,window.addEventListener("pointerup",R,h),window.addEventListener("pointercancel",R,h)},W=pe=>{if(pe.pointerType!=="touch"){if(i){I=!0;return}L(pe)}},le=pe=>{if(!dX(pe))return;I=!1;const ie=n(_,pe);typeof ie=="function"&&(C=ie,_.addEventListener("pointerleave",W,h))};_.addEventListener("pointerenter",le,h),_.addEventListener("pointerdown",U,h)}),m}const bN=(e,n)=>n?e===n?!0:bN(e,n.parentElement):!1,V3=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,pX=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function gX(e){return pX.has(e.tagName)||e.isContentEditable===!0}const mX=new Set(["INPUT","SELECT","TEXTAREA"]);function yX(e){return mX.has(e.tagName)||e.isContentEditable===!0}const a_=new WeakSet;function wN(e){return n=>{n.key==="Enter"&&e(n)}}function H3(e,n){e.dispatchEvent(new PointerEvent("pointer"+n,{isPrimary:!0,bubbles:!0}))}const _X=(e,n)=>{const s=e.currentTarget;if(!s)return;const l=wN(()=>{if(a_.has(s))return;H3(s,"down");const h=wN(()=>{H3(s,"up")}),m=()=>H3(s,"cancel");s.addEventListener("keyup",h,n),s.addEventListener("blur",m,n)});s.addEventListener("keydown",l,n),s.addEventListener("blur",()=>s.removeEventListener("keydown",l),n)};function MN(e){return V3(e)&&!vN()}const IN=new WeakSet;function vX(e,n,s={}){const[l,h,m]=xN(e,s),_=i=>{const I=i.currentTarget;if(!MN(i)||IN.has(i))return;a_.add(I),s.stopPropagation&&IN.add(i);const C=n(I,i),S=(U,W)=>{window.removeEventListener("pointerup",L),window.removeEventListener("pointercancel",R),a_.has(I)&&a_.delete(I),MN(U)&&typeof C=="function"&&C(U,{success:W})},L=U=>{S(U,I===window||I===document||s.useGlobalTarget||bN(I,U.target))},R=U=>{S(U,!1)};window.addEventListener("pointerup",L,h),window.addEventListener("pointercancel",R,h)};return l.forEach(i=>{(s.useGlobalTarget?window:i).addEventListener("pointerdown",_,h),uX(i)&&(i.addEventListener("focus",C=>_X(C,h)),!gX(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),m}function l_(e){return i6(e)&&"ownerSVGElement"in e}const c_=new WeakMap;let u_;const TN=(e,n,s)=>(l,h)=>h&&h[0]?h[0][e+"Size"]:l_(l)&&"getBBox"in l?l.getBBox()[n]:l[s],xX=TN("inline","width","offsetWidth"),bX=TN("block","height","offsetHeight");function wX({target:e,borderBoxSize:n}){c_.get(e)?.forEach(s=>{s(e,{get width(){return xX(e,n)},get height(){return bX(e,n)}})})}function MX(e){e.forEach(wX)}function IX(){typeof ResizeObserver>"u"||(u_=new ResizeObserver(MX))}function TX(e,n){u_||IX();const s=F3(e);return s.forEach(l=>{let h=c_.get(l);h||(h=new Set,c_.set(l,h)),h.add(n),u_?.observe(l)}),()=>{s.forEach(l=>{const h=c_.get(l);h?.delete(n),h?.size||u_?.unobserve(l)})}}const h_=new Set;let Od;function AX(){Od=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};h_.forEach(n=>n(e))},window.addEventListener("resize",Od)}function CX(e){return h_.add(e),Od||AX(),()=>{h_.delete(e),!h_.size&&typeof Od=="function"&&(window.removeEventListener("resize",Od),Od=void 0)}}function AN(e,n){return typeof e=="function"?CX(e):TX(e,n)}function CN(e){return l_(e)&&e.tagName==="svg"}function d_(...e){const n=!Array.isArray(e[0]),s=n?0:-1,l=e[0+s],h=e[1+s],m=e[2+s],_=e[3+s],i=R6(h,m,_);return n?i(l):i}const DX=[...fN,jo,$a],SX=e=>DX.find(dN(e)),DN=()=>({translate:0,scale:1,origin:0,originPoint:0}),jd=()=>({x:DN(),y:DN()}),SN=()=>({min:0,max:0}),Po=()=>({x:SN(),y:SN()}),yg=new WeakMap;function f_(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _g(e){return typeof e=="string"||Array.isArray(e)}const Q3=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Y3=["initial",...Q3];function p_(e){return f_(e.animate)||Y3.some(n=>_g(e[n]))}function EN(e){return!!(p_(e)||e.variants)}function EX(e,n,s){for(const l in n){const h=n[l],m=s[l];if(Qo(h))e.addValue(l,h);else if(Qo(m))e.addValue(l,Pc(h,{owner:e}));else if(m!==h)if(e.hasValue(l)){const _=e.getValue(l);_.liveStyle===!0?_.jump(h):_.hasAnimated||_.set(h)}else{const _=e.getStaticValue(l);e.addValue(l,Pc(_!==void 0?_:h,{owner:e}))}}for(const l in s)n[l]===void 0&&e.removeValue(l);return n}const g_={current:null},G3={current:!1},NX=typeof window<"u";function NN(){if(G3.current=!0,!!NX)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),n=()=>g_.current=e.matches;e.addEventListener("change",n),n()}else g_.current=!1}const LN=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let m_={};function kN(e){m_=e}function LX(){return m_}class zN{scrapeMotionValuesFromProps(n,s,l){return{}}constructor({parent:n,props:s,presenceContext:l,reducedMotionConfig:h,skipAnimations:m,blockInitialAnimation:_,visualState:i},I={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=T3,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const U=Ns.now();this.renderScheduledAt<U&&(this.renderScheduledAt=U,Rr.render(this.render,!1,!0))};const{latestValues:C,renderState:S}=i;this.latestValues=C,this.baseTarget={...C},this.initialValues=s.initial?{...C}:{},this.renderState=S,this.parent=n,this.props=s,this.presenceContext=l,this.depth=n?n.depth+1:0,this.reducedMotionConfig=h,this.skipAnimationsConfig=m,this.options=I,this.blockInitialAnimation=!!_,this.isControllingVariants=p_(s),this.isVariantNode=EN(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(n&&n.current);const{willChange:L,...R}=this.scrapeMotionValuesFromProps(s,{},this);for(const U in R){const W=R[U];C[U]!==void 0&&Qo(W)&&W.set(C[U])}}mount(n){if(this.hasBeenMounted)for(const s in this.initialValues)this.values.get(s)?.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=n,yg.set(n,this),this.projection&&!this.projection.instance&&this.projection.mount(n),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,l)=>this.bindToMotionValue(l,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(G3.current||NN(),this.shouldReduceMotion=g_.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),nc(this.notifyUpdate),nc(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(n){this.children.add(n),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(n)}removeChild(n){this.children.delete(n),this.enteringChildren&&this.enteringChildren.delete(n)}bindToMotionValue(n,s){if(this.valueSubscriptions.has(n)&&this.valueSubscriptions.get(n)(),s.accelerate&&nN.has(n)&&this.current instanceof HTMLElement){const{factory:_,keyframes:i,times:I,ease:C,duration:S}=s.accelerate,L=new J6({element:this.current,name:n,keyframes:i,times:I,ease:C,duration:Ws(S)}),R=_(L);this.valueSubscriptions.set(n,()=>{R(),L.cancel()});return}const l=zd.has(n);l&&this.onBindTransform&&this.onBindTransform();const h=s.on("change",_=>{this.latestValues[n]=_,this.props.onUpdate&&Rr.preRender(this.notifyUpdate),l&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let m;typeof window<"u"&&window.MotionCheckAppearSync&&(m=window.MotionCheckAppearSync(this,n,s)),this.valueSubscriptions.set(n,()=>{h(),m&&m(),s.owner&&s.stop()})}sortNodePosition(n){return!this.current||!this.sortInstanceNodePosition||this.type!==n.type?0:this.sortInstanceNodePosition(this.current,n.current)}updateFeatures(){let n="animation";for(n in m_){const s=m_[n];if(!s)continue;const{isEnabled:l,Feature:h}=s;if(!this.features[n]&&h&&l(this.props)&&(this.features[n]=new h(this)),this.features[n]){const m=this.features[n];m.isMounted?m.update():(m.mount(),m.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Po()}getStaticValue(n){return this.latestValues[n]}setStaticValue(n,s){this.latestValues[n]=s}update(n,s){(n.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=n,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let l=0;l<LN.length;l++){const h=LN[l];this.propEventSubscriptions[h]&&(this.propEventSubscriptions[h](),delete this.propEventSubscriptions[h]);const m="on"+h,_=n[m];_&&(this.propEventSubscriptions[h]=this.on(h,_))}this.prevMotionValues=EX(this,this.scrapeMotionValuesFromProps(n,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(n){return this.props.variants?this.props.variants[n]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(n){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(n),()=>s.variantChildren.delete(n)}addValue(n,s){const l=this.values.get(n);s!==l&&(l&&this.removeValue(n),this.bindToMotionValue(n,s),this.values.set(n,s),this.latestValues[n]=s.get())}removeValue(n){this.values.delete(n);const s=this.valueSubscriptions.get(n);s&&(s(),this.valueSubscriptions.delete(n)),delete this.latestValues[n],this.removeValueFromRenderState(n,this.renderState)}hasValue(n){return this.values.has(n)}getValue(n,s){if(this.props.values&&this.props.values[n])return this.props.values[n];let l=this.values.get(n);return l===void 0&&s!==void 0&&(l=Pc(s===null?void 0:s,{owner:this}),this.addValue(n,l)),l}readValue(n,s){let l=this.latestValues[n]!==void 0||!this.current?this.latestValues[n]:this.getBaseTargetFromProps(this.props,n)??this.readValueFromInstance(this.current,n,this.options);return l!=null&&(typeof l=="string"&&(n6(l)||r6(l))?l=parseFloat(l):!SX(l)&&$a.test(s)&&(l=yN(n,s)),this.setBaseTarget(n,Qo(l)?l.get():l)),Qo(l)?l.get():l}setBaseTarget(n,s){this.baseTarget[n]=s}getBaseTarget(n){const{initial:s}=this.props;let l;if(typeof s=="string"||typeof s=="object"){const m=N3(this.props,s,this.presenceContext?.custom);m&&(l=m[n])}if(s&&l!==void 0)return l;const h=this.getBaseTargetFromProps(this.props,n);return h!==void 0&&!Qo(h)?h:this.initialValues[n]!==void 0&&l===void 0?void 0:this.baseTarget[n]}on(n,s){return this.events[n]||(this.events[n]=new e3),this.events[n].add(s)}notify(n,...s){this.events[n]&&this.events[n].notify(...s)}scheduleRenderMicrotask(){U3.render(this.render)}}class ON extends zN{constructor(){super(...arguments),this.KeyframeResolver=cX}sortInstanceNodePosition(n,s){return n.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(n,s){const l=n.style;return l?l[s]:void 0}removeValueFromRenderState(n,{vars:s,style:l}){delete s[n],delete l[n]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:n}=this.props;Qo(n)&&(this.childSubscription=n.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class Rc{constructor(n){this.isMounted=!1,this.node=n}update(){}}function jN({top:e,left:n,right:s,bottom:l}){return{x:{min:n,max:s},y:{min:e,max:l}}}function kX({x:e,y:n}){return{top:n.min,right:e.max,bottom:n.max,left:e.min}}function zX(e,n){if(!n)return e;const s=n({x:e.left,y:e.top}),l=n({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:l.y,right:l.x}}function $3(e){return e===void 0||e===1}function Z3({scale:e,scaleX:n,scaleY:s}){return!$3(e)||!$3(n)||!$3(s)}function Xu(e){return Z3(e)||PN(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function PN(e){return RN(e.x)||RN(e.y)}function RN(e){return e&&e!=="0%"}function y_(e,n,s){const l=e-s,h=n*l;return s+h}function BN(e,n,s,l,h){return h!==void 0&&(e=y_(e,h,l)),y_(e,s,l)+n}function W3(e,n=0,s=1,l,h){e.min=BN(e.min,n,s,l,h),e.max=BN(e.max,n,s,l,h)}function FN(e,{x:n,y:s}){W3(e.x,n.translate,n.scale,n.originPoint),W3(e.y,s.translate,s.scale,s.originPoint)}const UN=.999999999999,VN=1.0000000000001;function OX(e,n,s,l=!1){const h=s.length;if(!h)return;n.x=n.y=1;let m,_;for(let i=0;i<h;i++){m=s[i],_=m.projectionDelta;const{visualElement:I}=m.options;I&&I.props.style&&I.props.style.display==="contents"||(l&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(_l(e.x,-m.scroll.offset.x),_l(e.y,-m.scroll.offset.y)),_&&(n.x*=_.x.scale,n.y*=_.y.scale,FN(e,_)),l&&Xu(m.latestValues)&&__(e,m.latestValues,m.layout?.layoutBox))}n.x<VN&&n.x>UN&&(n.x=1),n.y<VN&&n.y>UN&&(n.y=1)}function _l(e,n){e.min+=n,e.max+=n}function HN(e,n,s,l,h=.5){const m=Qr(e.min,e.max,h);W3(e,n,s,m,l)}function QN(e,n){return typeof e=="string"?parseFloat(e)/100*(n.max-n.min):e}function __(e,n,s){const l=s??e;HN(e.x,QN(n.x,l.x),n.scaleX,n.scale,n.originX),HN(e.y,QN(n.y,l.y),n.scaleY,n.scale,n.originY)}function YN(e,n){return jN(zX(e.getBoundingClientRect(),n))}function jX(e,n,s){const l=YN(e,s),{scroll:h}=n;return h&&(_l(l.x,h.offset.x),_l(l.y,h.offset.y)),l}const PX={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},RX=kd.length;function BX(e,n,s){let l="",h=!0;for(let m=0;m<RX;m++){const _=kd[m],i=e[_];if(i===void 0)continue;let I=!0;if(typeof i=="number")I=i===(_.startsWith("scale")?1:0);else{const C=parseFloat(i);I=_.startsWith("scale")?C===1:C===0}if(!I||s){const C=_N(i,B3[_]);if(!I){h=!1;const S=PX[_]||_;l+=`${S}(${C}) `}s&&(n[_]=C)}}return l=l.trim(),s?l=s(n,h?"":l):h&&(l="none"),l}function q3(e,n,s){const{style:l,vars:h,transformOrigin:m}=e;let _=!1,i=!1;for(const I in n){const C=n[I];if(zd.has(I)){_=!0;continue}else if(w6(I)){h[I]=C;continue}else{const S=_N(C,B3[I]);I.startsWith("origin")?(i=!0,m[I]=S):l[I]=S}}if(n.transform||(_||s?l.transform=BX(n,e.transform,s):l.transform&&(l.transform="none")),i){const{originX:I="50%",originY:C="50%",originZ:S=0}=m;l.transformOrigin=`${I} ${C} ${S}`}}function GN(e,{style:n,vars:s},l,h){const m=e.style;let _;for(_ in n)m[_]=n[_];h?.applyProjectionStyles(m,l);for(_ in s)m.setProperty(_,s[_])}function $N(e,n){return n.max===n.min?0:e/(n.max-n.min)*100}const vg={correct:(e,n)=>{if(!n.target)return e;if(typeof e=="string")if(fi.test(e))e=parseFloat(e);else return e;const s=$N(e,n.target.x),l=$N(e,n.target.y);return`${s}% ${l}%`}},FX={correct:(e,{treeScale:n,projectionDelta:s})=>{const l=e,h=$a.parse(e);if(h.length>5)return l;const m=$a.createTransformer(e),_=typeof h[0]!="number"?1:0,i=s.x.scale*n.x,I=s.y.scale*n.y;h[0+_]/=i,h[1+_]/=I;const C=Qr(i,I,.5);return typeof h[2+_]=="number"&&(h[2+_]/=C),typeof h[3+_]=="number"&&(h[3+_]/=C),m(h)}},K3={borderRadius:{...vg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vg,borderTopRightRadius:vg,borderBottomLeftRadius:vg,borderBottomRightRadius:vg,boxShadow:FX};function ZN(e,{layout:n,layoutId:s}){return zd.has(e)||e.startsWith("origin")||(n||s!==void 0)&&(!!K3[e]||e==="opacity")}function X3(e,n,s){const l=e.style,h=n?.style,m={};if(!l)return m;for(const _ in l)(Qo(l[_])||h&&Qo(h[_])||ZN(_,e)||s?.getValue(_)?.liveStyle!==void 0)&&(m[_]=l[_]);return m}function UX(e){return window.getComputedStyle(e)}class WN extends ON{constructor(){super(...arguments),this.type="html",this.renderInstance=GN}readValueFromInstance(n,s){if(zd.has(s))return this.projection?.isProjecting?x3(s):hK(n,s);{const l=UX(n),h=(w6(s)?l.getPropertyValue(s):l[s])||0;return typeof h=="string"?h.trim():h}}measureInstanceViewportBox(n,{transformPagePoint:s}){return YN(n,s)}build(n,s,l){q3(n,s,l.transformTemplate)}scrapeMotionValuesFromProps(n,s,l){return X3(n,s,l)}}function VX(e,n){return e in n}class HX extends zN{constructor(){super(...arguments),this.type="object"}readValueFromInstance(n,s){if(VX(s,n)){const l=n[s];if(typeof l=="string"||typeof l=="number")return l}}getBaseTargetFromProps(){}removeValueFromRenderState(n,s){delete s.output[n]}measureInstanceViewportBox(){return Po()}build(n,s){Object.assign(n.output,s)}renderInstance(n,{output:s}){Object.assign(n,s)}sortInstanceNodePosition(){return 0}}const QX={offset:"stroke-dashoffset",array:"stroke-dasharray"},YX={offset:"strokeDashoffset",array:"strokeDasharray"};function GX(e,n,s=1,l=0,h=!0){e.pathLength=1;const m=h?QX:YX;e[m.offset]=`${-l}`,e[m.array]=`${n} ${s}`}const $X=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function qN(e,{attrX:n,attrY:s,attrScale:l,pathLength:h,pathSpacing:m=1,pathOffset:_=0,...i},I,C,S){if(q3(e,i,C),I){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:L,style:R}=e;L.transform&&(R.transform=L.transform,delete L.transform),(R.transform||L.transformOrigin)&&(R.transformOrigin=L.transformOrigin??"50% 50%",delete L.transformOrigin),R.transform&&(R.transformBox=S?.transformBox??"fill-box",delete L.transformBox);for(const U of $X)L[U]!==void 0&&(R[U]=L[U],delete L[U]);n!==void 0&&(L.x=n),s!==void 0&&(L.y=s),l!==void 0&&(L.scale=l),h!==void 0&&GX(L,h,m,_,!1)}const KN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),XN=e=>typeof e=="string"&&e.toLowerCase()==="svg";function ZX(e,n,s,l){GN(e,n,void 0,l);for(const h in n.attrs)e.setAttribute(KN.has(h)?h:z3(h),n.attrs[h])}function JN(e,n,s){const l=X3(e,n,s);for(const h in e)if(Qo(e[h])||Qo(n[h])){const m=kd.indexOf(h)!==-1?"attr"+h.charAt(0).toUpperCase()+h.substring(1):h;l[m]=e[h]}return l}class eL extends ON{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Po}getBaseTargetFromProps(n,s){return n[s]}readValueFromInstance(n,s){if(zd.has(s)){const l=mN(s);return l&&l.default||0}return s=KN.has(s)?s:z3(s),n.getAttribute(s)}scrapeMotionValuesFromProps(n,s,l){return JN(n,s,l)}build(n,s,l){qN(n,s,this.isSVGTag,l.transformTemplate,l.style)}renderInstance(n,s,l,h){ZX(n,s,l,h)}mount(n){this.isSVGTag=XN(n.tagName),super.mount(n)}}const WX=Y3.length;function tL(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?tL(e.parent)||{}:{};return e.props.initial!==void 0&&(s.initial=e.props.initial),s}const n={};for(let s=0;s<WX;s++){const l=Y3[s],h=e.props[l];(_g(h)||h===!1)&&(n[l]=h)}return n}function nL(e,n){if(!Array.isArray(n))return!1;const s=n.length;if(s!==e.length)return!1;for(let l=0;l<s;l++)if(n[l]!==e[l])return!1;return!0}const qX=[...Q3].reverse(),KX=Q3.length;function XX(e){return n=>Promise.all(n.map(({animation:s,options:l})=>JK(e,s,l)))}function JX(e){let n=XX(e),s=iL(),l=!0,h=!1;const m=C=>(S,L)=>{const R=Ku(e,L,C==="exit"?e.presenceContext?.custom:void 0);if(R){const{transition:U,transitionEnd:W,...le}=R;S={...S,...le,...W}}return S};function _(C){n=C(e)}function i(C){const{props:S}=e,L=tL(e.parent)||{},R=[],U=new Set;let W={},le=1/0;for(let ie=0;ie<KX;ie++){const Y=qX[ie],q=s[Y],ue=S[Y]!==void 0?S[Y]:L[Y],me=_g(ue),ne=Y===C?q.isActive:null;ne===!1&&(le=ie);let De=ue===L[Y]&&ue!==S[Y]&&me;if(De&&(l||h)&&e.manuallyAnimateOnMount&&(De=!1),q.protectedKeys={...W},!q.isActive&&ne===null||!ue&&!q.prevProp||f_(ue)||typeof ue=="boolean")continue;if(Y==="exit"&&q.isActive&&ne!==!0){q.prevResolvedValues&&(W={...W,...q.prevResolvedValues});continue}const Me=eJ(q.prevProp,ue);let Ee=Me||Y===C&&q.isActive&&!De&&me||ie>le&&me,ge=!1;const Re=Array.isArray(ue)?ue:[ue];let Oe=Re.reduce(m(Y),{});ne===!1&&(Oe={});const{prevResolvedValues:Ne={}}=q,tt={...Ne,...Oe},dt=_e=>{Ee=!0,U.has(_e)&&(ge=!0,U.delete(_e)),q.needsAnimating[_e]=!0;const D=e.getValue(_e);D&&(D.liveStyle=!1)};for(const _e in tt){const D=Oe[_e],P=Ne[_e];if(W.hasOwnProperty(_e))continue;let K=!1;L3(D)&&L3(P)?K=!nL(D,P):K=D!==P,K?D!=null?dt(_e):U.add(_e):D!==void 0&&U.has(_e)?dt(_e):q.protectedKeys[_e]=!0}q.prevProp=ue,q.prevResolvedValues=Oe,q.isActive&&(W={...W,...Oe}),(l||h)&&e.blockInitialAnimation&&(Ee=!1);const Nt=De&&Me;Ee&&(!Nt||ge)&&R.push(...Re.map(_e=>{const D={type:Y};if(typeof _e=="string"&&(l||h)&&!Nt&&e.manuallyAnimateOnMount&&e.parent){const{parent:P}=e,K=Ku(P,_e);if(P.enteringChildren&&K){const{delayChildren:H}=K.transition||{};D.delay=rN(P.enteringChildren,e,H)}}return{animation:_e,options:D}}))}if(U.size){const ie={};if(typeof S.initial!="boolean"){const Y=Ku(e,Array.isArray(S.initial)?S.initial[0]:S.initial);Y&&Y.transition&&(ie.transition=Y.transition)}U.forEach(Y=>{const q=e.getBaseTarget(Y),ue=e.getValue(Y);ue&&(ue.liveStyle=!0),ie[Y]=q??null}),R.push({animation:ie})}let pe=!!R.length;return l&&(S.initial===!1||S.initial===S.animate)&&!e.manuallyAnimateOnMount&&(pe=!1),l=!1,h=!1,pe?n(R):Promise.resolve()}function I(C,S){if(s[C].isActive===S)return Promise.resolve();e.variantChildren?.forEach(R=>R.animationState?.setActive(C,S)),s[C].isActive=S;const L=i(C);for(const R in s)s[R].protectedKeys={};return L}return{animateChanges:i,setActive:I,setAnimateFunction:_,getState:()=>s,reset:()=>{s=iL(),h=!0}}}function eJ(e,n){return typeof n=="string"?n!==e:Array.isArray(n)?!nL(n,e):!1}function Ju(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function iL(){return{animate:Ju(!0),whileInView:Ju(),whileHover:Ju(),whileTap:Ju(),whileDrag:Ju(),whileFocus:Ju(),exit:Ju()}}function J3(e,n){e.min=n.min,e.max=n.max}function Wa(e,n){J3(e.x,n.x),J3(e.y,n.y)}function rL(e,n){e.translate=n.translate,e.scale=n.scale,e.originPoint=n.originPoint,e.origin=n.origin}const oL=1e-4,tJ=1-oL,nJ=1+oL,sL=.01,iJ=0-sL,rJ=0+sL;function Ls(e){return e.max-e.min}function oJ(e,n,s){return Math.abs(e-n)<=s}function aL(e,n,s,l=.5){e.origin=l,e.originPoint=Qr(n.min,n.max,e.origin),e.scale=Ls(s)/Ls(n),e.translate=Qr(s.min,s.max,e.origin)-e.originPoint,(e.scale>=tJ&&e.scale<=nJ||isNaN(e.scale))&&(e.scale=1),(e.translate>=iJ&&e.translate<=rJ||isNaN(e.translate))&&(e.translate=0)}function xg(e,n,s,l){aL(e.x,n.x,s.x,l?l.originX:void 0),aL(e.y,n.y,s.y,l?l.originY:void 0)}function lL(e,n,s,l=0){const h=l?Qr(s.min,s.max,l):s.min;e.min=h+n.min,e.max=e.min+Ls(n)}function sJ(e,n,s,l){lL(e.x,n.x,s.x,l?.x),lL(e.y,n.y,s.y,l?.y)}function cL(e,n,s,l=0){const h=l?Qr(s.min,s.max,l):s.min;e.min=n.min-h,e.max=e.min+Ls(n)}function v_(e,n,s,l){cL(e.x,n.x,s.x,l?.x),cL(e.y,n.y,s.y,l?.y)}function uL(e,n,s,l,h){return e-=n,e=y_(e,1/s,l),h!==void 0&&(e=y_(e,1/h,l)),e}function aJ(e,n=0,s=1,l=.5,h,m=e,_=e){if(yl.test(n)&&(n=parseFloat(n),n=Qr(_.min,_.max,n/100)-_.min),typeof n!="number")return;let i=Qr(m.min,m.max,l);e===m&&(i-=n),e.min=uL(e.min,n,s,i,h),e.max=uL(e.max,n,s,i,h)}function hL(e,n,[s,l,h],m,_){aJ(e,n[s],n[l],n[h],n.scale,m,_)}const lJ=["x","scaleX","originX"],cJ=["y","scaleY","originY"];function dL(e,n,s,l){hL(e.x,n,lJ,s?s.x:void 0,l?l.x:void 0),hL(e.y,n,cJ,s?s.y:void 0,l?l.y:void 0)}function fL(e){return e.translate===0&&e.scale===1}function pL(e){return fL(e.x)&&fL(e.y)}function gL(e,n){return e.min===n.min&&e.max===n.max}function uJ(e,n){return gL(e.x,n.x)&&gL(e.y,n.y)}function mL(e,n){return Math.round(e.min)===Math.round(n.min)&&Math.round(e.max)===Math.round(n.max)}function yL(e,n){return mL(e.x,n.x)&&mL(e.y,n.y)}function _L(e){return Ls(e.x)/Ls(e.y)}function vL(e,n){return e.translate===n.translate&&e.scale===n.scale&&e.originPoint===n.originPoint}function vl(e){return[e("x"),e("y")]}function hJ(e,n,s){let l="";const h=e.x.translate/n.x,m=e.y.translate/n.y,_=s?.z||0;if((h||m||_)&&(l=`translate3d(${h}px, ${m}px, ${_}px) `),(n.x!==1||n.y!==1)&&(l+=`scale(${1/n.x}, ${1/n.y}) `),s){const{transformPerspective:C,rotate:S,rotateX:L,rotateY:R,skewX:U,skewY:W}=s;C&&(l=`perspective(${C}px) ${l}`),S&&(l+=`rotate(${S}deg) `),L&&(l+=`rotateX(${L}deg) `),R&&(l+=`rotateY(${R}deg) `),U&&(l+=`skewX(${U}deg) `),W&&(l+=`skewY(${W}deg) `)}const i=e.x.scale*n.x,I=e.y.scale*n.y;return(i!==1||I!==1)&&(l+=`scale(${i}, ${I})`),l||"none"}const xL=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],dJ=xL.length,bL=e=>typeof e=="string"?parseFloat(e):e,wL=e=>typeof e=="number"||fi.test(e);function fJ(e,n,s,l,h,m){h?(e.opacity=Qr(0,s.opacity??1,pJ(l)),e.opacityExit=Qr(n.opacity??1,0,gJ(l))):m&&(e.opacity=Qr(n.opacity??1,s.opacity??1,l));for(let _=0;_<dJ;_++){const i=xL[_];let I=ML(n,i),C=ML(s,i);if(I===void 0&&C===void 0)continue;I||(I=0),C||(C=0),I===0||C===0||wL(I)===wL(C)?(e[i]=Math.max(Qr(bL(I),bL(C),l),0),(yl.test(C)||yl.test(I))&&(e[i]+="%")):e[i]=C}(n.rotate||s.rotate)&&(e.rotate=Qr(n.rotate||0,s.rotate||0,l))}function ML(e,n){return e[n]!==void 0?e[n]:e.borderRadius}const pJ=IL(0,.5,f6),gJ=IL(.5,.95,Ca);function IL(e,n,s){return l=>l<e?0:l>n?1:s(Sd(e,n,l))}function TL(e,n,s){const l=Qo(e)?e:Pc(e);return l.start(E3("",l,n,s)),l.animation}function bg(e,n,s,l={passive:!0}){return e.addEventListener(n,s,l),()=>e.removeEventListener(n,s)}const mJ=(e,n)=>e.depth-n.depth;class yJ{constructor(){this.children=[],this.isDirty=!1}add(n){XM(this.children,n),this.isDirty=!0}remove(n){Dd(this.children,n),this.isDirty=!0}forEach(n){this.isDirty&&this.children.sort(mJ),this.isDirty=!1,this.children.forEach(n)}}function _J(e,n){const s=Ns.now(),l=({timestamp:h})=>{const m=h-s;m>=n&&(nc(l),e(m-n))};return Rr.setup(l,!0),()=>nc(l)}function x_(e){return Qo(e)?e.get():e}class vJ{constructor(){this.members=[]}add(n){XM(this.members,n);for(let s=this.members.length-1;s>=0;s--){const l=this.members[s];if(l===n||l===this.lead||l===this.prevLead)continue;const h=l.instance;(!h||h.isConnected===!1)&&!l.snapshot&&(Dd(this.members,l),l.unmount())}n.scheduleRender()}remove(n){if(Dd(this.members,n),n===this.prevLead&&(this.prevLead=void 0),n===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(n){for(let s=this.members.indexOf(n)-1;s>=0;s--){const l=this.members[s];if(l.isPresent!==!1&&l.instance?.isConnected!==!1)return this.promote(l),!0}return!1}promote(n,s){const l=this.lead;if(n!==l&&(this.prevLead=l,this.lead=n,n.show(),l)){l.updateSnapshot(),n.scheduleRender();const{layoutDependency:h}=l.options,{layoutDependency:m}=n.options;(h===void 0||h!==m)&&(n.resumeFrom=l,s&&(l.preserveOpacity=!0),l.snapshot&&(n.snapshot=l.snapshot,n.snapshot.latestValues=l.animationValues||l.latestValues),n.root?.isUpdating&&(n.isLayoutDirty=!0)),n.options.crossfade===!1&&l.hide()}}exitAnimationComplete(){this.members.forEach(n=>{n.options.onExitComplete?.(),n.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(n=>n.instance&&n.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const b_={hasAnimatedSinceResize:!0,hasEverUpdated:!1},e4=["","X","Y","Z"],xJ=1e3;let bJ=0;function t4(e,n,s,l){const{latestValues:h}=n;h[e]&&(s[e]=h[e],n.setStaticValue(e,0),l&&(l[e]=0))}function AL(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:n}=e.options;if(!n)return;const s=hN(n);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:h,layoutId:m}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",Rr,!(h||m))}const{parent:l}=e;l&&!l.hasCheckedOptimisedAppear&&AL(l)}function CL({attachResizeListener:e,defaultParent:n,measureScroll:s,checkIsScrollRoot:l,resetTransform:h}){return class{constructor(_={},i=n?.()){this.id=bJ++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(IJ),this.nodes.forEach(EJ),this.nodes.forEach(NJ),this.nodes.forEach(TJ)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=_,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let I=0;I<this.path.length;I++)this.path[I].shouldResetTransform=!0;this.root===this&&(this.nodes=new yJ)}addEventListener(_,i){return this.eventHandlers.has(_)||this.eventHandlers.set(_,new e3),this.eventHandlers.get(_).add(i)}notifyListeners(_,...i){const I=this.eventHandlers.get(_);I&&I.notify(...i)}hasListeners(_){return this.eventHandlers.has(_)}mount(_){if(this.instance)return;this.isSVG=l_(_)&&!CN(_),this.instance=_;const{layoutId:i,layout:I,visualElement:C}=this.options;if(C&&!C.current&&C.mount(_),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(I||i)&&(this.isLayoutDirty=!0),e){let S,L=0;const R=()=>this.root.updateBlockedByResize=!1;Rr.read(()=>{L=window.innerWidth}),e(_,()=>{const U=window.innerWidth;U!==L&&(L=U,this.root.updateBlockedByResize=!0,S&&S(),S=_J(R,250),b_.hasAnimatedSinceResize&&(b_.hasAnimatedSinceResize=!1,this.nodes.forEach(EL)))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&C&&(i||I)&&this.addEventListener("didUpdate",({delta:S,hasLayoutChanged:L,hasRelativeLayoutChanged:R,layout:U})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const W=this.options.transition||C.getDefaultTransition()||jJ,{onLayoutAnimationStart:le,onLayoutAnimationComplete:pe}=C.getProps(),ie=!this.targetLayout||!yL(this.targetLayout,U),Y=!L&&R;if(this.options.layoutRoot||this.resumeFrom||Y||L&&(ie||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const q={...S3(W,"layout"),onPlay:le,onComplete:pe};(C.shouldReduceMotion||this.options.layoutRoot)&&(q.delay=0,q.type=!1),this.startAnimation(q),this.setAnimationOrigin(S,Y)}else L||EL(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=U})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const _=this.getStack();_&&_.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),nc(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(LJ),this.animationId++)}getTransformTemplate(){const{visualElement:_}=this.options;return _&&_.getProps().transformTemplate}willUpdate(_=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&AL(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let S=0;S<this.path.length;S++){const L=this.path[S];L.shouldResetTransform=!0,(typeof L.latestValues.x=="string"||typeof L.latestValues.y=="string")&&(L.isLayoutDirty=!0),L.updateScroll("snapshot"),L.options.layoutRoot&&L.willUpdate(!1)}const{layoutId:i,layout:I}=this.options;if(i===void 0&&!I)return;const C=this.getTransformTemplate();this.prevTransformTemplateValue=C?C(this.latestValues,""):void 0,this.updateSnapshot(),_&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const I=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),I&&this.nodes.forEach(CJ),this.nodes.forEach(DL);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(SL);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(DJ),this.nodes.forEach(SJ),this.nodes.forEach(wJ),this.nodes.forEach(MJ)):this.nodes.forEach(SL),this.clearAllSnapshots();const i=Ns.now();ls.delta=ml(0,1e3/60,i-ls.timestamp),ls.timestamp=i,ls.isProcessing=!0,i3.update.process(ls),i3.preRender.process(ls),i3.render.process(ls),ls.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,U3.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(AJ),this.sharedNodes.forEach(kJ)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Rr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Rr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ls(this.snapshot.measuredBox.x)&&!Ls(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let I=0;I<this.path.length;I++)this.path[I].updateScroll();const _=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Po()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:i}=this.options;i&&i.notify("LayoutMeasure",this.layout.layoutBox,_?_.layoutBox:void 0)}updateScroll(_="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===_&&(i=!1),i&&this.instance){const I=l(this.instance);this.scroll={animationId:this.root.animationId,phase:_,isRoot:I,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:I}}}resetTransform(){if(!h)return;const _=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!pL(this.projectionDelta),I=this.getTransformTemplate(),C=I?I(this.latestValues,""):void 0,S=C!==this.prevTransformTemplateValue;_&&this.instance&&(i||Xu(this.latestValues)||S)&&(h(this.instance,C),this.shouldResetTransform=!1,this.scheduleRender())}measure(_=!0){const i=this.measurePageBox();let I=this.removeElementScroll(i);return _&&(I=this.removeTransform(I)),PJ(I),{animationId:this.root.animationId,measuredBox:i,layoutBox:I,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:_}=this.options;if(!_)return Po();const i=_.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(RJ))){const{scroll:C}=this.root;C&&(_l(i.x,C.offset.x),_l(i.y,C.offset.y))}return i}removeElementScroll(_){const i=Po();if(Wa(i,_),this.scroll?.wasRoot)return i;for(let I=0;I<this.path.length;I++){const C=this.path[I],{scroll:S,options:L}=C;C!==this.root&&S&&L.layoutScroll&&(S.wasRoot&&Wa(i,_),_l(i.x,S.offset.x),_l(i.y,S.offset.y))}return i}applyTransform(_,i=!1,I){const C=I||Po();Wa(C,_);for(let S=0;S<this.path.length;S++){const L=this.path[S];!i&&L.options.layoutScroll&&L.scroll&&L!==L.root&&(_l(C.x,-L.scroll.offset.x),_l(C.y,-L.scroll.offset.y)),Xu(L.latestValues)&&__(C,L.latestValues,L.layout?.layoutBox)}return Xu(this.latestValues)&&__(C,this.latestValues,this.layout?.layoutBox),C}removeTransform(_){const i=Po();Wa(i,_);for(let I=0;I<this.path.length;I++){const C=this.path[I];if(!Xu(C.latestValues))continue;let S;C.instance&&(Z3(C.latestValues)&&C.updateSnapshot(),S=Po(),Wa(S,C.measurePageBox())),dL(i,C.latestValues,C.snapshot?.layoutBox,S)}return Xu(this.latestValues)&&dL(i,this.latestValues),i}setTargetDelta(_){this.targetDelta=_,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(_){this.options={...this.options,..._,crossfade:_.crossfade!==void 0?_.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ls.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(_=!1){const i=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=i.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=i.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=i.isSharedProjectionDirty);const I=!!this.resumingFrom||this!==i;if(!(_||I&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:S,layoutId:L}=this.options;if(!this.layout||!(S||L))return;this.resolvedRelativeTargetAt=ls.timestamp;const R=this.getClosestProjectingParent();R&&this.linkedParentVersion!==R.layoutVersion&&!R.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&R&&R.layout?this.createRelativeTarget(R,this.layout.layoutBox,R.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Po(),this.targetWithTransforms=Po()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),sJ(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Wa(this.target,this.layout.layoutBox),FN(this.target,this.targetDelta)):Wa(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&R&&!!R.resumingFrom==!!this.resumingFrom&&!R.options.layoutScroll&&R.target&&this.animationProgress!==1?this.createRelativeTarget(R,this.target,R.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Z3(this.parent.latestValues)||PN(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(_,i,I){this.relativeParent=_,this.linkedParentVersion=_.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Po(),this.relativeTargetOrigin=Po(),v_(this.relativeTargetOrigin,i,I,this.options.layoutAnchor||void 0),Wa(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const _=this.getLead(),i=!!this.resumingFrom||this!==_;let I=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(I=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(I=!1),this.resolvedRelativeTargetAt===ls.timestamp&&(I=!1),I)return;const{layout:C,layoutId:S}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(C||S))return;Wa(this.layoutCorrected,this.layout.layoutBox);const L=this.treeScale.x,R=this.treeScale.y;OX(this.layoutCorrected,this.treeScale,this.path,i),_.layout&&!_.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(_.target=_.layout.layoutBox,_.targetWithTransforms=Po());const{target:U}=_;if(!U){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(rL(this.prevProjectionDelta.x,this.projectionDelta.x),rL(this.prevProjectionDelta.y,this.projectionDelta.y)),xg(this.projectionDelta,this.layoutCorrected,U,this.latestValues),(this.treeScale.x!==L||this.treeScale.y!==R||!vL(this.projectionDelta.x,this.prevProjectionDelta.x)||!vL(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",U))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(_=!0){if(this.options.visualElement?.scheduleRender(),_){const i=this.getStack();i&&i.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=jd(),this.projectionDelta=jd(),this.projectionDeltaWithTransform=jd()}setAnimationOrigin(_,i=!1){const I=this.snapshot,C=I?I.latestValues:{},S={...this.latestValues},L=jd();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;const R=Po(),U=I?I.source:void 0,W=this.layout?this.layout.source:void 0,le=U!==W,pe=this.getStack(),ie=!pe||pe.members.length<=1,Y=!!(le&&!ie&&this.options.crossfade===!0&&!this.path.some(OJ));this.animationProgress=0;let q;this.mixTargetDelta=ue=>{const me=ue/1e3;NL(L.x,_.x,me),NL(L.y,_.y,me),this.setTargetDelta(L),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(v_(R,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),zJ(this.relativeTarget,this.relativeTargetOrigin,R,me),q&&uJ(this.relativeTarget,q)&&(this.isProjectionDirty=!1),q||(q=Po()),Wa(q,this.relativeTarget)),le&&(this.animationValues=S,fJ(S,C,this.latestValues,me,Y,ie)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=me},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(_){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(nc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Rr.update(()=>{b_.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Pc(0)),this.motionValue.jump(0,!1),this.currentAnimation=TL(this.motionValue,[0,1e3],{..._,velocity:0,isSync:!0,onUpdate:i=>{this.mixTargetDelta(i),_.onUpdate&&_.onUpdate(i)},onStop:()=>{},onComplete:()=>{_.onComplete&&_.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const _=this.getStack();_&&_.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(xJ),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const _=this.getLead();let{targetWithTransforms:i,target:I,layout:C,latestValues:S}=_;if(!(!i||!I||!C)){if(this!==_&&this.layout&&C&&jL(this.options.animationType,this.layout.layoutBox,C.layoutBox)){I=this.target||Po();const L=Ls(this.layout.layoutBox.x);I.x.min=_.target.x.min,I.x.max=I.x.min+L;const R=Ls(this.layout.layoutBox.y);I.y.min=_.target.y.min,I.y.max=I.y.min+R}Wa(i,I),__(i,S),xg(this.projectionDeltaWithTransform,this.layoutCorrected,i,S)}}registerSharedNode(_,i){this.sharedNodes.has(_)||this.sharedNodes.set(_,new vJ),this.sharedNodes.get(_).add(i);const C=i.options.initialPromotionConfig;i.promote({transition:C?C.transition:void 0,preserveFollowOpacity:C&&C.shouldPreserveFollowOpacity?C.shouldPreserveFollowOpacity(i):void 0})}isLead(){const _=this.getStack();return _?_.lead===this:!0}getLead(){const{layoutId:_}=this.options;return _?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:_}=this.options;return _?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:_}=this.options;if(_)return this.root.sharedNodes.get(_)}promote({needsReset:_,transition:i,preserveFollowOpacity:I}={}){const C=this.getStack();C&&C.promote(this,I),_&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){const _=this.getStack();return _?_.relegate(this):!1}resetSkewAndRotation(){const{visualElement:_}=this.options;if(!_)return;let i=!1;const{latestValues:I}=_;if((I.z||I.rotate||I.rotateX||I.rotateY||I.rotateZ||I.skewX||I.skewY)&&(i=!0),!i)return;const C={};I.z&&t4("z",_,C,this.animationValues);for(let S=0;S<e4.length;S++)t4(`rotate${e4[S]}`,_,C,this.animationValues),t4(`skew${e4[S]}`,_,C,this.animationValues);_.render();for(const S in C)_.setStaticValue(S,C[S]),this.animationValues&&(this.animationValues[S]=C[S]);_.scheduleRender()}applyProjectionStyles(_,i){if(!this.instance||this.isSVG)return;if(!this.isVisible){_.visibility="hidden";return}const I=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,_.visibility="",_.opacity="",_.pointerEvents=x_(i?.pointerEvents)||"",_.transform=I?I(this.latestValues,""):"none";return}const C=this.getLead();if(!this.projectionDelta||!this.layout||!C.target){this.options.layoutId&&(_.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,_.pointerEvents=x_(i?.pointerEvents)||""),this.hasProjected&&!Xu(this.latestValues)&&(_.transform=I?I({},""):"none",this.hasProjected=!1);return}_.visibility="";const S=C.animationValues||C.latestValues;this.applyTransformsToTarget();let L=hJ(this.projectionDeltaWithTransform,this.treeScale,S);I&&(L=I(S,L)),_.transform=L;const{x:R,y:U}=this.projectionDelta;_.transformOrigin=`${R.origin*100}% ${U.origin*100}% 0`,C.animationValues?_.opacity=C===this?S.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:S.opacityExit:_.opacity=C===this?S.opacity!==void 0?S.opacity:"":S.opacityExit!==void 0?S.opacityExit:0;for(const W in K3){if(S[W]===void 0)continue;const{correct:le,applyTo:pe,isCSSVariable:ie}=K3[W],Y=L==="none"?S[W]:le(S[W],C);if(pe){const q=pe.length;for(let ue=0;ue<q;ue++)_[pe[ue]]=Y}else ie?this.options.visualElement.renderState.vars[W]=Y:_[W]=Y}this.options.layoutId&&(_.pointerEvents=C===this?x_(i?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(_=>_.currentAnimation?.stop()),this.root.nodes.forEach(DL),this.root.sharedNodes.clear()}}}function wJ(e){e.updateLayout()}function MJ(e){const n=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:l}=e.layout,{animationType:h}=e.options,m=n.source!==e.layout.source;if(h==="size")vl(S=>{const L=m?n.measuredBox[S]:n.layoutBox[S],R=Ls(L);L.min=s[S].min,L.max=L.min+R});else if(h==="x"||h==="y"){const S=h==="x"?"y":"x";J3(m?n.measuredBox[S]:n.layoutBox[S],s[S])}else jL(h,n.layoutBox,s)&&vl(S=>{const L=m?n.measuredBox[S]:n.layoutBox[S],R=Ls(s[S]);L.max=L.min+R,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[S].max=e.relativeTarget[S].min+R)});const _=jd();xg(_,s,n.layoutBox);const i=jd();m?xg(i,e.applyTransform(l,!0),n.measuredBox):xg(i,s,n.layoutBox);const I=!pL(_);let C=!1;if(!e.resumeFrom){const S=e.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:L,layout:R}=S;if(L&&R){const U=e.options.layoutAnchor||void 0,W=Po();v_(W,n.layoutBox,L.layoutBox,U);const le=Po();v_(le,s,R.layoutBox,U),yL(W,le)||(C=!0),S.options.layoutRoot&&(e.relativeTarget=le,e.relativeTargetOrigin=W,e.relativeParent=S)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:i,layoutDelta:_,hasLayoutChanged:I,hasRelativeLayoutChanged:C})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function IJ(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function TJ(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function AJ(e){e.clearSnapshot()}function DL(e){e.clearMeasurements()}function CJ(e){e.isLayoutDirty=!0,e.updateLayout()}function SL(e){e.isLayoutDirty=!1}function DJ(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function SJ(e){const{visualElement:n}=e.options;n&&n.getProps().onBeforeLayoutMeasure&&n.notify("BeforeLayoutMeasure"),e.resetTransform()}function EL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function EJ(e){e.resolveTargetDelta()}function NJ(e){e.calcProjection()}function LJ(e){e.resetSkewAndRotation()}function kJ(e){e.removeLeadSnapshot()}function NL(e,n,s){e.translate=Qr(n.translate,0,s),e.scale=Qr(n.scale,1,s),e.origin=n.origin,e.originPoint=n.originPoint}function LL(e,n,s,l){e.min=Qr(n.min,s.min,l),e.max=Qr(n.max,s.max,l)}function zJ(e,n,s,l){LL(e.x,n.x,s.x,l),LL(e.y,n.y,s.y,l)}function OJ(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const jJ={duration:.45,ease:[.4,0,.1,1]},kL=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),zL=kL("applewebkit/")&&!kL("chrome/")?Math.round:Ca;function OL(e){e.min=zL(e.min),e.max=zL(e.max)}function PJ(e){OL(e.x),OL(e.y)}function jL(e,n,s){return e==="position"||e==="preserve-aspect"&&!oJ(_L(n),_L(s),.2)}function RJ(e){return e!==e.root&&e.scroll?.wasRoot}const BJ=CL({attachResizeListener:(e,n)=>bg(e,"resize",n),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),n4={current:void 0},PL=CL({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!n4.current){const e=new BJ({});e.mount(window),e.setOptions({layoutScroll:!0}),n4.current=e}return n4.current},resetTransform:(e,n)=>{e.style.transform=n!==void 0?n:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),i4=ve.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function FJ(e=!0){const n=ve.useContext(KM);if(n===null)return[!0,null];const{isPresent:s,onExitComplete:l,register:h}=n,m=ve.useId();ve.useEffect(()=>{if(e)return h(m)},[e]);const _=ve.useCallback(()=>e&&l&&l(m),[m,l,e]);return!s&&l?[!1,_]:[!0]}const RL=ve.createContext({strict:!1}),BL={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let FL=!1;function UJ(){if(FL)return;const e={};for(const n in BL)e[n]={isEnabled:s=>BL[n].some(l=>!!s[l])};kN(e),FL=!0}function UL(){return UJ(),LX()}function VJ(e){const n=UL();for(const s in e)n[s]={...n[s],...e[s]};kN(n)}const HJ=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function w_(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||HJ.has(e)}let VL=e=>!w_(e);function QJ(e){typeof e=="function"&&(VL=n=>n.startsWith("on")?!w_(n):e(n))}try{QJ(require("@emotion/is-prop-valid").default)}catch{}function YJ(e,n,s){const l={};for(const h in e)h==="values"&&typeof e.values=="object"||Qo(e[h])||(VL(h)||s===!0&&w_(h)||!n&&!w_(h)||e.draggable&&h.startsWith("onDrag"))&&(l[h]=e[h]);return l}const M_=ve.createContext({});function GJ(e,n){if(p_(e)){const{initial:s,animate:l}=e;return{initial:s===!1||_g(s)?s:void 0,animate:_g(l)?l:void 0}}return e.inherit!==!1?n:{}}function $J(e){const{initial:n,animate:s}=GJ(e,ve.useContext(M_));return ve.useMemo(()=>({initial:n,animate:s}),[HL(n),HL(s)])}function HL(e){return Array.isArray(e)?e.join(" "):e}const r4=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function QL(e,n,s){for(const l in n)!Qo(n[l])&&!ZN(l,s)&&(e[l]=n[l])}function ZJ({transformTemplate:e},n){return ve.useMemo(()=>{const s=r4();return q3(s,n,e),Object.assign({},s.vars,s.style)},[n])}function WJ(e,n){const s=e.style||{},l={};return QL(l,s,e),Object.assign(l,ZJ(e,n)),l}function qJ(e,n){const s={},l=WJ(e,n);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,l.userSelect=l.WebkitUserSelect=l.WebkitTouchCallout="none",l.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=l,s}const YL=()=>({...r4(),attrs:{}});function KJ(e,n,s,l){const h=ve.useMemo(()=>{const m=YL();return qN(m,n,XN(l),e.transformTemplate,e.style),{...m.attrs,style:{...m.style}}},[n]);if(e.style){const m={};QL(m,e.style,e),h.style={...m,...h.style}}return h}const XJ=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function o4(e){return typeof e!="string"||e.includes("-")?!1:!!(XJ.indexOf(e)>-1||/[A-Z]/u.test(e))}function JJ(e,n,s,{latestValues:l},h,m=!1,_){const I=(_??o4(e)?KJ:qJ)(n,l,h,e),C=YJ(n,typeof e=="string",m),S=e!==ve.Fragment?{...C,...I,ref:s}:{},{children:L}=n,R=ve.useMemo(()=>Qo(L)?L.get():L,[L]);return ve.createElement(e,{...S,children:R})}function eee({scrapeMotionValuesFromProps:e,createRenderState:n},s,l,h){return{latestValues:tee(s,l,h,e),renderState:n()}}function tee(e,n,s,l){const h={},m=l(e,{});for(const R in m)h[R]=x_(m[R]);let{initial:_,animate:i}=e;const I=p_(e),C=EN(e);n&&C&&!I&&e.inherit!==!1&&(_===void 0&&(_=n.initial),i===void 0&&(i=n.animate));let S=s?s.initial===!1:!1;S=S||_===!1;const L=S?i:_;if(L&&typeof L!="boolean"&&!f_(L)){const R=Array.isArray(L)?L:[L];for(let U=0;U<R.length;U++){const W=N3(e,R[U]);if(W){const{transitionEnd:le,transition:pe,...ie}=W;for(const Y in ie){let q=ie[Y];if(Array.isArray(q)){const ue=S?q.length-1:0;q=q[ue]}q!==null&&(h[Y]=q)}for(const Y in le)h[Y]=le[Y]}}}return h}const GL=e=>(n,s)=>{const l=ve.useContext(M_),h=ve.useContext(KM),m=()=>eee(e,n,l,h);return s?m():qM(m)},nee=GL({scrapeMotionValuesFromProps:X3,createRenderState:r4}),iee=GL({scrapeMotionValuesFromProps:JN,createRenderState:YL}),ree=Symbol.for("motionComponentSymbol");function oee(e,n,s){const l=ve.useRef(s);ve.useInsertionEffect(()=>{l.current=s});const h=ve.useRef(null);return ve.useCallback(m=>{m&&e.onMount?.(m);const _=l.current;if(typeof _=="function")if(m){const i=_(m);typeof i=="function"&&(h.current=i)}else h.current?(h.current(),h.current=null):_(m);else _&&(_.current=m);n&&(m?n.mount(m):n.unmount())},[n])}const $L=ve.createContext({});function Pd(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function see(e,n,s,l,h,m){const{visualElement:_}=ve.useContext(M_),i=ve.useContext(RL),I=ve.useContext(KM),C=ve.useContext(i4),S=C.reducedMotion,L=C.skipAnimations,R=ve.useRef(null),U=ve.useRef(!1);l=l||i.renderer,!R.current&&l&&(R.current=l(e,{visualState:n,parent:_,props:s,presenceContext:I,blockInitialAnimation:I?I.initial===!1:!1,reducedMotionConfig:S,skipAnimations:L,isSVG:m}),U.current&&R.current&&(R.current.manuallyAnimateOnMount=!0));const W=R.current,le=ve.useContext($L);W&&!W.projection&&h&&(W.type==="html"||W.type==="svg")&&aee(R.current,s,h,le);const pe=ve.useRef(!1);ve.useInsertionEffect(()=>{W&&pe.current&&W.update(s,I)});const ie=s[uN],Y=ve.useRef(!!ie&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(ie)&&window.MotionHasOptimisedAnimation?.(ie));return t6(()=>{U.current=!0,W&&(pe.current=!0,window.MotionIsMounted=!0,W.updateFeatures(),W.scheduleRenderMicrotask(),Y.current&&W.animationState&&W.animationState.animateChanges())}),ve.useEffect(()=>{W&&(!Y.current&&W.animationState&&W.animationState.animateChanges(),Y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(ie)}),Y.current=!1),W.enteringChildren=void 0)}),W}function aee(e,n,s,l){const{layoutId:h,layout:m,drag:_,dragConstraints:i,layoutScroll:I,layoutRoot:C,layoutAnchor:S,layoutCrossfade:L}=n;e.projection=new s(e.latestValues,n["data-framer-portal-id"]?void 0:ZL(e.parent)),e.projection.setOptions({layoutId:h,layout:m,alwaysMeasureLayout:!!_||i&&Pd(i),visualElement:e,animationType:typeof m=="string"?m:"both",initialPromotionConfig:l,crossfade:L,layoutScroll:I,layoutRoot:C,layoutAnchor:S})}function ZL(e){if(e)return e.options.allowProjection!==!1?e.projection:ZL(e.parent)}function s4(e,{forwardMotionProps:n=!1,type:s}={},l,h){l&&VJ(l);const m=s?s==="svg":o4(e),_=m?iee:nee;function i(C,S){let L;const R={...ve.useContext(i4),...C,layoutId:lee(C)},{isStatic:U}=R,W=$J(C),le=_(C,U);if(!U&&typeof window<"u"){cee();const pe=uee(R);L=pe.MeasureLayout,W.visualElement=see(e,le,R,h,pe.ProjectionNode,m)}return Le.jsxs(M_.Provider,{value:W,children:[L&&W.visualElement?Le.jsx(L,{visualElement:W.visualElement,...R}):null,JJ(e,C,oee(le,W.visualElement,S),le,U,n,m)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const I=ve.forwardRef(i);return I[ree]=e,I}function lee({layoutId:e}){const n=ve.useContext(e6).id;return n&&e!==void 0?n+"-"+e:e}function cee(e,n){ve.useContext(RL).strict}function uee(e){const n=UL(),{drag:s,layout:l}=n;if(!s&&!l)return{};const h={...s,...l};return{MeasureLayout:s?.isEnabled(e)||l?.isEnabled(e)?h.MeasureLayout:void 0,ProjectionNode:h.ProjectionNode}}function hee(e,n){if(typeof Proxy>"u")return s4;const s=new Map,l=(m,_)=>s4(m,_,e,n),h=(m,_)=>l(m,_);return new Proxy(h,{get:(m,_)=>_==="create"?l:(s.has(_)||s.set(_,s4(_,void 0,e,n)),s.get(_))})}const dee=(e,n)=>n.isSVG??o4(e)?new eL(n):new WN(n,{allowProjection:e!==ve.Fragment});class fee extends Rc{constructor(n){super(n),n.animationState||(n.animationState=JX(n))}updateAnimationControlsSubscription(){const{animate:n}=this.node.getProps();f_(n)&&(this.unmountControls=n.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:n}=this.node.getProps(),{animate:s}=this.node.prevProps||{};n!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let pee=0;class gee extends Rc{constructor(){super(...arguments),this.id=pee++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:n,onExitComplete:s}=this.node.presenceContext,{isPresent:l}=this.node.prevPresenceContext||{};if(!this.node.animationState||n===l)return;if(n&&l===!1){if(this.isExitComplete){const{initial:m,custom:_}=this.node.getProps();if(typeof m=="string"){const i=Ku(this.node,m,_);if(i){const{transition:I,transitionEnd:C,...S}=i;for(const L in S)this.node.getValue(L)?.jump(S[L])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const h=this.node.animationState.setActive("exit",!n);s&&!n&&h.then(()=>{this.isExitComplete=!0,s(this.id)})}mount(){const{register:n,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),n&&(this.unmount=n(this.id))}unmount(){}}const mee={animation:{Feature:fee},exit:{Feature:gee}};function wg(e){return{point:{x:e.pageX,y:e.pageY}}}const yee=e=>n=>V3(n)&&e(n,wg(n));function Mg(e,n,s,l){return bg(e,n,yee(s),l)}const WL=({current:e})=>e?e.ownerDocument.defaultView:null,qL=(e,n)=>Math.abs(e-n);function _ee(e,n){const s=qL(e.x,n.x),l=qL(e.y,n.y);return Math.sqrt(s**2+l**2)}const KL=new Set(["auto","scroll"]);class XL{constructor(n,s,{transformPagePoint:l,contextWindow:h=window,dragSnapToOrigin:m=!1,distanceThreshold:_=3,element:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=U=>{this.handleScroll(U.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=I_(this.lastRawMoveEventInfo,this.transformPagePoint));const U=a4(this.lastMoveEventInfo,this.history),W=this.startEvent!==null,le=_ee(U.offset,{x:0,y:0})>=this.distanceThreshold;if(!W&&!le)return;const{point:pe}=U,{timestamp:ie}=ls;this.history.push({...pe,timestamp:ie});const{onStart:Y,onMove:q}=this.handlers;W||(Y&&Y(this.lastMoveEvent,U),this.startEvent=this.lastMoveEvent),q&&q(this.lastMoveEvent,U)},this.handlePointerMove=(U,W)=>{this.lastMoveEvent=U,this.lastRawMoveEventInfo=W,this.lastMoveEventInfo=I_(W,this.transformPagePoint),Rr.update(this.updatePoint,!0)},this.handlePointerUp=(U,W)=>{this.end();const{onEnd:le,onSessionEnd:pe,resumeAnimation:ie}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&ie&&ie(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const Y=a4(U.type==="pointercancel"?this.lastMoveEventInfo:I_(W,this.transformPagePoint),this.history);this.startEvent&&le&&le(U,Y),pe&&pe(U,Y)},!V3(n))return;this.dragSnapToOrigin=m,this.handlers=s,this.transformPagePoint=l,this.distanceThreshold=_,this.contextWindow=h||window;const I=wg(n),C=I_(I,this.transformPagePoint),{point:S}=C,{timestamp:L}=ls;this.history=[{...S,timestamp:L}];const{onSessionStart:R}=s;R&&R(n,a4(C,this.history)),this.removeListeners=lg(Mg(this.contextWindow,"pointermove",this.handlePointerMove),Mg(this.contextWindow,"pointerup",this.handlePointerUp),Mg(this.contextWindow,"pointercancel",this.handlePointerUp)),i&&this.startScrollTracking(i)}startScrollTracking(n){let s=n.parentElement;for(;s;){const l=getComputedStyle(s);(KL.has(l.overflowX)||KL.has(l.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(n){const s=this.scrollPositions.get(n);if(!s)return;const l=n===window,h=l?{x:window.scrollX,y:window.scrollY}:{x:n.scrollLeft,y:n.scrollTop},m={x:h.x-s.x,y:h.y-s.y};m.x===0&&m.y===0||(l?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=m.x,this.lastMoveEventInfo.point.y+=m.y):this.history.length>0&&(this.history[0].x-=m.x,this.history[0].y-=m.y),this.scrollPositions.set(n,h),Rr.update(this.updatePoint,!0))}updateHandlers(n){this.handlers=n}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),nc(this.updatePoint)}}function I_(e,n){return n?{point:n(e.point)}:e}function JL(e,n){return{x:e.x-n.x,y:e.y-n.y}}function a4({point:e},n){return{point:e,delta:JL(e,ek(n)),offset:JL(e,vee(n)),velocity:xee(n,.1)}}function vee(e){return e[0]}function ek(e){return e[e.length-1]}function xee(e,n){if(e.length<2)return{x:0,y:0};let s=e.length-1,l=null;const h=ek(e);for(;s>=0&&(l=e[s],!(h.timestamp-l.timestamp>Ws(n)));)s--;if(!l)return{x:0,y:0};l===e[0]&&e.length>2&&h.timestamp-l.timestamp>Ws(n)*2&&(l=e[1]);const m=Da(h.timestamp-l.timestamp);if(m===0)return{x:0,y:0};const _={x:(h.x-l.x)/m,y:(h.y-l.y)/m};return _.x===1/0&&(_.x=0),_.y===1/0&&(_.y=0),_}function bee(e,{min:n,max:s},l){return n!==void 0&&e<n?e=l?Qr(n,e,l.min):Math.max(e,n):s!==void 0&&e>s&&(e=l?Qr(s,e,l.max):Math.min(e,s)),e}function tk(e,n,s){return{min:n!==void 0?e.min+n:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function wee(e,{top:n,left:s,bottom:l,right:h}){return{x:tk(e.x,s,h),y:tk(e.y,n,l)}}function nk(e,n){let s=n.min-e.min,l=n.max-e.max;return n.max-n.min<e.max-e.min&&([s,l]=[l,s]),{min:s,max:l}}function Mee(e,n){return{x:nk(e.x,n.x),y:nk(e.y,n.y)}}function Iee(e,n){let s=.5;const l=Ls(e),h=Ls(n);return h>l?s=Sd(n.min,n.max-l,e.min):l>h&&(s=Sd(e.min,e.max-h,n.min)),ml(0,1,s)}function Tee(e,n){const s={};return n.min!==void 0&&(s.min=n.min-e.min),n.max!==void 0&&(s.max=n.max-e.min),s}const l4=.35;function Aee(e=l4){return e===!1?e=0:e===!0&&(e=l4),{x:ik(e,"left","right"),y:ik(e,"top","bottom")}}function ik(e,n,s){return{min:rk(e,n),max:rk(e,s)}}function rk(e,n){return typeof e=="number"?e:e[n]||0}const Cee=new WeakMap;class Dee{constructor(n){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Po(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=n}start(n,{snapToCursor:s=!1,distanceThreshold:l}={}){const{presenceContext:h}=this.visualElement;if(h&&h.isPresent===!1)return;const m=L=>{s&&this.snapToCursor(wg(L).point),this.stopAnimation()},_=(L,R)=>{const{drag:U,dragPropagation:W,onDragStart:le}=this.getProps();if(U&&!W&&(this.openDragLock&&this.openDragLock(),this.openDragLock=hX(U),!this.openDragLock))return;this.latestPointerEvent=L,this.latestPanInfo=R,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),vl(ie=>{let Y=this.getAxisMotionValue(ie).get()||0;if(yl.test(Y)){const{projection:q}=this.visualElement;if(q&&q.layout){const ue=q.layout.layoutBox[ie];ue&&(Y=Ls(ue)*(parseFloat(Y)/100))}}this.originPoint[ie]=Y}),le&&Rr.update(()=>le(L,R),!1,!0),k3(this.visualElement,"transform");const{animationState:pe}=this.visualElement;pe&&pe.setActive("whileDrag",!0)},i=(L,R)=>{this.latestPointerEvent=L,this.latestPanInfo=R;const{dragPropagation:U,dragDirectionLock:W,onDirectionLock:le,onDrag:pe}=this.getProps();if(!U&&!this.openDragLock)return;const{offset:ie}=R;if(W&&this.currentDirection===null){this.currentDirection=Eee(ie),this.currentDirection!==null&&le&&le(this.currentDirection);return}this.updateAxis("x",R.point,ie),this.updateAxis("y",R.point,ie),this.visualElement.render(),pe&&Rr.update(()=>pe(L,R),!1,!0)},I=(L,R)=>{this.latestPointerEvent=L,this.latestPanInfo=R,this.stop(L,R),this.latestPointerEvent=null,this.latestPanInfo=null},C=()=>{const{dragSnapToOrigin:L}=this.getProps();(L||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:S}=this.getProps();this.panSession=new XL(n,{onSessionStart:m,onStart:_,onMove:i,onSessionEnd:I,resumeAnimation:C},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:S,distanceThreshold:l,contextWindow:WL(this.visualElement),element:this.visualElement.current})}stop(n,s){const l=n||this.latestPointerEvent,h=s||this.latestPanInfo,m=this.isDragging;if(this.cancel(),!m||!h||!l)return;const{velocity:_}=h;this.startAnimation(_);const{onDragEnd:i}=this.getProps();i&&Rr.postRender(()=>i(l,h))}cancel(){this.isDragging=!1;const{projection:n,animationState:s}=this.visualElement;n&&(n.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:l}=this.getProps();!l&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(n,s,l){const{drag:h}=this.getProps();if(!l||!T_(n,h,this.currentDirection))return;const m=this.getAxisMotionValue(n);let _=this.originPoint[n]+l[n];this.constraints&&this.constraints[n]&&(_=bee(_,this.constraints[n],this.elastic[n])),m.set(_)}resolveConstraints(){const{dragConstraints:n,dragElastic:s}=this.getProps(),l=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,h=this.constraints;n&&Pd(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&l?this.constraints=wee(l.layoutBox,n):this.constraints=!1,this.elastic=Aee(s),h!==this.constraints&&!Pd(n)&&l&&this.constraints&&!this.hasMutatedConstraints&&vl(m=>{this.constraints!==!1&&this.getAxisMotionValue(m)&&(this.constraints[m]=Tee(l.layoutBox[m],this.constraints[m]))})}resolveRefConstraints(){const{dragConstraints:n,onMeasureDragConstraints:s}=this.getProps();if(!n||!Pd(n))return!1;const l=n.current,{projection:h}=this.visualElement;if(!h||!h.layout)return!1;const m=jX(l,h.root,this.visualElement.getTransformPagePoint());let _=Mee(h.layout.layoutBox,m);if(s){const i=s(kX(_));this.hasMutatedConstraints=!!i,i&&(_=jN(i))}return _}startAnimation(n){const{drag:s,dragMomentum:l,dragElastic:h,dragTransition:m,dragSnapToOrigin:_,onDragTransitionEnd:i}=this.getProps(),I=this.constraints||{},C=vl(S=>{if(!T_(S,s,this.currentDirection))return;let L=I&&I[S]||{};(_===!0||_===S)&&(L={min:0,max:0});const R=h?200:1e6,U=h?40:1e7,W={type:"inertia",velocity:l?n[S]:0,bounceStiffness:R,bounceDamping:U,timeConstant:750,restDelta:1,restSpeed:10,...m,...L};return this.startAxisValueAnimation(S,W)});return Promise.all(C).then(i)}startAxisValueAnimation(n,s){const l=this.getAxisMotionValue(n);return k3(this.visualElement,n),l.start(E3(n,l,0,s,this.visualElement,!1))}stopAnimation(){vl(n=>this.getAxisMotionValue(n).stop())}getAxisMotionValue(n){const s=`_drag${n.toUpperCase()}`,l=this.visualElement.getProps(),h=l[s];return h||this.visualElement.getValue(n,(l.initial?l.initial[n]:void 0)||0)}snapToCursor(n){vl(s=>{const{drag:l}=this.getProps();if(!T_(s,l,this.currentDirection))return;const{projection:h}=this.visualElement,m=this.getAxisMotionValue(s);if(h&&h.layout){const{min:_,max:i}=h.layout.layoutBox[s],I=m.get()||0;m.set(n[s]-Qr(_,i,.5)+I)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:n,dragConstraints:s}=this.getProps(),{projection:l}=this.visualElement;if(!Pd(s)||!l||!this.constraints)return;this.stopAnimation();const h={x:0,y:0};vl(_=>{const i=this.getAxisMotionValue(_);if(i&&this.constraints!==!1){const I=i.get();h[_]=Iee({min:I,max:I},this.constraints[_])}});const{transformTemplate:m}=this.visualElement.getProps();this.visualElement.current.style.transform=m?m({},""):"none",l.root&&l.root.updateScroll(),l.updateLayout(),this.constraints=!1,this.resolveConstraints(),vl(_=>{if(!T_(_,n,null))return;const i=this.getAxisMotionValue(_),{min:I,max:C}=this.constraints[_];i.set(Qr(I,C,h[_]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Cee.set(this.visualElement,this);const n=this.visualElement.current,s=Mg(n,"pointerdown",C=>{const{drag:S,dragListener:L=!0}=this.getProps(),R=C.target,U=R!==n&&yX(R);S&&L&&!U&&this.start(C)});let l;const h=()=>{const{dragConstraints:C}=this.getProps();Pd(C)&&C.current&&(this.constraints=this.resolveRefConstraints(),l||(l=See(n,C.current,()=>this.scalePositionWithinConstraints())))},{projection:m}=this.visualElement,_=m.addEventListener("measure",h);m&&!m.layout&&(m.root&&m.root.updateScroll(),m.updateLayout()),Rr.read(h);const i=bg(window,"resize",()=>this.scalePositionWithinConstraints()),I=m.addEventListener("didUpdate",(({delta:C,hasLayoutChanged:S})=>{this.isDragging&&S&&(vl(L=>{const R=this.getAxisMotionValue(L);R&&(this.originPoint[L]+=C[L].translate,R.set(R.get()+C[L].translate))}),this.visualElement.render())}));return()=>{i(),s(),_(),I&&I(),l&&l()}}getProps(){const n=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:l=!1,dragPropagation:h=!1,dragConstraints:m=!1,dragElastic:_=l4,dragMomentum:i=!0}=n;return{...n,drag:s,dragDirectionLock:l,dragPropagation:h,dragConstraints:m,dragElastic:_,dragMomentum:i}}}function ok(e){let n=!0;return()=>{if(n){n=!1;return}e()}}function See(e,n,s){const l=AN(e,ok(s)),h=AN(n,ok(s));return()=>{l(),h()}}function T_(e,n,s){return(n===!0||n===e)&&(s===null||s===e)}function Eee(e,n=10){let s=null;return Math.abs(e.y)>n?s="y":Math.abs(e.x)>n&&(s="x"),s}class Nee extends Rc{constructor(n){super(n),this.removeGroupControls=Ca,this.removeListeners=Ca,this.controls=new Dee(n)}mount(){const{dragControls:n}=this.node.getProps();n&&(this.removeGroupControls=n.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ca}update(){const{dragControls:n}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};n!==s&&(this.removeGroupControls(),n&&(this.removeGroupControls=n.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const c4=e=>(n,s)=>{e&&Rr.update(()=>e(n,s),!1,!0)};class Lee extends Rc{constructor(){super(...arguments),this.removePointerDownListener=Ca}onPointerDown(n){this.session=new XL(n,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:WL(this.node)})}createPanHandlers(){const{onPanSessionStart:n,onPanStart:s,onPan:l,onPanEnd:h}=this.node.getProps();return{onSessionStart:c4(n),onStart:c4(s),onMove:c4(l),onEnd:(m,_)=>{delete this.session,h&&Rr.postRender(()=>h(m,_))}}}mount(){this.removePointerDownListener=Mg(this.node.current,"pointerdown",n=>this.onPointerDown(n))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let u4=!1;class kee extends ve.Component{componentDidMount(){const{visualElement:n,layoutGroup:s,switchLayoutGroup:l,layoutId:h}=this.props,{projection:m}=n;m&&(s.group&&s.group.add(m),l&&l.register&&h&&l.register(m),u4&&m.root.didUpdate(),m.addEventListener("animationComplete",()=>{this.safeToRemove()}),m.setOptions({...m.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),b_.hasEverUpdated=!0}getSnapshotBeforeUpdate(n){const{layoutDependency:s,visualElement:l,drag:h,isPresent:m}=this.props,{projection:_}=l;return _&&(_.isPresent=m,n.layoutDependency!==s&&_.setOptions({..._.options,layoutDependency:s}),u4=!0,h||n.layoutDependency!==s||s===void 0||n.isPresent!==m?_.willUpdate():this.safeToRemove(),n.isPresent!==m&&(m?_.promote():_.relegate()||Rr.postRender(()=>{const i=_.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:n,layoutAnchor:s}=this.props,{projection:l}=n;l&&(l.options.layoutAnchor=s,l.root.didUpdate(),U3.postRender(()=>{!l.currentAnimation&&l.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:n,layoutGroup:s,switchLayoutGroup:l}=this.props,{projection:h}=n;u4=!0,h&&(h.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(h),l&&l.deregister&&l.deregister(h))}safeToRemove(){const{safeToRemove:n}=this.props;n&&n()}render(){return null}}function sk(e){const[n,s]=FJ(),l=ve.useContext(e6);return Le.jsx(kee,{...e,layoutGroup:l,switchLayoutGroup:ve.useContext($L),isPresent:n,safeToRemove:s})}const zee={pan:{Feature:Lee},drag:{Feature:Nee,ProjectionNode:PL,MeasureLayout:sk}};function ak(e,n,s){const{props:l}=e;e.animationState&&l.whileHover&&e.animationState.setActive("whileHover",s==="Start");const h="onHover"+s,m=l[h];m&&Rr.postRender(()=>m(n,wg(n)))}class Oee extends Rc{mount(){const{current:n}=this.node;n&&(this.unmount=fX(n,(s,l)=>(ak(this.node,l,"Start"),h=>ak(this.node,h,"End"))))}unmount(){}}class jee extends Rc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let n=!1;try{n=this.node.current.matches(":focus-visible")}catch{n=!0}!n||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=lg(bg(this.node.current,"focus",()=>this.onFocus()),bg(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function lk(e,n,s){const{props:l}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&l.whileTap&&e.animationState.setActive("whileTap",s==="Start");const h="onTap"+(s==="End"?"":s),m=l[h];m&&Rr.postRender(()=>m(n,wg(n)))}class Pee extends Rc{mount(){const{current:n}=this.node;if(!n)return;const{globalTapTarget:s,propagate:l}=this.node.props;this.unmount=vX(n,(h,m)=>(lk(this.node,m,"Start"),(_,{success:i})=>lk(this.node,_,i?"End":"Cancel")),{useGlobalTarget:s,stopPropagation:l?.tap===!1})}unmount(){}}const h4=new WeakMap,d4=new WeakMap,Ree=e=>{const n=h4.get(e.target);n&&n(e)},Bee=e=>{e.forEach(Ree)};function Fee({root:e,...n}){const s=e||document;d4.has(s)||d4.set(s,{});const l=d4.get(s),h=JSON.stringify(n);return l[h]||(l[h]=new IntersectionObserver(Bee,{root:e,...n})),l[h]}function Uee(e,n,s){const l=Fee(n);return h4.set(e,s),l.observe(e),()=>{h4.delete(e),l.unobserve(e)}}const Vee={some:0,all:1};class Hee extends Rc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:n={}}=this.node.getProps(),{root:s,margin:l,amount:h="some",once:m}=n,_={root:s?s.current:void 0,rootMargin:l,threshold:typeof h=="number"?h:Vee[h]},i=I=>{const{isIntersecting:C}=I;if(this.isInView===C||(this.isInView=C,m&&!C&&this.hasEnteredView))return;C&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",C);const{onViewportEnter:S,onViewportLeave:L}=this.node.getProps(),R=C?S:L;R&&R(I)};this.stopObserver=Uee(this.node.current,_,i)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:n,prevProps:s}=this.node;["amount","margin","root"].some(Qee(n,s))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function Qee({viewport:e={}},{viewport:n={}}={}){return s=>e[s]!==n[s]}const Yee={...mee,...{inView:{Feature:Hee},tap:{Feature:Pee},focus:{Feature:jee},hover:{Feature:Oee}},...zee,...{layout:{ProjectionNode:PL,MeasureLayout:sk}}},ic=hee(Yee,dee);function f4(e){const n=qM(()=>Pc(e)),{isStatic:s}=ve.useContext(i4);if(s){const[,l]=ve.useState(e);ve.useEffect(()=>n.on("change",l),[])}return n}function ck(e,n){const s=f4(n()),l=()=>s.set(n());return l(),t6(()=>{const h=()=>Rr.preRender(l,!1,!0),m=e.map(_=>_.on("change",h));return()=>{m.forEach(_=>_()),nc(l)}}),s}function Gee(e){mg.current=[],e();const n=ck(mg.current,e);return mg.current=void 0,n}function Rd(e,n,s,l){if(typeof e=="function")return Gee(e);const m=typeof n=="function"?n:d_(n,s,l),_=Array.isArray(e)?uk(e,m):uk([e],([I])=>m(I)),i=Array.isArray(e)?void 0:e.accelerate;return i&&!i.isTransformed&&typeof n!="function"&&Array.isArray(s)&&l?.clamp!==!1&&(_.accelerate={...i,times:n,keyframes:s,isTransformed:!0}),_}function uk(e,n){const s=qM(()=>[]);return ck(e,()=>{s.length=0;const l=e.length;for(let h=0;h<l;h++)s[h]=e[h].get();return n(s)})}function $ee(){!G3.current&&NN();const[e]=ve.useState(g_.current);return e}function p4(e){return typeof e=="object"&&!Array.isArray(e)}function hk(e,n,s,l){return e==null?[]:typeof e=="string"&&p4(n)?F3(e,s,l):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(h=>h!=null):[e]}function Zee(e,n,s){return e*(n+1)}function dk(e,n,s,l){return typeof n=="number"?n:n.startsWith("-")||n.startsWith("+")?Math.max(0,e+parseFloat(n)):n==="<"?s:n.startsWith("<")?Math.max(0,s+parseFloat(n.slice(1))):l.get(n)??e}function Wee(e,n,s){for(let l=0;l<e.length;l++){const h=e[l];h.at>n&&h.at<s&&(Dd(e,h),l--)}}function qee(e,n,s,l,h,m){Wee(e,h,m);for(let _=0;_<n.length;_++)e.push({value:n[_],at:Qr(h,m,l[_]),easing:y6(s,_)})}function Kee(e,n){for(let s=0;s<e.length;s++)e[s]=e[s]/(n+1)}function Xee(e,n){return e.at===n.at?e.value===null?1:n.value===null?-1:0:e.at-n.at}const Jee="easeInOut";function ete(e,{defaultTransition:n={},...s}={},l,h){const m=n.duration||.3,_=new Map,i=new Map,I={},C=new Map;let S=0,L=0,R=0;for(let U=0;U<e.length;U++){const W=e[U];if(typeof W=="string"){C.set(W,L);continue}else if(!Array.isArray(W)){C.set(W.name,dk(L,W.at,S,C));continue}let[le,pe,ie={}]=W;ie.at!==void 0&&(L=dk(L,ie.at,S,C));let Y=0;const q=(ue,me,ne,De=0,Me=0)=>{const Ee=tte(ue),{delay:ge=0,times:Re=F6(Ee),type:Oe=n.type||"keyframes",repeat:Ne,repeatType:tt,repeatDelay:dt=0,...Nt}=me;let{ease:re=n.ease||"easeOut",duration:_e}=me;const D=typeof ge=="function"?ge(De,Me):ge,P=Ee.length,K=A3(Oe)?Oe:h?.[Oe||"keyframes"];if(P<=2&&K){let we=100;if(P===2&&rte(Ee)){const je=Ee[1]-Ee[0];we=Math.abs(je)}const he={...n,...Nt};_e!==void 0&&(he.duration=Ws(_e));const Ie=O6(he,we,K);re=Ie.ease,_e=Ie.duration}_e??(_e=m);const H=L+D;Re.length===1&&Re[0]===0&&(Re[1]=1);const Q=Re.length-Ee.length;if(Q>0&&B6(Re,Q),Ee.length===1&&Ee.unshift(null),Ne){_e=Zee(_e,Ne);const we=[...Ee],he=[...Re];re=Array.isArray(re)?[...re]:[re];const Ie=[...re];for(let je=0;je<Ne;je++){Ee.push(...we);for(let Fe=0;Fe<we.length;Fe++)Re.push(he[Fe]+(je+1)),re.push(Fe===0?"linear":y6(Ie,Fe-1))}Kee(Re,Ne)}const de=H+_e;qee(ne,Ee,re,Re,H,de),Y=Math.max(D+_e,Y),R=Math.max(de,R)};if(Qo(le)){const ue=fk(le,i);q(pe,ie,pk("default",ue))}else{const ue=hk(le,pe,l,I),me=ue.length;for(let ne=0;ne<me;ne++){pe=pe,ie=ie;const De=ue[ne],Me=fk(De,i);for(const Ee in pe)q(pe[Ee],nte(ie,Ee),pk(Ee,Me),ne,me)}}S=L,L+=Y}return i.forEach((U,W)=>{for(const le in U){const pe=U[le];pe.sort(Xee);const ie=[],Y=[],q=[];for(let De=0;De<pe.length;De++){const{at:Me,value:Ee,easing:ge}=pe[De];ie.push(Ee),Y.push(Sd(0,R,Me)),q.push(ge||"easeOut")}Y[0]!==0&&(Y.unshift(0),ie.unshift(ie[0]),q.unshift(Jee)),Y[Y.length-1]!==1&&(Y.push(1),ie.push(null)),_.has(W)||_.set(W,{keyframes:{},transition:{}});const ue=_.get(W);ue.keyframes[le]=ie;const{type:me,...ne}=n;ue.transition[le]={...ne,duration:R,ease:q,times:Y,...s}}}),_}function fk(e,n){return!n.has(e)&&n.set(e,{}),n.get(e)}function pk(e,n){return n[e]||(n[e]=[]),n[e]}function tte(e){return Array.isArray(e)?e:[e]}function nte(e,n){return e&&e[n]?{...e,...e[n]}:{...e}}const ite=e=>typeof e=="number",rte=e=>e.every(ite);function ote(e){const n={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},s=l_(e)&&!CN(e)?new eL(n):new WN(n);s.mount(e),yg.set(e,s)}function ste(e){const n={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},s=new HX(n);s.mount(e),yg.set(e,s)}function ate(e,n){return Qo(e)||typeof e=="number"||typeof e=="string"&&!p4(n)}function gk(e,n,s,l){const h=[];if(ate(e,n))h.push(TL(e,p4(n)&&n.default||n,s&&(s.default||s)));else{if(e==null)return h;const m=hk(e,n,l),_=m.length;for(let i=0;i<_;i++){const I=m[i],C=I instanceof Element?ote:ste;yg.has(I)||C(I);const S=yg.get(I),L={...s};"delay"in L&&typeof L.delay=="function"&&(L.delay=L.delay(i,_)),h.push(...O3(S,{...n,transition:L},{}))}}return h}function lte(e,n,s){const l=[],h=e.map(_=>{if(Array.isArray(_)&&typeof _[0]=="function"){const i=_[0],I=Pc(0);return I.on("change",i),_.length===1?[I,[0,1]]:_.length===2?[I,[0,1],_[1]]:[I,_[1],_[2]]}return _});return ete(h,n,s,{spring:fg}).forEach(({keyframes:_,transition:i},I)=>{l.push(...gk(I,_,i))}),l}function cte(e){return Array.isArray(e)&&e.some(Array.isArray)}function ute(e={}){const{scope:n,reduceMotion:s}=e;function l(h,m,_){let i=[],I;if(cte(h)){const{onComplete:S,...L}=m||{};typeof S=="function"&&(I=S),i=lte(h,s!==void 0?{reduceMotion:s,...L}:L,n)}else{const{onComplete:S,...L}=_||{};typeof S=="function"&&(I=S),i=gk(h,m,s!==void 0?{reduceMotion:s,...L}:L,n)}const C=new OK(i);return I&&C.finished.then(I),n&&(n.animations.push(C),C.finished.then(()=>{Dd(n.animations,C)})),C}return l}const Ig=ute();function mk(e,n){let s;return(...l)=>{window.clearTimeout(s),s=window.setTimeout(()=>e(...l),n)}}function hte({debounce:e,scroll:n,polyfill:s,offsetSize:l}={debounce:0,scroll:!1,offsetSize:!1}){const h=s||(typeof window>"u"?class{}:window.ResizeObserver);if(!h)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[m,_]=ve.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),i=ve.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:m,orientationHandler:null}),I=e?typeof e=="number"?e:e.scroll:null,C=e?typeof e=="number"?e:e.resize:null,S=ve.useRef(!1);ve.useEffect(()=>(S.current=!0,()=>{S.current=!1}));const[L,R,U]=ve.useMemo(()=>{const ie=()=>{if(!i.current.element)return;const{left:Y,top:q,width:ue,height:me,bottom:ne,right:De,x:Me,y:Ee}=i.current.element.getBoundingClientRect(),ge={left:Y,top:q,width:ue,height:me,bottom:ne,right:De,x:Me,y:Ee};i.current.element instanceof HTMLElement&&l&&(ge.height=i.current.element.offsetHeight,ge.width=i.current.element.offsetWidth),Object.freeze(ge),S.current&&!gte(i.current.lastBounds,ge)&&_(i.current.lastBounds=ge)};return[ie,C?mk(ie,C):ie,I?mk(ie,I):ie]},[_,l,I,C]);function W(){i.current.scrollContainers&&(i.current.scrollContainers.forEach(ie=>ie.removeEventListener("scroll",U,!0)),i.current.scrollContainers=null),i.current.resizeObserver&&(i.current.resizeObserver.disconnect(),i.current.resizeObserver=null),i.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",i.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",i.current.orientationHandler))}function le(){i.current.element&&(i.current.resizeObserver=new h(U),i.current.resizeObserver.observe(i.current.element),n&&i.current.scrollContainers&&i.current.scrollContainers.forEach(ie=>ie.addEventListener("scroll",U,{capture:!0,passive:!0})),i.current.orientationHandler=()=>{U()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",i.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",i.current.orientationHandler))}const pe=ie=>{!ie||ie===i.current.element||(W(),i.current.element=ie,i.current.scrollContainers=yk(ie),le())};return fte(U,!!n),dte(R),ve.useEffect(()=>{W(),le()},[n,U,R]),ve.useEffect(()=>W,[]),[pe,m,L]}function dte(e){ve.useEffect(()=>{const n=e;return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[e])}function fte(e,n){ve.useEffect(()=>{if(n){const s=e;return window.addEventListener("scroll",s,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",s,!0)}}},[e,n])}function yk(e){const n=[];if(!e||e===document.body)return n;const{overflow:s,overflowX:l,overflowY:h}=window.getComputedStyle(e);return[s,l,h].some(m=>m==="auto"||m==="scroll")&&n.push(e),[...n,...yk(e.parentElement)]}const pte=["x","y","top","bottom","left","right","width","height"],gte=(e,n)=>pte.every(s=>e[s]===n[s]);var _k=ve.createContext(void 0),vk=ve.createContext(void 0);function Tg(){const e=ve.useContext(_k);if(!e)throw new Error("Sheet context error");return e}function mte(){const e=ve.useContext(vk);if(!e)throw new Error("Sheet context error");return e}var xk="calc(100% - env(safe-area-inset-top) - 34px)",Ag=typeof window>"u",yte={ease:"easeOut",duration:.2},_te={ease:"linear",duration:.01},vte=.6,xte=1200,g4=Ag?ve.useEffect:ve.useLayoutEffect;function bte(){const[e,n]=ve.useState(()=>({windowHeight:Ag?0:window.innerHeight,windowWidth:Ag?0:window.innerWidth}));return g4(()=>{function s(){n({windowHeight:window.innerHeight,windowWidth:window.innerWidth})}return s(),window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[]),e}function rc(e,n){return n?e.base:{...e.base,...e.decorative}}function wte(e){for(let n=0;n<e.length;n++)if(e[n+1]<e[n])return!1;return!0}function A_(e){return n=>{e.forEach(s=>{typeof s=="function"?s(n):s&&(s.current=n)})}}function m4(e){var n;return typeof window<"u"&&window.navigator!=null?e.test(((n=window.navigator.userAgentData)==null?void 0:n.platform)||window.navigator.platform):!1}function C_(e){let n=null;return()=>(n==null&&(n=e()),n)}var Mte=C_(function(){return m4(/^Mac/i)}),Ite=C_(function(){return m4(/^iPhone/i)}),Tte=C_(function(){return m4(/^iPad/i)||Mte()&&navigator.maxTouchPoints>1}),Ate=C_(function(){return Ite()||Tte()});function Cte(e,n=50,s=20){return new Promise(l=>{let h=0;const m=setInterval(()=>{const _=document.getElementsByClassName(e)[0];h++,(_||h>=s)&&(clearInterval(m),l(_))},n)})}var Dte=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function eh(e){return e instanceof HTMLInputElement&&!Dte.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function bk(){return typeof window<"u"&&window.isSecureContext}function wk(e,n,s){return Math.min(Math.max(e,n),s)}function Jo(e){const n=ve.useRef(void 0);return g4(()=>{n.current=e}),ve.useCallback((...s)=>{const l=n.current;return l?.(...s)},[])}var Cg=0,y4=null;function Ste(e={}){const{containerRef:n,isEnabled:s=!0,debounceDelay:l=100,visualViewportThreshold:h=100}=e,[m,_]=ve.useState({isVisible:!1,height:0}),i=ve.useRef(null),I=ve.useRef(null);return ve.useEffect(()=>{const C=window.visualViewport,S=Ete();function L(ie){const Y=n?.current||document.documentElement;S?Y.style.setProperty("--keyboard-inset-height",`env(keyboard-inset-height, ${ie}px)`):Y.style.setProperty("--keyboard-inset-height",`${ie}px`)}function R(ie){_(Y=>Y.isVisible===ie.isVisible&&Y.height===ie.height?Y:ie)}function U(){i.current=null,L(0),R({isVisible:!1,height:0})}if(!s){U();return}function W(){I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{const ie=_4()??i.current;if(!(ie?eh(ie):!1)){U();return}if(i.current=ie,S?.overlaysContent){const q=S.boundingRect.height;L(q),R({isVisible:!0,height:q});return}if(C){const q=window.innerHeight-C.height;if(q>h){L(q),R({isVisible:!0,height:q});return}}U()},l)}function le(ie){ie.target instanceof HTMLElement&&eh(ie.target)&&(i.current=ie.target,W())}function pe(){requestAnimationFrame(()=>{i.current=_4(),W()})}return document.addEventListener("focusin",le),document.addEventListener("focusout",pe),C&&(C.addEventListener("resize",W),C.addEventListener("scroll",W)),S&&(Cg===0&&(y4=S.overlaysContent,S.overlaysContent=!0),Cg++,S.addEventListener("geometrychange",W)),i.current=_4(),W(),()=>{document.removeEventListener("focusin",le),document.removeEventListener("focusout",pe),C&&(C.removeEventListener("resize",W),C.removeEventListener("scroll",W)),S&&(S.removeEventListener("geometrychange",W),Cg=Math.max(0,Cg-1),Cg===0&&(S.overlaysContent=y4??!1,y4=null)),I.current&&clearTimeout(I.current),U()}},[l,s,h]),{keyboardHeight:m.height,isKeyboardOpen:m.isVisible}}function Ete(){return bk()&&"virtualKeyboard"in navigator?navigator.virtualKeyboard:null}function _4(){var e;let n=document.activeElement;for(;n instanceof HTMLElement&&((e=n.shadowRoot)!=null&&e.activeElement);)n=n.shadowRoot.activeElement;return n&&eh(n)?n:null}function Nte({isEnabled:e,containerRef:n,onWillOpenKeyboard:s,onDidOpenKeyboard:l}){const[h,m]=ve.useState(null),_=Ste({isEnabled:e,containerRef:n}),i=Jo(async C=>{var S;const L=C.target;eh(L)&&((S=n.current)!=null&&S.contains(L))&&(await s?.(C),m(L))}),I=Jo(C=>{const S=C.target;h===S&&m(null)});return ve.useEffect(()=>{if(e)return document.addEventListener("focusin",i),document.addEventListener("focusout",I),()=>{document.removeEventListener("focusin",i),document.removeEventListener("focusout",I)}},[e]),ve.useEffect(()=>{const C=n.current;!e||!h||!C||!_.isKeyboardOpen||requestAnimationFrame(()=>{l?.(h)})},[e,_.isKeyboardOpen,h]),_}function Lte(){const[e]=ve.useState(()=>{const n={top:0,left:0,right:0,bottom:0};if(Ag)return n;const s=document.querySelector(":root");if(!s)return n;s.style.setProperty("--rms-sat","env(safe-area-inset-top)"),s.style.setProperty("--rms-sal","env(safe-area-inset-left)"),s.style.setProperty("--rms-sar","env(safe-area-inset-right)"),s.style.setProperty("--rms-sab","env(safe-area-inset-bottom)");const l=getComputedStyle(s),h=D_(l,"--rms-sat"),m=D_(l,"--rms-sal"),_=D_(l,"--rms-sar"),i=D_(l,"--rms-sab");return s.style.removeProperty("--rms-sat"),s.style.removeProperty("--rms-sal"),s.style.removeProperty("--rms-sar"),s.style.removeProperty("--rms-sab"),{top:h,left:m,right:_,bottom:i}});return e}function D_(e,n){const s=e.getPropertyValue(n).replace("px","").trim();return parseInt(s,10)||0}function kte({y:e,detent:n,rootId:s,sheetHeight:l,snapPoints:h,startThreshold:m}){const _=Lte().top;let i=s;i&&n==="full"&&(console.warn('Using "full" detent with modal effect is not supported.'),i=void 0);const I=Jo(S=>{if(!i)return;let L=Math.max(0,1-S/l);const R=h.length>1?h[h.length-2]:void 0;if(R!==void 0){const W=R.snapValueY;S<=W?L=(W-S)/W:L=0}if(m!==void 0){const W=l-Math.min(Math.floor(m*l),l);S<=W?L=(W-S)/W:L=0}L=Math.max(0,Math.min(1,L));const U=window.innerWidth;Ote(i,{scale:d_(L,[0,1],[1,(U-16)/U]),translateY:d_(L,[0,1],[0,24+_]),borderRadius:d_(L,[0,1],[0,10])})}),C=Jo(()=>{i&&e.get()+5>=l&&Mk(i)});ve.useEffect(()=>{if(!i)return;const S=e.on("animationStart",()=>{i&&zte(i)}),L=e.on("change",W=>{I(W)}),R=e.on("animationComplete",C),U=e.on("animationCancel",C);return()=>{i&&Mk(i),S(),L(),R(),U()}},[i])}function zte(e){const n=document.querySelector(`#${e}`);if(!n)return;const s=document.querySelector("body");s.style.backgroundColor="#000000",n.style.overflow="hidden",n.style.transitionTimingFunction="cubic-bezier(0.32, 0.72, 0, 1)",n.style.transitionProperty="transform, border-radius",n.style.transitionDuration="0.5s",n.style.transformOrigin="center top"}function Ote(e,n){const s=document.querySelector(`#${e}`);if(!s)return;const{scale:l,translateY:h,borderRadius:m}=n;s.style.transform=`scale(${l}) translate3d(0, ${h}px, 0)`,s.style.borderTopRightRadius=`${m}px`,s.style.borderTopLeftRadius=`${m}px`}function Mk(e){const n=document.querySelector(`#${e}`);if(!n)return;document.querySelector("body").style.removeProperty("background-color"),n.style.removeProperty("overflow"),n.style.removeProperty("transition-timing-function"),n.style.removeProperty("transition-property"),n.style.removeProperty("transition-duration"),n.style.removeProperty("transform-origin"),n.style.removeProperty("transform"),n.style.removeProperty("border-top-right-radius"),n.style.removeProperty("border-top-left-radius")}var jte=24;function v4(...e){return(...n)=>{for(const s of e)typeof s=="function"&&s(...n)}}var x4=typeof document<"u"&&window.visualViewport;function Ik(e,n){if(!e)return!1;const s=window.getComputedStyle(e);let l=/(auto|scroll)/.test(s.overflow+s.overflowX+s.overflowY);return l&&n&&(l=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),l}function Tk(e,n){let s=e;for(Ik(s,n)&&(s=s.parentElement);s&&!Ik(s,n);)s=s.parentElement;return s||document.scrollingElement||document.documentElement}var S_=0,E_;function Pte(e={}){const{isDisabled:n}=e;g4(()=>{if(!n)return S_++,S_===1&&(Ate()?E_=Bte():E_=Rte()),()=>{S_--,S_===0&&E_?.()}},[n])}function Rte(){return v4(Dg(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Dg(document.documentElement,"overflow","hidden"))}function Bte(){let e,n=0;const s=L=>{var R;const U=(R=L.composedPath())==null?void 0:R[0];e=Tk(U,!0),!(e===document.documentElement&&e===document.body)&&(n=L.changedTouches[0].pageY)},l=L=>{if(e===void 0)return;if(!e||e===document.documentElement||e===document.body){L.preventDefault();return}const R=L.changedTouches[0].pageY,U=e.scrollTop,W=e.scrollHeight-e.clientHeight;W!==0&&((U<=0&&R>n||U>=W&&R<n)&&L.preventDefault(),n=R)},h=L=>{var R;const U=(R=L.composedPath())==null?void 0:R[0];eh(U)&&U!==document.activeElement&&(L.preventDefault(),U.style.transform="translateY(-2000px)",U.focus(),requestAnimationFrame(()=>{U.style.transform=""}))},m=L=>{var R;const U=(R=L.composedPath())==null?void 0:R[0];eh(U)&&(U.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{U.style.transform="",x4&&(x4.height<window.innerHeight?requestAnimationFrame(()=>{Ak(U)}):x4.addEventListener("resize",()=>Ak(U),{once:!0}))}))},_=()=>{window.scrollTo(0,0)},i=window.pageXOffset,I=window.pageYOffset,C=v4(Dg(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Dg(document.documentElement,"overflow","hidden"),Dg(document.body,"marginTop",`-${I}px`));window.scrollTo(0,0);const S=v4(Sg(document,"touchstart",s,{passive:!1,capture:!0}),Sg(document,"touchmove",l,{passive:!1,capture:!0}),Sg(document,"touchend",h,{passive:!1,capture:!0}),Sg(document,"focus",m,!0),Sg(window,"scroll",_));return()=>{C(),S(),window.scrollTo(i,I)}}function Dg(e,n,s){const l=e.style[n];return e.style[n]=s,()=>{e.style[n]=l}}function Sg(e,n,s,l){return e.addEventListener(n,s,l),()=>{e.removeEventListener(n,s,l)}}function Ak(e){const n=document.scrollingElement||document.documentElement;for(;e&&e!==n;){const s=Tk(e);if(s!==document.documentElement&&s!==document.body&&s!==e){const l=s.getBoundingClientRect().top,h=e.getBoundingClientRect().top,m=e.getBoundingClientRect().bottom,_=s.getBoundingClientRect().bottom+jte;m>_&&(s.scrollTop+=h-l)}e=s.parentElement}}function Fte({isOpen:e,onClosed:n,onOpening:s,onOpen:l,onClosing:h}){const[m,_]=ve.useState(e?"opening":"closed"),i=Jo(()=>n?.()),I=Jo(()=>s?.()),C=Jo(()=>l?.()),S=Jo(()=>h?.());return ve.useEffect(()=>{e&&m==="closed"?_("opening"):!e&&(m==="open"||m==="opening")&&_("closing")},[e,m]),ve.useEffect(()=>{async function L(){switch(m){case"closed":await i?.();break;case"opening":await I?.(),_("open");break;case"open":await C?.();break;case"closing":await S?.(),_("closed");break}}L().catch(R=>{console.error("Internal sheet state error:",R)})},[m]),m}function Ute({snapPointsProp:e,sheetHeight:n}){if(e[0]!==0&&(console.error(`First snap point should be 0 to ensure the sheet can be fully closed. Got: [${e.join(", ")}]`),e.unshift(0)),e[e.length-1]!==1&&(console.error(`Last snap point should be 1 to ensure the sheet can be fully opened. Got: [${e.join(", ")}]`),e.push(1)),n<=0)return console.error(`Sheet height is ${n}, cannot compute snap points. Make sure the sheet is mounted and has a valid height.`),[];const s=e.map(l=>l>0&&l<=1?Math.round(l*n):l<0?n+l:l);return console.assert(wte(s),`Snap points need to be in ascending order got: [${e.join(", ")}]`),s.forEach(l=>{(l<0||l>n)&&console.warn(`Snap point ${l} is outside of the sheet height ${n}. This can cause unexpected behavior. Consider adjusting your snap points.`)}),s.includes(n)||(console.warn("Snap points do not include the sheet height.Please include `1` as the last snap point or it will be included automatically.This is to ensure the sheet can be fully opened."),s.push(n)),s.map((l,h)=>({snapIndex:h,snapValue:l,snapValueY:n-l}))}function b4(e){return e>0?1:e<0?-1:0}function N_(e){return e.slice().sort((n,s)=>n.snapValueY-s.snapValueY)}function L_(e,n){return e.reduce((s,l)=>Math.abs(l.snapValueY-n)<Math.abs(s.snapValueY-n)?l:s)}function Ck(e,n){const s=N_(e);for(let l=s.length-1;l>=0;l--)if(s[l].snapValueY<n)return s[l];return null}function Dk(e,n){const s=N_(e);for(let l=0;l<s.length;l++)if(s[l].snapValueY>n)return s[l];return null}function Vte({offsetY:e,velocityY:n,deltaY:s}){if(Math.abs(n)>50)return b4(n);const l=b4(e);return l!==0?l:b4(s)}function Hte({y:e,info:n,sheetHeight:s,snapPoints:l,dragVelocityThreshold:h,dragCloseThreshold:m}){const _=h,i=Math.max(2e3,_),I=.35,C=.2,S=20,L=24,R=0,U=s,W=n.offset.y,le=n.delta.y,pe=n.velocity.y,ie=wk(e+pe*C,R,U),Y=Math.abs(pe),q=Vte({offsetY:W,velocityY:pe,deltaY:le}),ue=Y>i,me=Y>_;if(l.length===0){if(me)return{yTo:q<0?R:U,snapIndex:void 0};const tt=R+(U-R)*m;return{yTo:ie<tt?R:U,snapIndex:void 0}}const ne=L_(l,e);if(!me&&Math.abs(W)<S)return{yTo:ne.snapValueY,snapIndex:ne.snapIndex};if(!me&&Math.abs(e-ne.snapValueY)<L)return{yTo:ne.snapValueY,snapIndex:ne.snapIndex};if(ue){const tt=q<0?R:U,dt=L_(l,tt);return{yTo:tt,snapIndex:dt.snapIndex}}if(me){const tt=q<0?Ck(l,e):Dk(l,e),dt=q<0?R:U,Nt=L_(l,dt),re=tt??Nt;return{yTo:re.snapValueY,snapIndex:re.snapIndex}}const De=N_(l)[0],Me=N_(l)[l.length-1],Ee=Ck(l,e)??De,ge=Dk(l,e)??Me;if(Ee.snapIndex===ge.snapIndex)return{yTo:Ee.snapValueY,snapIndex:Ee.snapIndex};const Re=ge.snapValueY-Ee.snapValueY,Oe=Re>0?(e-Ee.snapValueY)/Re:0;let Ne=ne;if(q>0?Ne=Oe>I?ge:Ee:q<0&&(Ne=Oe<1-I?Ee:ge),Y>200){const tt=L_(l,ie);Math.abs(tt.snapValueY-e)<Math.abs(Ne.snapValueY-e)&&(Ne=tt)}return{yTo:Ne.snapValueY,snapIndex:Ne.snapIndex}}var oc={root:{base:{position:"fixed",top:0,bottom:0,left:0,right:0,overflow:"hidden",pointerEvents:"none"},decorative:{}},backdrop:{base:{zIndex:1,position:"fixed",top:0,left:0,width:"100%",height:"100%",touchAction:"none",userSelect:"none"},decorative:{backgroundColor:"rgba(0, 0, 0, 0.2)",border:"none",WebkitTapHighlightColor:"transparent"}},container:{base:{zIndex:2,position:"absolute",left:0,bottom:0,width:"100%",pointerEvents:"auto",display:"flex",flexDirection:"column"},decorative:{backgroundColor:"#fff",borderTopRightRadius:"8px",borderTopLeftRadius:"8px",boxShadow:"0px -2px 16px rgba(0, 0, 0, 0.3)"}},headerWrapper:{base:{width:"100%"},decorative:{}},header:{base:{width:"100%",position:"relative"},decorative:{height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}},indicatorWrapper:{base:{display:"flex"},decorative:{}},indicator:{base:{display:"inline-block"},decorative:{width:"18px",height:"4px",borderRadius:"99px",backgroundColor:"#ddd"}},content:{base:{minHeight:"0px",position:"relative",flexGrow:1,display:"flex",flexDirection:"column"},decorative:{}},scroller:{base:{height:"100%",overflowY:"auto",overscrollBehaviorY:"none"},decorative:{}}},Sk=ve.forwardRef(({avoidKeyboard:e=!0,children:n,className:s="",detent:l="default",disableDismiss:h=!1,disableDrag:m=!1,disableScrollLocking:_=!1,dragCloseThreshold:i=vte,dragVelocityThreshold:I=xte,initialSnap:C,isOpen:S,modalEffectRootId:L,modalEffectThreshold:R,mountPoint:U,prefersReducedMotion:W=!1,snapPoints:le,style:pe,tweenConfig:ie=yte,unstyled:Y=!1,onOpenStart:q,onOpenEnd:ue,onClose:me,onCloseStart:ne,onCloseEnd:De,onSnap:Me,onDrag:Ee,onDragStart:ge,onDragEnd:Re,...Oe},Ne)=>{const[tt,dt]=hte(),Nt=ve.useRef(null),re=Math.round(dt.height),[_e,D]=ve.useState(C),{windowHeight:P}=bte(),K=re>0?re:P,H=f4(K),Q=Rd(H,pt=>Math.max(re-pt,0)),de=Rd(H,pt=>wk(1-pt/K,0,1)),we=f4(0),he=$ee(),je={type:"tween",...!!(W||he)?_te:ie},Fe=Rd(H,pt=>pt+2>=K?-1:pe?.zIndex??9999),Ue=Rd(H,pt=>pt+2>=K?"hidden":"visible"),He=ve.useMemo(()=>le&&re>0?Ute({sheetHeight:re,snapPointsProp:le}):[],[re,le?.join("")]),it=Jo(pt=>{D(pt),Me?.(pt)}),ct=Jo(pt=>le&&He?pt<0||pt>=He.length?(console.warn(`Invalid snap index ${pt}. Snap points are: [${le.join(", ")}] and their computed values are: [${He.map(Ft=>Ft.snapValue).join(", ")}]`),null):He[pt]:null),Et=Jo(async pt=>{if(!le){console.warn("Snapping is not possible without `snapPoints` prop.");return}const Ft=ct(pt);if(Ft===null){console.warn(`Invalid snap index ${pt}.`);return}if(pt===0){me();return}await Ig(H,Ft.snapValueY,{...je,onComplete:()=>it(pt)})}),zt=Nte({isEnabled:S&&e,containerRef:Nt,onWillOpenKeyboard:async()=>{const pt=He[He.length-1];pt&&pt.snapIndex!==_e&&(await Ig(H,pt.snapValueY,je),it(pt.snapIndex))},onDidOpenKeyboard:pt=>{const Ft=Nt.current;if(!Ft)return;const Tn=pt.getBoundingClientRect(),On=Ft.getBoundingClientRect(),mn=Ft.querySelector(".react-modal-sheet-content-scroller"),ti=Math.max(Tn.top-On.top+mn.scrollTop-Tn.height,0);requestAnimationFrame(()=>{mn.scrollTo({top:ti,behavior:"smooth"})})}}).isKeyboardOpen||m,Wt=Jo(()=>{var pt;const Ft=document.activeElement;Ft&&eh(Ft)&&((pt=Nt.current)!=null&&pt.contains(Ft))&&Ft.blur()}),kt=Jo((pt,Ft)=>{Wt(),ge?.(pt,Ft)}),on=Jo((pt,Ft)=>{Ee?.(pt,Ft);const Tn=H.get(),On=H.getVelocity();On>0&&we.set(10),On<0&&we.set(-10),H.set(Math.max(Tn+Ft.delta.y,0))}),sn=Jo((pt,Ft)=>{Wt(),Re?.(pt,Ft);const Tn=H.get(),On=Hte({y:Tn,info:Ft,sheetHeight:re,dragCloseThreshold:i,snapPoints:He,dragVelocityThreshold:I});let mn=On.yTo;if(h&&mn+1>=re){const ti=He.find(Yn=>Yn.snapValue>0);ti?(mn=ti.snapValueY,it(ti.snapIndex)):mn=Tn}else On.snapIndex!==void 0&&it(On.snapIndex);Ig(H,mn,je),mn+1>=re&&!h&&me(),we.set(0)});kte({y:H,detent:l,sheetHeight:re,snapPoints:He,rootId:L,startThreshold:R}),Pte({isDisabled:_||!S});const rn=Fte({isOpen:S,onOpen:async()=>{q?.(),await Cte("react-modal-sheet-container");const pt=C!==void 0?ct(C):null,Ft=pt?.snapValueY??0;await Ig(H,Ft,je),C!==void 0&&it(C),ue?.()},onClosing:async()=>{ne?.(),await Ig(H,K,je),De?.()}}),Hn={currentSnap:_e,detent:l,disableDrag:zt,dragProps:{drag:"y",dragElastic:0,dragMomentum:!1,dragPropagation:!1,onDrag:on,onDragStart:kt,onDragEnd:sn},indicatorRotation:we,avoidKeyboard:e,prefersReducedMotion:W,sheetBoundsRef:tt,sheetRef:Nt,unstyled:Y,yProgress:de,y:H},Mn={height:re,currentSnap:_e,snapPoints:He,snapTo:Et,y:H,yInverted:Q,yProgress:de};ve.useImperativeHandle(Ne,()=>Mn);const an=ve.createElement(_k.Provider,{value:Hn},ve.createElement(ic.div,{...Oe,ref:Ne,"data-sheet-state":rn,className:`react-modal-sheet-root ${s}`,style:{...rc(oc.root,Y),zIndex:Fe,visibility:Ue,...pe}},ve.createElement(vk.Provider,{value:Mn},rn!=="closed"?n:null)));return Ag?an:os.createPortal(an,U??document.body)});Sk.displayName="Sheet";var Qte=e=>!!e.onClick||!!e.onTap,Ek=ve.forwardRef(({style:e,className:n="",unstyled:s,...l},h)=>{const m=Tg(),_=Qte(l),i=_?ic.button:ic.div,I=_?"auto":"none",C=s??m.unstyled,S={opacity:m.yProgress,...rc(oc.backdrop,C),...e,pointerEvents:I};return ve.createElement(i,{...l,ref:h,className:`react-modal-sheet-backdrop ${n}`,style:S})});Ek.displayName="SheetBackdrop";var Nk=ve.forwardRef(({children:e,style:n,className:s="",unstyled:l,...h},m)=>{const _=Tg(),i=l??_.unstyled,I={...rc(oc.container,i),...n,y:_.y};return _.detent==="default"&&(I.height=xk),_.detent==="full"&&(I.height="100%",I.maxHeight="100%"),_.detent==="content"&&(I.height="auto",I.maxHeight=xk),ve.createElement(ic.div,{...h,ref:A_([m,_.sheetRef,_.sheetBoundsRef]),className:`react-modal-sheet-container ${s}`,style:I},e)});Nk.displayName="SheetContainer";var Yte={bottom:0,top:0,left:0,right:0};function Lk(){const e=ve.useRef(null),n=ve.useCallback(()=>Yte,[]);return{ref:e,onMeasure:n}}function Gte(e={}){const{debounceDelay:n=32,isEnabled:s=!0}=e,l=ve.useRef(null),[h,m]=ve.useState(null),[_,i]=ve.useState(void 0),I=ve.useMemo(()=>R=>{m(R)},[]),C=Jo(R=>{const{scrollTop:U,scrollHeight:W,clientHeight:le}=R;if(!(W>le)){_&&i(void 0);return}const ie=U<=0,Y=Math.ceil(W)-Math.ceil(U)===Math.ceil(le);let q;ie?q="top":Y?q="bottom":q="middle",R.style.touchAction=ie?"pan-down":"",q!==_&&i(q)}),S=Jo(R=>{if(R.currentTarget instanceof HTMLElement){const U=R.currentTarget;l.current&&clearTimeout(l.current),n===0?C(U):l.current=setTimeout(()=>C(U),n)}}),L=Jo(R=>{if(R.currentTarget instanceof HTMLElement){const U=R.currentTarget;requestAnimationFrame(()=>{C(U)})}});return ve.useEffect(()=>{if(!(!h||!s))return C(h),h.addEventListener("scroll",S),h.addEventListener("touchstart",L),()=>{l.current&&clearTimeout(l.current),h.removeEventListener("scroll",S),h.removeEventListener("touchstart",L)}},[h,s]),{scrollRef:I,scrollPosition:_}}var kk=ve.forwardRef(({disableScroll:e,disableDrag:n,children:s,style:l,className:h="",scrollClassName:m="",scrollStyle:_,scrollRef:i=null,unstyled:I,...C},S)=>{const L=Tg(),R=Lk(),U=Gte({isEnabled:typeof e=="function"?!0:!e}),W=typeof e=="function"?e({scrollPosition:U.scrollPosition,currentSnap:L.currentSnap}):!!e,le=!W&&U.scrollPosition&&U.scrollPosition!=="top",Y=(typeof n=="function"?n({scrollPosition:U.scrollPosition,currentSnap:L.currentSnap}):!!n)||le||L.disableDrag||L.disableDrag?void 0:L.dragProps,q=I??L.unstyled,ue={...rc(oc.content,q),...l},me=rc(oc.scroller,q);return L.avoidKeyboard&&(me.paddingBottom=bk()?"env(keyboard-inset-height, var(--keyboard-inset-height, 0px))":"var(--keyboard-inset-height, 0px)"),W&&(me.overflowY="clip"),Y!==void 0&&(me.touchAction="pan-down"),ve.createElement(ic.div,{...C,ref:A_([S,R.ref]),className:`react-modal-sheet-content ${h}`,style:ue,...Y,dragConstraints:R.ref,onMeasureDragConstraints:R.onMeasure},ve.createElement(ic.div,{ref:A_([U.scrollRef,i]),style:{...me,..._},className:`react-modal-sheet-content-scroller ${m}`},s))});kk.displayName="SheetContent";function zk({style:e,className:n="",unstyled:s,...l}){const h=Tg(),m=Rd(h.indicatorRotation,S=>`translateX(2px) rotate(${S}deg)`),_=Rd(h.indicatorRotation,S=>`translateX(-2px) rotate(${-1*S}deg)`),i=s??h.unstyled,I={...rc(oc.indicatorWrapper,i),...e},C=rc(oc.indicator,i);return ve.createElement("div",{className:`react-modal-sheet-drag-indicator-container ${n}`,style:I,...l},ve.createElement(ic.span,{className:"react-modal-sheet-drag-indicator",style:{...C,transform:m}}),ve.createElement(ic.span,{className:"react-modal-sheet-drag-indicator",style:{...C,transform:_}}))}var Ok=ve.forwardRef(({children:e,style:n,disableDrag:s,unstyled:l,className:h="",...m},_)=>{const i=Tg(),I=Lk(),C=s||i.disableDrag?void 0:i.dragProps,S=l??i.unstyled,L={...rc(oc.headerWrapper,S),...n},R=rc(oc.header,S);return ve.createElement(ic.div,{...m,ref:A_([_,I.ref]),style:L,className:`react-modal-sheet-header-container ${h}`,...C,dragConstraints:I.ref,onMeasureDragConstraints:I.onMeasure},e||ve.createElement("div",{className:"react-modal-sheet-header",style:R},ve.createElement(zk,null)))});Ok.displayName="SheetHeader";var Eg=Object.assign(Sk,{Container:Nk,Header:Ok,DragIndicator:zk,Content:kk,Backdrop:Ek,useContext:mte});const th={FIT:"FIT",MAX:"MAX"};function $te(e){const[n,s]=ve.useState(1);return ve.useEffect(()=>s(1),[e]),{handleSnap:m=>s(m),isAtMaxSnap:m=>n===m.length-1}}const Bd=pi({key:"directionsResponse",default:null}),Ng=pi({key:"hasFoundRoute",default:!0}),nh={WALKING:"WALKING",DRIVING:"DRIVING",BICYCLING:"BICYCLING"},Fd=pi({key:"travelMode",default:nh.WALKING}),Ud=pi({key:"accessibilityOn",default:!1}),k_=pi({key:"shuttleBusOn",default:!1});function z_(e){const n=e.geometry.type==="Point"?e.geometry.coordinates:e.properties.anchor.coordinates;return{lat:n[1],lng:n[0],floor:e.properties.floor}}async function Zte(e,n,s,l,h){if(!n||!n.goTo)return;const m=n.getFloor(),_={type:"FeatureCollection",features:e.filter(i=>parseInt(i.properties.floor,10)===parseInt(m,10)).filter(i=>s&&i.properties.venueId.toLowerCase()===s.toLowerCase()).map(i=>({type:"Feature",geometry:i.geometry,properties:i.properties}))};if(_.features.length>0){const i=l instanceof Promise?await l:l,I=h instanceof Promise?await h:h;n.goTo(_,{maxZoom:22,padding:{bottom:i,left:I,top:0,right:0}})}}async function Wte(e,n){return e?n?await tg():0:200}async function qte(e,n){return e?n?0:await Lc():0}const jk=()=>{const e=bi(Jp),n=fn(as),s=fn(Ya),l=fn(Ga),h=Xo();return ve.useCallback(async _=>{if(!_||_.length===0){e([]);return}try{const i=_.map(S=>window.mapsindoors.services.LocationsService.getLocation(S)),C=(await Promise.all(i)).filter(S=>S!==null);if(e(C),C.length>0&&n){Kte(C,n);const[S,L]=await Promise.all([Wte(h,l),qte(h,l)]);await Zte(C,n,s,S,L)}}catch(i){console.error("useChatLocations: Error fetching locations:",i),e([])}},[e,n,s,h,l])};function Kte(e,n){const s=n.getFloor(),l=e.map(m=>m.properties.floor);if(!l.some(m=>String(m)===String(s))&&l.length>0){const m={};for(const I of l){const C=String(I);m[C]=(m[C]||0)+1}let _=null,i=0;for(const[I,C]of Object.entries(m))C>i&&(i=C,_=I);_!==null&&n.setFloor(_)}}function Xte(e){return/[a-zA-Z]/.test(e)?"locationId":"coordinates"}const Pk=(e,n)=>{const s=fn(Vy),l=bi(Bd),h=bi(Ng),m=fn(Fd),_=fn(Ud),i=fn(k_);return ve.useCallback(async C=>{if(!(!C||!C.originLocationId||!C.destinationLocationId)){if(!s){console.error("useChatDirections: Directions service not available");return}try{const S=Xte(C.originLocationId);let L=null,R;switch(S){case"coordinates":{const le=C.originLocationId.split(",");R={lat:parseFloat(le[0]),lng:parseFloat(le[1]),...le[2]&&{floor:parseInt(le[2],10)}};break}case"locationId":{if(L=await window.mapsindoors.services.LocationsService.getLocation(C.originLocationId),!L?.geometry){console.error("useChatDirections: Failed to fetch origin location or missing geometry");return}R=z_(L);break}default:console.error("useChatDirections: Invalid origin type");return}const U=await window.mapsindoors.services.LocationsService.getLocation(C.destinationLocationId);if(!U?.geometry){console.error("useChatDirections: Failed to fetch destination location or missing geometry");return}const W=await s.getRoute({origin:R,destination:z_(U),travelMode:m,avoidStairs:_,excludeHighwayTypes:i?[]:["busway"]});if(W&&W.legs){const le=W.legs.reduce((ie,Y)=>ie+Y.distance.value,0),pe=W.legs.reduce((ie,Y)=>ie+Y.duration.value,0);l({originLocation:L,destinationLocation:U,totalDistance:le,totalTime:pe,directionsResult:W}),h(!0),e(n.DIRECTIONS)}else console.error("useChatDirections: Failed to calculate route")}catch(S){console.error("useChatDirections: Error fetching locations or calculating route:",S)}}},[s,m,_,i,l,h,e,n])};let w4="";const Rk=()=>ve.useRef({getInitialMessage:()=>w4,setInitialMessage:n=>{w4=n||""},clearInitialMessage:()=>{w4=""}}).current,Bk=ve.createContext(),Lg="http://localhost:4000";function Fk({children:e,enabled:n}){const[s,l]=ve.useState(!1),[h,m]=ve.useState([]),[_,i]=ve.useState(null),I="",C=ve.useRef(null),S=ve.useRef(null),L=ve.useCallback(async Y=>{if(!C.current||S.current!==Y){if(C.current)try{await fetch(`${Lg}/api/chat/end/${C.current}`,{method:"DELETE"})}catch(ne){console.warn("Error ending previous session:",ne)}const ue=crypto.randomUUID(),me=await fetch(`${Lg}/api/chat/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:Y,sessionId:ue})});if(!me.ok){const ne=await me.json().catch(()=>({}));throw new Error(ne.error||`Failed to create session: ${me.status}`)}C.current=ue,S.current=Y}return C.current},[]),R=ve.useCallback(Y=>{let q=[];if(Y)switch(Y?.key){case"single_location":q=[Y.value];break;case"multiple_locations":q=Array.isArray(Y.value)?Y.value.filter(Boolean):[];break;case"directions":{const ue=Y.value?.originLocationId,me=Y.value?.destinationLocationId;ue&&me&&i({originLocationId:ue,destinationLocationId:me});break}}return q},[]),U=ve.useCallback(async(Y,q,ue,me)=>{const{onUpdate:ne,onComplete:De}=me;try{const Me=await fetch(`${Lg}/api/chat/stream`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:Y,message:q,extra:ue})});if(!Me.ok){const Nt=await Me.json().catch(()=>({}));throw new Error(Nt.error||`HTTP error! status: ${Me.status}`)}if(!Me.body)throw new Error("Streaming response body is empty");const Ee=Me.body.getReader(),ge=new TextDecoder;let Re="",Oe="",Ne=null,tt=!0;for(;tt;){const{done:Nt,value:re}=await Ee.read();Nt&&(tt=!1),Nt||(Re+=ge.decode(re,{stream:!0}));const _e=Re.split(`
43
43
  `);Re=Nt?"":_e.pop()||"";for(const D of _e)if(!(!D.trim()||D.startsWith(":"))&&D.startsWith("data: ")){const P=D.slice(6);if(P==="[DONE]")continue;try{const K=JSON.parse(P);ne&&ne({text:K.text,isThought:K.isThought}),Oe+=K.text,K.functionResponse&&(Ne=K.functionResponse),K.log?.toolCalls&&console.log(`Agent tool calls:
44
44
  `+JSON.stringify(K.log.toolCalls,null,2))}catch(K){console.warn("Failed to parse streaming chunk:",P,K)}}if(Nt)break}const dt=Ne?R(Ne):[];return console.log("Search result IDs:",dt),m(dt),De&&De({response:Oe,functionData:Ne}),Oe}catch(Me){throw console.error("Error in streaming response:",Me),Me}},[R]),W=ve.useCallback(async(Y,q,ue,me)=>{const ne=await fetch(`${Lg}/api/chat/message`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:Y,message:q,extra:ue})});if(!ne.ok){const Re=await ne.json().catch(()=>({}));throw new Error(Re.error||`HTTP error! status: ${ne.status}`)}const{response:De,tools:Me,functionData:Ee}=await ne.json(),ge=R(Ee);return console.log("Search result IDs:",ge),m(ge),console.log(`Agent tool calls:
45
- `+JSON.stringify(Me,null,2)),me&&me({response:De,tools:Me,functionData:Ee}),De},[R]),le=ve.useCallback(async(Y,q,ue={})=>{if(!n)return ue.onComplete&&ue.onComplete({response:"",error:new Error("Gemini provider is disabled")}),"";l(!0),i(null);try{console.log("Generating response for prompt:",q);const me=ue.extra||{},{onUpdate:ne,onComplete:De}=ue,Me=await L(Y);return ne?await U(Me,q,me,{onUpdate:ne,onComplete:De}):await W(Me,q,me,De)}catch(me){console.error("Error generating response:",me),me instanceof Error&&(console.error("Error message:",me.message),console.error("Error stack:",me.stack));const ne="I'm sorry, I encountered an error processing your request. Please try again later.";return ue.onComplete&&ue.onComplete({response:ne,error:me}),ne}finally{l(!1)}},[L,n,U,W]),pe=ve.useCallback(()=>{i(null)},[]);ve.useEffect(()=>()=>{C.current&&fetch(`${Lg}/api/chat/end/${C.current}`,{method:"DELETE"}).catch(Y=>{console.warn("Error ending session on unmount:",Y)})},[]);const ie={enabled:n,generateResponse:le,isLoading:s,searchResults:h,directionsLocationIds:_,clearDirectionsLocationIds:pe,defaultPrompt:I};return Le.jsx(Bk.Provider,{value:ie,children:e})}function Uk(){const e=ve.useContext(Bk);if(e===void 0)throw new Error("useGemini must be used within a GeminiProvider");return e}Fk.propTypes={children:ft.node.isRequired,enabled:ft.bool};const O_=pi({key:"showExternalIDs",default:!1});kg.propTypes={location:ft.object,locationClicked:ft.func,icon:ft.string,isHovered:ft.bool,disableHover:ft.bool};function kg({location:e,locationClicked:n,icon:s,isHovered:l,disableHover:h}){const{t:m}=oo(),_=ve.useRef(),i=fn(as),I=fn(O_);return ve.useEffect(()=>{const C=U=>{i.unhoverLocation(),n(U.detail)},S=()=>{h||e.properties.locationSettings?.selectable!==!1&&i.hoverLocation(e)},L=()=>{h||e.properties.locationSettings?.selectable!==!1&&i.unhoverLocation(e)};e.properties.locationSettings?.selectable===!1&&_.current.classList.add("non-selectable");const{current:R}=_;return R.location=e,R.icon=s||i.getDisplayRule(e).icon,R.addEventListener("locationClicked",C),h||(R.addEventListener("mouseover",S),R.addEventListener("mouseout",L)),l?_.current.classList.add("hovered"):_.current.classList.remove("hovered"),()=>{R.removeEventListener("locationClicked",C),h||(R.removeEventListener("mouseover",S),R.removeEventListener("mouseout",L))}},[e,n,l,h]),Le.jsx("mi-list-item-location",{level:m("Level"),ref:_,"show-external-id":I})}const Jte=()=>{const[e,n]=ve.useState(),s=fn(as),l=fn(Zy);return ve.useEffect(()=>{function h(){const m=s.getMapView().getCenter();n(m.lat+","+m.lng)}return s&&l?(s.getMapView().addListener("idle",h),h()):s&&s.getMapView().removeListener("idle",h),()=>{s&&s.getMapView().removeListener("idle",h)}},[s,l]),e},ih=pi({key:"language",default:void 0}),M4=pi({key:"searchInput",default:void 0}),j_=pi({key:"searchAllVenues",default:!1}),P_=ve.forwardRef(function(n,s){const{placeholder:l,mapsindoors:h,results:m,clicked:_,cleared:i,changed:I,inputFocused:C,category:S,google:L,mapbox:R,disabled:U=!1}=n,W=ve.useRef(),le=ve.useRef(null),pe=ve.useRef(!1),ie=fn(xd),Y=fn(ih),q=bi(M4),ue=sessionStorage.getItem("mapboxPlacesSessionToken"),me={longitude:ie?.coords.longitude,latitude:ie?.coords.latitude},ne=Jte(),De=fn(Ya),Me=fn(j_);return ve.useImperativeHandle(s,()=>({triggerSearch(){W.current.triggerSearch()},getValue(){return W.current.value},setDisplayText(Ee){pe.current||(le.current=Ee),W.current.setDisplayText(Ee)},focusInput(){W.current.focusInput()},clear(){W.current.clear()},getInputField(){return W.current.getInputField().then(Ee=>q(Ee))}})),ve.useEffect(()=>{const{current:Ee}=W;Ee.value&&window.mapsindoors.services.LocationsService.once("update_completed",()=>{Ee.triggerSearch()})},[Y]),ve.useEffect(()=>{const{current:Ee}=W;Ee.componentOnReady&&Ee.componentOnReady().then(()=>{pe.current=!0});const ge=()=>{pe.current=!0,le.current!==null&&(Ee.setDisplayText(le.current),le.current=null)};return Ee.addEventListener("componentRendered",ge),()=>Ee.removeEventListener("componentRendered",ge)},[]),ve.useEffect(()=>{const Ee=Ne=>m(Ne.detail),ge=()=>i(),Re=()=>C?.(),{current:Oe}=W;return h===!0&&(Oe.mapsindoors="true"),Oe.addEventListener("results",Ee),Oe.addEventListener("click",_),Oe.addEventListener("cleared",ge),Oe.addEventListener("changed",I),Oe.addEventListener("focused",Re),()=>{Oe.removeEventListener("results",Ee),Oe.removeEventListener("click",_),Oe.removeEventListener("cleared",ge),Oe.removeEventListener("changed",I),Oe.removeEventListener("focused",Re)}},[l,h,m,_,i,C,L,R,I]),Le.jsx("mi-search",{ref:W,"id-attribute":"search",placeholder:l,"session-token":ue,"user-position":me.latitude!==void 0&&me.longitude!==void 0?Object.values(me).join(","):null,"mi-near":ne,"mi-categories":S,disabled:U,mapbox:R,google:L,"mi-venue":Me?void 0:De,language:Y})});P_.propTypes={placeholder:ft.string,mapsindoors:ft.bool,results:ft.func,clicked:ft.func,cleared:ft.func,changed:ft.func,inputFocused:ft.func,category:ft.string,preventFocus:ft.bool,google:ft.bool,mapbox:ft.bool,disabled:ft.bool};const Vk=pi({key:"useKeyboard",default:!1}),Hk=ve.forwardRef(function(n,s){const{searchInputElement:l}=n,h=ve.useRef(),m=fn(ih);return ve.useImperativeHandle(s,()=>({clearInputField(){h.current.clearInputField()}})),ve.useEffect(()=>{const{current:_}=h;l&&(_.inputElement=l)},[l]),Le.jsx("mi-keyboard",{language:m,ref:h})});Hk.propTypes={searchInputElement:ft.instanceOf(HTMLInputElement)};const R_=pi({key:"searchResults",default:[]}),I4=pi({key:"selectedCategory",default:void 0});function ene(){return new Promise(e=>{const n=document.querySelector(".chip--active");if(n)e(n);else{const s=new MutationObserver(()=>{const l=document.querySelector(".chip--active");l&&(s.disconnect(),e(l))});s.observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}})}const tne=pi({key:"isBottomSheetLoaded",default:!1}),Qk=pi({key:"category",default:void 0});function Yk(e,n){const s=fn(bd),[l,h]=ve.useState(!1),m=e.getMap();ve.useEffect(()=>{n&&h(!1)},[n]);function _(I,C,S,L){const R=U=>{const W=C.getMap().queryRenderedFeatures(U.point);!W.length&&C?.getHighlight()?.length>0&&C.highlight([]),S&&(W.length?L(!1):L(!0))};return I.on("click",R),()=>{I.off("click",R)}}function i(I,C,S,L){const R=()=>{S&&L(!1)},U=()=>{C.highlight([]),S&&L(!0)};C.addListener("click",R);const W=I.addListener("click",U);return()=>{C.removeListener("click",R),W.remove()}}return ve.useEffect(()=>{let I;return s===so.Mapbox&&(I=_(m,e,n,h)),s===so.Google&&(I=i(m,e,n,h)),()=>I?.()},[e,n]),l}const Gk=e=>jn.createElement("svg",{width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M17.5 20.9999L10.5 13.9999L17.5 6.99994",stroke:"#1F2937",strokeWidth:2.33333,strokeLinecap:"round",strokeLinejoin:"round"})),nne=e=>jn.createElement("svg",{width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M10.5 7.00006L17.5 14.0001L10.5 21.0001",stroke:"#1F2937",strokeWidth:2.33333,strokeLinecap:"round",strokeLinejoin:"round"}));T4.propTypes={onSetSize:ft.func,getFilteredLocations:ft.func,searchFieldRef:ft.object,isOpen:ft.bool,topLevelCategory:ft.bool,handleBack:ft.func,selectedCategoriesArray:ft.object,categoryOrientation:ft.oneOf(["horizontal","vertical"])};function T4({onSetSize:e,getFilteredLocations:n,searchFieldRef:s,isOpen:l,topLevelCategory:h,handleBack:m,selectedCategoriesArray:_,categoryOrientation:i}){const I=fn(ng),C=Xo(),[S,L]=fr(I4),R=bi(R_),U=bi(Jp),[W,le]=ve.useState(),pe=fn(tne),ie=fn(Qk),Y=fn(as),q=Yk(Y,l),[ue,me]=ve.useState([]),[ne,De]=ve.useState([]),{t:Me}=oo(),Ee=ec(),ge=ve.useRef(null),[Re,Oe]=ve.useState(!1),[Ne,tt]=ve.useState(!1),dt=H=>{_e&&ge.current&&ge.current.scrollBy({left:H==="left"?-200:200,behavior:"smooth"})},Nt=()=>{if(ge.current){const{scrollLeft:H,scrollWidth:Q,clientWidth:de}=ge.current,we=H<=0,he=H>=Q-de-1;Oe(!we),tt(!he)}},re=!h&&ue.length===0,_e=Ee&&i==="horizontal"&&!re;ve.useEffect(()=>{if(!_e)return;const H=ge.current;if(H)return Nt(),H.addEventListener("scroll",Nt),()=>{H.removeEventListener("scroll",Nt)}},[_e,ue.length]);const D=`categories prevent-scroll${Ee?` categories--kiosk-${i||"vertical"}`:""}`;function P(H){typeof e=="function"&&e(H)}function K(H){L(H),S===H?(R([]),L(null),U([]),s.current.getValue()&&s.current.triggerSearch()):s.current.getValue()?s.current.triggerSearch():n(H)}return ve.useEffect(()=>{q&&S&&(L(null),R([]),U([]),s.current?.getValue()&&s.current.clear())},[q]),ve.useEffect(()=>{S&&(ene().then(H=>le(H)),P(th.MAX))},[S]),ve.useEffect(()=>{W&&ie!==void 0&&(C||!C&&pe)&&W.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[W,ie,pe]),ve.useEffect(()=>{let H=[];if(h){const de=I.flatMap(([,we])=>we.childKeys||[]);H=I.filter(([we])=>!de.includes(we))}else if(S){const we=I.find(([he])=>he===S)?.[1]?.childKeys||[];H=I.filter(([he])=>we.includes(he))}me(H);const Q=I.find(([de])=>de===S)?.[1]?.displayName;De(Q)},[I]),Le.jsx("div",{className:D,children:I.length>0&&Le.jsxs(Le.Fragment,{children:[!h&&Le.jsxs("div",{className:"categories__nav",children:[Le.jsx("button",{"aria-label":Me("Back"),type:"button",className:"categories__nav-button",onClick:m,children:Le.jsx(Gk,{})}),Le.jsx("div",{children:ne})]}),Le.jsxs("div",{className:"categories__row",children:[_e&&Le.jsx("div",{className:"categories__chevron categories__chevron--left",children:Le.jsx("button",{"aria-label":Me("Previous categories"),type:"button",disabled:!Re,onClick:()=>dt("left"),children:Le.jsx(Gk,{})})}),Le.jsx("div",{className:"categories__list",ref:Ee?ge:void 0,children:ue.map(([H,Q])=>!h&&_.current.length!==1?null:Le.jsx("div",{className:"categories__category",children:Le.jsxs("button",{onClick:()=>h?K(H):n(H),children:[Le.jsx("img",{src:Q.iconUrl,alt:""}),Q.displayName]})},H))}),_e&&Le.jsx("div",{className:"categories__chevron categories__chevron--right",children:Le.jsx("button",{"aria-label":Me("Next categories"),type:"button",disabled:!Ne,onClick:()=>dt("right"),children:Le.jsx(nne,{})})})]})]})})}const ine=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{opacity:.12,d:"M3 7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3H16.2C17.8802 3 18.7202 3 19.362 3.32698C19.9265 3.6146 20.3854 4.07354 20.673 4.63803C21 5.27976 21 6.11984 21 7.8V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8Z",fill:"#111827",style:{fill:"#111827",fill:"color(display-p3 0.0667 0.0941 0.1529)",fillOpacity:1}}),jn.createElement("path",{d:"M12 16V12M12 8H12.01M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z",stroke:"#111827",style:{stroke:"#111827",stroke:"color(display-p3 0.0667 0.0941 0.1529)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),rne=e=>jn.createElement("svg",{width:25,height:24,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M19.5 13C14.5987 13.4243 11.9243 16.0987 11.5 21C11.0578 16.0225 8.39737 13.5547 3.5 13C8.47478 12.4262 10.9262 9.97478 11.5 5C12.0547 9.89737 14.5225 12.5578 19.5 13Z",stroke:"white",style:{stroke:"white",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jn.createElement("path",{d:"M19.3864 2.34512C19.3642 2.14869 19.1981 2.0002 19.0004 2C18.8027 1.9998 18.6363 2.14794 18.6137 2.34433C18.5082 3.25861 18.2367 3.88584 17.8113 4.31127C17.3858 4.7367 16.7586 5.00822 15.8443 5.11367C15.6479 5.13632 15.4998 5.30271 15.5 5.5004C15.5002 5.69809 15.6487 5.86417 15.8451 5.88642C16.7439 5.98823 17.3855 6.25969 17.8217 6.68804C18.2556 7.11407 18.5322 7.74041 18.6126 8.64552C18.6305 8.84634 18.7988 9.00023 19.0004 9C19.202 8.99977 19.3701 8.84551 19.3874 8.64465C19.4645 7.75483 19.7409 7.11438 20.1776 6.67764C20.6144 6.24091 21.2548 5.96446 22.1446 5.88744C22.3455 5.87005 22.4998 5.70205 22.5 5.50044C22.5002 5.29883 22.3463 5.13048 22.1455 5.11264C21.2404 5.03224 20.6141 4.75557 20.188 4.3217C19.7597 3.88545 19.4882 3.24394 19.3864 2.34512Z",fill:"white",style:{fill:"white",fillOpacity:1}})),B_=pi({key:"isLegendDialogVisible",default:!1}),$k=k1({key:"legendFields",get:({get:e})=>{const n=e(Ga);if(!n?.properties.fields)return;const s=[];for(const h of Object.keys(n.properties.fields)){const m=parseInt(h.charAt(0));if(!Number.isInteger(m))continue;const _=s.find(C=>C.index===m),i=h.toLowerCase().includes("legendheading"),I=h.toLowerCase().includes("legendcontent");if(_)i?_.heading=n.properties.fields[h].value:I&&(_.content=n.properties.fields[h].value);else{const C={index:m,heading:i?n.properties.fields[h].value:null,content:I?n.properties.fields[h].value:null};s.push(C)}}return s.sort((h,m)=>h.index-m.index)}}),A4=pi({key:"initialVenueName",default:null});C4.propTypes={categories:ft.array,onSetSize:ft.func,isOpen:ft.bool,isSheetExpanded:ft.bool,onOpenChat:ft.func};function C4({onSetSize:e,isOpen:n,isSheetExpanded:s,onOpenChat:l}){const h=fn(kc),{t:m}=oo(),_=ve.useRef(),i=ve.useRef(),I=ve.useRef(),C=ve.useRef(),S=ve.useRef(),L=100,[R,U]=fr(R_),W=fn(ng),le=fn(oa),pe=fn(Vk),[ie,Y]=ve.useState(!1),[q,ue]=fr(I4),[me,ne]=ve.useState(),De=fn(as),Me=fn(bd),Ee=bi(Jp),ge=bi(Qa),Re=bi(ag),[Oe,Ne]=fr(Ya),tt=fn(ih),dt=Xo(),Nt=fn(Ga),[re,_e]=ve.useState(!1),D=fn(M4),{setInitialMessage:P}=Rk(),{enabled:K}=Uk(),H=ec(),Q=bi(B_),[de,we]=ve.useState(!1),he=fn($k),Ie=fn(j_),je=fn(wd),Fe=fn(A4),[Ue,He]=ve.useState(!1),[it,ct]=ve.useState(!1),Et=ve.useRef(!1),gt=ve.useRef([]),[zt,Wt]=ve.useState([]),[kt,on]=ve.useState(!1);function sn(){gt.current.length===0?(ue(null),U([]),Ee([]),He(!0),C.current?.getValue()?.trim()?C.current.triggerSearch():C.current&&(Et.current=!0,C.current.clear()),gt.current.pop()):(gt.current.pop(),ue(gt.current[0]))}function rn(et){gt.current.includes(et)||gt.current.push(et),q&&(ue([]),U([]),Ee([])),ue(et),window.mapsindoors.services.LocationsService.getLocations({categories:et,venue:Ie?void 0:je.find(Ct=>Ct.name.toLowerCase()===Oe.toLowerCase())?.name}).then(Ct=>Mn(Ct,!0))}function Nn(et){typeof e=="function"&&e(et)}function Hn(et){return q?[...et].sort((Ct,Xt)=>(Ct.properties?.name||"").localeCompare(Xt.properties?.name||"",void 0,{numeric:!0})):et}function Mn(et,Ct=!1){const Xt=et.slice(0,L);(!(R.length>0)||Xt.length===0)&&Nn(th.MAX),U(Xt),Ee(Xt),Y(Xt.length===0),et&&Ct&&an(et),H&&_.current?.addEventListener("transitionend",()=>{i?.current?.updateScrollButtons()},{once:!0})}function an(et){if(!De.goTo)return;const Ct=De.getFloor(),Xt={type:"FeatureCollection",features:et.filter(un=>parseInt(un.properties.floor,10)===parseInt(Ct,10)).filter(un=>un.properties.venueId.toLowerCase()===Oe.toLowerCase()).map(un=>({type:"Feature",geometry:un.geometry,properties:un.properties}))};Xt.features.length>0&&Promise.all([Yn(),yi()]).then(([un,_n])=>{De.goTo(Xt,{maxZoom:22,padding:{bottom:un,left:_n,top:0,right:0}})})}function pt(){if(C.current&&Ue){const et=C.current.getValue(),Ct=et?et.length:0;ct(Ct>5)}else ct(!1)}function Ft(){U([]),Y(!1),ct(!1),Et.current||De?.highlight?.([]),Et.current=!1,q&&rn(q),Ee([]),wr(S.current)||S.current.clearInputField()}function Tn(){C.current.getInputField(),He(!0),pt()}function On(){C.current.getInputField();const et=_.current.closest(".sheet");et?et.addEventListener("transitionend",()=>{C.current.focusInput(),He(!0),pt()},{once:!0}):(C.current.focusInput(),He(!0),pt())}function mn(et){ne(et)}function ti(et){et.properties.venueId.toLowerCase()!==Oe.toLowerCase()&&(Ne(et.properties.venueId),Re(!0));const Ct=De.getFloor(),Xt=et.properties.floor;Xt!==Ct?(De.once("floor_changed",()=>{const un=De.getMap();if(Me===so.Mapbox)un.once("idle",()=>ge(et));else if(Me===so.Google){const _n=un.addListener("idle",()=>{_n.remove(),ge(et)})}}),De.setFloor(Xt)):ge(et),Promise.all([Yn(),yi()]).then(([un,_n])=>{De.goTo(et,{maxZoom:22,padding:{bottom:un,left:_n,top:0,right:0}})})}function Yn(){return new Promise(et=>{dt?Nt?tg().then(Ct=>et(Ct)):et(0):et(200)})}function yi(){return new Promise(et=>{dt?Nt?et(0):Lc().then(Ct=>et(Ct)):et(0)})}function Jn(){if(R.length>0&&dt)return{display:"flex",flexDirection:"column",maxHeight:document.querySelector(".mapsindoors-map").clientHeight*.8+"px",overflow:"auto"}}function It(){return H&&kt}return ve.useEffect(()=>{const et=[".mi-floor-selector",".view-mode-switch",".mi-my-position",".view-selector__toggle-button",".building-list",".mapboxgl-ctrl-bottom-right",".gmnoprint",".language-selector-portal"],Ct=Xt=>{const un=_.current,_n=!!(un&&(un.contains(Xt.target)||typeof Xt.composedPath=="function"&&Xt.composedPath().includes(un))),Ln=et.some(Pn=>Xt.target.closest(Pn));!_n&&!Ln&&(He(!1),ct(!1),ue(null),U([]),Ee([]),gt.current=[])};return n?I.current=requestAnimationFrame(()=>{document.addEventListener("click",Ct)}):document.removeEventListener("click",Ct),()=>{document.removeEventListener("click",Ct),I.current&&cancelAnimationFrame(I.current)}},[n]),ve.useEffect(()=>()=>{ne()},[]),ve.useEffect(()=>{n&&!q&&(U([]),Ee([]),Y(!1),gt.current=[])},[n,q]),ve.useEffect(()=>{q&&Oe!==Fe&&(U([]),ue(null))},[Oe]),ve.useEffect(()=>{q&&window.mapsindoors.services.LocationsService.once("update_completed",()=>{C.current.triggerSearch()})},[tt]),ve.useEffect(()=>(De?.on("mouseenter",mn),()=>{De?.off("mouseenter",mn)}),[De]),ve.useEffect(()=>{if(n&&H&&R.length>0){const et=document.querySelector(".mapsindoors-map .search__results");i.current.scrollContainerElementRef=et}},[R,n]),ve.useEffect(()=>{if(pe){const et=Ct=>{Ct.target.closest("mi-keyboard")||Ct.target.tagName.toUpperCase()==="MI-SEARCH"||Ct.target.tagName.toUpperCase()==="INPUT"?_e(!0):_e(!1)};return window.addEventListener("click",et,!1),()=>{window.removeEventListener("click",et,!1)}}},[pe]),ve.useEffect(()=>{q&&rn(q)},[q]),ve.useEffect(()=>{Nt&&we(he.length>0)},[Nt]),ve.useEffect(()=>{const et=W.find(([Ct])=>Ct===q)?.[1]?.childKeys||[];Wt(et)},[W,q]),ve.useEffect(()=>{on(h?.appSettings?.areHorizontalCategoriesEnabled===!0||h?.appSettings?.areHorizontalCategoriesEnabled==="true")},[h]),ve.useEffect(()=>{n&&(Y(!1),He(!1),ct(!1),U([]),C.current&&(Et.current=!0,C.current.clear()))},[n,U]),ve.useEffect(()=>{if(!K||!D||!Ue||!it)return;const et=Ct=>{if(Ct.key==="Enter"&&l){Ct.preventDefault();const Xt=(Ct.target?.value||D?.value||"").trim();Xt&&(P(Xt),C.current&&(Et.current=!0,C.current.clear()),l())}};return D.addEventListener("keydown",et),()=>{D&&D.removeEventListener("keydown",et)}},[K,D,Ue,it,l,P]),Le.jsxs("div",{className:"search",ref:_,style:Jn(),children:[Le.jsxs("div",{className:"search__info",style:{gridTemplateColumns:H&&de?"min-content 1fr min-content":"1fr min-content"},children:[H&&de&&Le.jsx("button",{className:"search__legend",onClick:()=>Q(!0),"aria-label":m("Show legend"),children:Le.jsx(ine,{})}),Le.jsxs("label",{className:"search__label",children:[Le.jsx("span",{children:m("Search by name, category, building...")}),Le.jsx(P_,{ref:C,mapsindoors:!0,placeholder:m("Search by name, category, building..."),results:et=>Mn(et),clicked:()=>On(),inputFocused:()=>Tn(),cleared:()=>Ft(),changed:()=>pt(),category:q,disabled:!n})]})]}),K&&Ue&&it&&Le.jsxs("button",{className:"search__ask-ai-button",style:{"--ask-ai-button-primary-color":le},onClick:et=>{if(et.stopPropagation(),l){const Ct=(D?.value||C.current?.getValue()||"").trim();Ct&&(P(Ct),C.current&&(Et.current=!0,C.current.clear()),l())}},type:"button","aria-label":m("Ask with AI"),title:m("Ask with AI"),children:[Le.jsx(rne,{}),m("Ask with AI")]}),(It()||Ue||s)&&!ie&&W.length>0&&R.length===0&&Le.jsx(T4,{onSetSize:e,searchFieldRef:C,getFilteredLocations:et=>rn(et),isOpen:!!q,topLevelCategory:!0,categoryOrientation:kt?"horizontal":"vertical"}),!it&&ie&&Le.jsxs("p",{className:"search__error",children:[" ",m("Nothing was found")]}),R.length>0&&Le.jsxs("div",{className:`search__results prevent-scroll${H?" search__results--kiosk":""}`,children:[q&&Le.jsx(T4,{handleBack:sn,getFilteredLocations:et=>rn(et),onLocationClicked:ti,childKeys:zt,topLevelCategory:!1,selectedCategoriesArray:gt,categoryOrientation:kt?"horizontal":"vertical"}),Hn(R).map(et=>Le.jsx(kg,{location:et,locationClicked:()=>ti(et),isHovered:et?.id===me?.id},et.id))]}),re&&dt&&Le.jsx(Hk,{ref:S,searchInputElement:D}),n&&H&&R.length>0&&os.createPortal(Le.jsx("div",{className:"search__scroll-buttons",children:Le.jsx("mi-scroll-buttons",{ref:i})}),document.querySelector(".mapsindoors-map"))]})}const one=(e,n)=>{const[s,l]=ve.useState(void 0),[h,m]=ve.useState(void 0);return ve.useEffect(()=>{const _=(i=!1)=>{const I=n.current?.scrollHeight>n.current?.clientHeight;l(I),i===!0&&m(I)};_(!0),n.current&&new ResizeObserver(_).observe(n.current)},[e,n]),[s,h]},Zk=(e,n,s,l,h)=>{const[m,_]=ve.useState(),[i,I]=ve.useState(),[C,S]=fr(Ng),L=bi(Bd),[R,U]=ve.useState(),W=fn(k_);return ve.useEffect(()=>{U(!1);let le=!0;return e?.geometry&&n?.geometry&&s.getRoute({origin:z_(e),destination:z_(n),travelMode:l,avoidStairs:h,excludeHighwayTypes:W?[]:["busway"]}).then(pe=>{if(le)if(pe&&pe.legs){const ie=pe.legs.reduce((q,ue)=>q+ue.distance.value,0),Y=pe.legs.reduce((q,ue)=>q+ue.duration.value,0);_(ie),I(Y),L({originLocation:e,destinationLocation:n,totalDistance:ie,totalTime:Y,directionsResult:pe}),S(!0),U(!0)}else S(!1)},()=>{le&&S(!1)}),()=>{le=!1}},[e,n,s,h,l,W]),[m,i,C,R]},sne=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M12 7.75V12L14.75 14.75M21.25 12C21.25 17.1086 17.1086 21.25 12 21.25C6.89137 21.25 2.75 17.1086 2.75 12C2.75 6.89137 6.89137 2.75 12 2.75C17.1086 2.75 21.25 6.89137 21.25 12Z",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4500 0.4500 0.4500)",strokeOpacity:1},strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),ane=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M8 10L11.6464 13.6464C11.8417 13.8417 12.1583 13.8417 12.3536 13.6464L16 10",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4500 0.4500 0.4500)",strokeOpacity:1},strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),lne=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M16 14L12.3536 10.3536C12.1583 10.1583 11.8417 10.1583 11.6464 10.3536L8 14",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4500 0.4500 0.4500)",strokeOpacity:1},strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));Wk.propTypes={openingHours:ft.object,isMondayFirstDayOfTheWeek:ft.bool,onExpand:ft.func};function Wk({openingHours:e,isMondayFirstDayOfTheWeek:n=!0,onExpand:s}){const{t:l}=oo(),[h,m]=ve.useState(!1),i=fn(ih)??navigator.language,I=ve.useMemo(()=>new Date(2020,0,1,13).toLocaleTimeString(i).match(/AM|PM/)!==null,[i]),C=new Date().getDay(),S=ve.useMemo(()=>{const ue=[];for(let me=0;me<7;me++)ue.push(new Date(2024,0,me+1));if(!n){const me=ue.pop();ue.unshift(me)}return ue},[n]),L=ve.useMemo(()=>n?C===0?6:C-1:C,[C,n]),{standardOpeningHours:R}=e||{},U=ue=>{const[me,ne]=ue.split(":");return new Date(0,0,0,me,ne).toLocaleTimeString(i,{hour:"2-digit",minute:"2-digit",hour12:I})},W=ue=>{const me=ue.toLocaleString("en-US",{weekday:"long"}).toLowerCase(),ne=R?.[me];return!ne?.startTime||!ne?.endTime||ne.closedAllDay?{text:l("Closed"),isClosed:!0}:{text:`${U(ne.startTime)} - ${U(ne.endTime)}`,isClosed:!1}},le=ve.useCallback(ue=>{if(!ue||ue.closedAllDay||!ue.startTime||!ue.endTime)return!1;const me=new Date,ne=me.getHours()*60+me.getMinutes(),[De,Me]=ue.startTime.split(":"),[Ee,ge]=ue.endTime.split(":"),Re=parseInt(De,10)*60+parseInt(Me,10),Oe=parseInt(Ee,10)*60+parseInt(ge,10);return ne>=Re&&ne<=Oe},[]),ie=ve.useCallback(()=>{const ue=S[L].toLocaleString("en-US",{weekday:"long"}).toLowerCase();return le(R?.[ue])?"Open":"Closed"},[R,S,L,le,l])(),Y=ue=>ue.charAt(0).toUpperCase()+ue.slice(1),q=()=>{m(ue=>!ue)};return ve.useEffect(()=>{h&&typeof s=="function"&&s()},[h,s]),Le.jsxs("div",{className:"opening-hours",children:[Le.jsxs("button",{className:"contact-action-button contact-action-button--opening-hours",onClick:q,"aria-label":l(h?"Collapse opening hours":"Expand opening hours"),"aria-expanded":h,children:[Le.jsx("div",{className:"contact-action-button__icon-wrapper",children:Le.jsx(sne,{})}),Le.jsx("div",{className:"contact-action-button__text",children:W(S[L]).text}),Le.jsx("span",{className:`contact-action-button--opening-hours__status contact-action-button--opening-hours__status--${ie.toLowerCase()}`,children:l(ie)}),h?Le.jsx(lne,{}):Le.jsx(ane,{})]}),h&&Le.jsx("ul",{className:"opening-hours__list",children:S.map(ue=>{const me=W(ue);return Le.jsxs("li",{className:"opening-hours__list-item",children:[Le.jsx("span",{className:"opening-hours__day",children:Y(ue.toLocaleString(i,{weekday:"long"}))}),Le.jsx("span",{className:`opening-hours__hours ${me.isClosed?"opening-hours__hours--closed":""}`,children:me.text})]},ue)})})]})}const cne=ve.memo(Wk);function D4(e,n,s){return(n=(function(l){var h=(function(m,_){if(typeof m!="object"||!m)return m;var i=m[Symbol.toPrimitive];if(i!==void 0){var I=i.call(m,_);if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return(_==="string"?String:Number)(m)})(l,"string");return typeof h=="symbol"?h:h+""})(n))in e?Object.defineProperty(e,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[n]=s,e}var S4={click:"onClick",focusin:"onFocus",focusout:"onFocus",mousedown:"onMouseDown",mouseup:"onMouseUp",touchstart:"onTouchStart",touchend:"onTouchEnd"},qk=function(e){var n=e.children,s=e.onClickAway,l=e.focusEvent,h=l===void 0?"focusin":l,m=e.mouseEvent,_=m===void 0?"click":m,i=e.touchEvent,I=i===void 0?"touchend":i,C=ve.useRef(null),S=ve.useRef(null),L=ve.useRef(!1);ve.useEffect((function(){return setTimeout((function(){L.current=!0}),0),function(){L.current=!1}}),[]);var R=function(pe){return function(ie){S.current=ie.target;var Y=n?.props[pe];Y&&Y(ie)}};ve.useEffect((function(){var pe,ie,Y=(pe=(ie=C.current)===null||ie===void 0?void 0:ie.ownerDocument)!==null&&pe!==void 0?pe:document,q=function(ue){L.current&&(C.current&&C.current.contains(ue.target)||S.current===ue.target||!Y.contains(ue.target)||s(ue))};return Y.addEventListener(_,q),Y.addEventListener(I,q),Y.addEventListener(h,q),function(){Y.removeEventListener(_,q),Y.removeEventListener(I,q),Y.removeEventListener(h,q)}}),[h,_,s,I]);var U=S4[_],W=S4[I],le=S4[h];return ve.Children.only(ve.cloneElement(n,D4(D4(D4({ref:function(pe){C.current=pe;var ie=n.ref;typeof ie=="function"?ie(pe):ie&&(ie.current=pe)}},le,R(le)),U,R(U)),W,R(W))))};qk.displayName="ClickAwayListener";const E4=pi({key:"searchExternalLocations",default:!0}),Kk=k1({key:"baseLink",get:({get:e})=>{const n=e(OM),s=e(Qy),l=e(Hy),h=e(oa),m=e(ih),_=e(j_),i=e(E4),I=e(YM),C=window.location.origin+window.location.pathname.replace(/\/$/,""),S=new URLSearchParams(window.location.search),L=new URLSearchParams;return[["gmApiKey",n],["mapboxAccessToken",s],["apiKey",l],["primaryColor",h],["language",m],["searchAllVenues",_],["searchExternalLocations",i],["logo",I]].forEach(([R,U])=>{if(S.has(R)){const W=S.get(R);L.append(R,W)}else U&&(U===h?L.append(R,h.replace("#","")):L.append(R,U))}),`${C}?${L.toString()}`}}),une=e=>jn.createElement("svg",{width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.8484 4.66738C13.3129 3.20291 15.6872 3.20291 17.1517 4.66737L19.909 7.42474C21.3735 8.8892 21.3735 11.2636 19.909 12.7281L18.2804 14.3568C17.9875 14.6497 17.5126 14.6497 17.2197 14.3568C16.9268 14.0639 16.9268 13.589 17.2197 13.2961L18.8484 11.6674C19.7271 10.7887 19.7271 9.36407 18.8484 8.4854L16.091 5.72803C15.2123 4.84936 13.7877 4.84936 12.909 5.72804L11.2804 7.35672C10.9875 7.64961 10.5126 7.64961 10.2197 7.35672C9.92681 7.06382 9.92681 6.58895 10.2197 6.29606L11.8484 4.66738ZM15.5304 9.04606C15.8233 9.33895 15.8233 9.81382 15.5304 10.1067L9.53036 16.1068C9.23747 16.3997 8.7626 16.3997 8.4697 16.1068C8.17681 15.8139 8.17681 15.339 8.4697 15.0461L14.4697 9.04606C14.7626 8.75316 15.2375 8.75316 15.5304 9.04606ZM6.78036 10.7961C7.07326 11.089 7.07326 11.5639 6.78036 11.8568L5.15169 13.4854C4.27301 14.3641 4.27301 15.7887 5.15169 16.6674L7.90905 19.4248C8.78773 20.3035 10.2123 20.3035 11.091 19.4248L12.7197 17.7961C13.0126 17.5032 13.4875 17.5032 13.7804 17.7961C14.0733 18.089 14.0733 18.5639 13.7804 18.8568L12.1517 20.4854C10.6872 21.9499 8.31285 21.9499 6.84839 20.4854L4.09102 17.7281C2.62656 16.2636 2.62656 13.8893 4.09103 12.4248L5.7197 10.7961C6.0126 10.5032 6.48747 10.5032 6.78036 10.7961Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}})),Xk=e=>jn.createElement("svg",{width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 7.32635C3 5.25529 4.67893 3.57635 6.75 3.57635H7.25C9.32107 3.57635 11 5.25529 11 7.32635V7.82635C11 9.89742 9.32107 11.5764 7.25 11.5764H6.75C4.67893 11.5764 3 9.89742 3 7.82635V7.32635ZM6.75 5.07635C5.50736 5.07635 4.5 6.08371 4.5 7.32635V7.82635C4.5 9.06899 5.50736 10.0764 6.75 10.0764H7.25C8.49264 10.0764 9.5 9.06899 9.5 7.82635V7.32635C9.5 6.08371 8.49264 5.07635 7.25 5.07635H6.75ZM13 7.32635C13 5.25529 14.6789 3.57635 16.75 3.57635H17.25C19.3211 3.57635 21 5.25529 21 7.32635V7.82635C21 9.89742 19.3211 11.5764 17.25 11.5764H16.75C14.6789 11.5764 13 9.89742 13 7.82635V7.32635ZM16.75 5.07635C15.5074 5.07635 14.5 6.08371 14.5 7.32635V7.82635C14.5 9.06899 15.5074 10.0764 16.75 10.0764H17.25C18.4926 10.0764 19.5 9.06899 19.5 7.82635V7.32635C19.5 6.08371 18.4926 5.07635 17.25 5.07635H16.75ZM3 17.3264C3 15.2553 4.67893 13.5764 6.75 13.5764H7.25C9.32107 13.5764 11 15.2553 11 17.3264V17.8264C11 19.8975 9.32107 21.5764 7.25 21.5764H6.75C4.67893 21.5764 3 19.8975 3 17.8264V17.3264ZM6.75 15.0764C5.50736 15.0764 4.5 16.0838 4.5 17.3264V17.8264C4.5 19.069 5.50736 20.0764 6.75 20.0764H7.25C8.49264 20.0764 9.5 19.069 9.5 17.8264V17.3264C9.5 16.0838 8.49264 15.0764 7.25 15.0764H6.75Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),jn.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.75 13.5764C14.1642 13.5764 14.5 13.9122 14.5 14.3264V16.0764H16.25C16.6642 16.0764 17 16.4122 17 16.8264C17 17.2406 16.6642 17.5764 16.25 17.5764H13.75C13.3358 17.5764 13 17.2406 13 16.8264V14.3264C13 13.9122 13.3358 13.5764 13.75 13.5764ZM17 14.3264C17 13.9122 17.3358 13.5764 17.75 13.5764H20.25C20.6642 13.5764 21 13.9122 21 14.3264C21 14.7406 20.6642 15.0764 20.25 15.0764H17.75C17.3358 15.0764 17 14.7406 17 14.3264ZM17 18.3264C17 17.9122 17.3358 17.5764 17.75 17.5764H20.25C20.6642 17.5764 21 17.9122 21 18.3264C21 18.7406 20.6642 19.0764 20.25 19.0764H18.5V20.8264C18.5 21.2406 18.1642 21.5764 17.75 21.5764C17.3358 21.5764 17 21.2406 17 20.8264V18.3264Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),jn.createElement("path",{d:"M13 20.5764C13 20.0241 13.4477 19.5764 14 19.5764C14.5523 19.5764 15 20.0241 15 20.5764C15 21.1287 14.5523 21.5764 14 21.5764C13.4477 21.5764 13 21.1287 13 20.5764Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),jn.createElement("path",{d:"M5.5 17.0764C5.5 16.5241 5.94772 16.0764 6.5 16.0764H7.5C8.05228 16.0764 8.5 16.5241 8.5 17.0764V18.0764C8.5 18.6287 8.05228 19.0764 7.5 19.0764H6.5C5.94772 19.0764 5.5 18.6287 5.5 18.0764V17.0764Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),jn.createElement("path",{d:"M5.5 7.07635C5.5 6.52407 5.94772 6.07635 6.5 6.07635H7.5C8.05228 6.07635 8.5 6.52407 8.5 7.07635V8.07635C8.5 8.62863 8.05228 9.07635 7.5 9.07635H6.5C5.94772 9.07635 5.5 8.62863 5.5 8.07635V7.07635Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),jn.createElement("path",{d:"M15.5 7.07635C15.5 6.52407 15.9477 6.07635 16.5 6.07635H17.5C18.0523 6.07635 18.5 6.52407 18.5 7.07635V8.07635C18.5 8.62863 18.0523 9.07635 17.5 9.07635H16.5C15.9477 9.07635 15.5 8.62863 15.5 8.07635V7.07635Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}})),hne=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M8 6L12 2L16 6",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4510 0.4510 0.4510)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jn.createElement("path",{d:"M12 3V13",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4510 0.4510 0.4510)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jn.createElement("path",{d:"M17 10C18.1046 10 19 10.8954 19 12V18C19 19.1046 18.1046 20 17 20H7C5.89543 20 5 19.1046 5 18V12C5 10.8954 5.89543 10 7 10",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4510 0.4510 0.4510)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),F_=pi({key:"qrCodeLink",default:null}),Jk=pi({key:"supportsUrlParameters",default:!1});ez.propTypes={location:ft.object.isRequired,buttonClassName:ft.string};function ez({location:e,buttonClassName:n}){const{t:s}=oo(),[l,h]=ve.useState(!1),m=fn(Kk),[_,i]=ve.useState(),I=fn(Jk),[C,S]=ve.useState(!1),[L,R]=ve.useState(!1),U=fn(Ga),W=bi(F_),le=Xo();ve.useEffect(()=>{m&&e&&i(m+"&locationId="+e.id)},[m,e]),ve.useEffect(()=>{S(!U&&I&&le);const Y=typeof navigator.clipboard?.writeText=="function";R(!U&&I&&Y)},[I,U,le]);const pe=()=>{navigator.clipboard.writeText(_),h(!1)},ie=()=>{W(_),h(!1)};return(C||L)&&Le.jsxs("div",{className:"share-location-link",children:[Le.jsx("button",{className:n,onClick:()=>h(Y=>!Y),title:s("Share"),"aria-label":s("Share"),children:Le.jsx(hne,{})}),l&&Le.jsx(qk,{onClickAway:()=>h(!1),children:Le.jsxs("ul",{children:[L&&Le.jsx("li",{children:Le.jsxs("button",{className:n,onClick:()=>pe(),children:[Le.jsx(une,{}),s("Copy link")]})}),C&&Le.jsx("li",{children:Le.jsxs("button",{className:n,onClick:()=>ie(),children:[Le.jsx(Xk,{}),s("QR Code")]})})]})})]})}const tz={email:"email",phone:"phone"};nz.propTypes={detailType:ft.string,active:ft.bool,displayText:ft.string,value:ft.string,icon:ft.string};function nz({detailType:e,active:n,displayText:s,value:l,icon:h}){if(!n||e.toLowerCase()==="openinghours")return null;const m=s?.trim()?s:l,_=(i,I)=>{switch(i.toLowerCase()){case tz.email:return`mailto:${I}`;case tz.phone:return`tel:${I}`;default:try{return new URL(I),I}catch{return"#"}}};return Le.jsxs("a",{className:"contact-action-button",href:_(e,l),target:e.toLowerCase()==="email"||e.toLowerCase()==="phone"?"_self":"_blank",rel:"noopener noreferrer",children:[Le.jsx("div",{className:"contact-action-button__icon-wrapper",children:Le.jsx("img",{alt:"",src:h,className:"contact-action-button__icon"})}),Le.jsx("span",{className:"contact-action-button__text",children:m})]})}N4.propTypes={onBack:ft.func,onStartWayfinding:ft.func,onSetSize:ft.func,onStartDirections:ft.func,isOpen:ft.bool};function N4({onBack:e,onStartWayfinding:n,onSetSize:s,onStartDirections:l,isOpen:h}){const{t:m}=oo(),_=ve.useRef(null),i=ve.useRef(null),I=ve.useRef(null),C=ve.useRef(null),S=ve.useRef(null),[L,R]=ve.useState(!1),[U,W]=ve.useState(!1),[le,pe]=ve.useState(!1),ie=ve.useRef(!1),[Y,q]=ve.useState(null),ue=fn(as),me=fn(Qa),ne=me?.properties?.additionalDetails,De=ne?.find(zt=>zt.key.toLowerCase().includes("openinghours")&&zt.active===!0)?.openingHours,[Me,Ee]=one(me,I),ge=fn(oa),Re=fn(Ga),Oe=fn(Vy),[Ne,tt]=ve.useState(),[dt,Nt]=ve.useState(),[re,_e]=ve.useState(!0),D=Xo(),P=fn(Fd),K=fn(Ud),[,,H]=Zk(dt,Ne,Oe,P,K),Q=fn(O_),de=Yk(ue,h),he=fn(kc)?.appSettings?.excludeFromUI?.includes("wayfindingDisabled");ve.useEffect(()=>{(()=>{if(ue&&me)try{const Wt=ue.getBuilding();if(Wt&&Wt.floors){const kt=Object.keys(Wt.floors).length;_e(kt>1)}else _e(!1)}catch{_e(!0)}})()},[ue,me]),ve.useEffect(()=>()=>{q(null),tt(),Nt()},[]);const Ie=ve.useCallback(()=>{R(!1),W(!1),pe(!1),e()});function je(zt){typeof s=="function"&&s(zt)}function Fe(){L===!1?(Ue(),je(th.MAX)):He()}function Ue(){requestAnimationFrame(()=>{R(!0),it(),ie.current=!0})}function He(){R(!1),ct(),ie.current=!1}function it(){const zt=requestAnimationFrame(()=>{i.current&&(W(i.current.scrollTop>0),pe(i.current.scrollTop<i.current.scrollHeight-i.current.offsetHeight-1))});return()=>cancelAnimationFrame(zt)}function ct(){W(!1),pe(!1)}function Et(){R(!1),W(!1),pe(!1),n()}function gt(){R(!1),W(!1),pe(!1),l()}return ve.useEffect(()=>{de&&e()},[de]),ve.useEffect(()=>()=>{q(null),tt(),Nt()},[]),ve.useEffect(()=>{R(!1),W(!1),pe(!1),q(null),me&&(_.current&&(_.current.location=me),q(ue.getDisplayRule(me)),tt(me)),Re&&Nt(Re)},[me,ue,Re]),ve.useLayoutEffect(()=>{const zt=document.querySelector(".modal.modal--open");if(!zt||!C?.current||!i?.current)return;const Wt=()=>{const kt=zt.offsetHeight,on=i.current.offsetHeight;kt>0&&on>0&&(on/kt>.9?(zt.style.height="100%",it()):zt.style.height="auto")};return S.current?S.current.complete?Wt():(S.current.onload=Wt,S.current.onerror=Wt):Wt(),()=>{zt.style.height="",S.current&&(S.current.onload=null,S.current.onerror=null)}},[me,L,h,ne]),Le.jsx("div",{className:`location-details ${ie.current===!0?"location-details--max-height":""} ${U?"location-details--content-above":""} ${le?"location-details--content-below":""}`,children:me&&Le.jsxs(Le.Fragment,{children:[Le.jsxs("div",{className:"location-details__header",children:[Le.jsxs("div",{className:"location-info",children:[Le.jsx("div",{className:"location-info__icon",children:Y&&Le.jsx("img",{alt:"",src:Y.icon.src?Y.icon.src:Y.icon})}),Le.jsxs("div",{className:"location-info__content",children:[Le.jsx("div",{className:"location-info__name",children:me.properties.name}),Le.jsx("mi-location-info",{level:m("Level"),ref:_,"show-external-id":Q,"show-floor":re})]}),Le.jsxs("div",{className:"location-info__actions",children:[Le.jsx(ez,{buttonClassName:"location-info__button",location:me}),Le.jsx("button",{className:"location-info__button",onClick:()=>Ie(),"aria-label":m("Close"),children:Le.jsx(Td,{})})]})]}),!he&&(Re&&D?Le.jsx("button",{disabled:!H,onClick:()=>gt(),className:`location-details__wayfinding ${H?"":"location-details--no-route"}`,style:{background:ge},children:m(H?"Start directions":"Directions not available")}):Le.jsx("button",{onClick:()=>Et(),style:{background:ge},className:"location-details__wayfinding",children:m("Start wayfinding")}))]}),Le.jsx("div",{className:"location-details__details prevent-scroll",ref:C,children:Le.jsxs("div",{ref:i,onScroll:zt=>it(),className:"location-details__details-content",children:[me.properties.imageURL&&Le.jsx("img",{ref:S,alt:"",src:me.properties.imageURL,className:"location-details__image"}),Object.keys(me.properties.categories).length>0&&Le.jsx("p",{className:"location-details__categories",children:Object.values(me.properties.categories).map((zt,Wt,kt)=>Le.jsxs(ve.Fragment,{children:[zt,Wt<kt.length-1&&Le.jsx(Le.Fragment,{children:"・"})]},zt))}),me.properties.description&&Le.jsxs("section",{className:`location-details__description ${L?"location-details__description--full":""}`,children:[Le.jsx("div",{ref:I,children:me.properties.description}),(Me||Ee||L)&&Le.jsx("button",{onClick:()=>Fe(),children:m(L?"Close":"Read full description")})]}),ne&&Le.jsxs("div",{className:"contact-action-buttons-container",children:[ne.map(zt=>Le.jsx(nz,{detailType:zt.detailType,active:zt.active,displayText:zt.displayText,value:zt.value,icon:zt.icon},zt.key)),De&&Le.jsx(cne,{openingHours:De,onExpand:()=>it()})]})]})})]})})}L4.propTypes={onLocationClick:ft.func.isRequired,onBack:ft.func.isRequired,locations:ft.arrayOf(ft.object),onSetSize:ft.func};function L4({onBack:e,onLocationClick:n,locations:s,onSetSize:l}){const{t:h}=oo();function m(_){typeof l=="function"&&l(_)}return ve.useEffect(()=>{m(th.FIT)},[]),Le.jsxs("div",{className:"locations-list",children:[Le.jsxs("div",{className:"locations-list__header",children:[Le.jsxs("div",{className:"locations-list__title",children:[s?.length," ",h("Locations")]}),Le.jsx("button",{className:"locations-list__close",onClick:()=>e(),"aria-label":h("Close"),children:Le.jsx(Td,{})})]}),Le.jsx("div",{className:"locations-list__scrollable prevent-scroll",children:Le.jsx("div",{className:"locations-list__list",children:s?.map(_=>Le.jsx(kg,{location:_,locationClicked:i=>n(i)},_.id))})})]})}const dne=e=>jn.createElement("svg",{width:16,height:17,viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("g",{clipPath:"url(#clip0_1663_3931)"},jn.createElement("path",{d:"M8 0.5C6.41775 0.5 4.87104 0.969192 3.55544 1.84824C2.23985 2.72729 1.21447 3.97672 0.608967 5.43853C0.00346629 6.90034 -0.15496 8.50887 0.153721 10.0607C0.462403 11.6126 1.22433 13.038 2.34315 14.1569C3.46197 15.2757 4.88743 16.0376 6.43928 16.3463C7.99113 16.655 9.59966 16.4965 11.0615 15.891C12.5233 15.2855 13.7727 14.2602 14.6518 12.9446C15.5308 11.629 16 10.0823 16 8.5C16 6.37827 15.1571 4.34344 13.6569 2.84315C12.1566 1.34285 10.1217 0.5 8 0.5ZM11.4667 11.98C11.4074 12.0452 11.3358 12.098 11.2559 12.1353C11.1761 12.1726 11.0897 12.1937 11.0017 12.1974C10.9136 12.2012 10.8258 12.1874 10.7431 12.1569C10.6604 12.1265 10.5846 12.0799 10.52 12.02L7.18667 8.99333C7.12364 8.92813 7.07457 8.85074 7.04247 8.76591C7.01038 8.68109 6.99592 8.5906 7 8.5V4.83333C7 4.65652 7.07024 4.48695 7.19527 4.36193C7.32029 4.23691 7.48986 4.16667 7.66667 4.16667C7.84348 4.16667 8.01305 4.23691 8.13807 4.36193C8.2631 4.48695 8.33334 4.65652 8.33334 4.83333V8.20667L11.42 11.04C11.5506 11.1586 11.6288 11.3242 11.6375 11.5004C11.6463 11.6765 11.5848 11.849 11.4667 11.98Z",fill:"#707070"})),jn.createElement("defs",null,jn.createElement("clipPath",{id:"clip0_1663_3931"},jn.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0 0.5)"})))),iz=e=>jn.createElement("svg",{width:13,height:20,viewBox:"0 0 13 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M9.61194 2.82846C9.61194 3.93033 8.7187 4.82357 7.61683 4.82357C6.51495 4.82357 5.62171 3.93033 5.62171 2.82846C5.62171 1.72659 6.51495 0.833344 7.61683 0.833344C8.7187 0.833344 9.61194 1.72659 9.61194 2.82846Z",fill:"#4B5563"}),jn.createElement("path",{d:"M3.85618 7.89573L2.70342 8.26942C2.51461 8.33063 2.38005 8.49797 2.36081 8.69552L2.15675 10.7898C2.10483 11.3227 1.64157 11.7195 1.10705 11.6891C0.529883 11.6562 0.101401 11.1412 0.174055 10.5677L0.562276 7.5031C0.609594 7.12957 0.863193 6.8145 1.21798 6.68846L5.43314 5.19101C5.91287 4.94642 6.49458 4.90944 7.02868 5.14168C7.58278 5.38261 7.96247 5.86074 8.09808 6.40693C8.10564 6.42543 8.11266 6.44417 8.11911 6.46314L8.13434 6.50792C8.1531 6.56308 8.17666 6.6165 8.20475 6.66755L9.12944 8.34823C9.24374 8.55597 9.4283 8.71621 9.65003 8.80021L11.6264 9.54897C12.2431 9.78262 12.4674 10.5397 12.0776 11.0716C11.8078 11.4397 11.3226 11.5778 10.8994 11.4069L8.27831 10.3486C8.07383 10.266 7.90247 10.118 7.79102 9.92774L7.36282 9.1966L6.28886 11.8906C6.2887 11.8929 6.2885 11.8952 6.28824 11.8974C6.28503 11.9259 6.28989 11.9548 6.30227 11.9807L6.30571 11.9879L9.7205 18.1483C10.0544 18.7506 9.83675 19.5096 9.23443 19.8434C8.6321 20.1773 7.87316 19.9597 7.53929 19.3574L4.94329 14.6741L2.97868 19.1924C2.70407 19.8239 1.96948 20.1133 1.33793 19.8387C0.706382 19.5641 0.417021 18.8295 0.691627 18.1979L3.26686 12.2753L3.30923 12.1729C3.31648 12.1479 3.31685 12.1215 3.3104 12.0965C2.88761 11.4405 2.77915 10.5975 3.08907 9.82005L3.85618 7.89573Z",fill:"#4B5563"})),fne=e=>jn.createElement("svg",{width:20,height:24,viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M4.48045 5.12001C4.0861 5.12526 3.70969 5.28562 3.4327 5.56636C3.15571 5.84709 3.00042 6.22562 3.00045 6.62001V16.73C3.00045 16.7963 2.97411 16.8599 2.92723 16.9068C2.88035 16.9537 2.81676 16.98 2.75045 16.98H1.48045C1.30245 16.979 1.1274 17.0255 0.973367 17.1147C0.819338 17.2039 0.691916 17.3326 0.60426 17.4876C0.516604 17.6425 0.471891 17.818 0.474737 17.996C0.477584 18.174 0.527887 18.348 0.620453 18.5L3.62045 23.5C3.709 23.6492 3.83484 23.7728 3.98563 23.8587C4.13641 23.9446 4.30694 23.9897 4.48045 23.9897C4.65397 23.9897 4.8245 23.9446 4.97528 23.8587C5.12606 23.7728 5.25191 23.6492 5.34045 23.5L8.34045 18.5C8.42797 18.3484 8.47417 18.1765 8.47444 18.0015C8.4747 17.8265 8.42903 17.6544 8.34197 17.5026C8.25491 17.3508 8.12953 17.2244 7.97834 17.1362C7.82716 17.048 7.65548 17.0011 7.48045 17H6.23045C6.19758 16.9975 6.16554 16.9885 6.13616 16.9735C6.10679 16.9586 6.08066 16.938 6.05928 16.9129C6.03791 16.8878 6.0217 16.8587 6.01161 16.8273C6.00151 16.7959 5.99772 16.7629 6.00045 16.73V6.62001C6.00047 6.42133 5.96102 6.22463 5.88439 6.04132C5.80776 5.85802 5.69548 5.69176 5.55407 5.55221C5.41265 5.41266 5.24493 5.30259 5.06062 5.2284C4.87632 5.1542 4.67911 5.11736 4.48045 5.12001Z",fill:"#707070"}),jn.createElement("path",{d:"M15.5203 18.84C15.9182 18.84 16.2997 18.6819 16.581 18.4006C16.8623 18.1193 17.0203 17.7378 17.0203 17.34V7.22995C17.0254 7.16717 17.0539 7.10861 17.1003 7.06597C17.1466 7.02332 17.2074 6.99975 17.2703 6.99995H18.5203C18.6968 6.99992 18.8702 6.95317 19.0228 6.86446C19.1754 6.77574 19.3018 6.64822 19.3891 6.49485C19.4765 6.34148 19.5217 6.16771 19.5201 5.99122C19.5186 5.81472 19.4704 5.64177 19.3803 5.48995L16.3803 0.48995C16.2918 0.340728 16.1659 0.217112 16.0152 0.131252C15.8644 0.0453926 15.6938 0.000244141 15.5203 0.000244141C15.3468 0.000244141 15.1763 0.0453926 15.0255 0.131252C14.8747 0.217112 14.7489 0.340728 14.6603 0.48995L11.6603 5.48995C11.5703 5.64177 11.5221 5.81472 11.5205 5.99122C11.519 6.16771 11.5642 6.34148 11.6516 6.49485C11.7389 6.64822 11.8653 6.77574 12.0179 6.86446C12.1705 6.95317 12.3438 6.99992 12.5203 6.99995H13.7703C13.8366 6.99995 13.9002 7.02629 13.9471 7.07317C13.994 7.12006 14.0203 7.18365 14.0203 7.24995V17.34C14.0203 17.7378 14.1784 18.1193 14.4597 18.4006C14.741 18.6819 15.1225 18.84 15.5203 18.84Z",fill:"#707070"}));function k4(e){const n={type:"Point",coordinates:[e.coords.longitude,e.coords.latitude]};return{id:"USER_POSITION",geometry:n,properties:{name:eE("My position"),anchor:n},type:"Feature"}}let z4;function pne(e){return new Promise((n,s)=>{z4||(z4=new window.google.maps.Geocoder),z4.geocode({placeId:e.properties.placeId},l=>{l.length>0?(e.geometry={type:"Point",coordinates:[l[0].geometry.location.lng(),l[0].geometry.location.lat()]},n(e)):s()})})}const gne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASAAAAAkCAYAAAApZeciAAARjUlEQVR4Ae2dBXTb2vL1x6GmzJehzBjbKb/YcsrMfJkZyvDS1HbgMTMzM7d9zMzMGCjaTrnxt+e7zvqPpwLLdUpLe62fnFqSZak5W3PmzFHI0/UoT7Nf2t49XJeaY8RT24xY6jXhWPJt+Pn1+Hl3KNa2dE7N8X6Ariwe19XJeHhE6k5OM6KpD4eiidMwnLQVWH/eiCc/F44mDUBXBo/r4iQ8PIxY262Icj7J5uIW7PdZ3h+QBwCBD65YW/GB5ec78H9wxf2ACg0vrmk8PCLRZHUonjri1ngUrdXRxExAHgkKfGjVusCHVqY7qPjQqgcAFRpeXLN4eOBuvdyIJs5e3MVKHcbrq7F+caTuxIjqxrZbquqOD4vUpeYh4mkMxRL/0fuE46kdgMIengHlhwc0ETRmmEvu9ZzYv4SuYnHEEoonzqjczmlONC+qSXcDZMXqmnSZEUs+g/3bXuiGpfYCYjw8A7LFwzOgqppjfWAe/84yn3iqOVzf5geUK5H9yfFIRj8NKIMH8AzIBg/PgHhoXZoPRr4SbCaAPC4dz4A8LPAMiPM5Ou+D3M7dgDwKg2dAHhZ4BoQk6Z6s6CeW+DGl0z5AHoXBMyAPCzwDQu7nJ9kGlLoH0OXmb1VV5S2RyoXNkWBtsxF8c0sk8Ea8bm8OB6ana6gIkCu+RuXnvlK88NyB0tpzB4vfjNc3nj1Ysv3soZK8Pm/qy9u7GvG2ZRj1i4fiyTcit1OH6GaR/83pUkDTG1t7ci4NgOYegDK4NqB/R4L9cd6bWyLBl/J1aDGCdU1GcPk/p07tCsgKyxVQEbgRDAIDgI/cqxzcBAaDG0ERXX0qATeDweAWUEr5qQj0Bj2AL8fj3ZxnIy8S1/UmdV07y4DKwe1gEOhzJadYwIAuZHe/TvQHdLlIrx5T1hwJ7GwO+4+gwaXNaAr7/9hiVK5OE/kA2fIRKjt7oGTnmYOlR84dLE2bU/zH84fKViM48QGyY/VH0sWojXrOqjYqFE3+xYgnZiFy/LnIoX0dUIacDejwvMpeON/XNoeDZ0yvhRFsAQ9YXQdesB7OcCMoBwvBPtAo2A2qc2ygI8BDoF59Ri1YCfoBrfHie0wlawXFdrPJWuPEdn6g1QesBjH1HevAZnALmSugrlcZmAdqxGdsBlr9wFqT48XBRnBjjoY+Xx2L2QcWZtZPKJQBCaO7x+T/8lkwycRsbxXXZzU5SF3PWeQg3MUnZDeoxN8BOTEnevJ2HrZ3AzdkQJL/VPkHtBiB71kZjwZRwNvTVVUlgEz5Gg2AwXwPpHOj+O3YpwSQGRzJoAbqK86Fl4lTMKgTl2JAR6v9d7DR5nYtAm+UJqQNqDHDeLANNNrwvM0dsBisBo0OxMAEIDVArH+arPWUanjFZK7NYrvbTAxyv8N3rLcwwtlim5HgGZN9teGNBlGH49WZ7Kevz3aHz9gKggUyoBgYA+IOx9yg/g+K1Pe8hazlA1v1/5ODAYWzu1/J7wNygosMeXs3cOEioA64O9EUCf7kosYVDqYQAfywJeL/eVPEf06vbzb8bwGkaf8udUWX6yfaZBAJpfD6w3MHin9+5iul50xM6C2ANGyYiGq+bGo20dQv8POf9bp8Dah1+vSeuBa/1+eK6/APXI8DuBa/1uvAHkASXkgDerFofBvBDDAdrAV1YrttoNzkl2k9aBQ8AkJgClgIdot1DWA0kHpWrO9lEUU0KkaaGaEwmJ3qLn2balTPAAMEM69PqM8fa2VAwgwbMvvdAx5TUeIgUKf2CYEgiChDbbA4n+5ghzLw1WAqmA42iAilpkAGVCdMcw9YCCpBFXhYXaM1QGqmWLeSrDVUbPcYILcGhNzGDwA5kJcBherapgDqAF2Jl2Q3KP8p5H+e5FwQIIYjJLz3Kt34YExLAUlgJi+RxgKzOYWu2JOcCwKUYQByQa+6yIQOlC0FJOHCyuxrkzgTrkttkUWZ1ftPDFcmlZcBId/zcnUtmvC6SEY5hw1/Jc7zX6Jbev6wUTkGUAe8kAbE7AQ3A63+YIvYbjmQmqQayDigVQpWie1qQFeLxl0JtF4EGhWrHH6xF8u7s+pizAdFJkY6VWyzB5Tq7yjYYtN9KlYRZTXw6eOp89phEtWtUV2fvkDrZrALNBbCgAQbQRnQmqCMdYzqKu4XvwvlZK6NYv8JgNx2wcLxxD8BOePegMLRE9MBMf+dN2kg7uyn/68xBS80VQcjgMxorg7uUFHSL2XjbP8CDUSkc1pEPRcQDUUAmQFj2qGioF/KfBAnnDPTTzKGkmgPxVILAWmqatIlbEL5GtCxqol9YDgnhbkm8DoCkISNGWb8Snkd8O8PAOqAFyS7HQ4hcz+Rw6gDPUUjkuY02SHsvl9sa8hGJN6/G2g9Lu6WjwsT0w12oficwTLPJN6/zyFZvMrkfLQBRR0SspPFtpscjrdBdYU71Bc0iBya3fFuAQ0FNKCn9LVVmia2fQJILRbrZgCtHsLAdoHiPJPQIHkjIDs4muFowA41ugYSYwAxyOU8ohrSmwBZwaNW3CXLjoIqxgNiMLr1SJahfKX0TYCs4M/jLpmKmMYDAhz9rFbf/d2ArJgdPTWYr2M+BtQaCW5UEd5eaTz/q5oyCDmfxpaw/7BJd/V0c9WYHoAYXpDqzztpsUmUcqPq0jiNmN1qke/xiYghqkZh+oh9XqSihuFA6nnQCPaCIos77hCy151i2/UWBrSc7HW32PZWstdwi6hulorYnLSxgAY0OofRuJ1iexmZ9RNmuMXkdyIk9guRC3HdT/bjNNoeAnSpwKi+JyMINjtAgBvWe7LNJDgNkB3opmyR+7Qa/ocBAY5o3iPNBP+eBsiWQyVb5D4wsYcBMboyHOZSBcgORIXfyseAdFTDxsoGiffn4Zw/i3Nvv3hUMHicu6atc/yjAHXwwkInT50biu7fB1z+0vtEPqhBGc188VkjLPIK/VQ+aIXYTr8vtV0lfeM21ElTlQbk4nrtcXs8HU2ovNogclagQAZUn2OJwEoduQndJdYNVf//20UXrRu5EBrMLtV9+JUesXILPyGRH1ImZsb/FlAHLYb/oGxQGAHqDcgOjJbNz05GB6KAGHS5DkozSR+g3oDsQLdrvtwHRAExMM9PZSXQaxIDANmBfd6clwGFgx9S0WAtXv8E0hpO2qMc4f7/zZ7QHZCGeOEiKtCjVfeY3M0qKTc9JvbpLd6/Xby/RLz/qEnE9LRInhepboE2MBLdR7fskgbkIm/RkOfxtoEOPSTe70POGlogA9qdqx+I400HUkNUF7RDI9RNzJVmxVI3XzQLPpZ4DFC+IILYria2vhJQhqvfgGLJT7utjUKB4psKYEAm+E+1hAPv4iS0Qx1UZqG6Mg66Uf9SqW7CNNJyHk7vKe+OIpm6Hfgy6xtMckYRE/O812aIfr/IpQRcMMHCgMaTverEdwm4QH7u/Sryc9LIAhnQi8lZ+npMMYl0nxYRVS+TEokbgWuxQeihZiPWVgnILTwyxJNZs7p19amJgDqAmbw7y0xm+2cAssWo3JbVBYsEHgLEoNv07qzu1JdLZgCyA/tsy+62lT4EiOHnXavrMQuQPalvuDUgPQKm+FOrEXyeq6IB5QIvpAHNJGdNMBlhmuAiL6KHyWMm+YEl4vMGgmnq3x26Qby/DJSKIfa1No2rAXQh93JrQNtE4yuj/LRS5WScNKuAOaDu5KxNKuLU8qtRwJ6iZOABylPVDUd78wiYGrk6hgrgEKCcwcPKjGjyb/oRrYAkbB7Z3Y7A2wBZkV69urg54v+N3Od/4eBYQAybR3YSuvhtgKxAtXQxXn+TlYQ+VDoWEBOOJzeoc3gbIAtw/U7ewV3OvAzI8K9SEc//msOVcyynixD5rKZk8EIa0OPA5yKxOgaweoj39jpUS+vRqPuB1mCZcBbdkOeA1vNiuHyUqt/RWiHWB8heXUD5JRrQGqeRQaHyDFoVLgYJfODJAhrQDLJXN1ErVGfx/UvAXtGtm60NNV9Vxdqm6ofP88gOktQvzcxxImvSJZy8ltXAGZLh6PGhgCR8V88eeg62c9IVkAW12VMS/D/LGoY/QP0xenVSjGi1Y5RrHiBzSmvVMPzP5DB8pgL6uEyi818FAaTJDMN/Pt9heM7n4PyPyfNjAwJkRiYS/DNyQbMASXih64CCZK0xNvUx94p1S4WRORXVTQJaReKX9hnR/ZoDtOaaFAbGQKnDyNZu0IOstQREwXLQOx8DUvmYnQ4RxXIQBctAL2WEtTrKsFBlgeuAamzyTj5lsBtJy7yrXC/yXD66RIXr2pZkP5pDGEks8S4kWjdF6tqCHOlE6lOT+RGubFAwrn+Y/aUMrF8MyAyYSlxV/Z7hkS6ZYG2ZW3EzVz5fPPzsXwBIAlOJqwroMzzS1f5l6g7o//NFupkrn3l9FoeKFwCS6DwWmzMXJ8pCRDZXmPQXLrUQ0aTOqY3nfPE8OUAA12PaDTxPLMu0jeArpBHrHBBTD0KgRBnCNDVSM1XXoKj1q00a3CBVev+kSB5bRisOZf23mGy3KccIbpvJyFKZGomLgp55GpCuedoC7tDHU3VL+0EPmwLMGAiq61YCQqChEwoRd4Ahyiy6g3VqPttAslYPkykdM6hA4m4XGk0LN6R84UezspkBsiAz+z34fbOkK/g5aoV+ZzYEDV4HSMMVzzCh72tz4YroF2p+in/HkZFej31eB0jDkQ1G7L52sbkkTiLn8zOs+2OhpmKk/f5SFCB+w+Rckxhy/yl3P7lY02k6hp6K8ZiaOPoAuB/UmMz/8eVwB64Hj4F7lfEwexySqiPU9tv1MfWQrkNUJRvPNpM5VHeDh0DU4bOUATmqp4r4mC0Wx2sAEy0iwnvUZ+wF94H71cThxwpkQPuUGW0F94BH1I2GCZCzVqnfrS5UQFW9JHUT/z2wvAwIdUXh/cmxgJw4Pmdqv6ZI4JuqUVljBN7A+SBAZrR/ifqh0PCb0mAceAPngwCZwbkxUxMyMSXZZctzMmpvRIFfc7wGYrhej4rpCGgUWA4aLWgASxweqzFezCmz4jHQ1ylRrRrWQlLSlc8qF+FkCg84fMdabQZ5GhCrF3jY6XgOw/olKiFtxipwZ4EMaBfooyfbKqIOZi81Sg9edIaQFwqEo6n3hqLJlLP5JL8D1rmtIeLZ7Yh4ngVNNkPRv241AosBOcGz21Fo+CyinSZL4/lK8a/PHSxbDMgJjoRwftvAMYtz/zNPM+EJqqLu6Wt5/FWMzLUIPgdaba7Fz2Ha1YA0xAuTBjUIrAPbwT6wBawAt7p4DtBM8ADYAWrBNrABjHbR9x8vqp77k7X6i+0mU27ygRFgLdgKajPG+SgwbPI1d4CZGQYAcnG8kWCdyfHCLorx7gRrwHZQC3aA9aIMoae4FoPIvSrATFApbgSV4EGwF+wDT4O5oCflrnXiJtaPOllohOVcDcwPnIchvYwfyMVD9+FYaifngdT0jbzgbgjPB0OUs4u7WU1G4NX4+ZkWo6JC3+lz4sdUyvPBMNy+i7tZMJ5X4+dnkBuqkAnnXOFKbowUrkAeqB68BdTLB5LBeH5vMfIHA1oexB8nfFMH/o+sngnIij/OG9aF655ADT+cja8H58cwehjU18LpcRyePBVafUXy+W7qXHlKp338Z4cAWTHv1e1d1Aji6wFdbnjR2QbkydNiPSXDU+HFj1hFdPcIulC/5LlhgKzgyCirbqgudS+gyw0WnWZAnjzpWqFngY86RV7Ug5zOH7LqgOLJNYA0s2uSN+D1r2Lbs/weoMsNLzrTgDx5MlSNWSfJE/Jb95kk2t/MU1R4cipPOUHk86j+g46Z/BBdCbDoNAPy5KlUFJTWgFLqVHlREBdfuitDSPxdTVy9rPCiswzIk6cpqiSgc+UpM8Uk9bpczIe7bBwVAbpSYNFpBuTJU28wMEMZebpsCkeTBgoKD+qnRzI8+ZbLEcQUjSsGLwgKZRhInjx5um40s/54X340B08zwZSV6qr6U4Oupr8i+/8Adnj5PFwBRDQAAAAASUVORK5CYII=",rz=e=>jn.createElement("svg",{width:20,height:18,viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M18.5329 7.19049C18.5118 7.16682 18.4958 7.13909 18.4857 7.109C18.4757 7.07891 18.4719 7.04709 18.4746 7.01549C18.481 6.98424 18.4939 6.9547 18.5126 6.92884C18.5313 6.90298 18.5553 6.88139 18.5829 6.86549L19.2496 6.47383C19.4034 6.39827 19.54 6.29191 19.6509 6.16135C19.7619 6.03079 19.8448 5.87881 19.8945 5.71485C19.9443 5.5509 19.9598 5.37846 19.9401 5.20826C19.9204 5.03806 19.8659 4.87372 19.7801 4.72545C19.6942 4.57719 19.5788 4.44816 19.4409 4.34637C19.3031 4.24459 19.1458 4.17223 18.9789 4.13379C18.8119 4.09534 18.6388 4.09163 18.4703 4.12289C18.3019 4.15415 18.1416 4.21971 17.9996 4.31549L17.1079 4.82383C17.0788 4.84065 17.0457 4.8495 17.0121 4.8495C16.9784 4.8495 16.9454 4.84065 16.9163 4.82383C16.8885 4.81108 16.8638 4.79261 16.8437 4.76963C16.8236 4.74665 16.8085 4.71968 16.7996 4.69049L16.4663 2.69883C16.3686 2.10879 16.0627 1.5733 15.604 1.18953C15.1453 0.805757 14.5643 0.599136 13.9663 0.607159H5.99125C5.39796 0.609722 4.82491 0.823205 4.37454 1.20945C3.92418 1.59569 3.62587 2.12951 3.53292 2.71549L3.19959 4.69049C3.19282 4.72272 3.17879 4.75297 3.15858 4.77896C3.13836 4.80496 3.11249 4.826 3.08292 4.84049C3.05378 4.85731 3.02073 4.86617 2.98709 4.86617C2.95344 4.86617 2.92039 4.85731 2.89125 4.84049L1.99959 4.34049C1.85752 4.24471 1.69729 4.17915 1.52882 4.14789C1.36036 4.11663 1.18727 4.12034 1.0203 4.15879C0.853336 4.19723 0.696054 4.26959 0.558225 4.37137C0.420396 4.47316 0.304963 4.60219 0.219094 4.75045C0.133225 4.89872 0.078754 5.06306 0.0590634 5.23326C0.0393727 5.40346 0.0548829 5.5759 0.104631 5.73985C0.154378 5.90381 0.237302 6.05579 0.348251 6.18635C0.4592 6.31691 0.595806 6.42327 0.749587 6.49883L1.41625 6.89049C1.44391 6.90639 1.46788 6.92798 1.48655 6.95384C1.50523 6.9797 1.51819 7.00924 1.52459 7.04049C1.52727 7.07209 1.52348 7.10391 1.51345 7.134C1.50342 7.16409 1.48736 7.19182 1.46625 7.21549C0.79248 7.90316 0.415458 8.82776 0.416253 9.79049V11.4572C0.416532 11.8754 0.543199 12.2838 0.779646 12.6288C1.01609 12.9738 1.35128 13.2393 1.74125 13.3905C1.78008 13.4055 1.81353 13.4317 1.83729 13.4659C1.86106 13.5001 1.87405 13.5405 1.87459 13.5822V15.2072C1.87459 15.7044 2.07213 16.1814 2.42376 16.533C2.77539 16.8846 3.25231 17.0822 3.74959 17.0822C4.24687 17.0822 4.72378 16.8846 5.07541 16.533C5.42704 16.1814 5.62459 15.7044 5.62459 15.2072V13.7572C5.62455 13.7011 5.64622 13.6472 5.68507 13.6068C5.72392 13.5664 5.77691 13.5426 5.83292 13.5405H14.1663C14.2223 13.5426 14.2753 13.5664 14.3141 13.6068C14.3529 13.6472 14.3746 13.7011 14.3746 13.7572V15.2072C14.3746 15.7044 14.5721 16.1814 14.9238 16.533C15.2754 16.8846 15.7523 17.0822 16.2496 17.0822C16.7469 17.0822 17.2238 16.8846 17.5754 16.533C17.927 16.1814 18.1246 15.7044 18.1246 15.2072V13.5822C18.1251 13.5405 18.1381 13.5001 18.1619 13.4659C18.1856 13.4317 18.2191 13.4055 18.2579 13.3905C18.6479 13.2393 18.9831 12.9738 19.2195 12.6288C19.456 12.2838 19.5826 11.8754 19.5829 11.4572V9.79049C19.5903 8.81911 19.2128 7.88433 18.5329 7.19049ZM6.03292 2.26549H14.0496C14.2493 2.26292 14.4433 2.33219 14.5963 2.46067C14.7493 2.58915 14.851 2.7683 14.8829 2.96549L15.2829 5.35716C15.2878 5.38821 15.2858 5.41994 15.2772 5.45016C15.2686 5.48038 15.2534 5.50836 15.2329 5.53216C15.2131 5.55434 15.1887 5.57183 15.1613 5.58336C15.1339 5.59489 15.1043 5.60017 15.0746 5.59883H4.99959C4.9654 5.60054 4.93125 5.59471 4.89957 5.58175C4.86788 5.56878 4.83944 5.54901 4.81625 5.52383C4.79517 5.4674 4.79517 5.40525 4.81625 5.34883L5.17459 3.02383C5.19879 2.82341 5.29493 2.63859 5.44514 2.50372C5.59534 2.36884 5.7894 2.29307 5.99125 2.29049L6.03292 2.26549ZM16.2913 11.4322C16.044 11.4322 15.8024 11.3588 15.5968 11.2215C15.3912 11.0841 15.231 10.8889 15.1364 10.6605C15.0418 10.4321 15.017 10.1808 15.0653 9.9383C15.1135 9.69582 15.2326 9.47309 15.4074 9.29827C15.5822 9.12346 15.8049 9.00441 16.0474 8.95618C16.2899 8.90795 16.5412 8.9327 16.7696 9.02731C16.998 9.12192 17.1932 9.28213 17.3306 9.4877C17.4679 9.69326 17.5413 9.93493 17.5413 10.1822C17.5447 10.352 17.5136 10.5207 17.4497 10.6781C17.3858 10.8355 17.2905 10.9781 17.1696 11.0975C17.0488 11.2168 16.9048 11.3102 16.7467 11.3721C16.5885 11.4339 16.4193 11.4629 16.2496 11.4572L16.2913 11.4322ZM2.49959 10.2072C2.49959 9.95993 2.5729 9.71826 2.71025 9.5127C2.8476 9.30713 3.04282 9.14692 3.27123 9.05231C3.49964 8.9577 3.75097 8.93295 3.99345 8.98118C4.23593 9.02941 4.45865 9.14846 4.63347 9.32327C4.80829 9.49809 4.92734 9.72082 4.97557 9.9633C5.0238 10.2058 4.99905 10.4571 4.90444 10.6855C4.80983 10.9139 4.64961 11.1091 4.44405 11.2465C4.23849 11.3838 3.99681 11.4572 3.74959 11.4572C3.41807 11.4572 3.10012 11.3255 2.8657 11.091C2.63128 10.8566 2.49959 10.5387 2.49959 10.2072Z",fill:"#4B5563"})),oz=e=>jn.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("g",{clipPath:"url(#clip0_1697_57490)"},jn.createElement("path",{d:"M12.0829 5.05834C13.1783 5.05834 14.0663 4.17037 14.0663 3.07501C14.0663 1.97964 13.1783 1.09167 12.0829 1.09167C10.9876 1.09167 10.0996 1.97964 10.0996 3.07501C10.0996 4.17037 10.9876 5.05834 12.0829 5.05834Z",fill:"#4B5563"}),jn.createElement("path",{d:"M3.75 11.4083C3.00832 11.4083 2.2833 11.6283 1.66661 12.0403C1.04993 12.4524 0.569282 13.038 0.285453 13.7233C0.00162482 14.4085 -0.0726377 15.1625 0.0720569 15.8899C0.216751 16.6173 0.573904 17.2855 1.09835 17.81C1.6228 18.3344 2.29098 18.6916 3.01841 18.8363C3.74584 18.981 4.49984 18.9067 5.18506 18.6229C5.87029 18.339 6.45596 17.8584 6.86801 17.2417C7.28007 16.625 7.5 15.9 7.5 15.1583C7.4978 14.1644 7.10201 13.2119 6.39922 12.5091C5.69644 11.8063 4.74389 11.4105 3.75 11.4083ZM3.75 17.2417C3.33796 17.2417 2.93517 17.1195 2.59256 16.8906C2.24996 16.6616 1.98294 16.3363 1.82525 15.9556C1.66757 15.5749 1.62631 15.156 1.7067 14.7519C1.78708 14.3478 1.9855 13.9765 2.27686 13.6852C2.56822 13.3938 2.93944 13.1954 3.34356 13.115C3.74769 13.0346 4.16658 13.0759 4.54726 13.2336C4.92794 13.3913 5.25331 13.6583 5.48223 14.0009C5.71115 14.3435 5.83333 14.7463 5.83333 15.1583C5.83333 15.4319 5.77945 15.7028 5.67475 15.9556C5.57005 16.2083 5.4166 16.438 5.22314 16.6315C5.02969 16.8249 4.80002 16.9784 4.54726 17.0831C4.2945 17.1878 4.02359 17.2417 3.75 17.2417Z",fill:"#4B5563"}),jn.createElement("path",{d:"M16.25 11.4083C15.5083 11.4083 14.7833 11.6283 14.1666 12.0403C13.5499 12.4524 13.0693 13.038 12.7855 13.7233C12.5016 14.4085 12.4274 15.1625 12.5721 15.8899C12.7168 16.6173 13.0739 17.2855 13.5984 17.81C14.1228 18.3344 14.791 18.6916 15.5184 18.8363C16.2458 18.981 16.9998 18.9067 17.6851 18.6229C18.3703 18.339 18.956 17.8584 19.368 17.2417C19.7801 16.625 20 15.9 20 15.1583C19.9978 14.1644 19.602 13.2119 18.8992 12.5091C18.1964 11.8063 17.2439 11.4105 16.25 11.4083ZM16.25 17.2417C15.838 17.2417 15.4352 17.1195 15.0926 16.8906C14.75 16.6616 14.4829 16.3363 14.3253 15.9556C14.1676 15.5749 14.1263 15.156 14.2067 14.7519C14.2871 14.3478 14.4855 13.9765 14.7769 13.6852C15.0682 13.3938 15.4394 13.1954 15.8436 13.115C16.2477 13.0346 16.6666 13.0759 17.0473 13.2336C17.4279 13.3913 17.7533 13.6583 17.9822 14.0009C18.2112 14.3435 18.3333 14.7463 18.3333 15.1583C18.3333 15.4319 18.2794 15.7028 18.1748 15.9556C18.0701 16.2083 17.9166 16.438 17.7231 16.6315C17.5297 16.8249 17.3 16.9784 17.0473 17.0831C16.7945 17.1878 16.5236 17.2417 16.25 17.2417Z",fill:"#4B5563"}),jn.createElement("path",{d:"M8.93421 9.52501L10.1425 8.14168C11.2897 8.9152 12.6423 9.32736 14.0259 9.32501H14.5842C14.9157 9.32501 15.2337 9.19331 15.4681 8.95889C15.7025 8.72447 15.8342 8.40653 15.8342 8.07501C15.8342 7.74349 15.7025 7.42555 15.4681 7.19113C15.2337 6.95671 14.9157 6.82501 14.5842 6.82501H14.0259C12.8486 6.82097 11.7201 6.35403 10.8842 5.52501C10.7716 5.40452 10.6345 5.30949 10.4821 5.24625C10.3298 5.18302 10.1657 5.15305 10.0009 5.15834C9.82975 5.16377 9.66156 5.2043 9.50675 5.2774C9.35193 5.35051 9.21378 5.45464 9.10087 5.58334L6.18421 8.91668C6.05958 9.04818 5.96401 9.20443 5.90372 9.37528C5.84342 9.54613 5.81973 9.72775 5.83421 9.90834C5.8651 10.0771 5.92973 10.2379 6.02424 10.3811C6.11874 10.5243 6.24118 10.6469 6.38421 10.7417L6.93421 11.1083C7.66321 11.5976 8.22851 12.2944 8.55687 13.1086C8.88523 13.9229 8.96153 14.8169 8.77587 15.675C8.72593 15.8397 8.71053 16.0129 8.73063 16.1838C8.75074 16.3547 8.80592 16.5196 8.89272 16.6682C8.97951 16.8168 9.09606 16.9459 9.23505 17.0474C9.37404 17.1489 9.53249 17.2205 9.70047 17.2579C9.86845 17.2953 10.0423 17.2976 10.2112 17.2647C10.3802 17.2318 10.5404 17.1643 10.6821 17.0666C10.8237 16.9688 10.9436 16.8429 11.0343 16.6966C11.125 16.5504 11.1846 16.387 11.2092 16.2167C11.4704 14.9998 11.3968 13.7349 10.9961 12.5566C10.5955 11.3782 9.88295 10.3305 8.93421 9.52501Z",fill:"#4B5563"})),jn.createElement("defs",null,jn.createElement("clipPath",{id:"clip0_1697_57490"},jn.createElement("rect",{width:20,height:20,fill:"white"})))),mne=e=>jn.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("g",{clipPath:"url(#clip0_3407_1703)"},jn.createElement("path",{d:"M11.3752 20.0001H11.2169C10.9704 19.965 10.7399 19.8576 10.5545 19.6915C10.369 19.5254 10.2371 19.308 10.1752 19.0668L8.33357 11.6668L0.941907 9.82512C0.699196 9.76473 0.479985 9.63338 0.312261 9.44785C0.144536 9.26231 0.0359065 9.031 0.000240204 8.78345C-0.034478 8.53494 0.0136427 8.28191 0.137161 8.06349C0.26068 7.84508 0.452715 7.67344 0.683574 7.57512L18.3336 0.0917817C18.5568 0.00128909 18.802 -0.0208838 19.0378 0.0280732C19.2737 0.0770302 19.4898 0.194913 19.6586 0.366782C19.8232 0.535068 19.9346 0.74804 19.9791 0.979189C20.0235 1.21034 19.999 1.44946 19.9086 1.66678L12.4086 19.2834C12.3263 19.4916 12.1843 19.6707 12.0004 19.7982C11.8165 19.9258 11.599 19.996 11.3752 20.0001Z",fill:"#525252"})),jn.createElement("defs",null,jn.createElement("clipPath",{id:"clip0_3407_1703"},jn.createElement("rect",{width:20,height:20,fill:"white"}))));sz.propTypes={selectionChanged:ft.func,children:ft.node};function sz({selectionChanged:e,children:n}){const s=ve.useRef();return ve.useEffect(()=>{const l=m=>e(m.detail),{current:h}=s;return h.addEventListener("change",l),()=>h.removeEventListener("change",l)},[e]),Le.jsx("mi-dropdown",{ref:s,children:n})}function yne(e,n){const s=sessionStorage.getItem("mapboxPlacesSessionToken");return new Promise((l,h)=>{const m=`https://api.mapbox.com/search/searchbox/v1/retrieve/${e.id}?session_token=${s}&access_token=${n}`;fetch(m).then(_=>_.status!==200?h():_.json()).then(_=>{e.geometry={type:"Point",coordinates:[_.features[0].geometry.coordinates[0],_.features[0].geometry.coordinates[1]]},l(e)}).catch(()=>{h()})})}const _ne=k1({key:"unitSystem",get:({get:e})=>e(ih)==="en-US"?"imperial":"metric"});O4.propTypes={onAccessibilityChanged:ft.func};function O4({onAccessibilityChanged:e}){const n=fn(oa),[s,l]=fr(Ud);function h(m){l(m.target.checked),e&&e()}return Le.jsxs("div",{className:"accessibility",children:[Le.jsx("input",{className:"mi-toggle",type:"checkbox",checked:s,onChange:m=>h(m),style:{backgroundColor:s?n:""}}),Le.jsx("div",{children:eE("Avoid stairs and escalators")})]})}function az(){const{t:e}=oo(),n=fn(oa),s=fn(kc),[l,h]=fr(k_);function m(_){h(_.target.checked)}return Le.jsxs("div",{className:"shuttle-bus",children:[Le.jsx("input",{className:"mi-toggle",type:"checkbox",checked:l,onChange:_=>m(_),"aria-label":s?.appSettings?.includeTransitSelectionDescription||e("Include bus transportation"),style:{backgroundColor:l?n:""}}),Le.jsx("div",{children:s?.appSettings?.includeTransitSelectionDescription||"Include bus transportation"})]})}const lz=pi({key:"wayfindingLocation",default:null}),Eo={TO:"TO",FROM:"FROM"},vne="data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 14 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 0C3.13 0 0 3.13 0 7C0 12.25 7 20 7 20C7 20 14 12.25 14 7C14 3.13 10.87 0 7 0ZM7 9.5C5.62 9.5 4.5 8.38 4.5 7C4.5 5.62 5.62 4.5 7 4.5C8.38 4.5 9.5 5.62 9.5 7C9.5 8.38 8.38 9.5 7 9.5Z' fill='black' fill-opacity='0.88'/%3E%3C/svg%3E%0A";j4.propTypes={onStartDirections:ft.func.isRequired,onBack:ft.func.isRequired,directionsToLocation:ft.object,directionsFromLocation:ft.object,onSetSize:ft.func,isActive:ft.bool};function j4({onStartDirections:e,onBack:n,directionsToLocation:s,directionsFromLocation:l,onSetSize:h,isActive:m}){const{t:_}=oo(),i=ve.useRef(),I=ve.useRef(),C=ve.useRef(),S=ve.useRef(),L=fn(Vy),R=fn(xd),U=fn(Qa),W=fn(bd),le=fn(oa),[pe,ie]=fr(lz),[Y,q]=ve.useState(),ue=bi(Ng),[me,ne]=ve.useState(!0),[De,Me]=ve.useState(!1),[Ee,ge]=ve.useState([]),[Re,Oe]=ve.useState(),[Ne,tt]=ve.useState(),dt=fn(Ud),[Nt,re]=ve.useState(!1),[_e,D]=fr(Fd),[P,K]=ve.useState(!1),H=fn(Qy),Q=fn(_ne),[de,we,he,Ie]=Zk(Ne,Re,L,_e,dt),je=fn(E4),Fe=fn(kc),Ue=fn(as);function He(an){return W===so.Google&&an.properties.type==="google_places"?pne(an):W===so.Mapbox&&an.properties.type==="mapbox_places"?yne(an,H):Promise.resolve(an)}function it(an){Y===Eo.TO?He(an).then(pt=>{Oe(pt),C.current?.setDisplayText(pt.properties.name)},()=>ue(!1)):Y===Eo.FROM&&He(an).then(pt=>{tt(pt),S.current?.setDisplayText(pt.properties.name)},()=>ue(!1)),re(!1),Me(!1),ge([]),K(!1)}function ct(an,pt){if(q(pt),ue(!0),an.length===0)ne(!1),re(!1),ge([]);else{ne(!0),ge(an);const Ft=an.filter(Tn=>Tn.properties.type==="google_places").length>0;re(Ft),Et(th.MAX)}}function Et(an){typeof h=="function"&&h(an)}function gt(){const an=k4(R);Y===Eo.TO?(C.current?.setDisplayText(an.properties.name),Oe(an)):Y===Eo.FROM&&(S.current?.setDisplayText(an.properties.name),tt(an)),ge([]),ue(!0),ne(!0),re(!1),Me(!1),K(!1)}function zt(an){Ne?.id==="USER_POSITION"&&an===Eo.TO||Re?.id==="USER_POSITION"&&an===Eo.FROM?K(!1):K(!0)}function Wt(an){zt(an)}function kt(an){q(an),rn(an),ue(!0),re(!1),zt(an)}function on(an){K(!0),q(an),sn(an),ge([]),ue(!0),re(!1),ne(!0)}function sn(an){an===Eo.TO?Oe():an===Eo.FROM&&tt()}function rn(an){an===Eo.TO?(ge([]),C.current?.getValue()&&(Me(!0),C.current?.triggerSearch())):an===Eo.FROM&&(ge([]),S.current?.getValue()&&(Me(!0),S.current?.triggerSearch()))}function Nn(){(Re||Ne)&&(Ne?C.current?.setDisplayText(Ne.properties.name):C.current?.clear(),Re?S.current?.setDisplayText(Re.properties.name):S.current?.clear(),Oe(Ne),tt(Re))}function Hn(){tt(),S.current?.setDisplayText(""),Ue&&Ue.deselectLocation(),n()}function Mn(){ge([]),Me(!1),re(!1),K(!1)}return ve.useEffect(()=>()=>{ge([]),Oe(),tt()},[]),ve.useEffect(()=>{if(pe){if(Y===Eo.FROM)S.current?.setDisplayText(pe.properties.name),tt(pe);else if(Y===Eo.TO)C.current?.setDisplayText(pe.properties.name),Oe(pe);else return;Mn(),ie(null)}},[pe]),ve.useEffect(()=>{let an=!1;if(l?.id==="USER_POSITION"&&s?.id==="USER_POSITION"&&(s=void 0),s?.properties&&!U&&(C.current?.setDisplayText(s.properties.name),Oe(s)),l?.properties?Ne||(S.current?.setDisplayText(l.properties.name),tt(l),an=!0):q(Eo.FROM),m&&!S.current?.getValue()&&R&&!Ne&&s?.id!=="USER_POSITION"&&!an){const pt=k4(R);S.current?.setDisplayText(pt.properties.name),tt(pt),ue(!0),ne(!0),ge([])}},[m,s,l]),ve.useEffect(()=>{W===so.Mapbox&&(re(!1),ge(Ee.filter(an=>an.properties.type!=="google_places")))},[W]),ve.useEffect(()=>{U&&(Oe(U),C.current?.setDisplayText(U.properties.name))},[U]),Le.jsxs("div",{className:"wayfinding",ref:i,children:[Le.jsxs("div",{className:"wayfinding__directions",children:[Le.jsx("div",{className:"wayfinding__title",children:_("Directions")}),Le.jsx("button",{className:"wayfinding__close",onClick:()=>Hn(),"aria-label":"Close",children:Le.jsx(Td,{})}),Le.jsxs("div",{className:"wayfinding__locations",children:[Le.jsxs("label",{className:"wayfinding__label",children:[Le.jsx("span",{children:_("Choose departure")}),Le.jsx(P_,{ref:S,mapsindoors:!0,google:W===so.Google&&je,mapbox:W===so.Mapbox&&je,placeholder:_("Choose departure"),results:an=>ct(an,Eo.FROM),clicked:()=>kt(Eo.FROM),cleared:()=>on(Eo.FROM),changed:()=>Wt(Eo.FROM)})]}),Le.jsx("button",{onClick:()=>Nn(),"aria-label":_("Switch"),className:"wayfinding__switch",children:Le.jsx(fne,{})}),Le.jsxs("label",{className:"wayfinding__label",children:[Le.jsx("span",{children:_("Choose destination")}),Le.jsx(P_,{ref:C,mapsindoors:!0,google:W===so.Google&&je,mapbox:W===so.Mapbox&&je,placeholder:_("Choose destination"),results:an=>ct(an,Eo.TO),clicked:()=>kt(Eo.TO),cleared:()=>on(Eo.TO),changed:()=>Wt(Eo.TO)})]})]})]}),!he&&Le.jsx("p",{className:"wayfinding__error",children:_("No route found")}),!me&&!P&&Le.jsx("p",{className:"wayfinding__error",children:_("Nothing was found")}),R&&P&&Le.jsxs("button",{type:"button",className:"wayfinding__use-current-position",onClick:()=>gt(),children:[Le.jsx(mne,{}),_("My position")]}),Ee.length>0&&Le.jsx("div",{className:"wayfinding__scrollable",children:Le.jsxs("div",{className:"wayfinding__results",children:[Ee.map(an=>Le.jsx(kg,{icon:an.properties.type==="google_places"||an.properties.type==="mapbox_places"?vne:void 0,location:an,locationClicked:pt=>it(pt),disableHover:!0},an.id)),Nt&&Le.jsx("img",{className:"wayfinding__google",alt:"Powered by Google",src:gne})]})}),!De&&!P&&he&&!Nt&&Ne&&Re&&Le.jsxs("div",{className:"wayfinding__details",ref:I,children:[Le.jsxs("div",{className:"wayfinding__settings",children:[Le.jsxs("div",{className:"wayfinding__toggles",children:[Le.jsx(O4,{}),Fe?.appSettings?.includeTransitSelection==="true"&&Le.jsx(az,{})]}),Le.jsx("div",{className:"wayfinding__travel",children:Fe?.appSettings?.includeTravelModeSelection!=="false"&&Le.jsxs(sz,{selectionChanged:an=>D(an[0].value),children:[Le.jsxs("mi-dropdown-item",{selected:!0,value:nh.WALKING,children:[Le.jsx(iz,{}),_("Walk")]}),Le.jsxs("mi-dropdown-item",{value:nh.DRIVING,children:[Le.jsx(rz,{}),_("Drive")]}),Le.jsxs("mi-dropdown-item",{value:nh.BICYCLING,children:[Le.jsx(oz,{}),_("Bike")]})]})})]}),Le.jsx("hr",{}),Le.jsxs("div",{className:"wayfinding__info",children:[Le.jsxs("div",{className:"wayfinding__distance",children:[_e===nh.WALKING&&Le.jsx(iz,{}),_e===nh.DRIVING&&Le.jsx(rz,{}),_e===nh.BICYCLING&&Le.jsx(oz,{}),Le.jsxs("div",{children:[_("Distance"),":"]}),Le.jsx("div",{className:"wayfinding__meters",children:de&&Ie&&Le.jsx("mi-distance",{unit:Q,meters:de})})]}),Le.jsxs("div",{className:"wayfinding__time",children:[Le.jsx(dne,{}),Le.jsxs("div",{children:[_("Estimated time"),":"]}),Le.jsx("div",{className:"wayfinding__minutes",children:we&&Ie&&Le.jsx("mi-time",{translations:JSON.stringify({days:_("d"),hours:_("h"),minutes:_("min")}),seconds:we})})]})]}),Le.jsx("button",{className:"wayfinding__button",style:{background:le},onClick:()=>e(),disabled:!Ie,children:_("Go!")})]})]})}const xne=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M4 12H20M20 12L14 6M20 12L14 18",stroke:"#111827",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),bne=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M20 12H4M4 12L10 6M4 12L10 18",stroke:"#111827",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),U_=pi({key:"activeStep",default:0}),zg=pi({key:"substepsToggled",default:!1}),cz=pi({key:"triggerSubsteps",default:!1}),uz=ve.forwardRef(function(n,s){const{totalSteps:l,activeStep:h,previous:m,originLocation:_,directions:i}=n,I=ve.useRef(),{t:C}=oo(),[S,L]=fr(zg),R=bi(cz),U=ec();ve.useImperativeHandle(s,()=>({openSubsteps(){I.current.openSubsteps()},closeSubsteps(){I.current.closeSubsteps()}}));const W={walk:C("Walk"),bike:C("Bike"),transit:C("Transit"),drive:C("Drive"),destination:C("You have arrived"),leave:C("Leave"),from:C("From"),park:C("Park"),at:C("at"),building:C("Building"),venue:C("Venue"),takeStaircaseToLevel:C("Take staircase to level"),takeLadderToLevel:C("Take the ladder to level"),takeElevatorToLevel:C("Take elevator to level"),takeEscalatorToLevel:C("Take escalator to level"),takeWheelchairLiftToLevel:C("Take wheelchair lift to level"),takeWheelchairRampToLevel:C("Take wheelchair ramp to level"),exit:C("Exit"),enter:C("Enter"),stops:C("stops"),andContinue:C("and continue"),continueStraightAhead:C("Continue straight ahead"),goLeft:C("Go left"),goSharpLeft:C("Go sharp left"),goSlightLeft:C("Go slight left"),goRight:C("Go right"),goSharpRight:C("Go sharp right"),goSlightRight:C("Go slight right"),turnAround:C("Turn around"),days:C("d"),hours:C("h"),minutes:C("min"),rideTheBus:C("Ride the bus")};return ve.useEffect(()=>{const{current:le}=I;le&&(le.showHeader=!1);function pe(){R(!0),L(!S)}return le.addEventListener("substepsToggled",pe),()=>{le.removeEventListener("substepsToggled",pe)}},[S]),Le.jsx("mi-route-instructions-step",{ref:I,"show-toggle-button":!U,step:JSON.stringify(l[h]),translations:JSON.stringify(W),"destination-location":i?.destinationLocation.properties.name,"from-travel-mode":m?.travel_mode??"","from-route-context":m?.route_context??_?.properties?.name??""})});uz.propTypes={totalSteps:ft.array,activeStep:ft.number,previous:ft.object,originLocation:ft.object,directions:ft.object};const hz=pi({key:"isDestinationStep",default:!1});dz.propTypes={steps:ft.array,previous:ft.object,originLocation:ft.object,isOpen:ft.bool};function dz({steps:e,previous:n,originLocation:s,isOpen:l}){const h=ve.useRef(),m=fn(U_),_=fn(Bd),i=fn(zg),I=bi(hz);return ve.useEffect(()=>{l&&(m===e?.length-1&&_?.destinationLocation?I(!0):I(!1),i===!1?h.current?.closeSubsteps():i===!0&&h.current?.openSubsteps())},[l,m,e,i]),Le.jsx("div",{className:"route-instructions prevent-scroll",children:e?.length>0&&Le.jsx(uz,{totalSteps:e,activeStep:m,previous:n,directions:_,originLocation:s,ref:h})})}const P4=Object.freeze({minZoom:10}),fz=ve.forwardRef(function(n,s){const{totalSteps:l,activeStep:h,previous:m,originLocation:_}=n,i=ve.useRef(),{t:I}=oo(),[C,S]=fr(zg),L=bi(cz),R=ec();ve.useImperativeHandle(s,()=>({openSubsteps(){i.current.openSubsteps()},closeSubsteps(){i.current.closeSubsteps()}}));const U={walk:I("Walk"),bike:I("Bike"),transit:I("Transit"),drive:I("Drive"),destination:I("You have arrived"),leave:I("Leave"),from:I("From"),park:I("Park"),at:I("at"),building:I("Building"),venue:I("Venue"),takeStaircaseToLevel:I("Take staircase to level"),takeLadderToLevel:I("Take the ladder to level"),takeElevatorToLevel:I("Take elevator to level"),takeEscalatorToLevel:I("Take escalator to level"),takeWheelchairLiftToLevel:I("Take wheelchair lift to level"),takeWheelchairRampToLevel:I("Take wheelchair ramp to level"),exit:I("Exit"),enter:I("Enter"),stops:I("stops"),andContinue:I("and continue"),continueStraightAhead:I("Continue straight ahead"),goLeft:I("Go left"),goSharpLeft:I("Go sharp left"),goSlightLeft:I("Go slight left"),goRight:I("Go right"),goSharpRight:I("Go sharp right"),goSlightRight:I("Go slight right"),turnAround:I("Turn around"),days:I("d"),hours:I("h"),minutes:I("min"),rideTheBus:I("Ride the bus")};return ve.useEffect(()=>{const{current:W}=i;function le(){L(!0),S(!C)}return W.addEventListener("substepsToggled",le),()=>{W.removeEventListener("substepsToggled",le)}},[C]),Le.jsx("mi-route-instructions-step-header",{ref:i,"show-toggle-button":!R,step:JSON.stringify(l[h]),translations:JSON.stringify(U),"from-travel-mode":m?.travel_mode??"","from-route-context":m?.route_context??_?.properties?.name??""})});fz.propTypes={totalSteps:ft.array,activeStep:ft.number,previous:ft.object,originLocation:ft.object};let ks;R4.propTypes={isOpen:ft.bool,onBack:ft.func,onSetSize:ft.func,onRouteFinished:ft.func};function R4({isOpen:e,onBack:n,onSetSize:s,onRouteFinished:l}){const{t:h}=oo(),m=ve.useRef(),[_,i]=ve.useState(null),I=ve.useRef(null),[C,S]=ve.useState(),L=fn(as),R=fn(Fd),U=fn(Bd),[W,le]=fr(U_),[pe,ie]=ve.useState(),[Y,q]=fr(zg),ue=fn(Ga),me=Xo(),ne=bi(F_),De=fn(hz),Me=fn(oa),Ee=ec(),ge=fn(O_),Re=fn(Kk),Oe=fn(Qa),Ne=fn(bd),tt=fn(k_),dt=fn(kc);ve.useEffect(()=>()=>{i(null)},[]),ve.useEffect(()=>{if(i(null),e&&U){S(U.totalTime);const Fe=Math.min(window.innerHeight,window.innerWidth)*.06;ks?.setRoute(null),ks=null,Promise.all([Nt(Fe),re(Fe)]).then(([Ue,He])=>{ks=new window.mapsindoors.directions.DirectionsRenderer({mapsIndoors:L,fitBounds:Ee&&dt?.appSettings?.disableKioskStepMove==="true",fitBoundsPadding:Ee&&dt?.appSettings?.disableKioskStepMove==="true"?void 0:{top:Fe,bottom:Ue,left:He,right:Fe}}),ks.setRoute(U.directionsResult).then(()=>{ks.setStepIndex(0),L&&L.deselectLocation()}),I.current.location=U.destinationLocation,U.destinationLocation.id==="USER_POSITION"?i(null):i(L.getDisplayRule(U.destinationLocation)),we(null)})}return()=>{ks&&(ks.setRoute(null),ks=null),we(P4.minZoom)}},[e,U,L,R,tt]);function Nt(Fe){return new Promise(Ue=>{if(me)ue?tg().then(He=>Ue(He)):Ue(Fe);else return Md().then(He=>Ue(He))})}function re(Fe){return new Promise(Ue=>{me?ue?Ue(Fe):Lc().then(He=>Ue(He)):Ue(Fe)})}ve.useEffect(()=>{!e&&ks&&(Q(),we(P4.minZoom))},[e]);function _e(){return U?U.directionsResult.legs.reduce((Fe,Ue)=>{for(const He in Ue.steps){const it=Ue.steps[He];Fe.push(it)}return Fe},[]):[]}function D(){ks&&ks.nextStep()}function P(){ks&&ks.previousStep()}function K(){const Fe=_e();ie(Fe[W]),le(W+1),D()}function H(){const Fe=_e();ie(Fe[W-2]),le(W-1),P()}function Q(){ks?.setRoute(null),ks=null}function de(){le(0),q(!1)}function we(Fe){const Ue=L?.getMapView?.(),He=Ue?.getMap?.();!L||!Ue||!He||(Ne==="mapbox"?He.setMinZoom(Fe):Ne==="google"&&He.setOptions({minZoom:Fe}))}function he(){de(),Q(),n()}function Ie(Fe){typeof s=="function"&&s(Fe)}function je(){const Fe=`${Re}&directionsFrom=${ue.id}&directionsTo=${Oe.id}`;ne(Fe)}return ve.useEffect(()=>(m.current=requestAnimationFrame(()=>{Y&&Ie(th.MAX)}),()=>{m.current&&cancelAnimationFrame(m.current)}),[Y]),Le.jsxs("div",{className:"directions",style:{display:Ee?"block":"grid"},children:[Le.jsxs("div",{className:"directions__header",children:[Le.jsx("div",{className:"directions__minutes",children:C&&Le.jsx("mi-time",{translations:JSON.stringify({days:h("d"),hours:h("h"),minutes:h("min")}),seconds:C})}),Le.jsx(fz,{totalSteps:_e(),activeStep:W,previous:pe,originLocation:U?.originLocation})]}),Le.jsx("div",{className:"directions__steps",children:Le.jsx(dz,{steps:_e(),previous:pe,originLocation:U?.originLocation,isOpen:e})}),Ee&&Le.jsxs(Le.Fragment,{children:[Le.jsx("hr",{}),Le.jsxs("div",{className:"directions__kiosk",children:[Le.jsx(O4,{onAccessibilityChanged:()=>de()}),dt?.appSettings?.includeTransitSelection==="true"&&Le.jsx(az,{}),Le.jsxs("button",{className:"directions__qr-code",onClick:()=>je(),"aria-label":h("Scan QR code to view route on phone"),children:[Le.jsx(Xk,{}),h("Scan QR code")]})]})]}),Le.jsxs("div",{className:"directions__actions",children:[_e().length>0&&Le.jsxs("div",{className:`route-instructions__actions ${Ee?"route-instructions__actions--kiosk":""}`,children:[Le.jsx("button",{className:`route-instructions__button ${Ee?"route-instructions__button--kiosk":""}`,onClick:()=>H(),"aria-label":h("Previous"),disabled:W===0,children:Le.jsx(bne,{})}),Le.jsx("div",{className:"route-instructions__overview",children:h("StepYofX",{activeStep:W+1,totalSteps:_e().length})}),Le.jsx("button",{className:`route-instructions__button ${Ee?"route-instructions__button--kiosk":""}`,onClick:()=>K(),"aria-label":h("Next"),disabled:W===_e().length-1,children:Le.jsx(xne,{})})]}),Le.jsx("div",{className:"directions__details",children:U?.destinationLocation&&Le.jsxs("div",{className:"directions__info",children:[_&&U.destinationLocation.id!=="USER_POSITION"&&Le.jsx("div",{className:"directions__icon",children:Le.jsx("img",{alt:"",src:_.icon.src?_.icon.src:_.icon})}),Le.jsxs("div",{className:"directions__content",children:[Le.jsx("div",{className:"directions__name",children:U?.destinationLocation.properties.name}),Le.jsx("mi-location-info",{ref:I,"show-external-id":ge})]})]})}),De?Le.jsx("button",{className:"directions__finish",onClick:()=>l(),style:{background:Me},children:h("Finish route")}):Le.jsx("button",{className:"directions__cancel",onClick:()=>he(),children:h("Cancel route")})]})]})}const pz=pi({key:"chatHistoryState",default:[]}),wne=e=>{const[n,s]=ve.useState(0),l=ve.useRef(null);return ve.useLayoutEffect(()=>{if(e)return;const h=()=>{if(!window.visualViewport)return;const _=window.visualViewport.height,I=window.innerHeight-_;I>50?s(I):s(0)},m=()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(h,150)};return window.visualViewport&&(window.visualViewport.addEventListener("resize",m),m()),()=>{l.current&&clearTimeout(l.current),window.visualViewport&&window.visualViewport.removeEventListener("resize",m)}},[e]),n},Mne=pi({key:"userLocationShare",default:null});function Cpe(){}function Dpe(){}function Ine(e,n){const s={};return(e[e.length-1]===""?[...e,""]:e).join((s.padRight?" ":"")+","+(s.padLeft===!1?"":" ")).trim()}const Tne=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ane=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cne={};function gz(e,n){return(Cne.jsx?Ane:Tne).test(e)}const Dne=/[ \t\n\f\r]/g;function Sne(e){return typeof e=="object"?e.type==="text"?mz(e.value):!1:mz(e)}function mz(e){return e.replace(Dne,"")===""}class Og{constructor(n,s,l){this.normal=s,this.property=n,l&&(this.space=l)}}Og.prototype.normal={},Og.prototype.property={},Og.prototype.space=void 0;function yz(e,n){const s={},l={};for(const h of e)Object.assign(s,h.property),Object.assign(l,h.normal);return new Og(s,l,n)}function B4(e){return e.toLowerCase()}class qs{constructor(n,s){this.attribute=s,this.property=n}}qs.prototype.attribute="",qs.prototype.booleanish=!1,qs.prototype.boolean=!1,qs.prototype.commaOrSpaceSeparated=!1,qs.prototype.commaSeparated=!1,qs.prototype.defined=!1,qs.prototype.mustUseProperty=!1,qs.prototype.number=!1,qs.prototype.overloadedBoolean=!1,qs.prototype.property="",qs.prototype.spaceSeparated=!1,qs.prototype.space=void 0;let Ene=0;const ir=rh(),Ro=rh(),F4=rh(),Vn=rh(),Yr=rh(),Vd=rh(),sa=rh();function rh(){return 2**++Ene}const U4=Object.freeze(Object.defineProperty({__proto__:null,boolean:ir,booleanish:Ro,commaOrSpaceSeparated:sa,commaSeparated:Vd,number:Vn,overloadedBoolean:F4,spaceSeparated:Yr},Symbol.toStringTag,{value:"Module"})),V4=Object.keys(U4);class H4 extends qs{constructor(n,s,l,h){let m=-1;if(super(n,s),_z(this,"space",h),typeof l=="number")for(;++m<V4.length;){const _=V4[m];_z(this,V4[m],(l&U4[_])===U4[_])}}}H4.prototype.defined=!0;function _z(e,n,s){s&&(e[n]=s)}function Hd(e){const n={},s={};for(const[l,h]of Object.entries(e.properties)){const m=new H4(l,e.transform(e.attributes||{},l),h,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(m.mustUseProperty=!0),n[l]=m,s[B4(l)]=l,s[B4(m.attribute)]=l}return new Og(n,s,e.space)}const vz=Hd({properties:{ariaActiveDescendant:null,ariaAtomic:Ro,ariaAutoComplete:null,ariaBusy:Ro,ariaChecked:Ro,ariaColCount:Vn,ariaColIndex:Vn,ariaColSpan:Vn,ariaControls:Yr,ariaCurrent:null,ariaDescribedBy:Yr,ariaDetails:null,ariaDisabled:Ro,ariaDropEffect:Yr,ariaErrorMessage:null,ariaExpanded:Ro,ariaFlowTo:Yr,ariaGrabbed:Ro,ariaHasPopup:null,ariaHidden:Ro,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Yr,ariaLevel:Vn,ariaLive:null,ariaModal:Ro,ariaMultiLine:Ro,ariaMultiSelectable:Ro,ariaOrientation:null,ariaOwns:Yr,ariaPlaceholder:null,ariaPosInSet:Vn,ariaPressed:Ro,ariaReadOnly:Ro,ariaRelevant:null,ariaRequired:Ro,ariaRoleDescription:Yr,ariaRowCount:Vn,ariaRowIndex:Vn,ariaRowSpan:Vn,ariaSelected:Ro,ariaSetSize:Vn,ariaSort:null,ariaValueMax:Vn,ariaValueMin:Vn,ariaValueNow:Vn,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function xz(e,n){return n in e?e[n]:n}function bz(e,n){return xz(e,n.toLowerCase())}const Nne=Hd({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vd,acceptCharset:Yr,accessKey:Yr,action:null,allow:null,allowFullScreen:ir,allowPaymentRequest:ir,allowUserMedia:ir,alt:null,as:null,async:ir,autoCapitalize:null,autoComplete:Yr,autoFocus:ir,autoPlay:ir,blocking:Yr,capture:null,charSet:null,checked:ir,cite:null,className:Yr,cols:Vn,colSpan:null,content:null,contentEditable:Ro,controls:ir,controlsList:Yr,coords:Vn|Vd,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ir,defer:ir,dir:null,dirName:null,disabled:ir,download:F4,draggable:Ro,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ir,formTarget:null,headers:Yr,height:Vn,hidden:F4,high:Vn,href:null,hrefLang:null,htmlFor:Yr,httpEquiv:Yr,id:null,imageSizes:null,imageSrcSet:null,inert:ir,inputMode:null,integrity:null,is:null,isMap:ir,itemId:null,itemProp:Yr,itemRef:Yr,itemScope:ir,itemType:Yr,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ir,low:Vn,manifest:null,max:null,maxLength:Vn,media:null,method:null,min:null,minLength:Vn,multiple:ir,muted:ir,name:null,nonce:null,noModule:ir,noValidate:ir,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ir,optimum:Vn,pattern:null,ping:Yr,placeholder:null,playsInline:ir,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ir,referrerPolicy:null,rel:Yr,required:ir,reversed:ir,rows:Vn,rowSpan:Vn,sandbox:Yr,scope:null,scoped:ir,seamless:ir,selected:ir,shadowRootClonable:ir,shadowRootDelegatesFocus:ir,shadowRootMode:null,shape:null,size:Vn,sizes:null,slot:null,span:Vn,spellCheck:Ro,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Vn,step:null,style:null,tabIndex:Vn,target:null,title:null,translate:null,type:null,typeMustMatch:ir,useMap:null,value:Ro,width:Vn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Yr,axis:null,background:null,bgColor:null,border:Vn,borderColor:null,bottomMargin:Vn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ir,declare:ir,event:null,face:null,frame:null,frameBorder:null,hSpace:Vn,leftMargin:Vn,link:null,longDesc:null,lowSrc:null,marginHeight:Vn,marginWidth:Vn,noResize:ir,noHref:ir,noShade:ir,noWrap:ir,object:null,profile:null,prompt:null,rev:null,rightMargin:Vn,rules:null,scheme:null,scrolling:Ro,standby:null,summary:null,text:null,topMargin:Vn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Vn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ir,disableRemotePlayback:ir,prefix:null,property:null,results:Vn,security:null,unselectable:null},space:"html",transform:bz}),Lne=Hd({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:sa,accentHeight:Vn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Vn,amplitude:Vn,arabicForm:null,ascent:Vn,attributeName:null,attributeType:null,azimuth:Vn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Vn,by:null,calcMode:null,capHeight:Vn,className:Yr,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Vn,diffuseConstant:Vn,direction:null,display:null,dur:null,divisor:Vn,dominantBaseline:null,download:ir,dx:null,dy:null,edgeMode:null,editable:null,elevation:Vn,enableBackground:null,end:null,event:null,exponent:Vn,externalResourcesRequired:null,fill:null,fillOpacity:Vn,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Vd,g2:Vd,glyphName:Vd,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Vn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Vn,horizOriginX:Vn,horizOriginY:Vn,id:null,ideographic:Vn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Vn,k:Vn,k1:Vn,k2:Vn,k3:Vn,k4:Vn,kernelMatrix:sa,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Vn,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Vn,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Vn,overlineThickness:Vn,paintOrder:null,panose1:null,path:null,pathLength:Vn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Yr,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Vn,pointsAtY:Vn,pointsAtZ:Vn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sa,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sa,rev:sa,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sa,requiredFeatures:sa,requiredFonts:sa,requiredFormats:sa,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Vn,specularExponent:Vn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Vn,strikethroughThickness:Vn,string:null,stroke:null,strokeDashArray:sa,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Vn,strokeOpacity:Vn,strokeWidth:null,style:null,surfaceScale:Vn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:sa,tabIndex:Vn,tableValues:null,target:null,targetX:Vn,targetY:Vn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:sa,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Vn,underlineThickness:Vn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Vn,values:null,vAlphabetic:Vn,vMathematical:Vn,vectorEffect:null,vHanging:Vn,vIdeographic:Vn,version:null,vertAdvY:Vn,vertOriginX:Vn,vertOriginY:Vn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Vn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:xz}),wz=Hd({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Mz=Hd({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bz}),Iz=Hd({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),kne={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},zne=/[A-Z]/g,Tz=/-[a-z]/g,One=/^data[-\w.:]+$/i;function jne(e,n){const s=B4(n);let l=n,h=qs;if(s in e.normal)return e.property[e.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&One.test(n)){if(n.charAt(4)==="-"){const m=n.slice(5).replace(Tz,Rne);l="data"+m.charAt(0).toUpperCase()+m.slice(1)}else{const m=n.slice(4);if(!Tz.test(m)){let _=m.replace(zne,Pne);_.charAt(0)!=="-"&&(_="-"+_),n="data"+_}}h=H4}return new h(l,n)}function Pne(e){return"-"+e.toLowerCase()}function Rne(e){return e.charAt(1).toUpperCase()}const Bne=yz([vz,Nne,wz,Mz,Iz],"html"),Q4=yz([vz,Lne,wz,Mz,Iz],"svg");function Fne(e){return e.join(" ").trim()}var Qd={},Y4,Az;function Une(){if(Az)return Y4;Az=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,s=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,h=/^:\s*/,m=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,_=/^[;\s]*/,i=/^\s+|\s+$/g,I=`
45
+ `+JSON.stringify(Me,null,2)),me&&me({response:De,tools:Me,functionData:Ee}),De},[R]),le=ve.useCallback(async(Y,q,ue={})=>{if(!n)return ue.onComplete&&ue.onComplete({response:"",error:new Error("Gemini provider is disabled")}),"";l(!0),i(null);try{console.log("Generating response for prompt:",q);const me=ue.extra||{},{onUpdate:ne,onComplete:De}=ue,Me=await L(Y);return ne?await U(Me,q,me,{onUpdate:ne,onComplete:De}):await W(Me,q,me,De)}catch(me){console.error("Error generating response:",me),me instanceof Error&&(console.error("Error message:",me.message),console.error("Error stack:",me.stack));const ne="I'm sorry, I encountered an error processing your request. Please try again later.";return ue.onComplete&&ue.onComplete({response:ne,error:me}),ne}finally{l(!1)}},[L,n,U,W]),pe=ve.useCallback(()=>{i(null)},[]);ve.useEffect(()=>()=>{C.current&&fetch(`${Lg}/api/chat/end/${C.current}`,{method:"DELETE"}).catch(Y=>{console.warn("Error ending session on unmount:",Y)})},[]);const ie={enabled:n,generateResponse:le,isLoading:s,searchResults:h,directionsLocationIds:_,clearDirectionsLocationIds:pe,defaultPrompt:I};return Le.jsx(Bk.Provider,{value:ie,children:e})}function Uk(){const e=ve.useContext(Bk);if(e===void 0)throw new Error("useGemini must be used within a GeminiProvider");return e}Fk.propTypes={children:ft.node.isRequired,enabled:ft.bool};const O_=pi({key:"showExternalIDs",default:!1});kg.propTypes={location:ft.object,locationClicked:ft.func,icon:ft.string,isHovered:ft.bool,disableHover:ft.bool};function kg({location:e,locationClicked:n,icon:s,isHovered:l,disableHover:h}){const{t:m}=oo(),_=ve.useRef(),i=fn(as),I=fn(O_);return ve.useEffect(()=>{const C=U=>{i.unhoverLocation(),n(U.detail)},S=()=>{h||e.properties.locationSettings?.selectable!==!1&&i.hoverLocation(e)},L=()=>{h||e.properties.locationSettings?.selectable!==!1&&i.unhoverLocation(e)};e.properties.locationSettings?.selectable===!1&&_.current.classList.add("non-selectable");const{current:R}=_;return R.location=e,R.icon=s||i.getDisplayRule(e).icon,R.addEventListener("locationClicked",C),h||(R.addEventListener("mouseover",S),R.addEventListener("mouseout",L)),l?_.current.classList.add("hovered"):_.current.classList.remove("hovered"),()=>{R.removeEventListener("locationClicked",C),h||(R.removeEventListener("mouseover",S),R.removeEventListener("mouseout",L))}},[e,n,l,h]),Le.jsx("mi-list-item-location",{level:m("Level"),ref:_,"show-external-id":I})}const Jte=()=>{const[e,n]=ve.useState(),s=fn(as),l=fn(Zy);return ve.useEffect(()=>{function h(){const m=s.getMapView().getCenter();n(m.lat+","+m.lng)}return s&&l?(s.getMapView().addListener("idle",h),h()):s&&s.getMapView().removeListener("idle",h),()=>{s&&s.getMapView().removeListener("idle",h)}},[s,l]),e},ih=pi({key:"language",default:void 0}),M4=pi({key:"searchInput",default:void 0}),j_=pi({key:"searchAllVenues",default:!1}),P_=ve.forwardRef(function(n,s){const{placeholder:l,mapsindoors:h,results:m,clicked:_,cleared:i,changed:I,inputFocused:C,category:S,google:L,mapbox:R,disabled:U=!1}=n,W=ve.useRef(),le=ve.useRef(null),pe=ve.useRef(!1),ie=fn(xd),Y=fn(ih),q=bi(M4),ue=sessionStorage.getItem("mapboxPlacesSessionToken"),me={longitude:ie?.coords.longitude,latitude:ie?.coords.latitude},ne=Jte(),De=fn(Ya),Me=fn(j_);return ve.useImperativeHandle(s,()=>({triggerSearch(){W.current.triggerSearch()},getValue(){return W.current.value},setDisplayText(Ee){pe.current||(le.current=Ee),W.current.setDisplayText(Ee)},focusInput(){W.current.focusInput()},clear(){W.current.clear()},getInputField(){return W.current.getInputField().then(Ee=>q(Ee))}})),ve.useEffect(()=>{const{current:Ee}=W;Ee.value&&window.mapsindoors.services.LocationsService.once("update_completed",()=>{Ee.triggerSearch()})},[Y]),ve.useEffect(()=>{const{current:Ee}=W;Ee.componentOnReady&&Ee.componentOnReady().then(()=>{pe.current=!0});const ge=()=>{pe.current=!0,le.current!==null&&(Ee.setDisplayText(le.current),le.current=null)};return Ee.addEventListener("componentRendered",ge),()=>Ee.removeEventListener("componentRendered",ge)},[]),ve.useEffect(()=>{const Ee=Ne=>m(Ne.detail),ge=()=>i(),Re=()=>C?.(),{current:Oe}=W;return h===!0&&(Oe.mapsindoors="true"),Oe.addEventListener("results",Ee),Oe.addEventListener("click",_),Oe.addEventListener("cleared",ge),Oe.addEventListener("changed",I),Oe.addEventListener("focused",Re),()=>{Oe.removeEventListener("results",Ee),Oe.removeEventListener("click",_),Oe.removeEventListener("cleared",ge),Oe.removeEventListener("changed",I),Oe.removeEventListener("focused",Re)}},[l,h,m,_,i,C,L,R,I]),Le.jsx("mi-search",{ref:W,"id-attribute":"search",placeholder:l,"session-token":ue,"user-position":me.latitude!==void 0&&me.longitude!==void 0?Object.values(me).join(","):null,"mi-near":ne,"mi-categories":S,disabled:U,mapbox:R,google:L,"mi-venue":Me?void 0:De,language:Y})});P_.propTypes={placeholder:ft.string,mapsindoors:ft.bool,results:ft.func,clicked:ft.func,cleared:ft.func,changed:ft.func,inputFocused:ft.func,category:ft.string,preventFocus:ft.bool,google:ft.bool,mapbox:ft.bool,disabled:ft.bool};const Vk=pi({key:"useKeyboard",default:!1}),Hk=ve.forwardRef(function(n,s){const{searchInputElement:l}=n,h=ve.useRef(),m=fn(ih);return ve.useImperativeHandle(s,()=>({clearInputField(){h.current.clearInputField()}})),ve.useEffect(()=>{const{current:_}=h;l&&(_.inputElement=l)},[l]),Le.jsx("mi-keyboard",{language:m,ref:h})});Hk.propTypes={searchInputElement:ft.instanceOf(HTMLInputElement)};const R_=pi({key:"searchResults",default:[]}),I4=pi({key:"selectedCategory",default:void 0});function ene(){return new Promise(e=>{const n=document.querySelector(".chip--active");if(n)e(n);else{const s=new MutationObserver(()=>{const l=document.querySelector(".chip--active");l&&(s.disconnect(),e(l))});s.observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}})}const tne=pi({key:"isBottomSheetLoaded",default:!1}),Qk=pi({key:"category",default:void 0});function Yk(e,n){const s=fn(bd),[l,h]=ve.useState(!1),m=e.getMap();ve.useEffect(()=>{n&&h(!1)},[n]);function _(I,C,S,L){const R=U=>{const W=C.getMap().queryRenderedFeatures(U.point);!W.length&&C?.getHighlight()?.length>0&&C.highlight([]),S&&(W.length?L(!1):L(!0))};return I.on("click",R),()=>{I.off("click",R)}}function i(I,C,S,L){const R=()=>{S&&L(!1)},U=()=>{C.highlight([]),S&&L(!0)};C.addListener("click",R);const W=I.addListener("click",U);return()=>{C.removeListener("click",R),W.remove()}}return ve.useEffect(()=>{let I;return s===so.Mapbox&&(I=_(m,e,n,h)),s===so.Google&&(I=i(m,e,n,h)),()=>I?.()},[e,n]),l}const Gk=e=>jn.createElement("svg",{width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M17.5 20.9999L10.5 13.9999L17.5 6.99994",stroke:"#1F2937",strokeWidth:2.33333,strokeLinecap:"round",strokeLinejoin:"round"})),nne=e=>jn.createElement("svg",{width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M10.5 7.00006L17.5 14.0001L10.5 21.0001",stroke:"#1F2937",strokeWidth:2.33333,strokeLinecap:"round",strokeLinejoin:"round"}));T4.propTypes={onSetSize:ft.func,getFilteredLocations:ft.func,searchFieldRef:ft.object,isOpen:ft.bool,topLevelCategory:ft.bool,handleBack:ft.func,selectedCategoriesArray:ft.object,categoryOrientation:ft.oneOf(["horizontal","vertical"])};function T4({onSetSize:e,getFilteredLocations:n,searchFieldRef:s,isOpen:l,topLevelCategory:h,handleBack:m,selectedCategoriesArray:_,categoryOrientation:i}){const I=fn(ng),C=Xo(),[S,L]=fr(I4),R=bi(R_),U=bi(Jp),[W,le]=ve.useState(),pe=fn(tne),ie=fn(Qk),Y=fn(as),q=Yk(Y,l),[ue,me]=ve.useState([]),[ne,De]=ve.useState([]),{t:Me}=oo(),Ee=ec(),ge=ve.useRef(null),[Re,Oe]=ve.useState(!1),[Ne,tt]=ve.useState(!1),dt=H=>{_e&&ge.current&&ge.current.scrollBy({left:H==="left"?-200:200,behavior:"smooth"})},Nt=()=>{if(ge.current){const{scrollLeft:H,scrollWidth:Q,clientWidth:de}=ge.current,we=H<=0,he=H>=Q-de-1;Oe(!we),tt(!he)}},re=!h&&ue.length===0,_e=Ee&&i==="horizontal"&&!re;ve.useEffect(()=>{if(!_e)return;const H=ge.current;if(H)return Nt(),H.addEventListener("scroll",Nt),()=>{H.removeEventListener("scroll",Nt)}},[_e,ue.length]);const D=`categories prevent-scroll${Ee?` categories--kiosk-${i||"vertical"}`:""}`;function P(H){typeof e=="function"&&e(H)}function K(H){L(H),S===H?(R([]),L(null),U([]),s.current.getValue()&&s.current.triggerSearch()):s.current.getValue()?s.current.triggerSearch():n(H)}return ve.useEffect(()=>{q&&S&&(L(null),R([]),U([]),s.current?.getValue()&&s.current.clear())},[q]),ve.useEffect(()=>{S&&(ene().then(H=>le(H)),P(th.MAX))},[S]),ve.useEffect(()=>{W&&ie!==void 0&&(C||!C&&pe)&&W.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[W,ie,pe]),ve.useEffect(()=>{let H=[];if(h){const de=I.flatMap(([,we])=>we.childKeys||[]);H=I.filter(([we])=>!de.includes(we))}else if(S){const we=I.find(([he])=>he===S)?.[1]?.childKeys||[];H=I.filter(([he])=>we.includes(he))}me(H);const Q=I.find(([de])=>de===S)?.[1]?.displayName;De(Q)},[I]),Le.jsx("div",{className:D,children:I.length>0&&Le.jsxs(Le.Fragment,{children:[!h&&Le.jsxs("div",{className:"categories__nav",children:[Le.jsx("button",{"aria-label":Me("Back"),type:"button",className:"categories__nav-button",onClick:m,children:Le.jsx(Gk,{})}),Le.jsx("div",{children:ne})]}),Le.jsxs("div",{className:"categories__row",children:[_e&&Le.jsx("div",{className:"categories__chevron categories__chevron--left",children:Le.jsx("button",{"aria-label":Me("Previous categories"),type:"button",disabled:!Re,onClick:()=>dt("left"),children:Le.jsx(Gk,{})})}),Le.jsx("div",{className:"categories__list",ref:Ee?ge:void 0,children:ue.map(([H,Q])=>!h&&_.current.length!==1?null:Le.jsx("div",{className:"categories__category",children:Le.jsxs("button",{onClick:()=>h?K(H):n(H),children:[Le.jsx("img",{src:Q.iconUrl,alt:""}),Q.displayName]})},H))}),_e&&Le.jsx("div",{className:"categories__chevron categories__chevron--right",children:Le.jsx("button",{"aria-label":Me("Next categories"),type:"button",disabled:!Ne,onClick:()=>dt("right"),children:Le.jsx(nne,{})})})]})]})})}const ine=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{opacity:.12,d:"M3 7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3H16.2C17.8802 3 18.7202 3 19.362 3.32698C19.9265 3.6146 20.3854 4.07354 20.673 4.63803C21 5.27976 21 6.11984 21 7.8V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8Z",fill:"#111827",style:{fill:"#111827",fill:"color(display-p3 0.0667 0.0941 0.1529)",fillOpacity:1}}),jn.createElement("path",{d:"M12 16V12M12 8H12.01M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z",stroke:"#111827",style:{stroke:"#111827",stroke:"color(display-p3 0.0667 0.0941 0.1529)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),rne=e=>jn.createElement("svg",{width:25,height:24,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M19.5 13C14.5987 13.4243 11.9243 16.0987 11.5 21C11.0578 16.0225 8.39737 13.5547 3.5 13C8.47478 12.4262 10.9262 9.97478 11.5 5C12.0547 9.89737 14.5225 12.5578 19.5 13Z",stroke:"white",style:{stroke:"white",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jn.createElement("path",{d:"M19.3864 2.34512C19.3642 2.14869 19.1981 2.0002 19.0004 2C18.8027 1.9998 18.6363 2.14794 18.6137 2.34433C18.5082 3.25861 18.2367 3.88584 17.8113 4.31127C17.3858 4.7367 16.7586 5.00822 15.8443 5.11367C15.6479 5.13632 15.4998 5.30271 15.5 5.5004C15.5002 5.69809 15.6487 5.86417 15.8451 5.88642C16.7439 5.98823 17.3855 6.25969 17.8217 6.68804C18.2556 7.11407 18.5322 7.74041 18.6126 8.64552C18.6305 8.84634 18.7988 9.00023 19.0004 9C19.202 8.99977 19.3701 8.84551 19.3874 8.64465C19.4645 7.75483 19.7409 7.11438 20.1776 6.67764C20.6144 6.24091 21.2548 5.96446 22.1446 5.88744C22.3455 5.87005 22.4998 5.70205 22.5 5.50044C22.5002 5.29883 22.3463 5.13048 22.1455 5.11264C21.2404 5.03224 20.6141 4.75557 20.188 4.3217C19.7597 3.88545 19.4882 3.24394 19.3864 2.34512Z",fill:"white",style:{fill:"white",fillOpacity:1}})),B_=pi({key:"isLegendDialogVisible",default:!1}),$k=k1({key:"legendFields",get:({get:e})=>{const n=e(Ga);if(!n?.properties.fields)return;const s=[];for(const h of Object.keys(n.properties.fields)){const m=parseInt(h.charAt(0));if(!Number.isInteger(m))continue;const _=s.find(C=>C.index===m),i=h.toLowerCase().includes("legendheading"),I=h.toLowerCase().includes("legendcontent");if(_)i?_.heading=n.properties.fields[h].value:I&&(_.content=n.properties.fields[h].value);else{const C={index:m,heading:i?n.properties.fields[h].value:null,content:I?n.properties.fields[h].value:null};s.push(C)}}return s.sort((h,m)=>h.index-m.index)}}),A4=pi({key:"initialVenueName",default:null});C4.propTypes={categories:ft.array,onSetSize:ft.func,isOpen:ft.bool,isSheetExpanded:ft.bool,onOpenChat:ft.func};function C4({onSetSize:e,isOpen:n,isSheetExpanded:s,onOpenChat:l}){const h=fn(kc),{t:m}=oo(),_=ve.useRef(),i=ve.useRef(),I=ve.useRef(),C=ve.useRef(),S=ve.useRef(),L=100,[R,U]=fr(R_),W=fn(ng),le=fn(oa),pe=fn(Vk),[ie,Y]=ve.useState(!1),[q,ue]=fr(I4),[me,ne]=ve.useState(),De=fn(as),Me=fn(bd),Ee=bi(Jp),ge=bi(Qa),Re=bi(ag),[Oe,Ne]=fr(Ya),tt=fn(ih),dt=Xo(),Nt=fn(Ga),[re,_e]=ve.useState(!1),D=fn(M4),{setInitialMessage:P}=Rk(),{enabled:K}=Uk(),H=ec(),Q=bi(B_),[de,we]=ve.useState(!1),he=fn($k),Ie=fn(j_),je=fn(wd),Fe=fn(A4),[Ue,He]=ve.useState(!1),[it,ct]=ve.useState(!1),Et=ve.useRef(!1),gt=ve.useRef([]),[zt,Wt]=ve.useState([]),[kt,on]=ve.useState(!1);function sn(){gt.current.length===0?(ue(null),U([]),Ee([]),He(!0),C.current?.getValue()?.trim()?C.current.triggerSearch():C.current&&(Et.current=!0,C.current.clear()),gt.current.pop()):(gt.current.pop(),ue(gt.current[0]))}function rn(et){gt.current.includes(et)||gt.current.push(et),q&&(ue([]),U([]),Ee([])),ue(et),window.mapsindoors.services.LocationsService.getLocations({categories:et,venue:Ie?void 0:je.find(Ct=>Ct.name.toLowerCase()===Oe.toLowerCase())?.name}).then(Ct=>Mn(Ct,!0))}function Nn(et){typeof e=="function"&&e(et)}function Hn(et){return q?[...et].sort((Ct,Xt)=>(Ct.properties?.name||"").localeCompare(Xt.properties?.name||"",void 0,{numeric:!0})):et}function Mn(et,Ct=!1){const Xt=et.slice(0,L);(!(R.length>0)||Xt.length===0)&&Nn(th.MAX),U(Xt),Ee(Xt),Y(Xt.length===0),et&&Ct&&an(et),H&&_.current?.addEventListener("transitionend",()=>{i?.current?.updateScrollButtons()},{once:!0})}function an(et){if(!De.goTo)return;const Ct=De.getFloor(),Xt={type:"FeatureCollection",features:et.filter(un=>parseInt(un.properties.floor,10)===parseInt(Ct,10)).filter(un=>un.properties.venueId.toLowerCase()===Oe.toLowerCase()).map(un=>({type:"Feature",geometry:un.geometry,properties:un.properties}))};Xt.features.length>0&&Promise.all([Yn(),yi()]).then(([un,_n])=>{De.goTo(Xt,{maxZoom:22,padding:{bottom:un,left:_n,top:0,right:0}})})}function pt(){if(C.current&&Ue){const et=C.current.getValue(),Ct=et?et.length:0;ct(Ct>5)}else ct(!1)}function Ft(){U([]),Y(!1),ct(!1),Et.current||De?.highlight?.([]),Et.current=!1,q&&rn(q),Ee([]),wr(S.current)||S.current.clearInputField()}function Tn(){C.current.getInputField(),He(!0),pt()}function On(){C.current.getInputField();const et=_.current.closest(".sheet");et?et.addEventListener("transitionend",()=>{C.current.focusInput(),He(!0),pt()},{once:!0}):(C.current.focusInput(),He(!0),pt())}function mn(et){ne(et)}function ti(et){et.properties.venueId.toLowerCase()!==Oe.toLowerCase()&&(Ne(et.properties.venueId),Re(!0));const Ct=De.getFloor(),Xt=et.properties.floor;Xt!==Ct?(De.once("floor_changed",()=>{const un=De.getMap();if(Me===so.Mapbox)un.once("idle",()=>ge(et));else if(Me===so.Google){const _n=un.addListener("idle",()=>{_n.remove(),ge(et)})}}),De.setFloor(Xt)):ge(et),Promise.all([Yn(),yi()]).then(([un,_n])=>{De.goTo(et,{maxZoom:22,padding:{bottom:un,left:_n,top:0,right:0}})})}function Yn(){return new Promise(et=>{dt?Nt?tg().then(Ct=>et(Ct)):et(0):et(200)})}function yi(){return new Promise(et=>{dt?Nt?et(0):Lc().then(Ct=>et(Ct)):et(0)})}function Jn(){if(R.length>0&&dt)return{display:"flex",flexDirection:"column",maxHeight:document.querySelector(".mapsindoors-map").clientHeight*.8+"px",overflow:"auto"}}function It(){return H&&kt}return ve.useEffect(()=>{const et=[".mi-floor-selector",".view-mode-switch",".mi-my-position",".view-selector__toggle-button",".building-list",".mapboxgl-ctrl-bottom-right",".gmnoprint",".language-selector-portal"],Ct=Xt=>{const un=_.current,_n=!!(un&&(un.contains(Xt.target)||typeof Xt.composedPath=="function"&&Xt.composedPath().includes(un))),Ln=et.some(Pn=>Xt.target.closest(Pn));!_n&&!Ln&&(He(!1),ct(!1),ue(null),U([]),Ee([]),gt.current=[])};return n?I.current=requestAnimationFrame(()=>{document.addEventListener("click",Ct)}):document.removeEventListener("click",Ct),()=>{document.removeEventListener("click",Ct),I.current&&cancelAnimationFrame(I.current)}},[n]),ve.useEffect(()=>()=>{ne()},[]),ve.useEffect(()=>{n&&!q&&(U([]),Ee([]),Y(!1),gt.current=[])},[n,q]),ve.useEffect(()=>{q&&Oe!==Fe&&(U([]),ue(null))},[Oe]),ve.useEffect(()=>{q&&window.mapsindoors.services.LocationsService.once("update_completed",()=>{C.current.triggerSearch()})},[tt]),ve.useEffect(()=>(De?.on("mouseenter",mn),()=>{De?.off("mouseenter",mn)}),[De]),ve.useEffect(()=>{if(n&&H&&R.length>0){const et=document.querySelector(".mapsindoors-map .search__results");i.current.scrollContainerElementRef=et}},[R,n]),ve.useEffect(()=>{if(pe){const et=Ct=>{Ct.target.closest("mi-keyboard")||Ct.target.tagName.toUpperCase()==="MI-SEARCH"||Ct.target.tagName.toUpperCase()==="INPUT"?_e(!0):_e(!1)};return window.addEventListener("click",et,!1),()=>{window.removeEventListener("click",et,!1)}}},[pe]),ve.useEffect(()=>{q&&rn(q)},[q]),ve.useEffect(()=>{Nt&&we(he.length>0)},[Nt]),ve.useEffect(()=>{const et=W.find(([Ct])=>Ct===q)?.[1]?.childKeys||[];Wt(et)},[W,q]),ve.useEffect(()=>{on(h?.appSettings?.areHorizontalCategoriesEnabled===!0||h?.appSettings?.areHorizontalCategoriesEnabled==="true")},[h]),ve.useEffect(()=>{n&&(Y(!1),He(!1),ct(!1),U([]),C.current&&(Et.current=!0,C.current.clear()))},[n,U]),ve.useEffect(()=>{if(!K||!D||!Ue||!it)return;const et=Ct=>{if(Ct.key==="Enter"&&l){Ct.preventDefault();const Xt=(Ct.target?.value||D?.value||"").trim();Xt&&(P(Xt),C.current&&(Et.current=!0,C.current.clear()),l())}};return D.addEventListener("keydown",et),()=>{D&&D.removeEventListener("keydown",et)}},[K,D,Ue,it,l,P]),Le.jsxs("div",{className:"search",ref:_,style:Jn(),children:[Le.jsxs("div",{className:"search__info",style:{gridTemplateColumns:H&&de?"min-content 1fr min-content":"1fr min-content"},children:[H&&de&&Le.jsx("button",{className:"search__legend",onClick:()=>Q(!0),"aria-label":m("Show legend"),children:Le.jsx(ine,{})}),Le.jsxs("label",{className:"search__label",children:[Le.jsx("span",{children:m("Search by name, category, building...")}),Le.jsx(P_,{ref:C,mapsindoors:!0,placeholder:m("Search by name, category, building..."),results:et=>Mn(et),clicked:()=>On(),inputFocused:()=>Tn(),cleared:()=>Ft(),changed:()=>pt(),category:q,disabled:!n})]})]}),K&&Ue&&it&&Le.jsxs("button",{className:"search__ask-ai-button",style:{"--ask-ai-button-primary-color":le},onClick:et=>{if(et.stopPropagation(),l){const Ct=(D?.value||C.current?.getValue()||"").trim();Ct&&(P(Ct),C.current&&(Et.current=!0,C.current.clear()),l())}},type:"button","aria-label":m("Ask with AI"),title:m("Ask with AI"),children:[Le.jsx(rne,{}),m("Ask with AI")]}),(It()||Ue||s)&&!ie&&W.length>0&&R.length===0&&Le.jsx(T4,{onSetSize:e,searchFieldRef:C,getFilteredLocations:et=>rn(et),isOpen:!!q,topLevelCategory:!0,categoryOrientation:kt?"horizontal":"vertical"}),!it&&ie&&Le.jsxs("p",{className:"search__error",children:[" ",m("Nothing was found")]}),R.length>0&&Le.jsxs("div",{className:`search__results prevent-scroll${H?" search__results--kiosk":""}`,children:[q&&Le.jsx(T4,{handleBack:sn,getFilteredLocations:et=>rn(et),onLocationClicked:ti,childKeys:zt,topLevelCategory:!1,selectedCategoriesArray:gt,categoryOrientation:kt?"horizontal":"vertical"}),Hn(R).map(et=>Le.jsx(kg,{location:et,locationClicked:()=>ti(et),isHovered:et?.id===me?.id},et.id))]}),re&&dt&&Le.jsx(Hk,{ref:S,searchInputElement:D}),n&&H&&R.length>0&&os.createPortal(Le.jsx("div",{className:"search__scroll-buttons",children:Le.jsx("mi-scroll-buttons",{ref:i})}),document.querySelector(".mapsindoors-map"))]})}const one=(e,n)=>{const[s,l]=ve.useState(void 0),[h,m]=ve.useState(void 0);return ve.useEffect(()=>{const _=(i=!1)=>{const I=n.current?.scrollHeight>n.current?.clientHeight;l(I),i===!0&&m(I)};_(!0),n.current&&new ResizeObserver(_).observe(n.current)},[e,n]),[s,h]},Zk=(e,n,s,l,h)=>{const[m,_]=ve.useState(),[i,I]=ve.useState(),[C,S]=fr(Ng),L=bi(Bd),[R,U]=ve.useState(),W=fn(k_);return ve.useEffect(()=>{U(!1);let le=!0;return e?.geometry&&n?.geometry&&s.getRoute({origin:z_(e),destination:z_(n),travelMode:l,avoidStairs:h,excludeHighwayTypes:W?[]:["busway"]}).then(pe=>{if(le)if(pe&&pe.legs){const ie=pe.legs.reduce((q,ue)=>q+ue.distance.value,0),Y=pe.legs.reduce((q,ue)=>q+ue.duration.value,0);_(ie),I(Y),L({originLocation:e,destinationLocation:n,totalDistance:ie,totalTime:Y,directionsResult:pe}),S(!0),U(!0)}else S(!1)},()=>{le&&S(!1)}),()=>{le=!1}},[e,n,s,h,l,W]),[m,i,C,R]},sne=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M12 7.75V12L14.75 14.75M21.25 12C21.25 17.1086 17.1086 21.25 12 21.25C6.89137 21.25 2.75 17.1086 2.75 12C2.75 6.89137 6.89137 2.75 12 2.75C17.1086 2.75 21.25 6.89137 21.25 12Z",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4500 0.4500 0.4500)",strokeOpacity:1},strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),ane=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M8 10L11.6464 13.6464C11.8417 13.8417 12.1583 13.8417 12.3536 13.6464L16 10",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4500 0.4500 0.4500)",strokeOpacity:1},strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),lne=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M16 14L12.3536 10.3536C12.1583 10.1583 11.8417 10.1583 11.6464 10.3536L8 14",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4500 0.4500 0.4500)",strokeOpacity:1},strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));Wk.propTypes={openingHours:ft.object,isMondayFirstDayOfTheWeek:ft.bool,onExpand:ft.func};function Wk({openingHours:e,isMondayFirstDayOfTheWeek:n=!0,onExpand:s}){const{t:l}=oo(),[h,m]=ve.useState(!1),i=fn(ih)??navigator.language,I=ve.useMemo(()=>new Date(2020,0,1,13).toLocaleTimeString(i).match(/AM|PM/)!==null,[i]),C=new Date().getDay(),S=ve.useMemo(()=>{const ue=[];for(let me=0;me<7;me++)ue.push(new Date(2024,0,me+1));if(!n){const me=ue.pop();ue.unshift(me)}return ue},[n]),L=ve.useMemo(()=>n?C===0?6:C-1:C,[C,n]),{standardOpeningHours:R}=e||{},U=ue=>{const[me,ne]=ue.split(":");return new Date(0,0,0,me,ne).toLocaleTimeString(i,{hour:"2-digit",minute:"2-digit",hour12:I})},W=ue=>{const me=ue.toLocaleString("en-US",{weekday:"long"}).toLowerCase(),ne=R?.[me];return!ne?.startTime||!ne?.endTime||ne.closedAllDay?{text:l("Closed"),isClosed:!0}:{text:`${U(ne.startTime)} - ${U(ne.endTime)}`,isClosed:!1}},le=ve.useCallback(ue=>{if(!ue||ue.closedAllDay||!ue.startTime||!ue.endTime)return!1;const me=new Date,ne=me.getHours()*60+me.getMinutes(),[De,Me]=ue.startTime.split(":"),[Ee,ge]=ue.endTime.split(":"),Re=parseInt(De,10)*60+parseInt(Me,10),Oe=parseInt(Ee,10)*60+parseInt(ge,10);return ne>=Re&&ne<=Oe},[]),ie=ve.useCallback(()=>{const ue=S[L].toLocaleString("en-US",{weekday:"long"}).toLowerCase();return le(R?.[ue])?"Open":"Closed"},[R,S,L,le,l])(),Y=ue=>ue.charAt(0).toUpperCase()+ue.slice(1),q=()=>{m(ue=>!ue)};return ve.useEffect(()=>{h&&typeof s=="function"&&s()},[h,s]),Le.jsxs("div",{className:"opening-hours",children:[Le.jsxs("button",{className:"contact-action-button contact-action-button--opening-hours",onClick:q,"aria-label":l(h?"Collapse opening hours":"Expand opening hours"),"aria-expanded":h,children:[Le.jsx("div",{className:"contact-action-button__icon-wrapper",children:Le.jsx(sne,{})}),Le.jsx("div",{className:"contact-action-button__text",children:W(S[L]).text}),Le.jsx("span",{className:`contact-action-button--opening-hours__status contact-action-button--opening-hours__status--${ie.toLowerCase()}`,children:l(ie)}),h?Le.jsx(lne,{}):Le.jsx(ane,{})]}),h&&Le.jsx("ul",{className:"opening-hours__list",children:S.map(ue=>{const me=W(ue);return Le.jsxs("li",{className:"opening-hours__list-item",children:[Le.jsx("span",{className:"opening-hours__day",children:Y(ue.toLocaleString(i,{weekday:"long"}))}),Le.jsx("span",{className:`opening-hours__hours ${me.isClosed?"opening-hours__hours--closed":""}`,children:me.text})]},ue)})})]})}const cne=ve.memo(Wk);function D4(e,n,s){return(n=(function(l){var h=(function(m,_){if(typeof m!="object"||!m)return m;var i=m[Symbol.toPrimitive];if(i!==void 0){var I=i.call(m,_);if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return(_==="string"?String:Number)(m)})(l,"string");return typeof h=="symbol"?h:h+""})(n))in e?Object.defineProperty(e,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[n]=s,e}var S4={click:"onClick",focusin:"onFocus",focusout:"onFocus",mousedown:"onMouseDown",mouseup:"onMouseUp",touchstart:"onTouchStart",touchend:"onTouchEnd"},qk=function(e){var n=e.children,s=e.onClickAway,l=e.focusEvent,h=l===void 0?"focusin":l,m=e.mouseEvent,_=m===void 0?"click":m,i=e.touchEvent,I=i===void 0?"touchend":i,C=ve.useRef(null),S=ve.useRef(null),L=ve.useRef(!1);ve.useEffect((function(){return setTimeout((function(){L.current=!0}),0),function(){L.current=!1}}),[]);var R=function(pe){return function(ie){S.current=ie.target;var Y=n?.props[pe];Y&&Y(ie)}};ve.useEffect((function(){var pe,ie,Y=(pe=(ie=C.current)===null||ie===void 0?void 0:ie.ownerDocument)!==null&&pe!==void 0?pe:document,q=function(ue){L.current&&(C.current&&C.current.contains(ue.target)||S.current===ue.target||!Y.contains(ue.target)||s(ue))};return Y.addEventListener(_,q),Y.addEventListener(I,q),Y.addEventListener(h,q),function(){Y.removeEventListener(_,q),Y.removeEventListener(I,q),Y.removeEventListener(h,q)}}),[h,_,s,I]);var U=S4[_],W=S4[I],le=S4[h];return ve.Children.only(ve.cloneElement(n,D4(D4(D4({ref:function(pe){C.current=pe;var ie=n.ref;typeof ie=="function"?ie(pe):ie&&(ie.current=pe)}},le,R(le)),U,R(U)),W,R(W))))};qk.displayName="ClickAwayListener";const E4=pi({key:"searchExternalLocations",default:!0}),Kk=k1({key:"baseLink",get:({get:e})=>{const n=e(OM),s=e(Qy),l=e(Hy),h=e(oa),m=e(ih),_=e(j_),i=e(E4),I=e(YM),C=window.location.origin+window.location.pathname.replace(/\/$/,""),S=new URLSearchParams(window.location.search),L=new URLSearchParams;return[["gmApiKey",n],["mapboxAccessToken",s],["apiKey",l],["primaryColor",h],["language",m],["searchAllVenues",_],["searchExternalLocations",i],["logo",I]].forEach(([R,U])=>{if(S.has(R)){const W=S.get(R);L.append(R,W)}else U&&(U===h?L.append(R,h.replace("#","")):L.append(R,U))}),`${C}?${L.toString()}`}}),une=e=>jn.createElement("svg",{width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.8484 4.66738C13.3129 3.20291 15.6872 3.20291 17.1517 4.66737L19.909 7.42474C21.3735 8.8892 21.3735 11.2636 19.909 12.7281L18.2804 14.3568C17.9875 14.6497 17.5126 14.6497 17.2197 14.3568C16.9268 14.0639 16.9268 13.589 17.2197 13.2961L18.8484 11.6674C19.7271 10.7887 19.7271 9.36407 18.8484 8.4854L16.091 5.72803C15.2123 4.84936 13.7877 4.84936 12.909 5.72804L11.2804 7.35672C10.9875 7.64961 10.5126 7.64961 10.2197 7.35672C9.92681 7.06382 9.92681 6.58895 10.2197 6.29606L11.8484 4.66738ZM15.5304 9.04606C15.8233 9.33895 15.8233 9.81382 15.5304 10.1067L9.53036 16.1068C9.23747 16.3997 8.7626 16.3997 8.4697 16.1068C8.17681 15.8139 8.17681 15.339 8.4697 15.0461L14.4697 9.04606C14.7626 8.75316 15.2375 8.75316 15.5304 9.04606ZM6.78036 10.7961C7.07326 11.089 7.07326 11.5639 6.78036 11.8568L5.15169 13.4854C4.27301 14.3641 4.27301 15.7887 5.15169 16.6674L7.90905 19.4248C8.78773 20.3035 10.2123 20.3035 11.091 19.4248L12.7197 17.7961C13.0126 17.5032 13.4875 17.5032 13.7804 17.7961C14.0733 18.089 14.0733 18.5639 13.7804 18.8568L12.1517 20.4854C10.6872 21.9499 8.31285 21.9499 6.84839 20.4854L4.09102 17.7281C2.62656 16.2636 2.62656 13.8893 4.09103 12.4248L5.7197 10.7961C6.0126 10.5032 6.48747 10.5032 6.78036 10.7961Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}})),Xk=e=>jn.createElement("svg",{width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 7.32635C3 5.25529 4.67893 3.57635 6.75 3.57635H7.25C9.32107 3.57635 11 5.25529 11 7.32635V7.82635C11 9.89742 9.32107 11.5764 7.25 11.5764H6.75C4.67893 11.5764 3 9.89742 3 7.82635V7.32635ZM6.75 5.07635C5.50736 5.07635 4.5 6.08371 4.5 7.32635V7.82635C4.5 9.06899 5.50736 10.0764 6.75 10.0764H7.25C8.49264 10.0764 9.5 9.06899 9.5 7.82635V7.32635C9.5 6.08371 8.49264 5.07635 7.25 5.07635H6.75ZM13 7.32635C13 5.25529 14.6789 3.57635 16.75 3.57635H17.25C19.3211 3.57635 21 5.25529 21 7.32635V7.82635C21 9.89742 19.3211 11.5764 17.25 11.5764H16.75C14.6789 11.5764 13 9.89742 13 7.82635V7.32635ZM16.75 5.07635C15.5074 5.07635 14.5 6.08371 14.5 7.32635V7.82635C14.5 9.06899 15.5074 10.0764 16.75 10.0764H17.25C18.4926 10.0764 19.5 9.06899 19.5 7.82635V7.32635C19.5 6.08371 18.4926 5.07635 17.25 5.07635H16.75ZM3 17.3264C3 15.2553 4.67893 13.5764 6.75 13.5764H7.25C9.32107 13.5764 11 15.2553 11 17.3264V17.8264C11 19.8975 9.32107 21.5764 7.25 21.5764H6.75C4.67893 21.5764 3 19.8975 3 17.8264V17.3264ZM6.75 15.0764C5.50736 15.0764 4.5 16.0838 4.5 17.3264V17.8264C4.5 19.069 5.50736 20.0764 6.75 20.0764H7.25C8.49264 20.0764 9.5 19.069 9.5 17.8264V17.3264C9.5 16.0838 8.49264 15.0764 7.25 15.0764H6.75Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),jn.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.75 13.5764C14.1642 13.5764 14.5 13.9122 14.5 14.3264V16.0764H16.25C16.6642 16.0764 17 16.4122 17 16.8264C17 17.2406 16.6642 17.5764 16.25 17.5764H13.75C13.3358 17.5764 13 17.2406 13 16.8264V14.3264C13 13.9122 13.3358 13.5764 13.75 13.5764ZM17 14.3264C17 13.9122 17.3358 13.5764 17.75 13.5764H20.25C20.6642 13.5764 21 13.9122 21 14.3264C21 14.7406 20.6642 15.0764 20.25 15.0764H17.75C17.3358 15.0764 17 14.7406 17 14.3264ZM17 18.3264C17 17.9122 17.3358 17.5764 17.75 17.5764H20.25C20.6642 17.5764 21 17.9122 21 18.3264C21 18.7406 20.6642 19.0764 20.25 19.0764H18.5V20.8264C18.5 21.2406 18.1642 21.5764 17.75 21.5764C17.3358 21.5764 17 21.2406 17 20.8264V18.3264Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),jn.createElement("path",{d:"M13 20.5764C13 20.0241 13.4477 19.5764 14 19.5764C14.5523 19.5764 15 20.0241 15 20.5764C15 21.1287 14.5523 21.5764 14 21.5764C13.4477 21.5764 13 21.1287 13 20.5764Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),jn.createElement("path",{d:"M5.5 17.0764C5.5 16.5241 5.94772 16.0764 6.5 16.0764H7.5C8.05228 16.0764 8.5 16.5241 8.5 17.0764V18.0764C8.5 18.6287 8.05228 19.0764 7.5 19.0764H6.5C5.94772 19.0764 5.5 18.6287 5.5 18.0764V17.0764Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),jn.createElement("path",{d:"M5.5 7.07635C5.5 6.52407 5.94772 6.07635 6.5 6.07635H7.5C8.05228 6.07635 8.5 6.52407 8.5 7.07635V8.07635C8.5 8.62863 8.05228 9.07635 7.5 9.07635H6.5C5.94772 9.07635 5.5 8.62863 5.5 8.07635V7.07635Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),jn.createElement("path",{d:"M15.5 7.07635C15.5 6.52407 15.9477 6.07635 16.5 6.07635H17.5C18.0523 6.07635 18.5 6.52407 18.5 7.07635V8.07635C18.5 8.62863 18.0523 9.07635 17.5 9.07635H16.5C15.9477 9.07635 15.5 8.62863 15.5 8.07635V7.07635Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}})),hne=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M8 6L12 2L16 6",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4510 0.4510 0.4510)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jn.createElement("path",{d:"M12 3V13",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4510 0.4510 0.4510)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),jn.createElement("path",{d:"M17 10C18.1046 10 19 10.8954 19 12V18C19 19.1046 18.1046 20 17 20H7C5.89543 20 5 19.1046 5 18V12C5 10.8954 5.89543 10 7 10",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4510 0.4510 0.4510)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),F_=pi({key:"qrCodeLink",default:null}),Jk=pi({key:"supportsUrlParameters",default:!1});ez.propTypes={location:ft.object.isRequired,buttonClassName:ft.string};function ez({location:e,buttonClassName:n}){const{t:s}=oo(),[l,h]=ve.useState(!1),m=fn(Kk),[_,i]=ve.useState(),I=fn(Jk),[C,S]=ve.useState(!1),[L,R]=ve.useState(!1),U=fn(Ga),W=bi(F_),le=Xo();ve.useEffect(()=>{m&&e&&i(m+"&locationId="+e.id)},[m,e]),ve.useEffect(()=>{S(!U&&I&&le);const Y=typeof navigator.clipboard?.writeText=="function";R(!U&&I&&Y)},[I,U,le]);const pe=()=>{navigator.clipboard.writeText(_),h(!1)},ie=()=>{W(_),h(!1)};return(C||L)&&Le.jsxs("div",{className:"share-location-link",children:[Le.jsx("button",{className:n,onClick:()=>h(Y=>!Y),title:s("Share"),"aria-label":s("Share"),children:Le.jsx(hne,{})}),l&&Le.jsx(qk,{onClickAway:()=>h(!1),children:Le.jsxs("ul",{children:[L&&Le.jsx("li",{children:Le.jsxs("button",{className:n,onClick:()=>pe(),children:[Le.jsx(une,{}),s("Copy link")]})}),C&&Le.jsx("li",{children:Le.jsxs("button",{className:n,onClick:()=>ie(),children:[Le.jsx(Xk,{}),s("QR Code")]})})]})})]})}const tz={email:"email",phone:"phone"};nz.propTypes={detailType:ft.string,active:ft.bool,displayText:ft.string,value:ft.string,icon:ft.string};function nz({detailType:e,active:n,displayText:s,value:l,icon:h}){if(!n||e.toLowerCase()==="openinghours")return null;const m=s?.trim()?s:l,_=(i,I)=>{switch(i.toLowerCase()){case tz.email:return`mailto:${I}`;case tz.phone:return`tel:${I}`;default:try{return new URL(I),I}catch{return"#"}}};return Le.jsxs("a",{className:"contact-action-button",href:_(e,l),target:e.toLowerCase()==="email"||e.toLowerCase()==="phone"?"_self":"_blank",rel:"noopener noreferrer",children:[Le.jsx("div",{className:"contact-action-button__icon-wrapper",children:Le.jsx("img",{alt:"",src:h,className:"contact-action-button__icon"})}),Le.jsx("span",{className:"contact-action-button__text",children:m})]})}N4.propTypes={onBack:ft.func,onStartWayfinding:ft.func,onSetSize:ft.func,onStartDirections:ft.func,isOpen:ft.bool};function N4({onBack:e,onStartWayfinding:n,onSetSize:s,onStartDirections:l,isOpen:h}){const{t:m}=oo(),_=ve.useRef(null),i=ve.useRef(null),I=ve.useRef(null),C=ve.useRef(null),S=ve.useRef(null),[L,R]=ve.useState(!1),[U,W]=ve.useState(!1),[le,pe]=ve.useState(!1),ie=ve.useRef(!1),[Y,q]=ve.useState(null),ue=fn(as),me=fn(Qa),ne=me?.properties?.additionalDetails,De=ne?.find(zt=>zt.key.toLowerCase().includes("openinghours")&&zt.active===!0)?.openingHours,[Me,Ee]=one(me,I),ge=fn(oa),Re=fn(Ga),Oe=fn(Vy),[Ne,tt]=ve.useState(),[dt,Nt]=ve.useState(),[re,_e]=ve.useState(!0),D=Xo(),P=fn(Fd),K=fn(Ud),[,,H]=Zk(dt,Ne,Oe,P,K),Q=fn(O_),de=Yk(ue,h),he=fn(kc)?.appSettings?.excludeFromUI?.includes("wayfindingDisabled");ve.useEffect(()=>{(()=>{if(ue&&me)try{const Wt=ue.getBuilding();if(Wt&&Wt.floors){const kt=Object.keys(Wt.floors).length;_e(kt>1)}else _e(!1)}catch{_e(!0)}})()},[ue,me]),ve.useEffect(()=>()=>{q(null),tt(),Nt()},[]);const Ie=ve.useCallback(()=>{R(!1),W(!1),pe(!1),e()});function je(zt){typeof s=="function"&&s(zt)}function Fe(){L===!1?(Ue(),je(th.MAX)):He()}function Ue(){requestAnimationFrame(()=>{R(!0),it(),ie.current=!0})}function He(){R(!1),ct(),ie.current=!1}function it(){const zt=requestAnimationFrame(()=>{i.current&&(W(i.current.scrollTop>0),pe(i.current.scrollTop<i.current.scrollHeight-i.current.offsetHeight-1))});return()=>cancelAnimationFrame(zt)}function ct(){W(!1),pe(!1)}function Et(){R(!1),W(!1),pe(!1),n()}function gt(){R(!1),W(!1),pe(!1),l()}return ve.useEffect(()=>{de&&e()},[de]),ve.useEffect(()=>()=>{q(null),tt(),Nt()},[]),ve.useEffect(()=>{R(!1),W(!1),pe(!1),q(null),me&&(_.current&&(_.current.location=me),q(ue.getDisplayRule(me)),tt(me)),Re&&Nt(Re)},[me,ue,Re]),ve.useLayoutEffect(()=>{const zt=document.querySelector(".modal.modal--open");if(!zt||!C?.current||!i?.current)return;const Wt=()=>{const kt=zt.offsetHeight,on=i.current.offsetHeight;kt>0&&on>0&&(on/kt>.9?(zt.style.height="100%",it()):zt.style.height="auto")};return S.current?S.current.complete?Wt():(S.current.onload=Wt,S.current.onerror=Wt):Wt(),()=>{zt.style.height="",S.current&&(S.current.onload=null,S.current.onerror=null)}},[me,L,h,ne]),Le.jsx("div",{className:`location-details ${ie.current===!0?"location-details--max-height":""} ${U?"location-details--content-above":""} ${le?"location-details--content-below":""}`,children:me&&Le.jsxs(Le.Fragment,{children:[Le.jsxs("div",{className:"location-details__header",children:[Le.jsxs("div",{className:"location-info",children:[Le.jsx("div",{className:"location-info__icon",children:Y&&Le.jsx("img",{alt:"",src:Y.icon.src?Y.icon.src:Y.icon})}),Le.jsxs("div",{className:"location-info__content",children:[Le.jsx("div",{className:"location-info__name",children:me.properties.name}),Le.jsx("mi-location-info",{level:m("Level"),ref:_,"show-external-id":Q,"show-floor":re})]}),Le.jsxs("div",{className:"location-info__actions",children:[Le.jsx(ez,{buttonClassName:"location-info__button",location:me}),Le.jsx("button",{className:"location-info__button",onClick:()=>Ie(),"aria-label":m("Close"),children:Le.jsx(Td,{})})]})]}),!he&&(Re&&D?Le.jsx("button",{disabled:!H,onClick:()=>gt(),className:`location-details__wayfinding ${H?"":"location-details--no-route"}`,style:{background:ge},children:m(H?"Start directions":"Directions not available")}):Le.jsx("button",{onClick:()=>Et(),style:{background:ge},className:"location-details__wayfinding",children:m("Start wayfinding")}))]}),Le.jsx("div",{className:"location-details__details prevent-scroll",ref:C,children:Le.jsxs("div",{ref:i,onScroll:zt=>it(),className:"location-details__details-content",children:[me.properties.imageURL&&Le.jsx("img",{ref:S,alt:"",src:me.properties.imageURL,className:"location-details__image"}),Object.keys(me.properties.categories).length>0&&Le.jsx("p",{className:"location-details__categories",children:Object.values(me.properties.categories).map((zt,Wt,kt)=>Le.jsxs(ve.Fragment,{children:[zt,Wt<kt.length-1&&Le.jsx(Le.Fragment,{children:"・"})]},zt))}),me.properties.description&&Le.jsxs("section",{className:`location-details__description ${L?"location-details__description--full":""}`,children:[Le.jsx("div",{ref:I,children:me.properties.description}),(Me||Ee||L)&&Le.jsx("button",{onClick:()=>Fe(),children:m(L?"Close":"Read full description")})]}),ne&&Le.jsxs("div",{className:"contact-action-buttons-container",children:[ne.map(zt=>Le.jsx(nz,{detailType:zt.detailType,active:zt.active,displayText:zt.displayText,value:zt.value,icon:zt.icon},zt.key)),De&&Le.jsx(cne,{openingHours:De,onExpand:()=>it()})]})]})})]})})}L4.propTypes={onLocationClick:ft.func.isRequired,onBack:ft.func.isRequired,locations:ft.arrayOf(ft.object),onSetSize:ft.func};function L4({onBack:e,onLocationClick:n,locations:s,onSetSize:l}){const{t:h}=oo();function m(_){typeof l=="function"&&l(_)}return ve.useEffect(()=>{m(th.FIT)},[]),Le.jsxs("div",{className:"locations-list",children:[Le.jsxs("div",{className:"locations-list__header",children:[Le.jsxs("div",{className:"locations-list__title",children:[s?.length," ",h("Locations")]}),Le.jsx("button",{className:"locations-list__close",onClick:()=>e(),"aria-label":h("Close"),children:Le.jsx(Td,{})})]}),Le.jsx("div",{className:"locations-list__scrollable prevent-scroll",children:Le.jsx("div",{className:"locations-list__list",children:s?.map(_=>Le.jsx(kg,{location:_,locationClicked:i=>n(i)},_.id))})})]})}const dne=e=>jn.createElement("svg",{width:16,height:17,viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("g",{clipPath:"url(#clip0_1663_3931)"},jn.createElement("path",{d:"M8 0.5C6.41775 0.5 4.87104 0.969192 3.55544 1.84824C2.23985 2.72729 1.21447 3.97672 0.608967 5.43853C0.00346629 6.90034 -0.15496 8.50887 0.153721 10.0607C0.462403 11.6126 1.22433 13.038 2.34315 14.1569C3.46197 15.2757 4.88743 16.0376 6.43928 16.3463C7.99113 16.655 9.59966 16.4965 11.0615 15.891C12.5233 15.2855 13.7727 14.2602 14.6518 12.9446C15.5308 11.629 16 10.0823 16 8.5C16 6.37827 15.1571 4.34344 13.6569 2.84315C12.1566 1.34285 10.1217 0.5 8 0.5ZM11.4667 11.98C11.4074 12.0452 11.3358 12.098 11.2559 12.1353C11.1761 12.1726 11.0897 12.1937 11.0017 12.1974C10.9136 12.2012 10.8258 12.1874 10.7431 12.1569C10.6604 12.1265 10.5846 12.0799 10.52 12.02L7.18667 8.99333C7.12364 8.92813 7.07457 8.85074 7.04247 8.76591C7.01038 8.68109 6.99592 8.5906 7 8.5V4.83333C7 4.65652 7.07024 4.48695 7.19527 4.36193C7.32029 4.23691 7.48986 4.16667 7.66667 4.16667C7.84348 4.16667 8.01305 4.23691 8.13807 4.36193C8.2631 4.48695 8.33334 4.65652 8.33334 4.83333V8.20667L11.42 11.04C11.5506 11.1586 11.6288 11.3242 11.6375 11.5004C11.6463 11.6765 11.5848 11.849 11.4667 11.98Z",fill:"#707070"})),jn.createElement("defs",null,jn.createElement("clipPath",{id:"clip0_1663_3931"},jn.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0 0.5)"})))),iz=e=>jn.createElement("svg",{width:13,height:20,viewBox:"0 0 13 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M9.61194 2.82846C9.61194 3.93033 8.7187 4.82357 7.61683 4.82357C6.51495 4.82357 5.62171 3.93033 5.62171 2.82846C5.62171 1.72659 6.51495 0.833344 7.61683 0.833344C8.7187 0.833344 9.61194 1.72659 9.61194 2.82846Z",fill:"#4B5563"}),jn.createElement("path",{d:"M3.85618 7.89573L2.70342 8.26942C2.51461 8.33063 2.38005 8.49797 2.36081 8.69552L2.15675 10.7898C2.10483 11.3227 1.64157 11.7195 1.10705 11.6891C0.529883 11.6562 0.101401 11.1412 0.174055 10.5677L0.562276 7.5031C0.609594 7.12957 0.863193 6.8145 1.21798 6.68846L5.43314 5.19101C5.91287 4.94642 6.49458 4.90944 7.02868 5.14168C7.58278 5.38261 7.96247 5.86074 8.09808 6.40693C8.10564 6.42543 8.11266 6.44417 8.11911 6.46314L8.13434 6.50792C8.1531 6.56308 8.17666 6.6165 8.20475 6.66755L9.12944 8.34823C9.24374 8.55597 9.4283 8.71621 9.65003 8.80021L11.6264 9.54897C12.2431 9.78262 12.4674 10.5397 12.0776 11.0716C11.8078 11.4397 11.3226 11.5778 10.8994 11.4069L8.27831 10.3486C8.07383 10.266 7.90247 10.118 7.79102 9.92774L7.36282 9.1966L6.28886 11.8906C6.2887 11.8929 6.2885 11.8952 6.28824 11.8974C6.28503 11.9259 6.28989 11.9548 6.30227 11.9807L6.30571 11.9879L9.7205 18.1483C10.0544 18.7506 9.83675 19.5096 9.23443 19.8434C8.6321 20.1773 7.87316 19.9597 7.53929 19.3574L4.94329 14.6741L2.97868 19.1924C2.70407 19.8239 1.96948 20.1133 1.33793 19.8387C0.706382 19.5641 0.417021 18.8295 0.691627 18.1979L3.26686 12.2753L3.30923 12.1729C3.31648 12.1479 3.31685 12.1215 3.3104 12.0965C2.88761 11.4405 2.77915 10.5975 3.08907 9.82005L3.85618 7.89573Z",fill:"#4B5563"})),fne=e=>jn.createElement("svg",{width:20,height:24,viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M4.48045 5.12001C4.0861 5.12526 3.70969 5.28562 3.4327 5.56636C3.15571 5.84709 3.00042 6.22562 3.00045 6.62001V16.73C3.00045 16.7963 2.97411 16.8599 2.92723 16.9068C2.88035 16.9537 2.81676 16.98 2.75045 16.98H1.48045C1.30245 16.979 1.1274 17.0255 0.973367 17.1147C0.819338 17.2039 0.691916 17.3326 0.60426 17.4876C0.516604 17.6425 0.471891 17.818 0.474737 17.996C0.477584 18.174 0.527887 18.348 0.620453 18.5L3.62045 23.5C3.709 23.6492 3.83484 23.7728 3.98563 23.8587C4.13641 23.9446 4.30694 23.9897 4.48045 23.9897C4.65397 23.9897 4.8245 23.9446 4.97528 23.8587C5.12606 23.7728 5.25191 23.6492 5.34045 23.5L8.34045 18.5C8.42797 18.3484 8.47417 18.1765 8.47444 18.0015C8.4747 17.8265 8.42903 17.6544 8.34197 17.5026C8.25491 17.3508 8.12953 17.2244 7.97834 17.1362C7.82716 17.048 7.65548 17.0011 7.48045 17H6.23045C6.19758 16.9975 6.16554 16.9885 6.13616 16.9735C6.10679 16.9586 6.08066 16.938 6.05928 16.9129C6.03791 16.8878 6.0217 16.8587 6.01161 16.8273C6.00151 16.7959 5.99772 16.7629 6.00045 16.73V6.62001C6.00047 6.42133 5.96102 6.22463 5.88439 6.04132C5.80776 5.85802 5.69548 5.69176 5.55407 5.55221C5.41265 5.41266 5.24493 5.30259 5.06062 5.2284C4.87632 5.1542 4.67911 5.11736 4.48045 5.12001Z",fill:"#707070"}),jn.createElement("path",{d:"M15.5203 18.84C15.9182 18.84 16.2997 18.6819 16.581 18.4006C16.8623 18.1193 17.0203 17.7378 17.0203 17.34V7.22995C17.0254 7.16717 17.0539 7.10861 17.1003 7.06597C17.1466 7.02332 17.2074 6.99975 17.2703 6.99995H18.5203C18.6968 6.99992 18.8702 6.95317 19.0228 6.86446C19.1754 6.77574 19.3018 6.64822 19.3891 6.49485C19.4765 6.34148 19.5217 6.16771 19.5201 5.99122C19.5186 5.81472 19.4704 5.64177 19.3803 5.48995L16.3803 0.48995C16.2918 0.340728 16.1659 0.217112 16.0152 0.131252C15.8644 0.0453926 15.6938 0.000244141 15.5203 0.000244141C15.3468 0.000244141 15.1763 0.0453926 15.0255 0.131252C14.8747 0.217112 14.7489 0.340728 14.6603 0.48995L11.6603 5.48995C11.5703 5.64177 11.5221 5.81472 11.5205 5.99122C11.519 6.16771 11.5642 6.34148 11.6516 6.49485C11.7389 6.64822 11.8653 6.77574 12.0179 6.86446C12.1705 6.95317 12.3438 6.99992 12.5203 6.99995H13.7703C13.8366 6.99995 13.9002 7.02629 13.9471 7.07317C13.994 7.12006 14.0203 7.18365 14.0203 7.24995V17.34C14.0203 17.7378 14.1784 18.1193 14.4597 18.4006C14.741 18.6819 15.1225 18.84 15.5203 18.84Z",fill:"#707070"}));function k4(e){const n={type:"Point",coordinates:[e.coords.longitude,e.coords.latitude]};return{id:"USER_POSITION",geometry:n,properties:{name:eE("My position"),anchor:n},type:"Feature"}}let z4;function pne(e){return new Promise((n,s)=>{z4||(z4=new window.google.maps.Geocoder),z4.geocode({placeId:e.properties.placeId},l=>{l.length>0?(e.geometry={type:"Point",coordinates:[l[0].geometry.location.lng(),l[0].geometry.location.lat()]},n(e)):s()})})}const gne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASAAAAAkCAYAAAApZeciAAARjUlEQVR4Ae2dBXTb2vL1x6GmzJehzBjbKb/YcsrMfJkZyvDS1HbgMTMzM7d9zMzMGCjaTrnxt+e7zvqPpwLLdUpLe62fnFqSZak5W3PmzFHI0/UoT7Nf2t49XJeaY8RT24xY6jXhWPJt+Pn1+Hl3KNa2dE7N8X6Ariwe19XJeHhE6k5OM6KpD4eiidMwnLQVWH/eiCc/F44mDUBXBo/r4iQ8PIxY262Icj7J5uIW7PdZ3h+QBwCBD65YW/GB5ec78H9wxf2ACg0vrmk8PCLRZHUonjri1ngUrdXRxExAHgkKfGjVusCHVqY7qPjQqgcAFRpeXLN4eOBuvdyIJs5e3MVKHcbrq7F+caTuxIjqxrZbquqOD4vUpeYh4mkMxRL/0fuE46kdgMIengHlhwc0ETRmmEvu9ZzYv4SuYnHEEoonzqjczmlONC+qSXcDZMXqmnSZEUs+g/3bXuiGpfYCYjw8A7LFwzOgqppjfWAe/84yn3iqOVzf5geUK5H9yfFIRj8NKIMH8AzIBg/PgHhoXZoPRr4SbCaAPC4dz4A8LPAMiPM5Ou+D3M7dgDwKg2dAHhZ4BoQk6Z6s6CeW+DGl0z5AHoXBMyAPCzwDQu7nJ9kGlLoH0OXmb1VV5S2RyoXNkWBtsxF8c0sk8Ea8bm8OB6ana6gIkCu+RuXnvlK88NyB0tpzB4vfjNc3nj1Ysv3soZK8Pm/qy9u7GvG2ZRj1i4fiyTcit1OH6GaR/83pUkDTG1t7ci4NgOYegDK4NqB/R4L9cd6bWyLBl/J1aDGCdU1GcPk/p07tCsgKyxVQEbgRDAIDgI/cqxzcBAaDG0ERXX0qATeDweAWUEr5qQj0Bj2AL8fj3ZxnIy8S1/UmdV07y4DKwe1gEOhzJadYwIAuZHe/TvQHdLlIrx5T1hwJ7GwO+4+gwaXNaAr7/9hiVK5OE/kA2fIRKjt7oGTnmYOlR84dLE2bU/zH84fKViM48QGyY/VH0sWojXrOqjYqFE3+xYgnZiFy/LnIoX0dUIacDejwvMpeON/XNoeDZ0yvhRFsAQ9YXQdesB7OcCMoBwvBPtAo2A2qc2ygI8BDoF59Ri1YCfoBrfHie0wlawXFdrPJWuPEdn6g1QesBjH1HevAZnALmSugrlcZmAdqxGdsBlr9wFqT48XBRnBjjoY+Xx2L2QcWZtZPKJQBCaO7x+T/8lkwycRsbxXXZzU5SF3PWeQg3MUnZDeoxN8BOTEnevJ2HrZ3AzdkQJL/VPkHtBiB71kZjwZRwNvTVVUlgEz5Gg2AwXwPpHOj+O3YpwSQGRzJoAbqK86Fl4lTMKgTl2JAR6v9d7DR5nYtAm+UJqQNqDHDeLANNNrwvM0dsBisBo0OxMAEIDVArH+arPWUanjFZK7NYrvbTAxyv8N3rLcwwtlim5HgGZN9teGNBlGH49WZ7Kevz3aHz9gKggUyoBgYA+IOx9yg/g+K1Pe8hazlA1v1/5ODAYWzu1/J7wNygosMeXs3cOEioA64O9EUCf7kosYVDqYQAfywJeL/eVPEf06vbzb8bwGkaf8udUWX6yfaZBAJpfD6w3MHin9+5iul50xM6C2ANGyYiGq+bGo20dQv8POf9bp8Dah1+vSeuBa/1+eK6/APXI8DuBa/1uvAHkASXkgDerFofBvBDDAdrAV1YrttoNzkl2k9aBQ8AkJgClgIdot1DWA0kHpWrO9lEUU0KkaaGaEwmJ3qLn2balTPAAMEM69PqM8fa2VAwgwbMvvdAx5TUeIgUKf2CYEgiChDbbA4n+5ghzLw1WAqmA42iAilpkAGVCdMcw9YCCpBFXhYXaM1QGqmWLeSrDVUbPcYILcGhNzGDwA5kJcBherapgDqAF2Jl2Q3KP8p5H+e5FwQIIYjJLz3Kt34YExLAUlgJi+RxgKzOYWu2JOcCwKUYQByQa+6yIQOlC0FJOHCyuxrkzgTrkttkUWZ1ftPDFcmlZcBId/zcnUtmvC6SEY5hw1/Jc7zX6Jbev6wUTkGUAe8kAbE7AQ3A63+YIvYbjmQmqQayDigVQpWie1qQFeLxl0JtF4EGhWrHH6xF8u7s+pizAdFJkY6VWyzB5Tq7yjYYtN9KlYRZTXw6eOp89phEtWtUV2fvkDrZrALNBbCgAQbQRnQmqCMdYzqKu4XvwvlZK6NYv8JgNx2wcLxxD8BOePegMLRE9MBMf+dN2kg7uyn/68xBS80VQcjgMxorg7uUFHSL2XjbP8CDUSkc1pEPRcQDUUAmQFj2qGioF/KfBAnnDPTTzKGkmgPxVILAWmqatIlbEL5GtCxqol9YDgnhbkm8DoCkISNGWb8Snkd8O8PAOqAFyS7HQ4hcz+Rw6gDPUUjkuY02SHsvl9sa8hGJN6/G2g9Lu6WjwsT0w12oficwTLPJN6/zyFZvMrkfLQBRR0SspPFtpscjrdBdYU71Bc0iBya3fFuAQ0FNKCn9LVVmia2fQJILRbrZgCtHsLAdoHiPJPQIHkjIDs4muFowA41ugYSYwAxyOU8ohrSmwBZwaNW3CXLjoIqxgNiMLr1SJahfKX0TYCs4M/jLpmKmMYDAhz9rFbf/d2ArJgdPTWYr2M+BtQaCW5UEd5eaTz/q5oyCDmfxpaw/7BJd/V0c9WYHoAYXpDqzztpsUmUcqPq0jiNmN1qke/xiYghqkZh+oh9XqSihuFA6nnQCPaCIos77hCy151i2/UWBrSc7HW32PZWstdwi6hulorYnLSxgAY0OofRuJ1iexmZ9RNmuMXkdyIk9guRC3HdT/bjNNoeAnSpwKi+JyMINjtAgBvWe7LNJDgNkB3opmyR+7Qa/ocBAY5o3iPNBP+eBsiWQyVb5D4wsYcBMboyHOZSBcgORIXfyseAdFTDxsoGiffn4Zw/i3Nvv3hUMHicu6atc/yjAHXwwkInT50biu7fB1z+0vtEPqhBGc188VkjLPIK/VQ+aIXYTr8vtV0lfeM21ElTlQbk4nrtcXs8HU2ovNogclagQAZUn2OJwEoduQndJdYNVf//20UXrRu5EBrMLtV9+JUesXILPyGRH1ImZsb/FlAHLYb/oGxQGAHqDcgOjJbNz05GB6KAGHS5DkozSR+g3oDsQLdrvtwHRAExMM9PZSXQaxIDANmBfd6clwGFgx9S0WAtXv8E0hpO2qMc4f7/zZ7QHZCGeOEiKtCjVfeY3M0qKTc9JvbpLd6/Xby/RLz/qEnE9LRInhepboE2MBLdR7fskgbkIm/RkOfxtoEOPSTe70POGlogA9qdqx+I400HUkNUF7RDI9RNzJVmxVI3XzQLPpZ4DFC+IILYria2vhJQhqvfgGLJT7utjUKB4psKYEAm+E+1hAPv4iS0Qx1UZqG6Mg66Uf9SqW7CNNJyHk7vKe+OIpm6Hfgy6xtMckYRE/O812aIfr/IpQRcMMHCgMaTverEdwm4QH7u/Sryc9LIAhnQi8lZ+npMMYl0nxYRVS+TEokbgWuxQeihZiPWVgnILTwyxJNZs7p19amJgDqAmbw7y0xm+2cAssWo3JbVBYsEHgLEoNv07qzu1JdLZgCyA/tsy+62lT4EiOHnXavrMQuQPalvuDUgPQKm+FOrEXyeq6IB5QIvpAHNJGdNMBlhmuAiL6KHyWMm+YEl4vMGgmnq3x26Qby/DJSKIfa1No2rAXQh93JrQNtE4yuj/LRS5WScNKuAOaDu5KxNKuLU8qtRwJ6iZOABylPVDUd78wiYGrk6hgrgEKCcwcPKjGjyb/oRrYAkbB7Z3Y7A2wBZkV69urg54v+N3Od/4eBYQAybR3YSuvhtgKxAtXQxXn+TlYQ+VDoWEBOOJzeoc3gbIAtw/U7ewV3OvAzI8K9SEc//msOVcyynixD5rKZk8EIa0OPA5yKxOgaweoj39jpUS+vRqPuB1mCZcBbdkOeA1vNiuHyUqt/RWiHWB8heXUD5JRrQGqeRQaHyDFoVLgYJfODJAhrQDLJXN1ErVGfx/UvAXtGtm60NNV9Vxdqm6ofP88gOktQvzcxxImvSJZy8ltXAGZLh6PGhgCR8V88eeg62c9IVkAW12VMS/D/LGoY/QP0xenVSjGi1Y5RrHiBzSmvVMPzP5DB8pgL6uEyi818FAaTJDMN/Pt9heM7n4PyPyfNjAwJkRiYS/DNyQbMASXih64CCZK0xNvUx94p1S4WRORXVTQJaReKX9hnR/ZoDtOaaFAbGQKnDyNZu0IOstQREwXLQOx8DUvmYnQ4RxXIQBctAL2WEtTrKsFBlgeuAamzyTj5lsBtJy7yrXC/yXD66RIXr2pZkP5pDGEks8S4kWjdF6tqCHOlE6lOT+RGubFAwrn+Y/aUMrF8MyAyYSlxV/Z7hkS6ZYG2ZW3EzVz5fPPzsXwBIAlOJqwroMzzS1f5l6g7o//NFupkrn3l9FoeKFwCS6DwWmzMXJ8pCRDZXmPQXLrUQ0aTOqY3nfPE8OUAA12PaDTxPLMu0jeArpBHrHBBTD0KgRBnCNDVSM1XXoKj1q00a3CBVev+kSB5bRisOZf23mGy3KccIbpvJyFKZGomLgp55GpCuedoC7tDHU3VL+0EPmwLMGAiq61YCQqChEwoRd4Ahyiy6g3VqPttAslYPkykdM6hA4m4XGk0LN6R84UezspkBsiAz+z34fbOkK/g5aoV+ZzYEDV4HSMMVzzCh72tz4YroF2p+in/HkZFej31eB0jDkQ1G7L52sbkkTiLn8zOs+2OhpmKk/f5SFCB+w+Rckxhy/yl3P7lY02k6hp6K8ZiaOPoAuB/UmMz/8eVwB64Hj4F7lfEwexySqiPU9tv1MfWQrkNUJRvPNpM5VHeDh0DU4bOUATmqp4r4mC0Wx2sAEy0iwnvUZ+wF94H71cThxwpkQPuUGW0F94BH1I2GCZCzVqnfrS5UQFW9JHUT/z2wvAwIdUXh/cmxgJw4Pmdqv6ZI4JuqUVljBN7A+SBAZrR/ifqh0PCb0mAceAPngwCZwbkxUxMyMSXZZctzMmpvRIFfc7wGYrhej4rpCGgUWA4aLWgASxweqzFezCmz4jHQ1ylRrRrWQlLSlc8qF+FkCg84fMdabQZ5GhCrF3jY6XgOw/olKiFtxipwZ4EMaBfooyfbKqIOZi81Sg9edIaQFwqEo6n3hqLJlLP5JL8D1rmtIeLZ7Yh4ngVNNkPRv241AosBOcGz21Fo+CyinSZL4/lK8a/PHSxbDMgJjoRwftvAMYtz/zNPM+EJqqLu6Wt5/FWMzLUIPgdaba7Fz2Ha1YA0xAuTBjUIrAPbwT6wBawAt7p4DtBM8ADYAWrBNrABjHbR9x8vqp77k7X6i+0mU27ygRFgLdgKajPG+SgwbPI1d4CZGQYAcnG8kWCdyfHCLorx7gRrwHZQC3aA9aIMoae4FoPIvSrATFApbgSV4EGwF+wDT4O5oCflrnXiJtaPOllohOVcDcwPnIchvYwfyMVD9+FYaifngdT0jbzgbgjPB0OUs4u7WU1G4NX4+ZkWo6JC3+lz4sdUyvPBMNy+i7tZMJ5X4+dnkBuqkAnnXOFKbowUrkAeqB68BdTLB5LBeH5vMfIHA1oexB8nfFMH/o+sngnIij/OG9aF655ADT+cja8H58cwehjU18LpcRyePBVafUXy+W7qXHlKp338Z4cAWTHv1e1d1Aji6wFdbnjR2QbkydNiPSXDU+HFj1hFdPcIulC/5LlhgKzgyCirbqgudS+gyw0WnWZAnjzpWqFngY86RV7Ug5zOH7LqgOLJNYA0s2uSN+D1r2Lbs/weoMsNLzrTgDx5MlSNWSfJE/Jb95kk2t/MU1R4cipPOUHk86j+g46Z/BBdCbDoNAPy5KlUFJTWgFLqVHlREBdfuitDSPxdTVy9rPCiswzIk6cpqiSgc+UpM8Uk9bpczIe7bBwVAbpSYNFpBuTJU28wMEMZebpsCkeTBgoKD+qnRzI8+ZbLEcQUjSsGLwgKZRhInjx5um40s/54X340B08zwZSV6qr6U4Oupr8i+/8Adnj5PFwBRDQAAAAASUVORK5CYII=",rz=e=>jn.createElement("svg",{width:20,height:18,viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M18.5329 7.19049C18.5118 7.16682 18.4958 7.13909 18.4857 7.109C18.4757 7.07891 18.4719 7.04709 18.4746 7.01549C18.481 6.98424 18.4939 6.9547 18.5126 6.92884C18.5313 6.90298 18.5553 6.88139 18.5829 6.86549L19.2496 6.47383C19.4034 6.39827 19.54 6.29191 19.6509 6.16135C19.7619 6.03079 19.8448 5.87881 19.8945 5.71485C19.9443 5.5509 19.9598 5.37846 19.9401 5.20826C19.9204 5.03806 19.8659 4.87372 19.7801 4.72545C19.6942 4.57719 19.5788 4.44816 19.4409 4.34637C19.3031 4.24459 19.1458 4.17223 18.9789 4.13379C18.8119 4.09534 18.6388 4.09163 18.4703 4.12289C18.3019 4.15415 18.1416 4.21971 17.9996 4.31549L17.1079 4.82383C17.0788 4.84065 17.0457 4.8495 17.0121 4.8495C16.9784 4.8495 16.9454 4.84065 16.9163 4.82383C16.8885 4.81108 16.8638 4.79261 16.8437 4.76963C16.8236 4.74665 16.8085 4.71968 16.7996 4.69049L16.4663 2.69883C16.3686 2.10879 16.0627 1.5733 15.604 1.18953C15.1453 0.805757 14.5643 0.599136 13.9663 0.607159H5.99125C5.39796 0.609722 4.82491 0.823205 4.37454 1.20945C3.92418 1.59569 3.62587 2.12951 3.53292 2.71549L3.19959 4.69049C3.19282 4.72272 3.17879 4.75297 3.15858 4.77896C3.13836 4.80496 3.11249 4.826 3.08292 4.84049C3.05378 4.85731 3.02073 4.86617 2.98709 4.86617C2.95344 4.86617 2.92039 4.85731 2.89125 4.84049L1.99959 4.34049C1.85752 4.24471 1.69729 4.17915 1.52882 4.14789C1.36036 4.11663 1.18727 4.12034 1.0203 4.15879C0.853336 4.19723 0.696054 4.26959 0.558225 4.37137C0.420396 4.47316 0.304963 4.60219 0.219094 4.75045C0.133225 4.89872 0.078754 5.06306 0.0590634 5.23326C0.0393727 5.40346 0.0548829 5.5759 0.104631 5.73985C0.154378 5.90381 0.237302 6.05579 0.348251 6.18635C0.4592 6.31691 0.595806 6.42327 0.749587 6.49883L1.41625 6.89049C1.44391 6.90639 1.46788 6.92798 1.48655 6.95384C1.50523 6.9797 1.51819 7.00924 1.52459 7.04049C1.52727 7.07209 1.52348 7.10391 1.51345 7.134C1.50342 7.16409 1.48736 7.19182 1.46625 7.21549C0.79248 7.90316 0.415458 8.82776 0.416253 9.79049V11.4572C0.416532 11.8754 0.543199 12.2838 0.779646 12.6288C1.01609 12.9738 1.35128 13.2393 1.74125 13.3905C1.78008 13.4055 1.81353 13.4317 1.83729 13.4659C1.86106 13.5001 1.87405 13.5405 1.87459 13.5822V15.2072C1.87459 15.7044 2.07213 16.1814 2.42376 16.533C2.77539 16.8846 3.25231 17.0822 3.74959 17.0822C4.24687 17.0822 4.72378 16.8846 5.07541 16.533C5.42704 16.1814 5.62459 15.7044 5.62459 15.2072V13.7572C5.62455 13.7011 5.64622 13.6472 5.68507 13.6068C5.72392 13.5664 5.77691 13.5426 5.83292 13.5405H14.1663C14.2223 13.5426 14.2753 13.5664 14.3141 13.6068C14.3529 13.6472 14.3746 13.7011 14.3746 13.7572V15.2072C14.3746 15.7044 14.5721 16.1814 14.9238 16.533C15.2754 16.8846 15.7523 17.0822 16.2496 17.0822C16.7469 17.0822 17.2238 16.8846 17.5754 16.533C17.927 16.1814 18.1246 15.7044 18.1246 15.2072V13.5822C18.1251 13.5405 18.1381 13.5001 18.1619 13.4659C18.1856 13.4317 18.2191 13.4055 18.2579 13.3905C18.6479 13.2393 18.9831 12.9738 19.2195 12.6288C19.456 12.2838 19.5826 11.8754 19.5829 11.4572V9.79049C19.5903 8.81911 19.2128 7.88433 18.5329 7.19049ZM6.03292 2.26549H14.0496C14.2493 2.26292 14.4433 2.33219 14.5963 2.46067C14.7493 2.58915 14.851 2.7683 14.8829 2.96549L15.2829 5.35716C15.2878 5.38821 15.2858 5.41994 15.2772 5.45016C15.2686 5.48038 15.2534 5.50836 15.2329 5.53216C15.2131 5.55434 15.1887 5.57183 15.1613 5.58336C15.1339 5.59489 15.1043 5.60017 15.0746 5.59883H4.99959C4.9654 5.60054 4.93125 5.59471 4.89957 5.58175C4.86788 5.56878 4.83944 5.54901 4.81625 5.52383C4.79517 5.4674 4.79517 5.40525 4.81625 5.34883L5.17459 3.02383C5.19879 2.82341 5.29493 2.63859 5.44514 2.50372C5.59534 2.36884 5.7894 2.29307 5.99125 2.29049L6.03292 2.26549ZM16.2913 11.4322C16.044 11.4322 15.8024 11.3588 15.5968 11.2215C15.3912 11.0841 15.231 10.8889 15.1364 10.6605C15.0418 10.4321 15.017 10.1808 15.0653 9.9383C15.1135 9.69582 15.2326 9.47309 15.4074 9.29827C15.5822 9.12346 15.8049 9.00441 16.0474 8.95618C16.2899 8.90795 16.5412 8.9327 16.7696 9.02731C16.998 9.12192 17.1932 9.28213 17.3306 9.4877C17.4679 9.69326 17.5413 9.93493 17.5413 10.1822C17.5447 10.352 17.5136 10.5207 17.4497 10.6781C17.3858 10.8355 17.2905 10.9781 17.1696 11.0975C17.0488 11.2168 16.9048 11.3102 16.7467 11.3721C16.5885 11.4339 16.4193 11.4629 16.2496 11.4572L16.2913 11.4322ZM2.49959 10.2072C2.49959 9.95993 2.5729 9.71826 2.71025 9.5127C2.8476 9.30713 3.04282 9.14692 3.27123 9.05231C3.49964 8.9577 3.75097 8.93295 3.99345 8.98118C4.23593 9.02941 4.45865 9.14846 4.63347 9.32327C4.80829 9.49809 4.92734 9.72082 4.97557 9.9633C5.0238 10.2058 4.99905 10.4571 4.90444 10.6855C4.80983 10.9139 4.64961 11.1091 4.44405 11.2465C4.23849 11.3838 3.99681 11.4572 3.74959 11.4572C3.41807 11.4572 3.10012 11.3255 2.8657 11.091C2.63128 10.8566 2.49959 10.5387 2.49959 10.2072Z",fill:"#4B5563"})),oz=e=>jn.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("g",{clipPath:"url(#clip0_1697_57490)"},jn.createElement("path",{d:"M12.0829 5.05834C13.1783 5.05834 14.0663 4.17037 14.0663 3.07501C14.0663 1.97964 13.1783 1.09167 12.0829 1.09167C10.9876 1.09167 10.0996 1.97964 10.0996 3.07501C10.0996 4.17037 10.9876 5.05834 12.0829 5.05834Z",fill:"#4B5563"}),jn.createElement("path",{d:"M3.75 11.4083C3.00832 11.4083 2.2833 11.6283 1.66661 12.0403C1.04993 12.4524 0.569282 13.038 0.285453 13.7233C0.00162482 14.4085 -0.0726377 15.1625 0.0720569 15.8899C0.216751 16.6173 0.573904 17.2855 1.09835 17.81C1.6228 18.3344 2.29098 18.6916 3.01841 18.8363C3.74584 18.981 4.49984 18.9067 5.18506 18.6229C5.87029 18.339 6.45596 17.8584 6.86801 17.2417C7.28007 16.625 7.5 15.9 7.5 15.1583C7.4978 14.1644 7.10201 13.2119 6.39922 12.5091C5.69644 11.8063 4.74389 11.4105 3.75 11.4083ZM3.75 17.2417C3.33796 17.2417 2.93517 17.1195 2.59256 16.8906C2.24996 16.6616 1.98294 16.3363 1.82525 15.9556C1.66757 15.5749 1.62631 15.156 1.7067 14.7519C1.78708 14.3478 1.9855 13.9765 2.27686 13.6852C2.56822 13.3938 2.93944 13.1954 3.34356 13.115C3.74769 13.0346 4.16658 13.0759 4.54726 13.2336C4.92794 13.3913 5.25331 13.6583 5.48223 14.0009C5.71115 14.3435 5.83333 14.7463 5.83333 15.1583C5.83333 15.4319 5.77945 15.7028 5.67475 15.9556C5.57005 16.2083 5.4166 16.438 5.22314 16.6315C5.02969 16.8249 4.80002 16.9784 4.54726 17.0831C4.2945 17.1878 4.02359 17.2417 3.75 17.2417Z",fill:"#4B5563"}),jn.createElement("path",{d:"M16.25 11.4083C15.5083 11.4083 14.7833 11.6283 14.1666 12.0403C13.5499 12.4524 13.0693 13.038 12.7855 13.7233C12.5016 14.4085 12.4274 15.1625 12.5721 15.8899C12.7168 16.6173 13.0739 17.2855 13.5984 17.81C14.1228 18.3344 14.791 18.6916 15.5184 18.8363C16.2458 18.981 16.9998 18.9067 17.6851 18.6229C18.3703 18.339 18.956 17.8584 19.368 17.2417C19.7801 16.625 20 15.9 20 15.1583C19.9978 14.1644 19.602 13.2119 18.8992 12.5091C18.1964 11.8063 17.2439 11.4105 16.25 11.4083ZM16.25 17.2417C15.838 17.2417 15.4352 17.1195 15.0926 16.8906C14.75 16.6616 14.4829 16.3363 14.3253 15.9556C14.1676 15.5749 14.1263 15.156 14.2067 14.7519C14.2871 14.3478 14.4855 13.9765 14.7769 13.6852C15.0682 13.3938 15.4394 13.1954 15.8436 13.115C16.2477 13.0346 16.6666 13.0759 17.0473 13.2336C17.4279 13.3913 17.7533 13.6583 17.9822 14.0009C18.2112 14.3435 18.3333 14.7463 18.3333 15.1583C18.3333 15.4319 18.2794 15.7028 18.1748 15.9556C18.0701 16.2083 17.9166 16.438 17.7231 16.6315C17.5297 16.8249 17.3 16.9784 17.0473 17.0831C16.7945 17.1878 16.5236 17.2417 16.25 17.2417Z",fill:"#4B5563"}),jn.createElement("path",{d:"M8.93421 9.52501L10.1425 8.14168C11.2897 8.9152 12.6423 9.32736 14.0259 9.32501H14.5842C14.9157 9.32501 15.2337 9.19331 15.4681 8.95889C15.7025 8.72447 15.8342 8.40653 15.8342 8.07501C15.8342 7.74349 15.7025 7.42555 15.4681 7.19113C15.2337 6.95671 14.9157 6.82501 14.5842 6.82501H14.0259C12.8486 6.82097 11.7201 6.35403 10.8842 5.52501C10.7716 5.40452 10.6345 5.30949 10.4821 5.24625C10.3298 5.18302 10.1657 5.15305 10.0009 5.15834C9.82975 5.16377 9.66156 5.2043 9.50675 5.2774C9.35193 5.35051 9.21378 5.45464 9.10087 5.58334L6.18421 8.91668C6.05958 9.04818 5.96401 9.20443 5.90372 9.37528C5.84342 9.54613 5.81973 9.72775 5.83421 9.90834C5.8651 10.0771 5.92973 10.2379 6.02424 10.3811C6.11874 10.5243 6.24118 10.6469 6.38421 10.7417L6.93421 11.1083C7.66321 11.5976 8.22851 12.2944 8.55687 13.1086C8.88523 13.9229 8.96153 14.8169 8.77587 15.675C8.72593 15.8397 8.71053 16.0129 8.73063 16.1838C8.75074 16.3547 8.80592 16.5196 8.89272 16.6682C8.97951 16.8168 9.09606 16.9459 9.23505 17.0474C9.37404 17.1489 9.53249 17.2205 9.70047 17.2579C9.86845 17.2953 10.0423 17.2976 10.2112 17.2647C10.3802 17.2318 10.5404 17.1643 10.6821 17.0666C10.8237 16.9688 10.9436 16.8429 11.0343 16.6966C11.125 16.5504 11.1846 16.387 11.2092 16.2167C11.4704 14.9998 11.3968 13.7349 10.9961 12.5566C10.5955 11.3782 9.88295 10.3305 8.93421 9.52501Z",fill:"#4B5563"})),jn.createElement("defs",null,jn.createElement("clipPath",{id:"clip0_1697_57490"},jn.createElement("rect",{width:20,height:20,fill:"white"})))),mne=e=>jn.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("g",{clipPath:"url(#clip0_3407_1703)"},jn.createElement("path",{d:"M11.3752 20.0001H11.2169C10.9704 19.965 10.7399 19.8576 10.5545 19.6915C10.369 19.5254 10.2371 19.308 10.1752 19.0668L8.33357 11.6668L0.941907 9.82512C0.699196 9.76473 0.479985 9.63338 0.312261 9.44785C0.144536 9.26231 0.0359065 9.031 0.000240204 8.78345C-0.034478 8.53494 0.0136427 8.28191 0.137161 8.06349C0.26068 7.84508 0.452715 7.67344 0.683574 7.57512L18.3336 0.0917817C18.5568 0.00128909 18.802 -0.0208838 19.0378 0.0280732C19.2737 0.0770302 19.4898 0.194913 19.6586 0.366782C19.8232 0.535068 19.9346 0.74804 19.9791 0.979189C20.0235 1.21034 19.999 1.44946 19.9086 1.66678L12.4086 19.2834C12.3263 19.4916 12.1843 19.6707 12.0004 19.7982C11.8165 19.9258 11.599 19.996 11.3752 20.0001Z",fill:"#525252"})),jn.createElement("defs",null,jn.createElement("clipPath",{id:"clip0_3407_1703"},jn.createElement("rect",{width:20,height:20,fill:"white"}))));sz.propTypes={selectionChanged:ft.func,children:ft.node};function sz({selectionChanged:e,children:n}){const s=ve.useRef();return ve.useEffect(()=>{const l=m=>e(m.detail),{current:h}=s;return h.addEventListener("change",l),()=>h.removeEventListener("change",l)},[e]),Le.jsx("mi-dropdown",{ref:s,children:n})}function yne(e,n){const s=sessionStorage.getItem("mapboxPlacesSessionToken");return new Promise((l,h)=>{const m=`https://api.mapbox.com/search/searchbox/v1/retrieve/${e.id}?session_token=${s}&access_token=${n}`;fetch(m).then(_=>_.status!==200?h():_.json()).then(_=>{e.geometry={type:"Point",coordinates:[_.features[0].geometry.coordinates[0],_.features[0].geometry.coordinates[1]]},l(e)}).catch(()=>{h()})})}const _ne=k1({key:"unitSystem",get:({get:e})=>e(ih)==="en-US"?"imperial":"metric"});O4.propTypes={onAccessibilityChanged:ft.func};function O4({onAccessibilityChanged:e}){const n=fn(oa),[s,l]=fr(Ud);function h(m){l(m.target.checked),e&&e()}return Le.jsxs("div",{className:"accessibility",children:[Le.jsx("input",{className:"mi-toggle",type:"checkbox",checked:s,onChange:m=>h(m),style:{backgroundColor:s?n:""}}),Le.jsx("div",{children:eE("Avoid stairs and escalators")})]})}function az(){const{t:e}=oo(),n=fn(oa),s=fn(kc),[l,h]=fr(k_);function m(_){h(_.target.checked)}return Le.jsxs("div",{className:"shuttle-bus",children:[Le.jsx("input",{className:"mi-toggle",type:"checkbox",checked:l,onChange:_=>m(_),"aria-label":s?.appSettings?.includeTransitSelectionDescription||e("Include bus transportation"),style:{backgroundColor:l?n:""}}),Le.jsx("div",{children:s?.appSettings?.includeTransitSelectionDescription||"Include bus transportation"})]})}const lz=pi({key:"wayfindingLocation",default:null}),Eo={TO:"TO",FROM:"FROM"},vne="data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 14 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 0C3.13 0 0 3.13 0 7C0 12.25 7 20 7 20C7 20 14 12.25 14 7C14 3.13 10.87 0 7 0ZM7 9.5C5.62 9.5 4.5 8.38 4.5 7C4.5 5.62 5.62 4.5 7 4.5C8.38 4.5 9.5 5.62 9.5 7C9.5 8.38 8.38 9.5 7 9.5Z' fill='black' fill-opacity='0.88'/%3E%3C/svg%3E%0A";j4.propTypes={onStartDirections:ft.func.isRequired,onBack:ft.func.isRequired,directionsToLocation:ft.object,directionsFromLocation:ft.object,onSetSize:ft.func,isActive:ft.bool};function j4({onStartDirections:e,onBack:n,directionsToLocation:s,directionsFromLocation:l,onSetSize:h,isActive:m}){const{t:_}=oo(),i=ve.useRef(),I=ve.useRef(),C=ve.useRef(),S=ve.useRef(),L=fn(Vy),R=fn(xd),U=fn(Qa),W=fn(bd),le=fn(oa),[pe,ie]=fr(lz),[Y,q]=ve.useState(),ue=bi(Ng),[me,ne]=ve.useState(!0),[De,Me]=ve.useState(!1),[Ee,ge]=ve.useState([]),[Re,Oe]=ve.useState(),[Ne,tt]=ve.useState(),dt=fn(Ud),[Nt,re]=ve.useState(!1),[_e,D]=fr(Fd),[P,K]=ve.useState(!1),H=fn(Qy),Q=fn(_ne),[de,we,he,Ie]=Zk(Ne,Re,L,_e,dt),je=fn(E4),Fe=fn(kc),Ue=fn(as);function He(an){return W===so.Google&&an.properties.type==="google_places"?pne(an):W===so.Mapbox&&an.properties.type==="mapbox_places"?yne(an,H):Promise.resolve(an)}function it(an){Y===Eo.TO?He(an).then(pt=>{Oe(pt),C.current?.setDisplayText(pt.properties.name)},()=>ue(!1)):Y===Eo.FROM&&He(an).then(pt=>{tt(pt),S.current?.setDisplayText(pt.properties.name)},()=>ue(!1)),re(!1),Me(!1),ge([]),K(!1)}function ct(an,pt){if(q(pt),ue(!0),an.length===0)ne(!1),re(!1),ge([]);else{ne(!0),ge(an);const Ft=an.filter(Tn=>Tn.properties.type==="google_places").length>0;re(Ft),Et(th.MAX)}}function Et(an){typeof h=="function"&&h(an)}function gt(){const an=k4(R);Y===Eo.TO?(C.current?.setDisplayText(an.properties.name),Oe(an)):Y===Eo.FROM&&(S.current?.setDisplayText(an.properties.name),tt(an)),ge([]),ue(!0),ne(!0),re(!1),Me(!1),K(!1)}function zt(an){Ne?.id==="USER_POSITION"&&an===Eo.TO||Re?.id==="USER_POSITION"&&an===Eo.FROM?K(!1):K(!0)}function Wt(an){zt(an)}function kt(an){q(an),rn(an),ue(!0),re(!1),zt(an)}function on(an){K(!0),q(an),sn(an),ge([]),ue(!0),re(!1),ne(!0)}function sn(an){an===Eo.TO?Oe():an===Eo.FROM&&tt()}function rn(an){an===Eo.TO?(ge([]),C.current?.getValue()&&(Me(!0),C.current?.triggerSearch())):an===Eo.FROM&&(ge([]),S.current?.getValue()&&(Me(!0),S.current?.triggerSearch()))}function Nn(){(Re||Ne)&&(Ne?C.current?.setDisplayText(Ne.properties.name):C.current?.clear(),Re?S.current?.setDisplayText(Re.properties.name):S.current?.clear(),Oe(Ne),tt(Re))}function Hn(){tt(),S.current?.setDisplayText(""),Ue&&Ue.deselectLocation(),n()}function Mn(){ge([]),Me(!1),re(!1),K(!1)}return ve.useEffect(()=>()=>{ge([]),Oe(),tt()},[]),ve.useEffect(()=>{if(pe){if(Y===Eo.FROM)S.current?.setDisplayText(pe.properties.name),tt(pe);else if(Y===Eo.TO)C.current?.setDisplayText(pe.properties.name),Oe(pe);else return;Mn(),ie(null)}},[pe]),ve.useEffect(()=>{let an=!1;if(l?.id==="USER_POSITION"&&s?.id==="USER_POSITION"&&(s=void 0),s?.properties&&!U&&(C.current?.setDisplayText(s.properties.name),Oe(s)),l?.properties?Ne||(S.current?.setDisplayText(l.properties.name),tt(l),an=!0):q(Eo.FROM),m&&!S.current?.getValue()&&R&&!Ne&&s?.id!=="USER_POSITION"&&!an){const pt=k4(R);S.current?.setDisplayText(pt.properties.name),tt(pt),ue(!0),ne(!0),ge([])}},[m,s,l]),ve.useEffect(()=>{W===so.Mapbox&&(re(!1),ge(Ee.filter(an=>an.properties.type!=="google_places")))},[W]),ve.useEffect(()=>{U&&(Oe(U),C.current?.setDisplayText(U.properties.name))},[U]),Le.jsxs("div",{className:"wayfinding",ref:i,children:[Le.jsxs("div",{className:"wayfinding__directions",children:[Le.jsx("div",{className:"wayfinding__title",children:_("Directions")}),Le.jsx("button",{className:"wayfinding__close",onClick:()=>Hn(),"aria-label":"Close",children:Le.jsx(Td,{})}),Le.jsxs("div",{className:"wayfinding__locations",children:[Le.jsxs("label",{className:"wayfinding__label",children:[Le.jsx("span",{children:_("Choose departure")}),Le.jsx(P_,{ref:S,mapsindoors:!0,google:W===so.Google&&je,mapbox:W===so.Mapbox&&je,placeholder:_("Choose departure"),results:an=>ct(an,Eo.FROM),clicked:()=>kt(Eo.FROM),cleared:()=>on(Eo.FROM),changed:()=>Wt(Eo.FROM)})]}),Le.jsx("button",{onClick:()=>Nn(),"aria-label":_("Switch"),className:"wayfinding__switch",children:Le.jsx(fne,{})}),Le.jsxs("label",{className:"wayfinding__label",children:[Le.jsx("span",{children:_("Choose destination")}),Le.jsx(P_,{ref:C,mapsindoors:!0,google:W===so.Google&&je,mapbox:W===so.Mapbox&&je,placeholder:_("Choose destination"),results:an=>ct(an,Eo.TO),clicked:()=>kt(Eo.TO),cleared:()=>on(Eo.TO),changed:()=>Wt(Eo.TO)})]})]})]}),!he&&Le.jsx("p",{className:"wayfinding__error",children:_("No route found")}),!me&&!P&&Le.jsx("p",{className:"wayfinding__error",children:_("Nothing was found")}),R&&P&&Le.jsxs("button",{type:"button",className:"wayfinding__use-current-position",onClick:()=>gt(),children:[Le.jsx(mne,{}),_("My position")]}),Ee.length>0&&Le.jsx("div",{className:"wayfinding__scrollable",children:Le.jsxs("div",{className:"wayfinding__results",children:[Ee.map(an=>Le.jsx(kg,{icon:an.properties.type==="google_places"||an.properties.type==="mapbox_places"?vne:void 0,location:an,locationClicked:pt=>it(pt),disableHover:!0},an.id)),Nt&&Le.jsx("img",{className:"wayfinding__google",alt:"Powered by Google",src:gne})]})}),!De&&!P&&he&&!Nt&&Ne&&Re&&Le.jsxs("div",{className:"wayfinding__details",ref:I,children:[Le.jsxs("div",{className:"wayfinding__settings",children:[Le.jsxs("div",{className:"wayfinding__toggles",children:[Le.jsx(O4,{}),Fe?.appSettings?.includeTransitSelection==="true"&&Le.jsx(az,{})]}),Le.jsx("div",{className:"wayfinding__travel",children:Fe?.appSettings?.includeTravelModeSelection!=="false"&&Le.jsxs(sz,{selectionChanged:an=>D(an[0].value),children:[Le.jsxs("mi-dropdown-item",{selected:!0,value:nh.WALKING,children:[Le.jsx(iz,{}),_("Walk")]}),Le.jsxs("mi-dropdown-item",{value:nh.DRIVING,children:[Le.jsx(rz,{}),_("Drive")]}),Le.jsxs("mi-dropdown-item",{value:nh.BICYCLING,children:[Le.jsx(oz,{}),_("Bike")]})]})})]}),Le.jsx("hr",{}),Le.jsxs("div",{className:"wayfinding__info",children:[Le.jsxs("div",{className:"wayfinding__distance",children:[_e===nh.WALKING&&Le.jsx(iz,{}),_e===nh.DRIVING&&Le.jsx(rz,{}),_e===nh.BICYCLING&&Le.jsx(oz,{}),Le.jsxs("div",{children:[_("Distance"),":"]}),Le.jsx("div",{className:"wayfinding__meters",children:de&&Ie&&Le.jsx("mi-distance",{unit:Q,meters:de})})]}),Le.jsxs("div",{className:"wayfinding__time",children:[Le.jsx(dne,{}),Le.jsxs("div",{children:[_("Estimated time"),":"]}),Le.jsx("div",{className:"wayfinding__minutes",children:we&&Ie&&Le.jsx("mi-time",{translations:JSON.stringify({days:_("d"),hours:_("h"),minutes:_("min")}),seconds:we})})]})]}),Le.jsx("button",{className:"wayfinding__button",style:{background:le},onClick:()=>e(),disabled:!Ie,children:_("Go!")})]})]})}const xne=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M4 12H20M20 12L14 6M20 12L14 18",stroke:"#111827",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),bne=e=>jn.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},jn.createElement("path",{d:"M20 12H4M4 12L10 6M4 12L10 18",stroke:"#111827",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),U_=pi({key:"activeStep",default:0}),zg=pi({key:"substepsToggled",default:!1}),cz=pi({key:"triggerSubsteps",default:!1}),uz=ve.forwardRef(function(n,s){const{totalSteps:l,activeStep:h,previous:m,originLocation:_,directions:i}=n,I=ve.useRef(),{t:C}=oo(),[S,L]=fr(zg),R=bi(cz),U=ec();ve.useImperativeHandle(s,()=>({openSubsteps(){I.current.openSubsteps()},closeSubsteps(){I.current.closeSubsteps()}}));const W={walk:C("Walk"),bike:C("Bike"),transit:C("Transit"),drive:C("Drive"),destination:C("You have arrived"),leave:C("Leave"),from:C("From"),park:C("Park"),at:C("at"),building:C("Building"),venue:C("Venue"),takeStaircaseToLevel:C("Take staircase to level"),takeLadderToLevel:C("Take the ladder to level"),takeElevatorToLevel:C("Take elevator to level"),takeEscalatorToLevel:C("Take escalator to level"),takeWheelchairLiftToLevel:C("Take wheelchair lift to level"),takeWheelchairRampToLevel:C("Take wheelchair ramp to level"),exit:C("Exit"),enter:C("Enter"),stops:C("stops"),andContinue:C("and continue"),continueStraightAhead:C("Continue straight ahead"),goLeft:C("Go left"),goSharpLeft:C("Go sharp left"),goSlightLeft:C("Go slight left"),goRight:C("Go right"),goSharpRight:C("Go sharp right"),goSlightRight:C("Go slight right"),turnAround:C("Turn around"),days:C("d"),hours:C("h"),minutes:C("min"),rideTheBus:C("Ride the bus")};return ve.useEffect(()=>{const{current:le}=I;le&&(le.showHeader=!1);function pe(){R(!0),L(!S)}return le.addEventListener("substepsToggled",pe),()=>{le.removeEventListener("substepsToggled",pe)}},[S]),Le.jsx("mi-route-instructions-step",{ref:I,"show-toggle-button":!U,step:JSON.stringify(l[h]),translations:JSON.stringify(W),"destination-location":i?.destinationLocation.properties.name,"from-travel-mode":m?.travel_mode??"","from-route-context":m?.route_context??_?.properties?.name??""})});uz.propTypes={totalSteps:ft.array,activeStep:ft.number,previous:ft.object,originLocation:ft.object,directions:ft.object};const hz=pi({key:"isDestinationStep",default:!1});dz.propTypes={steps:ft.array,previous:ft.object,originLocation:ft.object,isOpen:ft.bool};function dz({steps:e,previous:n,originLocation:s,isOpen:l}){const h=ve.useRef(),m=fn(U_),_=fn(Bd),i=fn(zg),I=bi(hz);return ve.useEffect(()=>{l&&(m===e?.length-1&&_?.destinationLocation?I(!0):I(!1),i===!1?h.current?.closeSubsteps():i===!0&&h.current?.openSubsteps())},[l,m,e,i]),Le.jsx("div",{className:"route-instructions prevent-scroll",children:e?.length>0&&Le.jsx(uz,{totalSteps:e,activeStep:m,previous:n,directions:_,originLocation:s,ref:h})})}const P4=Object.freeze({minZoom:10}),fz=ve.forwardRef(function(n,s){const{totalSteps:l,activeStep:h,previous:m,originLocation:_}=n,i=ve.useRef(),{t:I}=oo(),[C,S]=fr(zg),L=bi(cz),R=ec();ve.useImperativeHandle(s,()=>({openSubsteps(){i.current.openSubsteps()},closeSubsteps(){i.current.closeSubsteps()}}));const U={walk:I("Walk"),bike:I("Bike"),transit:I("Transit"),drive:I("Drive"),destination:I("You have arrived"),leave:I("Leave"),from:I("From"),park:I("Park"),at:I("at"),building:I("Building"),venue:I("Venue"),takeStaircaseToLevel:I("Take staircase to level"),takeLadderToLevel:I("Take the ladder to level"),takeElevatorToLevel:I("Take elevator to level"),takeEscalatorToLevel:I("Take escalator to level"),takeWheelchairLiftToLevel:I("Take wheelchair lift to level"),takeWheelchairRampToLevel:I("Take wheelchair ramp to level"),exit:I("Exit"),enter:I("Enter"),stops:I("stops"),andContinue:I("and continue"),continueStraightAhead:I("Continue straight ahead"),goLeft:I("Go left"),goSharpLeft:I("Go sharp left"),goSlightLeft:I("Go slight left"),goRight:I("Go right"),goSharpRight:I("Go sharp right"),goSlightRight:I("Go slight right"),turnAround:I("Turn around"),days:I("d"),hours:I("h"),minutes:I("min"),rideTheBus:I("Ride the bus")};return ve.useEffect(()=>{const{current:W}=i;function le(){L(!0),S(!C)}return W.addEventListener("substepsToggled",le),()=>{W.removeEventListener("substepsToggled",le)}},[C]),Le.jsx("mi-route-instructions-step-header",{ref:i,"show-toggle-button":!R,step:JSON.stringify(l[h]),translations:JSON.stringify(U),"from-travel-mode":m?.travel_mode??"","from-route-context":m?.route_context??_?.properties?.name??""})});fz.propTypes={totalSteps:ft.array,activeStep:ft.number,previous:ft.object,originLocation:ft.object};let ks;R4.propTypes={isOpen:ft.bool,onBack:ft.func,onSetSize:ft.func,onRouteFinished:ft.func};function R4({isOpen:e,onBack:n,onSetSize:s,onRouteFinished:l}){const{t:h}=oo(),m=ve.useRef(),[_,i]=ve.useState(null),I=ve.useRef(null),[C,S]=ve.useState(),L=fn(as),R=fn(Fd),U=fn(Bd),[W,le]=fr(U_),[pe,ie]=ve.useState(),[Y,q]=fr(zg),ue=fn(Ga),me=Xo(),ne=bi(F_),De=fn(hz),Me=fn(oa),Ee=ec(),ge=fn(O_),Re=fn(Kk),Oe=fn(Qa),Ne=fn(bd),tt=fn(k_),dt=fn(kc);ve.useEffect(()=>()=>{i(null)},[]),ve.useEffect(()=>{if(i(null),e&&U){S(U.totalTime);const Fe=Math.min(window.innerHeight,window.innerWidth)*.06;ks?.setRoute(null),ks=null,Promise.all([Nt(Fe),re(Fe)]).then(([Ue,He])=>{ks=new window.mapsindoors.directions.DirectionsRenderer({mapsIndoors:L,fitBounds:Ee&&dt?.appSettings?.disableKioskStepMove==="true",fitBoundsPadding:Ee&&dt?.appSettings?.disableKioskStepMove==="true"?void 0:{top:Fe,bottom:Ue,left:He,right:Fe}}),ks.setRoute(U.directionsResult).then(()=>{ks.setStepIndex(0),L&&L.deselectLocation()}),I.current.location=U.destinationLocation,U.destinationLocation.id==="USER_POSITION"?i(null):i(L.getDisplayRule(U.destinationLocation)),we(null)})}return()=>{ks&&(ks.setRoute(null),ks=null),we(P4.minZoom)}},[e,U,L,R,tt]);function Nt(Fe){return new Promise(Ue=>{if(me)ue?tg().then(He=>Ue(He)):Ue(Fe);else return Md().then(He=>Ue(He))})}function re(Fe){return new Promise(Ue=>{me?ue?Ue(Fe):Lc().then(He=>Ue(He)):Ue(Fe)})}ve.useEffect(()=>{!e&&ks&&(Q(),we(P4.minZoom))},[e]);function _e(){return U?U.directionsResult.legs.reduce((Fe,Ue)=>{for(const He in Ue.steps){const it=Ue.steps[He];Fe.push(it)}return Fe},[]):[]}function D(){ks&&ks.nextStep()}function P(){ks&&ks.previousStep()}function K(){const Fe=_e();ie(Fe[W]),le(W+1),D()}function H(){const Fe=_e();ie(Fe[W-2]),le(W-1),P()}function Q(){ks?.setRoute(null),ks=null}function de(){le(0),q(!1)}function we(Fe){const Ue=L?.getMapView?.(),He=Ue?.getMap?.();!L||!Ue||!He||(Ne==="mapbox"?He.setMinZoom(Fe):Ne==="google"&&He.setOptions({minZoom:Fe}))}function he(){de(),Q(),n()}function Ie(Fe){typeof s=="function"&&s(Fe)}function je(){const Fe=`${Re}&directionsFrom=${ue.id}&directionsTo=${Oe.id}`;ne(Fe)}return ve.useEffect(()=>(m.current=requestAnimationFrame(()=>{Y&&Ie(th.MAX)}),()=>{m.current&&cancelAnimationFrame(m.current)}),[Y]),Le.jsxs("div",{className:"directions",style:{display:Ee?"block":"grid"},children:[Le.jsxs("div",{className:"directions__header",children:[Le.jsx("div",{className:"directions__minutes",children:C&&Le.jsx("mi-time",{translations:JSON.stringify({days:h("d"),hours:h("h"),minutes:h("min")}),seconds:C})}),Le.jsx(fz,{totalSteps:_e(),activeStep:W,previous:pe,originLocation:U?.originLocation})]}),Le.jsx("div",{className:"directions__steps",children:Le.jsx(dz,{steps:_e(),previous:pe,originLocation:U?.originLocation,isOpen:e})}),Ee&&Le.jsxs(Le.Fragment,{children:[Le.jsx("hr",{}),Le.jsxs("div",{className:"directions__kiosk",children:[Le.jsx(O4,{onAccessibilityChanged:()=>de()}),dt?.appSettings?.includeTransitSelection==="true"&&Le.jsx(az,{}),(dt?.appSettings?.enableKioskQrCode==="true"||dt?.appSettings?.enableKioskQrCode===void 0)&&Le.jsxs("button",{className:"directions__qr-code",onClick:()=>je(),"aria-label":h("Scan QR code to view route on phone"),children:[Le.jsx(Xk,{}),h("Scan QR code")]})]})]}),Le.jsxs("div",{className:"directions__actions",children:[_e().length>0&&Le.jsxs("div",{className:`route-instructions__actions ${Ee?"route-instructions__actions--kiosk":""}`,children:[Le.jsx("button",{className:`route-instructions__button ${Ee?"route-instructions__button--kiosk":""}`,onClick:()=>H(),"aria-label":h("Previous"),disabled:W===0,children:Le.jsx(bne,{})}),Le.jsx("div",{className:"route-instructions__overview",children:h("StepYofX",{activeStep:W+1,totalSteps:_e().length})}),Le.jsx("button",{className:`route-instructions__button ${Ee?"route-instructions__button--kiosk":""}`,onClick:()=>K(),"aria-label":h("Next"),disabled:W===_e().length-1,children:Le.jsx(xne,{})})]}),Le.jsx("div",{className:"directions__details",children:U?.destinationLocation&&Le.jsxs("div",{className:"directions__info",children:[_&&U.destinationLocation.id!=="USER_POSITION"&&Le.jsx("div",{className:"directions__icon",children:Le.jsx("img",{alt:"",src:_.icon.src?_.icon.src:_.icon})}),Le.jsxs("div",{className:"directions__content",children:[Le.jsx("div",{className:"directions__name",children:U?.destinationLocation.properties.name}),Le.jsx("mi-location-info",{ref:I,"show-external-id":ge})]})]})}),De?Le.jsx("button",{className:"directions__finish",onClick:()=>l(),style:{background:Me},children:h("Finish route")}):Le.jsx("button",{className:"directions__cancel",onClick:()=>he(),children:h("Cancel route")})]})]})}const pz=pi({key:"chatHistoryState",default:[]}),wne=e=>{const[n,s]=ve.useState(0),l=ve.useRef(null);return ve.useLayoutEffect(()=>{if(e)return;const h=()=>{if(!window.visualViewport)return;const _=window.visualViewport.height,I=window.innerHeight-_;I>50?s(I):s(0)},m=()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(h,150)};return window.visualViewport&&(window.visualViewport.addEventListener("resize",m),m()),()=>{l.current&&clearTimeout(l.current),window.visualViewport&&window.visualViewport.removeEventListener("resize",m)}},[e]),n},Mne=pi({key:"userLocationShare",default:null});function Cpe(){}function Dpe(){}function Ine(e,n){const s={};return(e[e.length-1]===""?[...e,""]:e).join((s.padRight?" ":"")+","+(s.padLeft===!1?"":" ")).trim()}const Tne=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ane=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cne={};function gz(e,n){return(Cne.jsx?Ane:Tne).test(e)}const Dne=/[ \t\n\f\r]/g;function Sne(e){return typeof e=="object"?e.type==="text"?mz(e.value):!1:mz(e)}function mz(e){return e.replace(Dne,"")===""}class Og{constructor(n,s,l){this.normal=s,this.property=n,l&&(this.space=l)}}Og.prototype.normal={},Og.prototype.property={},Og.prototype.space=void 0;function yz(e,n){const s={},l={};for(const h of e)Object.assign(s,h.property),Object.assign(l,h.normal);return new Og(s,l,n)}function B4(e){return e.toLowerCase()}class qs{constructor(n,s){this.attribute=s,this.property=n}}qs.prototype.attribute="",qs.prototype.booleanish=!1,qs.prototype.boolean=!1,qs.prototype.commaOrSpaceSeparated=!1,qs.prototype.commaSeparated=!1,qs.prototype.defined=!1,qs.prototype.mustUseProperty=!1,qs.prototype.number=!1,qs.prototype.overloadedBoolean=!1,qs.prototype.property="",qs.prototype.spaceSeparated=!1,qs.prototype.space=void 0;let Ene=0;const ir=rh(),Ro=rh(),F4=rh(),Vn=rh(),Yr=rh(),Vd=rh(),sa=rh();function rh(){return 2**++Ene}const U4=Object.freeze(Object.defineProperty({__proto__:null,boolean:ir,booleanish:Ro,commaOrSpaceSeparated:sa,commaSeparated:Vd,number:Vn,overloadedBoolean:F4,spaceSeparated:Yr},Symbol.toStringTag,{value:"Module"})),V4=Object.keys(U4);class H4 extends qs{constructor(n,s,l,h){let m=-1;if(super(n,s),_z(this,"space",h),typeof l=="number")for(;++m<V4.length;){const _=V4[m];_z(this,V4[m],(l&U4[_])===U4[_])}}}H4.prototype.defined=!0;function _z(e,n,s){s&&(e[n]=s)}function Hd(e){const n={},s={};for(const[l,h]of Object.entries(e.properties)){const m=new H4(l,e.transform(e.attributes||{},l),h,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(m.mustUseProperty=!0),n[l]=m,s[B4(l)]=l,s[B4(m.attribute)]=l}return new Og(n,s,e.space)}const vz=Hd({properties:{ariaActiveDescendant:null,ariaAtomic:Ro,ariaAutoComplete:null,ariaBusy:Ro,ariaChecked:Ro,ariaColCount:Vn,ariaColIndex:Vn,ariaColSpan:Vn,ariaControls:Yr,ariaCurrent:null,ariaDescribedBy:Yr,ariaDetails:null,ariaDisabled:Ro,ariaDropEffect:Yr,ariaErrorMessage:null,ariaExpanded:Ro,ariaFlowTo:Yr,ariaGrabbed:Ro,ariaHasPopup:null,ariaHidden:Ro,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Yr,ariaLevel:Vn,ariaLive:null,ariaModal:Ro,ariaMultiLine:Ro,ariaMultiSelectable:Ro,ariaOrientation:null,ariaOwns:Yr,ariaPlaceholder:null,ariaPosInSet:Vn,ariaPressed:Ro,ariaReadOnly:Ro,ariaRelevant:null,ariaRequired:Ro,ariaRoleDescription:Yr,ariaRowCount:Vn,ariaRowIndex:Vn,ariaRowSpan:Vn,ariaSelected:Ro,ariaSetSize:Vn,ariaSort:null,ariaValueMax:Vn,ariaValueMin:Vn,ariaValueNow:Vn,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function xz(e,n){return n in e?e[n]:n}function bz(e,n){return xz(e,n.toLowerCase())}const Nne=Hd({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vd,acceptCharset:Yr,accessKey:Yr,action:null,allow:null,allowFullScreen:ir,allowPaymentRequest:ir,allowUserMedia:ir,alt:null,as:null,async:ir,autoCapitalize:null,autoComplete:Yr,autoFocus:ir,autoPlay:ir,blocking:Yr,capture:null,charSet:null,checked:ir,cite:null,className:Yr,cols:Vn,colSpan:null,content:null,contentEditable:Ro,controls:ir,controlsList:Yr,coords:Vn|Vd,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ir,defer:ir,dir:null,dirName:null,disabled:ir,download:F4,draggable:Ro,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ir,formTarget:null,headers:Yr,height:Vn,hidden:F4,high:Vn,href:null,hrefLang:null,htmlFor:Yr,httpEquiv:Yr,id:null,imageSizes:null,imageSrcSet:null,inert:ir,inputMode:null,integrity:null,is:null,isMap:ir,itemId:null,itemProp:Yr,itemRef:Yr,itemScope:ir,itemType:Yr,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ir,low:Vn,manifest:null,max:null,maxLength:Vn,media:null,method:null,min:null,minLength:Vn,multiple:ir,muted:ir,name:null,nonce:null,noModule:ir,noValidate:ir,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ir,optimum:Vn,pattern:null,ping:Yr,placeholder:null,playsInline:ir,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ir,referrerPolicy:null,rel:Yr,required:ir,reversed:ir,rows:Vn,rowSpan:Vn,sandbox:Yr,scope:null,scoped:ir,seamless:ir,selected:ir,shadowRootClonable:ir,shadowRootDelegatesFocus:ir,shadowRootMode:null,shape:null,size:Vn,sizes:null,slot:null,span:Vn,spellCheck:Ro,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Vn,step:null,style:null,tabIndex:Vn,target:null,title:null,translate:null,type:null,typeMustMatch:ir,useMap:null,value:Ro,width:Vn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Yr,axis:null,background:null,bgColor:null,border:Vn,borderColor:null,bottomMargin:Vn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ir,declare:ir,event:null,face:null,frame:null,frameBorder:null,hSpace:Vn,leftMargin:Vn,link:null,longDesc:null,lowSrc:null,marginHeight:Vn,marginWidth:Vn,noResize:ir,noHref:ir,noShade:ir,noWrap:ir,object:null,profile:null,prompt:null,rev:null,rightMargin:Vn,rules:null,scheme:null,scrolling:Ro,standby:null,summary:null,text:null,topMargin:Vn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Vn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ir,disableRemotePlayback:ir,prefix:null,property:null,results:Vn,security:null,unselectable:null},space:"html",transform:bz}),Lne=Hd({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:sa,accentHeight:Vn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Vn,amplitude:Vn,arabicForm:null,ascent:Vn,attributeName:null,attributeType:null,azimuth:Vn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Vn,by:null,calcMode:null,capHeight:Vn,className:Yr,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Vn,diffuseConstant:Vn,direction:null,display:null,dur:null,divisor:Vn,dominantBaseline:null,download:ir,dx:null,dy:null,edgeMode:null,editable:null,elevation:Vn,enableBackground:null,end:null,event:null,exponent:Vn,externalResourcesRequired:null,fill:null,fillOpacity:Vn,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Vd,g2:Vd,glyphName:Vd,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Vn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Vn,horizOriginX:Vn,horizOriginY:Vn,id:null,ideographic:Vn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Vn,k:Vn,k1:Vn,k2:Vn,k3:Vn,k4:Vn,kernelMatrix:sa,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Vn,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Vn,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Vn,overlineThickness:Vn,paintOrder:null,panose1:null,path:null,pathLength:Vn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Yr,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Vn,pointsAtY:Vn,pointsAtZ:Vn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sa,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sa,rev:sa,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sa,requiredFeatures:sa,requiredFonts:sa,requiredFormats:sa,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Vn,specularExponent:Vn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Vn,strikethroughThickness:Vn,string:null,stroke:null,strokeDashArray:sa,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Vn,strokeOpacity:Vn,strokeWidth:null,style:null,surfaceScale:Vn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:sa,tabIndex:Vn,tableValues:null,target:null,targetX:Vn,targetY:Vn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:sa,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Vn,underlineThickness:Vn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Vn,values:null,vAlphabetic:Vn,vMathematical:Vn,vectorEffect:null,vHanging:Vn,vIdeographic:Vn,version:null,vertAdvY:Vn,vertOriginX:Vn,vertOriginY:Vn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Vn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:xz}),wz=Hd({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Mz=Hd({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bz}),Iz=Hd({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),kne={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},zne=/[A-Z]/g,Tz=/-[a-z]/g,One=/^data[-\w.:]+$/i;function jne(e,n){const s=B4(n);let l=n,h=qs;if(s in e.normal)return e.property[e.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&One.test(n)){if(n.charAt(4)==="-"){const m=n.slice(5).replace(Tz,Rne);l="data"+m.charAt(0).toUpperCase()+m.slice(1)}else{const m=n.slice(4);if(!Tz.test(m)){let _=m.replace(zne,Pne);_.charAt(0)!=="-"&&(_="-"+_),n="data"+_}}h=H4}return new h(l,n)}function Pne(e){return"-"+e.toLowerCase()}function Rne(e){return e.charAt(1).toUpperCase()}const Bne=yz([vz,Nne,wz,Mz,Iz],"html"),Q4=yz([vz,Lne,wz,Mz,Iz],"svg");function Fne(e){return e.join(" ").trim()}var Qd={},Y4,Az;function Une(){if(Az)return Y4;Az=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,s=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,h=/^:\s*/,m=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,_=/^[;\s]*/,i=/^\s+|\s+$/g,I=`
46
46
  `,C="/",S="*",L="",R="comment",U="declaration";Y4=function(le,pe){if(typeof le!="string")throw new TypeError("First argument must be a string");if(!le)return[];pe=pe||{};var ie=1,Y=1;function q(Ne){var tt=Ne.match(n);tt&&(ie+=tt.length);var dt=Ne.lastIndexOf(I);Y=~dt?Ne.length-dt:Y+Ne.length}function ue(){var Ne={line:ie,column:Y};return function(tt){return tt.position=new me(Ne),Me(),tt}}function me(Ne){this.start=Ne,this.end={line:ie,column:Y},this.source=pe.source}me.prototype.content=le;function ne(Ne){var tt=new Error(pe.source+":"+ie+":"+Y+": "+Ne);if(tt.reason=Ne,tt.filename=pe.source,tt.line=ie,tt.column=Y,tt.source=le,!pe.silent)throw tt}function De(Ne){var tt=Ne.exec(le);if(tt){var dt=tt[0];return q(dt),le=le.slice(dt.length),tt}}function Me(){De(s)}function Ee(Ne){var tt;for(Ne=Ne||[];tt=ge();)tt!==!1&&Ne.push(tt);return Ne}function ge(){var Ne=ue();if(!(C!=le.charAt(0)||S!=le.charAt(1))){for(var tt=2;L!=le.charAt(tt)&&(S!=le.charAt(tt)||C!=le.charAt(tt+1));)++tt;if(tt+=2,L===le.charAt(tt-1))return ne("End of comment missing");var dt=le.slice(2,tt-2);return Y+=2,q(dt),le=le.slice(tt),Y+=2,Ne({type:R,comment:dt})}}function Re(){var Ne=ue(),tt=De(l);if(tt){if(ge(),!De(h))return ne("property missing ':'");var dt=De(m),Nt=Ne({type:U,property:W(tt[0].replace(e,L)),value:dt?W(dt[0].replace(e,L)):L});return De(_),Nt}}function Oe(){var Ne=[];Ee(Ne);for(var tt;tt=Re();)tt!==!1&&(Ne.push(tt),Ee(Ne));return Ne}return Me(),Oe()};function W(le){return le?le.replace(i,L):L}return Y4}var Cz;function Vne(){if(Cz)return Qd;Cz=1;var e=Qd&&Qd.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Qd,"__esModule",{value:!0}),Qd.default=s;const n=e(Une());function s(l,h){let m=null;if(!l||typeof l!="string")return m;const _=(0,n.default)(l),i=typeof h=="function";return _.forEach(I=>{if(I.type!=="declaration")return;const{property:C,value:S}=I;i?h(C,S,I):S&&(m=m||{},m[C]=S)}),m}return Qd}var jg={},Dz;function Hne(){if(Dz)return jg;Dz=1,Object.defineProperty(jg,"__esModule",{value:!0}),jg.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,s=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,h=/^-(ms)-/,m=function(C){return!C||s.test(C)||e.test(C)},_=function(C,S){return S.toUpperCase()},i=function(C,S){return"".concat(S,"-")},I=function(C,S){return S===void 0&&(S={}),m(C)?C:(C=C.toLowerCase(),S.reactCompat?C=C.replace(h,i):C=C.replace(l,i),C.replace(n,_))};return jg.camelCase=I,jg}var Pg,Sz;function Qne(){if(Sz)return Pg;Sz=1;var e=Pg&&Pg.__importDefault||function(h){return h&&h.__esModule?h:{default:h}},n=e(Vne()),s=Hne();function l(h,m){var _={};return!h||typeof h!="string"||(0,n.default)(h,function(i,I){i&&I&&(_[(0,s.camelCase)(i,m)]=I)}),_}return l.default=l,Pg=l,Pg}var Yne=Qne();const Gne=nd(Yne),Ez=Nz("end"),G4=Nz("start");function Nz(e){return n;function n(s){const l=s&&s.position&&s.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function $ne(e){const n=G4(e),s=Ez(e);if(n&&s)return{start:n,end:s}}function Rg(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Lz(e.position):"start"in e||"end"in e?Lz(e):"line"in e||"column"in e?$4(e):""}function $4(e){return kz(e&&e.line)+":"+kz(e&&e.column)}function Lz(e){return $4(e&&e.start)+"-"+$4(e&&e.end)}function kz(e){return e&&typeof e=="number"?e:1}class xs extends Error{constructor(n,s,l){super(),typeof s=="string"&&(l=s,s=void 0);let h="",m={},_=!1;if(s&&("line"in s&&"column"in s?m={place:s}:"start"in s&&"end"in s?m={place:s}:"type"in s?m={ancestors:[s],place:s.position}:m={...s}),typeof n=="string"?h=n:!m.cause&&n&&(_=!0,h=n.message,m.cause=n),!m.ruleId&&!m.source&&typeof l=="string"){const I=l.indexOf(":");I===-1?m.ruleId=l:(m.source=l.slice(0,I),m.ruleId=l.slice(I+1))}if(!m.place&&m.ancestors&&m.ancestors){const I=m.ancestors[m.ancestors.length-1];I&&(m.place=I.position)}const i=m.place&&"start"in m.place?m.place.start:m.place;this.ancestors=m.ancestors||void 0,this.cause=m.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=h,this.line=i?i.line:void 0,this.name=Rg(m.place)||"1:1",this.place=m.place||void 0,this.reason=this.message,this.ruleId=m.ruleId||void 0,this.source=m.source||void 0,this.stack=_&&m.cause&&typeof m.cause.stack=="string"?m.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}xs.prototype.file="",xs.prototype.name="",xs.prototype.reason="",xs.prototype.message="",xs.prototype.stack="",xs.prototype.column=void 0,xs.prototype.line=void 0,xs.prototype.ancestors=void 0,xs.prototype.cause=void 0,xs.prototype.fatal=void 0,xs.prototype.place=void 0,xs.prototype.ruleId=void 0,xs.prototype.source=void 0;const Z4={}.hasOwnProperty,Zne=new Map,Wne=/[A-Z]/g,qne=new Set(["table","tbody","thead","tfoot","tr"]),Kne=new Set(["td","th"]),zz="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Xne(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const s=n.filePath||void 0;let l;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=sie(s,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=oie(s,n.jsx,n.jsxs)}const h={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:l,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:s,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Q4:Bne,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},m=Oz(h,e,void 0);return m&&typeof m!="string"?m:h.create(e,h.Fragment,{children:m||void 0},void 0)}function Oz(e,n,s){if(n.type==="element")return Jne(e,n,s);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return eie(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return nie(e,n,s);if(n.type==="mdxjsEsm")return tie(e,n);if(n.type==="root")return iie(e,n,s);if(n.type==="text")return rie(e,n)}function Jne(e,n,s){const l=e.schema;let h=l;n.tagName.toLowerCase()==="svg"&&l.space==="html"&&(h=Q4,e.schema=h),e.ancestors.push(n);const m=Pz(e,n.tagName,!1),_=aie(e,n);let i=q4(e,n);return qne.has(n.tagName)&&(i=i.filter(function(I){return typeof I=="string"?!Sne(I):!0})),jz(e,_,m,n),W4(_,i),e.ancestors.pop(),e.schema=l,e.create(n,m,_,s)}function eie(e,n){if(n.data&&n.data.estree&&e.evaluater){const l=n.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}Bg(e,n.position)}function tie(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Bg(e,n.position)}function nie(e,n,s){const l=e.schema;let h=l;n.name==="svg"&&l.space==="html"&&(h=Q4,e.schema=h),e.ancestors.push(n);const m=n.name===null?e.Fragment:Pz(e,n.name,!0),_=lie(e,n),i=q4(e,n);return jz(e,_,m,n),W4(_,i),e.ancestors.pop(),e.schema=l,e.create(n,m,_,s)}function iie(e,n,s){const l={};return W4(l,q4(e,n)),e.create(n,e.Fragment,l,s)}function rie(e,n){return n.value}function jz(e,n,s,l){typeof s!="string"&&s!==e.Fragment&&e.passNode&&(n.node=l)}function W4(e,n){if(n.length>0){const s=n.length>1?n:n[0];s&&(e.children=s)}}function oie(e,n,s){return l;function l(h,m,_,i){const C=Array.isArray(_.children)?s:n;return i?C(m,_,i):C(m,_)}}function sie(e,n){return s;function s(l,h,m,_){const i=Array.isArray(m.children),I=G4(l);return n(h,m,_,i,{columnNumber:I?I.column-1:void 0,fileName:e,lineNumber:I?I.line:void 0},void 0)}}function aie(e,n){const s={};let l,h;for(h in n.properties)if(h!=="children"&&Z4.call(n.properties,h)){const m=cie(e,h,n.properties[h]);if(m){const[_,i]=m;e.tableCellAlignToStyle&&_==="align"&&typeof i=="string"&&Kne.has(n.tagName)?l=i:s[_]=i}}if(l){const m=s.style||(s.style={});m[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return s}function lie(e,n){const s={};for(const l of n.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const m=l.data.estree.body[0];m.type;const _=m.expression;_.type;const i=_.properties[0];i.type,Object.assign(s,e.evaluater.evaluateExpression(i.argument))}else Bg(e,n.position);else{const h=l.name;let m;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const i=l.value.data.estree.body[0];i.type,m=e.evaluater.evaluateExpression(i.expression)}else Bg(e,n.position);else m=l.value===null?!0:l.value;s[h]=m}return s}function q4(e,n){const s=[];let l=-1;const h=e.passKeys?new Map:Zne;for(;++l<n.children.length;){const m=n.children[l];let _;if(e.passKeys){const I=m.type==="element"?m.tagName:m.type==="mdxJsxFlowElement"||m.type==="mdxJsxTextElement"?m.name:void 0;if(I){const C=h.get(I)||0;_=I+"-"+C,h.set(I,C+1)}}const i=Oz(e,m,_);i!==void 0&&s.push(i)}return s}function cie(e,n,s){const l=jne(e.schema,n);if(!(s==null||typeof s=="number"&&Number.isNaN(s))){if(Array.isArray(s)&&(s=l.commaSeparated?Ine(s):Fne(s)),l.property==="style"){let h=typeof s=="object"?s:uie(e,String(s));return e.stylePropertyNameCase==="css"&&(h=hie(h)),["style",h]}return[e.elementAttributeNameCase==="react"&&l.space?kne[l.property]||l.property:l.attribute,s]}}function uie(e,n){try{return Gne(n,{reactCompat:!0})}catch(s){if(e.ignoreInvalidStyle)return{};const l=s,h=new xs("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw h.file=e.filePath||void 0,h.url=zz+"#cannot-parse-style-attribute",h}}function Pz(e,n,s){let l;if(!s)l={type:"Literal",value:n};else if(n.includes(".")){const h=n.split(".");let m=-1,_;for(;++m<h.length;){const i=gz(h[m])?{type:"Identifier",name:h[m]}:{type:"Literal",value:h[m]};_=_?{type:"MemberExpression",object:_,property:i,computed:!!(m&&i.type==="Literal"),optional:!1}:i}l=_}else l=gz(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(l.type==="Literal"){const h=l.value;return Z4.call(e.components,h)?e.components[h]:h}if(e.evaluater)return e.evaluater.evaluateExpression(l);Bg(e)}function Bg(e,n){const s=new xs("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=zz+"#cannot-handle-mdx-estrees-without-createevaluater",s}function hie(e){const n={};let s;for(s in e)Z4.call(e,s)&&(n[die(s)]=e[s]);return n}function die(e){let n=e.replace(Wne,fie);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function fie(e){return"-"+e.toLowerCase()}const K4={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},pie={};function X4(e,n){const s=pie,l=typeof s.includeImageAlt=="boolean"?s.includeImageAlt:!0,h=typeof s.includeHtml=="boolean"?s.includeHtml:!0;return Rz(e,l,h)}function Rz(e,n,s){if(gie(e)){if("value"in e)return e.type==="html"&&!s?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Bz(e.children,n,s)}return Array.isArray(e)?Bz(e,n,s):""}function Bz(e,n,s){const l=[];let h=-1;for(;++h<e.length;)l[h]=Rz(e[h],n,s);return l.join("")}function gie(e){return!!(e&&typeof e=="object")}const Fz=document.createElement("i");function J4(e){const n="&"+e+";";Fz.innerHTML=n;const s=Fz.textContent;return s.charCodeAt(s.length-1)===59&&e!=="semi"||s===n?!1:s}function aa(e,n,s,l){const h=e.length;let m=0,_;if(n<0?n=-n>h?0:h+n:n=n>h?h:n,s=s>0?s:0,l.length<1e4)_=Array.from(l),_.unshift(n,s),e.splice(..._);else for(s&&e.splice(n,s);m<l.length;)_=l.slice(m,m+1e4),_.unshift(n,0),e.splice(..._),m+=1e4,n+=1e4}function Sa(e,n){return e.length>0?(aa(e,e.length,0,n),e):n}const Uz={}.hasOwnProperty;function Vz(e){const n={};let s=-1;for(;++s<e.length;)mie(n,e[s]);return n}function mie(e,n){let s;for(s in n){const h=(Uz.call(e,s)?e[s]:void 0)||(e[s]={}),m=n[s];let _;if(m)for(_ in m){Uz.call(h,_)||(h[_]=[]);const i=m[_];yie(h[_],Array.isArray(i)?i:i?[i]:[])}}}function yie(e,n){let s=-1;const l=[];for(;++s<n.length;)(n[s].add==="after"?e:l).push(n[s]);aa(e,0,0,l)}function Hz(e,n){const s=Number.parseInt(e,n);return s<9||s===11||s>13&&s<32||s>126&&s<160||s>55295&&s<57344||s>64975&&s<65008||(s&65535)===65535||(s&65535)===65534||s>1114111?"�":String.fromCodePoint(s)}function qa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const zs=Bc(/[A-Za-z]/),bs=Bc(/[\dA-Za-z]/),_ie=Bc(/[#-'*+\--9=?A-Z^-~]/);function V_(e){return e!==null&&(e<32||e===127)}const e5=Bc(/\d/),vie=Bc(/[\dA-Fa-f]/),xie=Bc(/[!-/:-@[-`{-~]/);function Ni(e){return e!==null&&e<-2}function Br(e){return e!==null&&(e<0||e===32)}function pr(e){return e===-2||e===-1||e===32}const H_=Bc(new RegExp("\\p{P}|\\p{S}","u")),oh=Bc(/\s/);function Bc(e){return n;function n(s){return s!==null&&s>-1&&e.test(String.fromCharCode(s))}}function Yd(e){const n=[];let s=-1,l=0,h=0;for(;++s<e.length;){const m=e.charCodeAt(s);let _="";if(m===37&&bs(e.charCodeAt(s+1))&&bs(e.charCodeAt(s+2)))h=2;else if(m<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(m))||(_=String.fromCharCode(m));else if(m>55295&&m<57344){const i=e.charCodeAt(s+1);m<56320&&i>56319&&i<57344?(_=String.fromCharCode(m,i),h=1):_="�"}else _=String.fromCharCode(m);_&&(n.push(e.slice(l,s),encodeURIComponent(_)),l=s+h+1,_=""),h&&(s+=h,h=0)}return n.join("")+e.slice(l)}function xr(e,n,s,l){const h=l?l-1:Number.POSITIVE_INFINITY;let m=0;return _;function _(I){return pr(I)?(e.enter(s),i(I)):n(I)}function i(I){return pr(I)&&m++<h?(e.consume(I),i):(e.exit(s),n(I))}}const bie={tokenize:wie};function wie(e){const n=e.attempt(this.parser.constructs.contentInitial,l,h);let s;return n;function l(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),xr(e,n,"linePrefix")}function h(i){return e.enter("paragraph"),m(i)}function m(i){const I=e.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=I),s=I,_(i)}function _(i){if(i===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(i);return}return Ni(i)?(e.consume(i),e.exit("chunkText"),m):(e.consume(i),_)}}const Mie={tokenize:Iie},Qz={tokenize:Tie};function Iie(e){const n=this,s=[];let l=0,h,m,_;return i;function i(q){if(l<s.length){const ue=s[l];return n.containerState=ue[1],e.attempt(ue[0].continuation,I,C)(q)}return C(q)}function I(q){if(l++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,h&&Y();const ue=n.events.length;let me=ue,ne;for(;me--;)if(n.events[me][0]==="exit"&&n.events[me][1].type==="chunkFlow"){ne=n.events[me][1].end;break}ie(l);let De=ue;for(;De<n.events.length;)n.events[De][1].end={...ne},De++;return aa(n.events,me+1,0,n.events.slice(ue)),n.events.length=De,C(q)}return i(q)}function C(q){if(l===s.length){if(!h)return R(q);if(h.currentConstruct&&h.currentConstruct.concrete)return W(q);n.interrupt=!!(h.currentConstruct&&!h._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Qz,S,L)(q)}function S(q){return h&&Y(),ie(l),R(q)}function L(q){return n.parser.lazy[n.now().line]=l!==s.length,_=n.now().offset,W(q)}function R(q){return n.containerState={},e.attempt(Qz,U,W)(q)}function U(q){return l++,s.push([n.currentConstruct,n.containerState]),R(q)}function W(q){if(q===null){h&&Y(),ie(0),e.consume(q);return}return h=h||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:h,contentType:"flow",previous:m}),le(q)}function le(q){if(q===null){pe(e.exit("chunkFlow"),!0),ie(0),e.consume(q);return}return Ni(q)?(e.consume(q),pe(e.exit("chunkFlow")),l=0,n.interrupt=void 0,i):(e.consume(q),le)}function pe(q,ue){const me=n.sliceStream(q);if(ue&&me.push(null),q.previous=m,m&&(m.next=q),m=q,h.defineSkip(q.start),h.write(me),n.parser.lazy[q.start.line]){let ne=h.events.length;for(;ne--;)if(h.events[ne][1].start.offset<_&&(!h.events[ne][1].end||h.events[ne][1].end.offset>_))return;const De=n.events.length;let Me=De,Ee,ge;for(;Me--;)if(n.events[Me][0]==="exit"&&n.events[Me][1].type==="chunkFlow"){if(Ee){ge=n.events[Me][1].end;break}Ee=!0}for(ie(l),ne=De;ne<n.events.length;)n.events[ne][1].end={...ge},ne++;aa(n.events,Me+1,0,n.events.slice(De)),n.events.length=ne}}function ie(q){let ue=s.length;for(;ue-- >q;){const me=s[ue];n.containerState=me[1],me[0].exit.call(n,e)}s.length=q}function Y(){h.write([null]),m=void 0,h=void 0,n.containerState._closeFlow=void 0}}function Tie(e,n,s){return xr(e,e.attempt(this.parser.constructs.document,n,s),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Gd(e){if(e===null||Br(e)||oh(e))return 1;if(H_(e))return 2}function Q_(e,n,s){const l=[];let h=-1;for(;++h<e.length;){const m=e[h].resolveAll;m&&!l.includes(m)&&(n=m(n,s),l.push(m))}return n}const t5={name:"attention",resolveAll:Aie,tokenize:Cie};function Aie(e,n){let s=-1,l,h,m,_,i,I,C,S;for(;++s<e.length;)if(e[s][0]==="enter"&&e[s][1].type==="attentionSequence"&&e[s][1]._close){for(l=s;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&n.sliceSerialize(e[l][1]).charCodeAt(0)===n.sliceSerialize(e[s][1]).charCodeAt(0)){if((e[l][1]._close||e[s][1]._open)&&(e[s][1].end.offset-e[s][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[s][1].end.offset-e[s][1].start.offset)%3))continue;I=e[l][1].end.offset-e[l][1].start.offset>1&&e[s][1].end.offset-e[s][1].start.offset>1?2:1;const L={...e[l][1].end},R={...e[s][1].start};Yz(L,-I),Yz(R,I),_={type:I>1?"strongSequence":"emphasisSequence",start:L,end:{...e[l][1].end}},i={type:I>1?"strongSequence":"emphasisSequence",start:{...e[s][1].start},end:R},m={type:I>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[s][1].start}},h={type:I>1?"strong":"emphasis",start:{..._.start},end:{...i.end}},e[l][1].end={..._.start},e[s][1].start={...i.end},C=[],e[l][1].end.offset-e[l][1].start.offset&&(C=Sa(C,[["enter",e[l][1],n],["exit",e[l][1],n]])),C=Sa(C,[["enter",h,n],["enter",_,n],["exit",_,n],["enter",m,n]]),C=Sa(C,Q_(n.parser.constructs.insideSpan.null,e.slice(l+1,s),n)),C=Sa(C,[["exit",m,n],["enter",i,n],["exit",i,n],["exit",h,n]]),e[s][1].end.offset-e[s][1].start.offset?(S=2,C=Sa(C,[["enter",e[s][1],n],["exit",e[s][1],n]])):S=0,aa(e,l-1,s-l+3,C),s=l+C.length-S-2;break}}for(s=-1;++s<e.length;)e[s][1].type==="attentionSequence"&&(e[s][1].type="data");return e}function Cie(e,n){const s=this.parser.constructs.attentionMarkers.null,l=this.previous,h=Gd(l);let m;return _;function _(I){return m=I,e.enter("attentionSequence"),i(I)}function i(I){if(I===m)return e.consume(I),i;const C=e.exit("attentionSequence"),S=Gd(I),L=!S||S===2&&h||s.includes(I),R=!h||h===2&&S||s.includes(l);return C._open=!!(m===42?L:L&&(h||!R)),C._close=!!(m===42?R:R&&(S||!L)),n(I)}}function Yz(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const Die={name:"autolink",tokenize:Sie};function Sie(e,n,s){let l=0;return h;function h(U){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(U),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),m}function m(U){return zs(U)?(e.consume(U),_):U===64?s(U):C(U)}function _(U){return U===43||U===45||U===46||bs(U)?(l=1,i(U)):C(U)}function i(U){return U===58?(e.consume(U),l=0,I):(U===43||U===45||U===46||bs(U))&&l++<32?(e.consume(U),i):(l=0,C(U))}function I(U){return U===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(U),e.exit("autolinkMarker"),e.exit("autolink"),n):U===null||U===32||U===60||V_(U)?s(U):(e.consume(U),I)}function C(U){return U===64?(e.consume(U),S):_ie(U)?(e.consume(U),C):s(U)}function S(U){return bs(U)?L(U):s(U)}function L(U){return U===46?(e.consume(U),l=0,S):U===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(U),e.exit("autolinkMarker"),e.exit("autolink"),n):R(U)}function R(U){if((U===45||bs(U))&&l++<63){const W=U===45?R:L;return e.consume(U),W}return s(U)}}const Fg={partial:!0,tokenize:Eie};function Eie(e,n,s){return l;function l(m){return pr(m)?xr(e,h,"linePrefix")(m):h(m)}function h(m){return m===null||Ni(m)?n(m):s(m)}}const Gz={continuation:{tokenize:Lie},exit:kie,name:"blockQuote",tokenize:Nie};function Nie(e,n,s){const l=this;return h;function h(_){if(_===62){const i=l.containerState;return i.open||(e.enter("blockQuote",{_container:!0}),i.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(_),e.exit("blockQuoteMarker"),m}return s(_)}function m(_){return pr(_)?(e.enter("blockQuotePrefixWhitespace"),e.consume(_),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(_))}}function Lie(e,n,s){const l=this;return h;function h(_){return pr(_)?xr(e,m,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):m(_)}function m(_){return e.attempt(Gz,n,s)(_)}}function kie(e){e.exit("blockQuote")}const $z={name:"characterEscape",tokenize:zie};function zie(e,n,s){return l;function l(m){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(m),e.exit("escapeMarker"),h}function h(m){return xie(m)?(e.enter("characterEscapeValue"),e.consume(m),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):s(m)}}const Zz={name:"characterReference",tokenize:Oie};function Oie(e,n,s){const l=this;let h=0,m,_;return i;function i(L){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(L),e.exit("characterReferenceMarker"),I}function I(L){return L===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(L),e.exit("characterReferenceMarkerNumeric"),C):(e.enter("characterReferenceValue"),m=31,_=bs,S(L))}function C(L){return L===88||L===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(L),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),m=6,_=vie,S):(e.enter("characterReferenceValue"),m=7,_=e5,S(L))}function S(L){if(L===59&&h){const R=e.exit("characterReferenceValue");return _===bs&&!J4(l.sliceSerialize(R))?s(L):(e.enter("characterReferenceMarker"),e.consume(L),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return _(L)&&h++<m?(e.consume(L),S):s(L)}}const Wz={partial:!0,tokenize:Pie},qz={concrete:!0,name:"codeFenced",tokenize:jie};function jie(e,n,s){const l=this,h={partial:!0,tokenize:me};let m=0,_=0,i;return I;function I(ne){return C(ne)}function C(ne){const De=l.events[l.events.length-1];return m=De&&De[1].type==="linePrefix"?De[2].sliceSerialize(De[1],!0).length:0,i=ne,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),S(ne)}function S(ne){return ne===i?(_++,e.consume(ne),S):_<3?s(ne):(e.exit("codeFencedFenceSequence"),pr(ne)?xr(e,L,"whitespace")(ne):L(ne))}function L(ne){return ne===null||Ni(ne)?(e.exit("codeFencedFence"),l.interrupt?n(ne):e.check(Wz,le,ue)(ne)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),R(ne))}function R(ne){return ne===null||Ni(ne)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),L(ne)):pr(ne)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xr(e,U,"whitespace")(ne)):ne===96&&ne===i?s(ne):(e.consume(ne),R)}function U(ne){return ne===null||Ni(ne)?L(ne):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),W(ne))}function W(ne){return ne===null||Ni(ne)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),L(ne)):ne===96&&ne===i?s(ne):(e.consume(ne),W)}function le(ne){return e.attempt(h,ue,pe)(ne)}function pe(ne){return e.enter("lineEnding"),e.consume(ne),e.exit("lineEnding"),ie}function ie(ne){return m>0&&pr(ne)?xr(e,Y,"linePrefix",m+1)(ne):Y(ne)}function Y(ne){return ne===null||Ni(ne)?e.check(Wz,le,ue)(ne):(e.enter("codeFlowValue"),q(ne))}function q(ne){return ne===null||Ni(ne)?(e.exit("codeFlowValue"),Y(ne)):(e.consume(ne),q)}function ue(ne){return e.exit("codeFenced"),n(ne)}function me(ne,De,Me){let Ee=0;return ge;function ge(dt){return ne.enter("lineEnding"),ne.consume(dt),ne.exit("lineEnding"),Re}function Re(dt){return ne.enter("codeFencedFence"),pr(dt)?xr(ne,Oe,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(dt):Oe(dt)}function Oe(dt){return dt===i?(ne.enter("codeFencedFenceSequence"),Ne(dt)):Me(dt)}function Ne(dt){return dt===i?(Ee++,ne.consume(dt),Ne):Ee>=_?(ne.exit("codeFencedFenceSequence"),pr(dt)?xr(ne,tt,"whitespace")(dt):tt(dt)):Me(dt)}function tt(dt){return dt===null||Ni(dt)?(ne.exit("codeFencedFence"),De(dt)):Me(dt)}}}function Pie(e,n,s){const l=this;return h;function h(_){return _===null?s(_):(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),m)}function m(_){return l.parser.lazy[l.now().line]?s(_):n(_)}}const n5={name:"codeIndented",tokenize:Bie},Rie={partial:!0,tokenize:Fie};function Bie(e,n,s){const l=this;return h;function h(C){return e.enter("codeIndented"),xr(e,m,"linePrefix",5)(C)}function m(C){const S=l.events[l.events.length-1];return S&&S[1].type==="linePrefix"&&S[2].sliceSerialize(S[1],!0).length>=4?_(C):s(C)}function _(C){return C===null?I(C):Ni(C)?e.attempt(Rie,_,I)(C):(e.enter("codeFlowValue"),i(C))}function i(C){return C===null||Ni(C)?(e.exit("codeFlowValue"),_(C)):(e.consume(C),i)}function I(C){return e.exit("codeIndented"),n(C)}}function Fie(e,n,s){const l=this;return h;function h(_){return l.parser.lazy[l.now().line]?s(_):Ni(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),h):xr(e,m,"linePrefix",5)(_)}function m(_){const i=l.events[l.events.length-1];return i&&i[1].type==="linePrefix"&&i[2].sliceSerialize(i[1],!0).length>=4?n(_):Ni(_)?h(_):s(_)}}const Uie={name:"codeText",previous:Hie,resolve:Vie,tokenize:Qie};function Vie(e){let n=e.length-4,s=3,l,h;if((e[s][1].type==="lineEnding"||e[s][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(l=s;++l<n;)if(e[l][1].type==="codeTextData"){e[s][1].type="codeTextPadding",e[n][1].type="codeTextPadding",s+=2,n-=2;break}}for(l=s-1,n++;++l<=n;)h===void 0?l!==n&&e[l][1].type!=="lineEnding"&&(h=l):(l===n||e[l][1].type==="lineEnding")&&(e[h][1].type="codeTextData",l!==h+2&&(e[h][1].end=e[l-1][1].end,e.splice(h+2,l-h-2),n-=l-h-2,l=h+2),h=void 0);return e}function Hie(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Qie(e,n,s){let l=0,h,m;return _;function _(L){return e.enter("codeText"),e.enter("codeTextSequence"),i(L)}function i(L){return L===96?(e.consume(L),l++,i):(e.exit("codeTextSequence"),I(L))}function I(L){return L===null?s(L):L===32?(e.enter("space"),e.consume(L),e.exit("space"),I):L===96?(m=e.enter("codeTextSequence"),h=0,S(L)):Ni(L)?(e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),I):(e.enter("codeTextData"),C(L))}function C(L){return L===null||L===32||L===96||Ni(L)?(e.exit("codeTextData"),I(L)):(e.consume(L),C)}function S(L){return L===96?(e.consume(L),h++,S):h===l?(e.exit("codeTextSequence"),e.exit("codeText"),n(L)):(m.type="codeTextData",C(L))}}class Yie{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,s){const l=s??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(n,l):n>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(n,s,l){const h=s||0;this.setCursor(Math.trunc(n));const m=this.right.splice(this.right.length-h,Number.POSITIVE_INFINITY);return l&&Ug(this.left,l),m.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Ug(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Ug(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const s=this.left.splice(n,Number.POSITIVE_INFINITY);Ug(this.right,s.reverse())}else{const s=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Ug(this.left,s.reverse())}}}function Ug(e,n){let s=0;if(n.length<1e4)e.push(...n);else for(;s<n.length;)e.push(...n.slice(s,s+1e4)),s+=1e4}function Kz(e){const n={};let s=-1,l,h,m,_,i,I,C;const S=new Yie(e);for(;++s<S.length;){for(;s in n;)s=n[s];if(l=S.get(s),s&&l[1].type==="chunkFlow"&&S.get(s-1)[1].type==="listItemPrefix"&&(I=l[1]._tokenizer.events,m=0,m<I.length&&I[m][1].type==="lineEndingBlank"&&(m+=2),m<I.length&&I[m][1].type==="content"))for(;++m<I.length&&I[m][1].type!=="content";)I[m][1].type==="chunkText"&&(I[m][1]._isInFirstContentOfListItem=!0,m++);if(l[0]==="enter")l[1].contentType&&(Object.assign(n,Gie(S,s)),s=n[s],C=!0);else if(l[1]._container){for(m=s,h=void 0;m--;)if(_=S.get(m),_[1].type==="lineEnding"||_[1].type==="lineEndingBlank")_[0]==="enter"&&(h&&(S.get(h)[1].type="lineEndingBlank"),_[1].type="lineEnding",h=m);else if(!(_[1].type==="linePrefix"||_[1].type==="listItemIndent"))break;h&&(l[1].end={...S.get(h)[1].start},i=S.slice(h,s),i.unshift(l),S.splice(h,s-h+1,i))}}return aa(e,0,Number.POSITIVE_INFINITY,S.slice(0)),!C}function Gie(e,n){const s=e.get(n)[1],l=e.get(n)[2];let h=n-1;const m=[];let _=s._tokenizer;_||(_=l.parser[s.contentType](s.start),s._contentTypeTextTrailing&&(_._contentTypeTextTrailing=!0));const i=_.events,I=[],C={};let S,L,R=-1,U=s,W=0,le=0;const pe=[le];for(;U;){for(;e.get(++h)[1]!==U;);m.push(h),U._tokenizer||(S=l.sliceStream(U),U.next||S.push(null),L&&_.defineSkip(U.start),U._isInFirstContentOfListItem&&(_._gfmTasklistFirstContentOfListItem=!0),_.write(S),U._isInFirstContentOfListItem&&(_._gfmTasklistFirstContentOfListItem=void 0)),L=U,U=U.next}for(U=s;++R<i.length;)i[R][0]==="exit"&&i[R-1][0]==="enter"&&i[R][1].type===i[R-1][1].type&&i[R][1].start.line!==i[R][1].end.line&&(le=R+1,pe.push(le),U._tokenizer=void 0,U.previous=void 0,U=U.next);for(_.events=[],U?(U._tokenizer=void 0,U.previous=void 0):pe.pop(),R=pe.length;R--;){const ie=i.slice(pe[R],pe[R+1]),Y=m.pop();I.push([Y,Y+ie.length-1]),e.splice(Y,2,ie)}for(I.reverse(),R=-1;++R<I.length;)C[W+I[R][0]]=W+I[R][1],W+=I[R][1]-I[R][0]-1;return C}const $ie={resolve:Wie,tokenize:qie},Zie={partial:!0,tokenize:Kie};function Wie(e){return Kz(e),e}function qie(e,n){let s;return l;function l(i){return e.enter("content"),s=e.enter("chunkContent",{contentType:"content"}),h(i)}function h(i){return i===null?m(i):Ni(i)?e.check(Zie,_,m)(i):(e.consume(i),h)}function m(i){return e.exit("chunkContent"),e.exit("content"),n(i)}function _(i){return e.consume(i),e.exit("chunkContent"),s.next=e.enter("chunkContent",{contentType:"content",previous:s}),s=s.next,h}}function Kie(e,n,s){const l=this;return h;function h(_){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),xr(e,m,"linePrefix")}function m(_){if(_===null||Ni(_))return s(_);const i=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&i&&i[1].type==="linePrefix"&&i[2].sliceSerialize(i[1],!0).length>=4?n(_):e.interrupt(l.parser.constructs.flow,s,n)(_)}}function Xz(e,n,s,l,h,m,_,i,I){const C=I||Number.POSITIVE_INFINITY;let S=0;return L;function L(ie){return ie===60?(e.enter(l),e.enter(h),e.enter(m),e.consume(ie),e.exit(m),R):ie===null||ie===32||ie===41||V_(ie)?s(ie):(e.enter(l),e.enter(_),e.enter(i),e.enter("chunkString",{contentType:"string"}),le(ie))}function R(ie){return ie===62?(e.enter(m),e.consume(ie),e.exit(m),e.exit(h),e.exit(l),n):(e.enter(i),e.enter("chunkString",{contentType:"string"}),U(ie))}function U(ie){return ie===62?(e.exit("chunkString"),e.exit(i),R(ie)):ie===null||ie===60||Ni(ie)?s(ie):(e.consume(ie),ie===92?W:U)}function W(ie){return ie===60||ie===62||ie===92?(e.consume(ie),U):U(ie)}function le(ie){return!S&&(ie===null||ie===41||Br(ie))?(e.exit("chunkString"),e.exit(i),e.exit(_),e.exit(l),n(ie)):S<C&&ie===40?(e.consume(ie),S++,le):ie===41?(e.consume(ie),S--,le):ie===null||ie===32||ie===40||V_(ie)?s(ie):(e.consume(ie),ie===92?pe:le)}function pe(ie){return ie===40||ie===41||ie===92?(e.consume(ie),le):le(ie)}}function Jz(e,n,s,l,h,m){const _=this;let i=0,I;return C;function C(U){return e.enter(l),e.enter(h),e.consume(U),e.exit(h),e.enter(m),S}function S(U){return i>999||U===null||U===91||U===93&&!I||U===94&&!i&&"_hiddenFootnoteSupport"in _.parser.constructs?s(U):U===93?(e.exit(m),e.enter(h),e.consume(U),e.exit(h),e.exit(l),n):Ni(U)?(e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),S):(e.enter("chunkString",{contentType:"string"}),L(U))}function L(U){return U===null||U===91||U===93||Ni(U)||i++>999?(e.exit("chunkString"),S(U)):(e.consume(U),I||(I=!pr(U)),U===92?R:L)}function R(U){return U===91||U===92||U===93?(e.consume(U),i++,L):L(U)}}function e9(e,n,s,l,h,m){let _;return i;function i(R){return R===34||R===39||R===40?(e.enter(l),e.enter(h),e.consume(R),e.exit(h),_=R===40?41:R,I):s(R)}function I(R){return R===_?(e.enter(h),e.consume(R),e.exit(h),e.exit(l),n):(e.enter(m),C(R))}function C(R){return R===_?(e.exit(m),I(_)):R===null?s(R):Ni(R)?(e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),xr(e,C,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),S(R))}function S(R){return R===_||R===null||Ni(R)?(e.exit("chunkString"),C(R)):(e.consume(R),R===92?L:S)}function L(R){return R===_||R===92?(e.consume(R),S):S(R)}}function Vg(e,n){let s;return l;function l(h){return Ni(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),s=!0,l):pr(h)?xr(e,l,s?"linePrefix":"lineSuffix")(h):n(h)}}const Xie={name:"definition",tokenize:ere},Jie={partial:!0,tokenize:tre};function ere(e,n,s){const l=this;let h;return m;function m(U){return e.enter("definition"),_(U)}function _(U){return Jz.call(l,e,i,s,"definitionLabel","definitionLabelMarker","definitionLabelString")(U)}function i(U){return h=qa(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),U===58?(e.enter("definitionMarker"),e.consume(U),e.exit("definitionMarker"),I):s(U)}function I(U){return Br(U)?Vg(e,C)(U):C(U)}function C(U){return Xz(e,S,s,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(U)}function S(U){return e.attempt(Jie,L,L)(U)}function L(U){return pr(U)?xr(e,R,"whitespace")(U):R(U)}function R(U){return U===null||Ni(U)?(e.exit("definition"),l.parser.defined.push(h),n(U)):s(U)}}function tre(e,n,s){return l;function l(i){return Br(i)?Vg(e,h)(i):s(i)}function h(i){return e9(e,m,s,"definitionTitle","definitionTitleMarker","definitionTitleString")(i)}function m(i){return pr(i)?xr(e,_,"whitespace")(i):_(i)}function _(i){return i===null||Ni(i)?n(i):s(i)}}const nre={name:"hardBreakEscape",tokenize:ire};function ire(e,n,s){return l;function l(m){return e.enter("hardBreakEscape"),e.consume(m),h}function h(m){return Ni(m)?(e.exit("hardBreakEscape"),n(m)):s(m)}}const rre={name:"headingAtx",resolve:ore,tokenize:sre};function ore(e,n){let s=e.length-2,l=3,h,m;return e[l][1].type==="whitespace"&&(l+=2),s-2>l&&e[s][1].type==="whitespace"&&(s-=2),e[s][1].type==="atxHeadingSequence"&&(l===s-1||s-4>l&&e[s-2][1].type==="whitespace")&&(s-=l+1===s?2:4),s>l&&(h={type:"atxHeadingText",start:e[l][1].start,end:e[s][1].end},m={type:"chunkText",start:e[l][1].start,end:e[s][1].end,contentType:"text"},aa(e,l,s-l+1,[["enter",h,n],["enter",m,n],["exit",m,n],["exit",h,n]])),e}function sre(e,n,s){let l=0;return h;function h(S){return e.enter("atxHeading"),m(S)}function m(S){return e.enter("atxHeadingSequence"),_(S)}function _(S){return S===35&&l++<6?(e.consume(S),_):S===null||Br(S)?(e.exit("atxHeadingSequence"),i(S)):s(S)}function i(S){return S===35?(e.enter("atxHeadingSequence"),I(S)):S===null||Ni(S)?(e.exit("atxHeading"),n(S)):pr(S)?xr(e,i,"whitespace")(S):(e.enter("atxHeadingText"),C(S))}function I(S){return S===35?(e.consume(S),I):(e.exit("atxHeadingSequence"),i(S))}function C(S){return S===null||S===35||Br(S)?(e.exit("atxHeadingText"),i(S)):(e.consume(S),C)}}const are=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],t9=["pre","script","style","textarea"],lre={concrete:!0,name:"htmlFlow",resolveTo:hre,tokenize:dre},cre={partial:!0,tokenize:pre},ure={partial:!0,tokenize:fre};function hre(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function dre(e,n,s){const l=this;let h,m,_,i,I;return C;function C(Q){return S(Q)}function S(Q){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(Q),L}function L(Q){return Q===33?(e.consume(Q),R):Q===47?(e.consume(Q),m=!0,le):Q===63?(e.consume(Q),h=3,l.interrupt?n:P):zs(Q)?(e.consume(Q),_=String.fromCharCode(Q),pe):s(Q)}function R(Q){return Q===45?(e.consume(Q),h=2,U):Q===91?(e.consume(Q),h=5,i=0,W):zs(Q)?(e.consume(Q),h=4,l.interrupt?n:P):s(Q)}function U(Q){return Q===45?(e.consume(Q),l.interrupt?n:P):s(Q)}function W(Q){const de="CDATA[";return Q===de.charCodeAt(i++)?(e.consume(Q),i===de.length?l.interrupt?n:Oe:W):s(Q)}function le(Q){return zs(Q)?(e.consume(Q),_=String.fromCharCode(Q),pe):s(Q)}function pe(Q){if(Q===null||Q===47||Q===62||Br(Q)){const de=Q===47,we=_.toLowerCase();return!de&&!m&&t9.includes(we)?(h=1,l.interrupt?n(Q):Oe(Q)):are.includes(_.toLowerCase())?(h=6,de?(e.consume(Q),ie):l.interrupt?n(Q):Oe(Q)):(h=7,l.interrupt&&!l.parser.lazy[l.now().line]?s(Q):m?Y(Q):q(Q))}return Q===45||bs(Q)?(e.consume(Q),_+=String.fromCharCode(Q),pe):s(Q)}function ie(Q){return Q===62?(e.consume(Q),l.interrupt?n:Oe):s(Q)}function Y(Q){return pr(Q)?(e.consume(Q),Y):ge(Q)}function q(Q){return Q===47?(e.consume(Q),ge):Q===58||Q===95||zs(Q)?(e.consume(Q),ue):pr(Q)?(e.consume(Q),q):ge(Q)}function ue(Q){return Q===45||Q===46||Q===58||Q===95||bs(Q)?(e.consume(Q),ue):me(Q)}function me(Q){return Q===61?(e.consume(Q),ne):pr(Q)?(e.consume(Q),me):q(Q)}function ne(Q){return Q===null||Q===60||Q===61||Q===62||Q===96?s(Q):Q===34||Q===39?(e.consume(Q),I=Q,De):pr(Q)?(e.consume(Q),ne):Me(Q)}function De(Q){return Q===I?(e.consume(Q),I=null,Ee):Q===null||Ni(Q)?s(Q):(e.consume(Q),De)}function Me(Q){return Q===null||Q===34||Q===39||Q===47||Q===60||Q===61||Q===62||Q===96||Br(Q)?me(Q):(e.consume(Q),Me)}function Ee(Q){return Q===47||Q===62||pr(Q)?q(Q):s(Q)}function ge(Q){return Q===62?(e.consume(Q),Re):s(Q)}function Re(Q){return Q===null||Ni(Q)?Oe(Q):pr(Q)?(e.consume(Q),Re):s(Q)}function Oe(Q){return Q===45&&h===2?(e.consume(Q),Nt):Q===60&&h===1?(e.consume(Q),re):Q===62&&h===4?(e.consume(Q),K):Q===63&&h===3?(e.consume(Q),P):Q===93&&h===5?(e.consume(Q),D):Ni(Q)&&(h===6||h===7)?(e.exit("htmlFlowData"),e.check(cre,H,Ne)(Q)):Q===null||Ni(Q)?(e.exit("htmlFlowData"),Ne(Q)):(e.consume(Q),Oe)}function Ne(Q){return e.check(ure,tt,H)(Q)}function tt(Q){return e.enter("lineEnding"),e.consume(Q),e.exit("lineEnding"),dt}function dt(Q){return Q===null||Ni(Q)?Ne(Q):(e.enter("htmlFlowData"),Oe(Q))}function Nt(Q){return Q===45?(e.consume(Q),P):Oe(Q)}function re(Q){return Q===47?(e.consume(Q),_="",_e):Oe(Q)}function _e(Q){if(Q===62){const de=_.toLowerCase();return t9.includes(de)?(e.consume(Q),K):Oe(Q)}return zs(Q)&&_.length<8?(e.consume(Q),_+=String.fromCharCode(Q),_e):Oe(Q)}function D(Q){return Q===93?(e.consume(Q),P):Oe(Q)}function P(Q){return Q===62?(e.consume(Q),K):Q===45&&h===2?(e.consume(Q),P):Oe(Q)}function K(Q){return Q===null||Ni(Q)?(e.exit("htmlFlowData"),H(Q)):(e.consume(Q),K)}function H(Q){return e.exit("htmlFlow"),n(Q)}}function fre(e,n,s){const l=this;return h;function h(_){return Ni(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),m):s(_)}function m(_){return l.parser.lazy[l.now().line]?s(_):n(_)}}function pre(e,n,s){return l;function l(h){return e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),e.attempt(Fg,n,s)}}const gre={name:"htmlText",tokenize:mre};function mre(e,n,s){const l=this;let h,m,_;return i;function i(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),I}function I(P){return P===33?(e.consume(P),C):P===47?(e.consume(P),me):P===63?(e.consume(P),q):zs(P)?(e.consume(P),Me):s(P)}function C(P){return P===45?(e.consume(P),S):P===91?(e.consume(P),m=0,W):zs(P)?(e.consume(P),Y):s(P)}function S(P){return P===45?(e.consume(P),U):s(P)}function L(P){return P===null?s(P):P===45?(e.consume(P),R):Ni(P)?(_=L,re(P)):(e.consume(P),L)}function R(P){return P===45?(e.consume(P),U):L(P)}function U(P){return P===62?Nt(P):P===45?R(P):L(P)}function W(P){const K="CDATA[";return P===K.charCodeAt(m++)?(e.consume(P),m===K.length?le:W):s(P)}function le(P){return P===null?s(P):P===93?(e.consume(P),pe):Ni(P)?(_=le,re(P)):(e.consume(P),le)}function pe(P){return P===93?(e.consume(P),ie):le(P)}function ie(P){return P===62?Nt(P):P===93?(e.consume(P),ie):le(P)}function Y(P){return P===null||P===62?Nt(P):Ni(P)?(_=Y,re(P)):(e.consume(P),Y)}function q(P){return P===null?s(P):P===63?(e.consume(P),ue):Ni(P)?(_=q,re(P)):(e.consume(P),q)}function ue(P){return P===62?Nt(P):q(P)}function me(P){return zs(P)?(e.consume(P),ne):s(P)}function ne(P){return P===45||bs(P)?(e.consume(P),ne):De(P)}function De(P){return Ni(P)?(_=De,re(P)):pr(P)?(e.consume(P),De):Nt(P)}function Me(P){return P===45||bs(P)?(e.consume(P),Me):P===47||P===62||Br(P)?Ee(P):s(P)}function Ee(P){return P===47?(e.consume(P),Nt):P===58||P===95||zs(P)?(e.consume(P),ge):Ni(P)?(_=Ee,re(P)):pr(P)?(e.consume(P),Ee):Nt(P)}function ge(P){return P===45||P===46||P===58||P===95||bs(P)?(e.consume(P),ge):Re(P)}function Re(P){return P===61?(e.consume(P),Oe):Ni(P)?(_=Re,re(P)):pr(P)?(e.consume(P),Re):Ee(P)}function Oe(P){return P===null||P===60||P===61||P===62||P===96?s(P):P===34||P===39?(e.consume(P),h=P,Ne):Ni(P)?(_=Oe,re(P)):pr(P)?(e.consume(P),Oe):(e.consume(P),tt)}function Ne(P){return P===h?(e.consume(P),h=void 0,dt):P===null?s(P):Ni(P)?(_=Ne,re(P)):(e.consume(P),Ne)}function tt(P){return P===null||P===34||P===39||P===60||P===61||P===96?s(P):P===47||P===62||Br(P)?Ee(P):(e.consume(P),tt)}function dt(P){return P===47||P===62||Br(P)?Ee(P):s(P)}function Nt(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),n):s(P)}function re(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),_e}function _e(P){return pr(P)?xr(e,D,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):D(P)}function D(P){return e.enter("htmlTextData"),_(P)}}const i5={name:"labelEnd",resolveAll:xre,resolveTo:bre,tokenize:wre},yre={tokenize:Mre},_re={tokenize:Ire},vre={tokenize:Tre};function xre(e){let n=-1;const s=[];for(;++n<e.length;){const l=e[n][1];if(s.push(e[n]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const h=l.type==="labelImage"?4:2;l.type="data",n+=h}}return e.length!==s.length&&aa(e,0,e.length,s),e}function bre(e,n){let s=e.length,l=0,h,m,_,i;for(;s--;)if(h=e[s][1],m){if(h.type==="link"||h.type==="labelLink"&&h._inactive)break;e[s][0]==="enter"&&h.type==="labelLink"&&(h._inactive=!0)}else if(_){if(e[s][0]==="enter"&&(h.type==="labelImage"||h.type==="labelLink")&&!h._balanced&&(m=s,h.type!=="labelLink")){l=2;break}}else h.type==="labelEnd"&&(_=s);const I={type:e[m][1].type==="labelLink"?"link":"image",start:{...e[m][1].start},end:{...e[e.length-1][1].end}},C={type:"label",start:{...e[m][1].start},end:{...e[_][1].end}},S={type:"labelText",start:{...e[m+l+2][1].end},end:{...e[_-2][1].start}};return i=[["enter",I,n],["enter",C,n]],i=Sa(i,e.slice(m+1,m+l+3)),i=Sa(i,[["enter",S,n]]),i=Sa(i,Q_(n.parser.constructs.insideSpan.null,e.slice(m+l+4,_-3),n)),i=Sa(i,[["exit",S,n],e[_-2],e[_-1],["exit",C,n]]),i=Sa(i,e.slice(_+1)),i=Sa(i,[["exit",I,n]]),aa(e,m,e.length,i),e}function wre(e,n,s){const l=this;let h=l.events.length,m,_;for(;h--;)if((l.events[h][1].type==="labelImage"||l.events[h][1].type==="labelLink")&&!l.events[h][1]._balanced){m=l.events[h][1];break}return i;function i(R){return m?m._inactive?L(R):(_=l.parser.defined.includes(qa(l.sliceSerialize({start:m.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(R),e.exit("labelMarker"),e.exit("labelEnd"),I):s(R)}function I(R){return R===40?e.attempt(yre,S,_?S:L)(R):R===91?e.attempt(_re,S,_?C:L)(R):_?S(R):L(R)}function C(R){return e.attempt(vre,S,L)(R)}function S(R){return n(R)}function L(R){return m._balanced=!0,s(R)}}function Mre(e,n,s){return l;function l(L){return e.enter("resource"),e.enter("resourceMarker"),e.consume(L),e.exit("resourceMarker"),h}function h(L){return Br(L)?Vg(e,m)(L):m(L)}function m(L){return L===41?S(L):Xz(e,_,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(L)}function _(L){return Br(L)?Vg(e,I)(L):S(L)}function i(L){return s(L)}function I(L){return L===34||L===39||L===40?e9(e,C,s,"resourceTitle","resourceTitleMarker","resourceTitleString")(L):S(L)}function C(L){return Br(L)?Vg(e,S)(L):S(L)}function S(L){return L===41?(e.enter("resourceMarker"),e.consume(L),e.exit("resourceMarker"),e.exit("resource"),n):s(L)}}function Ire(e,n,s){const l=this;return h;function h(i){return Jz.call(l,e,m,_,"reference","referenceMarker","referenceString")(i)}function m(i){return l.parser.defined.includes(qa(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?n(i):s(i)}function _(i){return s(i)}}function Tre(e,n,s){return l;function l(m){return e.enter("reference"),e.enter("referenceMarker"),e.consume(m),e.exit("referenceMarker"),h}function h(m){return m===93?(e.enter("referenceMarker"),e.consume(m),e.exit("referenceMarker"),e.exit("reference"),n):s(m)}}const Are={name:"labelStartImage",resolveAll:i5.resolveAll,tokenize:Cre};function Cre(e,n,s){const l=this;return h;function h(i){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(i),e.exit("labelImageMarker"),m}function m(i){return i===91?(e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelImage"),_):s(i)}function _(i){return i===94&&"_hiddenFootnoteSupport"in l.parser.constructs?s(i):n(i)}}const Dre={name:"labelStartLink",resolveAll:i5.resolveAll,tokenize:Sre};function Sre(e,n,s){const l=this;return h;function h(_){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(_),e.exit("labelMarker"),e.exit("labelLink"),m}function m(_){return _===94&&"_hiddenFootnoteSupport"in l.parser.constructs?s(_):n(_)}}const r5={name:"lineEnding",tokenize:Ere};function Ere(e,n){return s;function s(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),xr(e,n,"linePrefix")}}const Y_={name:"thematicBreak",tokenize:Nre};function Nre(e,n,s){let l=0,h;return m;function m(C){return e.enter("thematicBreak"),_(C)}function _(C){return h=C,i(C)}function i(C){return C===h?(e.enter("thematicBreakSequence"),I(C)):l>=3&&(C===null||Ni(C))?(e.exit("thematicBreak"),n(C)):s(C)}function I(C){return C===h?(e.consume(C),l++,I):(e.exit("thematicBreakSequence"),pr(C)?xr(e,i,"whitespace")(C):i(C))}}const Ks={continuation:{tokenize:Ore},exit:Pre,name:"list",tokenize:zre},Lre={partial:!0,tokenize:Rre},kre={partial:!0,tokenize:jre};function zre(e,n,s){const l=this,h=l.events[l.events.length-1];let m=h&&h[1].type==="linePrefix"?h[2].sliceSerialize(h[1],!0).length:0,_=0;return i;function i(U){const W=l.containerState.type||(U===42||U===43||U===45?"listUnordered":"listOrdered");if(W==="listUnordered"?!l.containerState.marker||U===l.containerState.marker:e5(U)){if(l.containerState.type||(l.containerState.type=W,e.enter(W,{_container:!0})),W==="listUnordered")return e.enter("listItemPrefix"),U===42||U===45?e.check(Y_,s,C)(U):C(U);if(!l.interrupt||U===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),I(U)}return s(U)}function I(U){return e5(U)&&++_<10?(e.consume(U),I):(!l.interrupt||_<2)&&(l.containerState.marker?U===l.containerState.marker:U===41||U===46)?(e.exit("listItemValue"),C(U)):s(U)}function C(U){return e.enter("listItemMarker"),e.consume(U),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||U,e.check(Fg,l.interrupt?s:S,e.attempt(Lre,R,L))}function S(U){return l.containerState.initialBlankLine=!0,m++,R(U)}function L(U){return pr(U)?(e.enter("listItemPrefixWhitespace"),e.consume(U),e.exit("listItemPrefixWhitespace"),R):s(U)}function R(U){return l.containerState.size=m+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(U)}}function Ore(e,n,s){const l=this;return l.containerState._closeFlow=void 0,e.check(Fg,h,m);function h(i){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,xr(e,n,"listItemIndent",l.containerState.size+1)(i)}function m(i){return l.containerState.furtherBlankLines||!pr(i)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,_(i)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(kre,n,_)(i))}function _(i){return l.containerState._closeFlow=!0,l.interrupt=void 0,xr(e,e.attempt(Ks,n,s),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}function jre(e,n,s){const l=this;return xr(e,h,"listItemIndent",l.containerState.size+1);function h(m){const _=l.events[l.events.length-1];return _&&_[1].type==="listItemIndent"&&_[2].sliceSerialize(_[1],!0).length===l.containerState.size?n(m):s(m)}}function Pre(e){e.exit(this.containerState.type)}function Rre(e,n,s){const l=this;return xr(e,h,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function h(m){const _=l.events[l.events.length-1];return!pr(m)&&_&&_[1].type==="listItemPrefixWhitespace"?n(m):s(m)}}const n9={name:"setextUnderline",resolveTo:Bre,tokenize:Fre};function Bre(e,n){let s=e.length,l,h,m;for(;s--;)if(e[s][0]==="enter"){if(e[s][1].type==="content"){l=s;break}e[s][1].type==="paragraph"&&(h=s)}else e[s][1].type==="content"&&e.splice(s,1),!m&&e[s][1].type==="definition"&&(m=s);const _={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[h][1].type="setextHeadingText",m?(e.splice(h,0,["enter",_,n]),e.splice(m+1,0,["exit",e[l][1],n]),e[l][1].end={...e[m][1].end}):e[l][1]=_,e.push(["exit",_,n]),e}function Fre(e,n,s){const l=this;let h;return m;function m(C){let S=l.events.length,L;for(;S--;)if(l.events[S][1].type!=="lineEnding"&&l.events[S][1].type!=="linePrefix"&&l.events[S][1].type!=="content"){L=l.events[S][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||L)?(e.enter("setextHeadingLine"),h=C,_(C)):s(C)}function _(C){return e.enter("setextHeadingLineSequence"),i(C)}function i(C){return C===h?(e.consume(C),i):(e.exit("setextHeadingLineSequence"),pr(C)?xr(e,I,"lineSuffix")(C):I(C))}function I(C){return C===null||Ni(C)?(e.exit("setextHeadingLine"),n(C)):s(C)}}const Ure={tokenize:Vre};function Vre(e){const n=this,s=e.attempt(Fg,l,e.attempt(this.parser.constructs.flowInitial,h,xr(e,e.attempt(this.parser.constructs.flow,h,e.attempt($ie,h)),"linePrefix")));return s;function l(m){if(m===null){e.consume(m);return}return e.enter("lineEndingBlank"),e.consume(m),e.exit("lineEndingBlank"),n.currentConstruct=void 0,s}function h(m){if(m===null){e.consume(m);return}return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),n.currentConstruct=void 0,s}}const Hre={resolveAll:r9()},Qre=i9("string"),Yre=i9("text");function i9(e){return{resolveAll:r9(e==="text"?Gre:void 0),tokenize:n};function n(s){const l=this,h=this.parser.constructs[e],m=s.attempt(h,_,i);return _;function _(S){return C(S)?m(S):i(S)}function i(S){if(S===null){s.consume(S);return}return s.enter("data"),s.consume(S),I}function I(S){return C(S)?(s.exit("data"),m(S)):(s.consume(S),I)}function C(S){if(S===null)return!0;const L=h[S];let R=-1;if(L)for(;++R<L.length;){const U=L[R];if(!U.previous||U.previous.call(l,l.previous))return!0}return!1}}}function r9(e){return n;function n(s,l){let h=-1,m;for(;++h<=s.length;)m===void 0?s[h]&&s[h][1].type==="data"&&(m=h,h++):(!s[h]||s[h][1].type!=="data")&&(h!==m+2&&(s[m][1].end=s[h-1][1].end,s.splice(m+2,h-m-2),h=m+2),m=void 0);return e?e(s,l):s}}function Gre(e,n){let s=0;for(;++s<=e.length;)if((s===e.length||e[s][1].type==="lineEnding")&&e[s-1][1].type==="data"){const l=e[s-1][1],h=n.sliceStream(l);let m=h.length,_=-1,i=0,I;for(;m--;){const C=h[m];if(typeof C=="string"){for(_=C.length;C.charCodeAt(_-1)===32;)i++,_--;if(_)break;_=-1}else if(C===-2)I=!0,i++;else if(C!==-1){m++;break}}if(n._contentTypeTextTrailing&&s===e.length&&(i=0),i){const C={type:s===e.length||I||i<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:m?_:l.start._bufferIndex+_,_index:l.start._index+m,line:l.end.line,column:l.end.column-i,offset:l.end.offset-i},end:{...l.end}};l.end={...C.start},l.start.offset===l.end.offset?Object.assign(l,C):(e.splice(s,0,["enter",C,n],["exit",C,n]),s+=2)}s++}return e}const $re=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Xie},disable:{null:[]},document:{42:Ks,43:Ks,45:Ks,48:Ks,49:Ks,50:Ks,51:Ks,52:Ks,53:Ks,54:Ks,55:Ks,56:Ks,57:Ks,62:Gz},flow:{35:rre,42:Y_,45:[n9,Y_],60:lre,61:n9,95:Y_,96:qz,126:qz},flowInitial:{[-2]:n5,[-1]:n5,32:n5},insideSpan:{null:[t5,Hre]},string:{38:Zz,92:$z},text:{[-5]:r5,[-4]:r5,[-3]:r5,33:Are,38:Zz,42:t5,60:[Die,gre],91:Dre,92:[nre,$z],93:i5,95:t5,96:Uie}},Symbol.toStringTag,{value:"Module"}));function Zre(e,n,s){let l={_bufferIndex:-1,_index:0,line:s&&s.line||1,column:s&&s.column||1,offset:s&&s.offset||0};const h={},m=[];let _=[],i=[];const I={attempt:De(me),check:De(ne),consume:Y,enter:q,exit:ue,interrupt:De(ne,{interrupt:!0})},C={code:null,containerState:{},defineSkip:le,events:[],now:W,parser:e,previous:null,sliceSerialize:R,sliceStream:U,write:L};let S=n.tokenize.call(C,I);return n.resolveAll&&m.push(n),C;function L(Re){return _=Sa(_,Re),pe(),_[_.length-1]!==null?[]:(Me(n,0),C.events=Q_(m,C.events,C),C.events)}function R(Re,Oe){return qre(U(Re),Oe)}function U(Re){return Wre(_,Re)}function W(){const{_bufferIndex:Re,_index:Oe,line:Ne,column:tt,offset:dt}=l;return{_bufferIndex:Re,_index:Oe,line:Ne,column:tt,offset:dt}}function le(Re){h[Re.line]=Re.column,ge()}function pe(){let Re;for(;l._index<_.length;){const Oe=_[l._index];if(typeof Oe=="string")for(Re=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===Re&&l._bufferIndex<Oe.length;)ie(Oe.charCodeAt(l._bufferIndex));else ie(Oe)}}function ie(Re){S=S(Re)}function Y(Re){Ni(Re)?(l.line++,l.column=1,l.offset+=Re===-3?2:1,ge()):Re!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===_[l._index].length&&(l._bufferIndex=-1,l._index++)),C.previous=Re}function q(Re,Oe){const Ne=Oe||{};return Ne.type=Re,Ne.start=W(),C.events.push(["enter",Ne,C]),i.push(Ne),Ne}function ue(Re){const Oe=i.pop();return Oe.end=W(),C.events.push(["exit",Oe,C]),Oe}function me(Re,Oe){Me(Re,Oe.from)}function ne(Re,Oe){Oe.restore()}function De(Re,Oe){return Ne;function Ne(tt,dt,Nt){let re,_e,D,P;return Array.isArray(tt)?H(tt):"tokenize"in tt?H([tt]):K(tt);function K(he){return Ie;function Ie(je){const Fe=je!==null&&he[je],Ue=je!==null&&he.null,He=[...Array.isArray(Fe)?Fe:Fe?[Fe]:[],...Array.isArray(Ue)?Ue:Ue?[Ue]:[]];return H(He)(je)}}function H(he){return re=he,_e=0,he.length===0?Nt:Q(he[_e])}function Q(he){return Ie;function Ie(je){return P=Ee(),D=he,he.partial||(C.currentConstruct=he),he.name&&C.parser.constructs.disable.null.includes(he.name)?we():he.tokenize.call(Oe?Object.assign(Object.create(C),Oe):C,I,de,we)(je)}}function de(he){return Re(D,P),dt}function we(he){return P.restore(),++_e<re.length?Q(re[_e]):Nt}}}function Me(Re,Oe){Re.resolveAll&&!m.includes(Re)&&m.push(Re),Re.resolve&&aa(C.events,Oe,C.events.length-Oe,Re.resolve(C.events.slice(Oe),C)),Re.resolveTo&&(C.events=Re.resolveTo(C.events,C))}function Ee(){const Re=W(),Oe=C.previous,Ne=C.currentConstruct,tt=C.events.length,dt=Array.from(i);return{from:tt,restore:Nt};function Nt(){l=Re,C.previous=Oe,C.currentConstruct=Ne,C.events.length=tt,i=dt,ge()}}function ge(){l.line in h&&l.column<2&&(l.column=h[l.line],l.offset+=h[l.line]-1)}}function Wre(e,n){const s=n.start._index,l=n.start._bufferIndex,h=n.end._index,m=n.end._bufferIndex;let _;if(s===h)_=[e[s].slice(l,m)];else{if(_=e.slice(s,h),l>-1){const i=_[0];typeof i=="string"?_[0]=i.slice(l):_.shift()}m>0&&_.push(e[h].slice(0,m))}return _}function qre(e,n){let s=-1;const l=[];let h;for(;++s<e.length;){const m=e[s];let _;if(typeof m=="string")_=m;else switch(m){case-5:{_="\r";break}case-4:{_=`
47
47
  `;break}case-3:{_=`\r
48
48
  `;break}case-2:{_=n?" ":" ";break}case-1:{if(!n&&h)continue;_=" ";break}default:_=String.fromCharCode(m)}h=m===-2,l.push(_)}return l.join("")}function Kre(e){const l={constructs:Vz([$re,...(e||{}).extensions||[]]),content:h(bie),defined:[],document:h(Mie),flow:h(Ure),lazy:{},string:h(Qre),text:h(Yre)};return l;function h(m){return _;function _(i){return Zre(l,m,i)}}}function Xre(e){for(;!Kz(e););return e}const o9=/[\0\t\n\r]/g;function Jre(){let e=1,n="",s=!0,l;return h;function h(m,_,i){const I=[];let C,S,L,R,U;for(m=n+(typeof m=="string"?m.toString():new TextDecoder(_||void 0).decode(m)),L=0,n="",s&&(m.charCodeAt(0)===65279&&L++,s=void 0);L<m.length;){if(o9.lastIndex=L,C=o9.exec(m),R=C&&C.index!==void 0?C.index:m.length,U=m.charCodeAt(R),!C){n=m.slice(L);break}if(U===10&&L===R&&l)I.push(-3),l=void 0;else switch(l&&(I.push(-5),l=void 0),L<R&&(I.push(m.slice(L,R)),e+=R-L),U){case 0:{I.push(65533),e++;break}case 9:{for(S=Math.ceil(e/4)*4,I.push(-2);e++<S;)I.push(-1);break}case 10:{I.push(-4),e=1;break}default:l=!0,e=1}L=R+1}return i&&(l&&I.push(-5),n&&I.push(n),I.push(null)),I}}const eoe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function toe(e){return e.replace(eoe,noe)}function noe(e,n,s){if(n)return n;if(s.charCodeAt(0)===35){const h=s.charCodeAt(1),m=h===120||h===88;return Hz(s.slice(m?2:1),m?16:10)}return J4(s)||e}const s9={}.hasOwnProperty;function ioe(e,n,s){return typeof n!="string"&&(s=n,n=void 0),roe(s)(Xre(Kre(s).document().write(Jre()(e,n,!0))))}function roe(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:m(on),autolinkProtocol:Ee,autolinkEmail:Ee,atxHeading:m(gt),blockQuote:m(Ue),characterEscape:Ee,characterReference:Ee,codeFenced:m(He),codeFencedFenceInfo:_,codeFencedFenceMeta:_,codeIndented:m(He,_),codeText:m(it,_),codeTextData:Ee,data:Ee,codeFlowValue:Ee,definition:m(ct),definitionDestinationString:_,definitionLabelString:_,definitionTitleString:_,emphasis:m(Et),hardBreakEscape:m(zt),hardBreakTrailing:m(zt),htmlFlow:m(Wt,_),htmlFlowData:Ee,htmlText:m(Wt,_),htmlTextData:Ee,image:m(kt),label:_,link:m(on),listItem:m(rn),listItemValue:R,listOrdered:m(sn,L),listUnordered:m(sn),paragraph:m(Nn),reference:Q,referenceString:_,resourceDestinationString:_,resourceTitleString:_,setextHeading:m(gt),strong:m(Hn),thematicBreak:m(an)},exit:{atxHeading:I(),atxHeadingSequence:me,autolink:I(),autolinkEmail:Fe,autolinkProtocol:je,blockQuote:I(),characterEscapeValue:ge,characterReferenceMarkerHexadecimal:we,characterReferenceMarkerNumeric:we,characterReferenceValue:he,characterReference:Ie,codeFenced:I(pe),codeFencedFence:le,codeFencedFenceInfo:U,codeFencedFenceMeta:W,codeFlowValue:ge,codeIndented:I(ie),codeText:I(dt),codeTextData:ge,data:ge,definition:I(),definitionDestinationString:ue,definitionLabelString:Y,definitionTitleString:q,emphasis:I(),hardBreakEscape:I(Oe),hardBreakTrailing:I(Oe),htmlFlow:I(Ne),htmlFlowData:ge,htmlText:I(tt),htmlTextData:ge,image:I(re),label:D,labelText:_e,lineEnding:Re,link:I(Nt),listItem:I(),listOrdered:I(),listUnordered:I(),paragraph:I(),referenceString:de,resourceDestinationString:P,resourceTitleString:K,resource:H,setextHeading:I(Me),setextHeadingLineSequence:De,setextHeadingText:ne,strong:I(),thematicBreak:I()}};a9(n,(e||{}).mdastExtensions||[]);const s={};return l;function l(pt){let Ft={type:"root",children:[]};const Tn={stack:[Ft],tokenStack:[],config:n,enter:i,exit:C,buffer:_,resume:S,data:s},On=[];let mn=-1;for(;++mn<pt.length;)if(pt[mn][1].type==="listOrdered"||pt[mn][1].type==="listUnordered")if(pt[mn][0]==="enter")On.push(mn);else{const ti=On.pop();mn=h(pt,ti,mn)}for(mn=-1;++mn<pt.length;){const ti=n[pt[mn][0]];s9.call(ti,pt[mn][1].type)&&ti[pt[mn][1].type].call(Object.assign({sliceSerialize:pt[mn][2].sliceSerialize},Tn),pt[mn][1])}if(Tn.tokenStack.length>0){const ti=Tn.tokenStack[Tn.tokenStack.length-1];(ti[1]||l9).call(Tn,void 0,ti[0])}for(Ft.position={start:Fc(pt.length>0?pt[0][1].start:{line:1,column:1,offset:0}),end:Fc(pt.length>0?pt[pt.length-2][1].end:{line:1,column:1,offset:0})},mn=-1;++mn<n.transforms.length;)Ft=n.transforms[mn](Ft)||Ft;return Ft}function h(pt,Ft,Tn){let On=Ft-1,mn=-1,ti=!1,Yn,yi,Jn,It;for(;++On<=Tn;){const et=pt[On];switch(et[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{et[0]==="enter"?mn++:mn--,It=void 0;break}case"lineEndingBlank":{et[0]==="enter"&&(Yn&&!It&&!mn&&!Jn&&(Jn=On),It=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:It=void 0}if(!mn&&et[0]==="enter"&&et[1].type==="listItemPrefix"||mn===-1&&et[0]==="exit"&&(et[1].type==="listUnordered"||et[1].type==="listOrdered")){if(Yn){let Ct=On;for(yi=void 0;Ct--;){const Xt=pt[Ct];if(Xt[1].type==="lineEnding"||Xt[1].type==="lineEndingBlank"){if(Xt[0]==="exit")continue;yi&&(pt[yi][1].type="lineEndingBlank",ti=!0),Xt[1].type="lineEnding",yi=Ct}else if(!(Xt[1].type==="linePrefix"||Xt[1].type==="blockQuotePrefix"||Xt[1].type==="blockQuotePrefixWhitespace"||Xt[1].type==="blockQuoteMarker"||Xt[1].type==="listItemIndent"))break}Jn&&(!yi||Jn<yi)&&(Yn._spread=!0),Yn.end=Object.assign({},yi?pt[yi][1].start:et[1].end),pt.splice(yi||On,0,["exit",Yn,et[2]]),On++,Tn++}if(et[1].type==="listItemPrefix"){const Ct={type:"listItem",_spread:!1,start:Object.assign({},et[1].start),end:void 0};Yn=Ct,pt.splice(On,0,["enter",Ct,et[2]]),On++,Tn++,Jn=void 0,It=!0}}}return pt[Ft][1]._spread=ti,Tn}function m(pt,Ft){return Tn;function Tn(On){i.call(this,pt(On),On),Ft&&Ft.call(this,On)}}function _(){this.stack.push({type:"fragment",children:[]})}function i(pt,Ft,Tn){this.stack[this.stack.length-1].children.push(pt),this.stack.push(pt),this.tokenStack.push([Ft,Tn||void 0]),pt.position={start:Fc(Ft.start),end:void 0}}function I(pt){return Ft;function Ft(Tn){pt&&pt.call(this,Tn),C.call(this,Tn)}}function C(pt,Ft){const Tn=this.stack.pop(),On=this.tokenStack.pop();if(On)On[0].type!==pt.type&&(Ft?Ft.call(this,pt,On[0]):(On[1]||l9).call(this,pt,On[0]));else throw new Error("Cannot close `"+pt.type+"` ("+Rg({start:pt.start,end:pt.end})+"): it’s not open");Tn.position.end=Fc(pt.end)}function S(){return X4(this.stack.pop())}function L(){this.data.expectingFirstListItemValue=!0}function R(pt){if(this.data.expectingFirstListItemValue){const Ft=this.stack[this.stack.length-2];Ft.start=Number.parseInt(this.sliceSerialize(pt),10),this.data.expectingFirstListItemValue=void 0}}function U(){const pt=this.resume(),Ft=this.stack[this.stack.length-1];Ft.lang=pt}function W(){const pt=this.resume(),Ft=this.stack[this.stack.length-1];Ft.meta=pt}function le(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function pe(){const pt=this.resume(),Ft=this.stack[this.stack.length-1];Ft.value=pt.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function ie(){const pt=this.resume(),Ft=this.stack[this.stack.length-1];Ft.value=pt.replace(/(\r?\n|\r)$/g,"")}function Y(pt){const Ft=this.resume(),Tn=this.stack[this.stack.length-1];Tn.label=Ft,Tn.identifier=qa(this.sliceSerialize(pt)).toLowerCase()}function q(){const pt=this.resume(),Ft=this.stack[this.stack.length-1];Ft.title=pt}function ue(){const pt=this.resume(),Ft=this.stack[this.stack.length-1];Ft.url=pt}function me(pt){const Ft=this.stack[this.stack.length-1];if(!Ft.depth){const Tn=this.sliceSerialize(pt).length;Ft.depth=Tn}}function ne(){this.data.setextHeadingSlurpLineEnding=!0}function De(pt){const Ft=this.stack[this.stack.length-1];Ft.depth=this.sliceSerialize(pt).codePointAt(0)===61?1:2}function Me(){this.data.setextHeadingSlurpLineEnding=void 0}function Ee(pt){const Tn=this.stack[this.stack.length-1].children;let On=Tn[Tn.length-1];(!On||On.type!=="text")&&(On=Mn(),On.position={start:Fc(pt.start),end:void 0},Tn.push(On)),this.stack.push(On)}function ge(pt){const Ft=this.stack.pop();Ft.value+=this.sliceSerialize(pt),Ft.position.end=Fc(pt.end)}function Re(pt){const Ft=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Tn=Ft.children[Ft.children.length-1];Tn.position.end=Fc(pt.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(Ft.type)&&(Ee.call(this,pt),ge.call(this,pt))}function Oe(){this.data.atHardBreak=!0}function Ne(){const pt=this.resume(),Ft=this.stack[this.stack.length-1];Ft.value=pt}function tt(){const pt=this.resume(),Ft=this.stack[this.stack.length-1];Ft.value=pt}function dt(){const pt=this.resume(),Ft=this.stack[this.stack.length-1];Ft.value=pt}function Nt(){const pt=this.stack[this.stack.length-1];if(this.data.inReference){const Ft=this.data.referenceType||"shortcut";pt.type+="Reference",pt.referenceType=Ft,delete pt.url,delete pt.title}else delete pt.identifier,delete pt.label;this.data.referenceType=void 0}function re(){const pt=this.stack[this.stack.length-1];if(this.data.inReference){const Ft=this.data.referenceType||"shortcut";pt.type+="Reference",pt.referenceType=Ft,delete pt.url,delete pt.title}else delete pt.identifier,delete pt.label;this.data.referenceType=void 0}function _e(pt){const Ft=this.sliceSerialize(pt),Tn=this.stack[this.stack.length-2];Tn.label=toe(Ft),Tn.identifier=qa(Ft).toLowerCase()}function D(){const pt=this.stack[this.stack.length-1],Ft=this.resume(),Tn=this.stack[this.stack.length-1];if(this.data.inReference=!0,Tn.type==="link"){const On=pt.children;Tn.children=On}else Tn.alt=Ft}function P(){const pt=this.resume(),Ft=this.stack[this.stack.length-1];Ft.url=pt}function K(){const pt=this.resume(),Ft=this.stack[this.stack.length-1];Ft.title=pt}function H(){this.data.inReference=void 0}function Q(){this.data.referenceType="collapsed"}function de(pt){const Ft=this.resume(),Tn=this.stack[this.stack.length-1];Tn.label=Ft,Tn.identifier=qa(this.sliceSerialize(pt)).toLowerCase(),this.data.referenceType="full"}function we(pt){this.data.characterReferenceType=pt.type}function he(pt){const Ft=this.sliceSerialize(pt),Tn=this.data.characterReferenceType;let On;Tn?(On=Hz(Ft,Tn==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):On=J4(Ft);const mn=this.stack[this.stack.length-1];mn.value+=On}function Ie(pt){const Ft=this.stack.pop();Ft.position.end=Fc(pt.end)}function je(pt){ge.call(this,pt);const Ft=this.stack[this.stack.length-1];Ft.url=this.sliceSerialize(pt)}function Fe(pt){ge.call(this,pt);const Ft=this.stack[this.stack.length-1];Ft.url="mailto:"+this.sliceSerialize(pt)}function Ue(){return{type:"blockquote",children:[]}}function He(){return{type:"code",lang:null,meta:null,value:""}}function it(){return{type:"inlineCode",value:""}}function ct(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Et(){return{type:"emphasis",children:[]}}function gt(){return{type:"heading",depth:0,children:[]}}function zt(){return{type:"break"}}function Wt(){return{type:"html",value:""}}function kt(){return{type:"image",title:null,url:"",alt:null}}function on(){return{type:"link",title:null,url:"",children:[]}}function sn(pt){return{type:"list",ordered:pt.type==="listOrdered",start:null,spread:pt._spread,children:[]}}function rn(pt){return{type:"listItem",spread:pt._spread,checked:null,children:[]}}function Nn(){return{type:"paragraph",children:[]}}function Hn(){return{type:"strong",children:[]}}function Mn(){return{type:"text",value:""}}function an(){return{type:"thematicBreak"}}}function Fc(e){return{line:e.line,column:e.column,offset:e.offset}}function a9(e,n){let s=-1;for(;++s<n.length;){const l=n[s];Array.isArray(l)?a9(e,l):ooe(e,l)}}function ooe(e,n){let s;for(s in n)if(s9.call(n,s))switch(s){case"canContainEols":{const l=n[s];l&&e[s].push(...l);break}case"transforms":{const l=n[s];l&&e[s].push(...l);break}case"enter":case"exit":{const l=n[s];l&&Object.assign(e[s],l);break}}}function l9(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Rg({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Rg({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Rg({start:n.start,end:n.end})+") is still open")}function soe(e){const n=this;n.parser=s;function s(l){return ioe(l,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function aoe(e,n){const s={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,s),e.applyData(n,s)}function loe(e,n){const s={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,s),[e.applyData(n,s),{type:"text",value:`