@mapsindoors/map-template 1.8.0 → 1.8.1

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.
Files changed (75) hide show
  1. package/dist/{combo-box-item.entry-1cbf92d5.mjs → combo-box-item.entry-51ec0deb.mjs} +1 -1
  2. package/dist/{combo-box-item.entry-a4c7f7e8.mjs → combo-box-item.entry-89372d9b.mjs} +1 -1
  3. package/dist/mapsindoors-react.es.js +1 -1
  4. package/dist/mapsindoors-react.umd.js +3 -3
  5. package/dist/mapsindoors-webcomponent.es.js +1 -1
  6. package/dist/mapsindoors-webcomponent.umd.js +3 -3
  7. package/dist/{mi-card_2.entry-21dcb086.mjs → mi-card_2.entry-80d405d2.mjs} +1 -1
  8. package/dist/{mi-card_2.entry-26a8e478.mjs → mi-card_2.entry-fa326ba5.mjs} +1 -1
  9. package/dist/{mi-chip.entry-83deffcb.mjs → mi-chip.entry-515d007c.mjs} +1 -1
  10. package/dist/{mi-chip.entry-0f70d583.mjs → mi-chip.entry-b4a69e78.mjs} +1 -1
  11. package/dist/{mi-column.entry-aade2a71.mjs → mi-column.entry-1aca0c78.mjs} +1 -1
  12. package/dist/{mi-column.entry-24b54f3d.mjs → mi-column.entry-68b11fe5.mjs} +1 -1
  13. package/dist/{mi-combo-box.entry-845f805f.mjs → mi-combo-box.entry-998196cc.mjs} +1 -1
  14. package/dist/{mi-combo-box.entry-2673466f.mjs → mi-combo-box.entry-dedfa99d.mjs} +1 -1
  15. package/dist/{mi-data-table.entry-45d6e587.mjs → mi-data-table.entry-3718fe61.mjs} +1 -1
  16. package/dist/{mi-data-table.entry-5f9e719e.mjs → mi-data-table.entry-73086bfd.mjs} +1 -1
  17. package/dist/{mi-distance_2.entry-908f19fc.mjs → mi-distance_2.entry-1a7d85cc.mjs} +1 -1
  18. package/dist/{mi-distance_2.entry-d4b759e4.mjs → mi-distance_2.entry-7a7254cc.mjs} +1 -1
  19. package/dist/{mi-dropdown-item.entry-ee268c81.mjs → mi-dropdown-item.entry-19c32445.mjs} +1 -1
  20. package/dist/{mi-dropdown-item.entry-bd8794f2.mjs → mi-dropdown-item.entry-45636ef7.mjs} +1 -1
  21. package/dist/{mi-dropdown.entry-adb7aec9.mjs → mi-dropdown.entry-69b9e67c.mjs} +1 -1
  22. package/dist/{mi-dropdown.entry-c76c803f.mjs → mi-dropdown.entry-aef74a0e.mjs} +1 -1
  23. package/dist/{mi-floor-selector.entry-c632984d.mjs → mi-floor-selector.entry-2fad6805.mjs} +1 -1
  24. package/dist/{mi-floor-selector.entry-0693b8a1.mjs → mi-floor-selector.entry-67ea5b4e.mjs} +1 -1
  25. package/dist/{mi-keyboard.entry-dee1caca.mjs → mi-keyboard.entry-b6619db9.mjs} +1 -1
  26. package/dist/{mi-keyboard.entry-ca96e165.mjs → mi-keyboard.entry-cf1e9ac1.mjs} +1 -1
  27. package/dist/{mi-list-item-category.entry-a926e10b.mjs → mi-list-item-category.entry-61bb2ad3.mjs} +1 -1
  28. package/dist/{mi-list-item-category.entry-330475fb.mjs → mi-list-item-category.entry-da0adc83.mjs} +1 -1
  29. package/dist/{mi-list-item-location.entry-a86bb166.mjs → mi-list-item-location.entry-2f53e749.mjs} +1 -1
  30. package/dist/{mi-list-item-location.entry-c8899d45.mjs → mi-list-item-location.entry-ff46036b.mjs} +1 -1
  31. package/dist/{mi-list.entry-392c33fc.mjs → mi-list.entry-5aff4202.mjs} +1 -1
  32. package/dist/{mi-list.entry-c4318c10.mjs → mi-list.entry-7daf35fb.mjs} +1 -1
  33. package/dist/{mi-location-booking.entry-2f6d0c90.mjs → mi-location-booking.entry-24f4144f.mjs} +1 -1
  34. package/dist/{mi-location-booking.entry-d266bab5.mjs → mi-location-booking.entry-b48195cd.mjs} +1 -1
  35. package/dist/mi-location-info.entry-7c441d75.mjs +29 -0
  36. package/dist/mi-location-info.entry-959ac6d9.mjs +31 -0
  37. package/dist/{mi-map-googlemaps.entry-6aea7145.mjs → mi-map-googlemaps.entry-1b35a901.mjs} +1 -1
  38. package/dist/{mi-map-googlemaps.entry-081a816f.mjs → mi-map-googlemaps.entry-fa4ec7eb.mjs} +1 -1
  39. package/dist/{mi-map-mapbox.entry-a21e2de3.mjs → mi-map-mapbox.entry-7aa23da3.mjs} +1 -1
  40. package/dist/{mi-map-mapbox.entry-5f09cdd2.mjs → mi-map-mapbox.entry-977fd311.mjs} +1 -1
  41. package/dist/{mi-metric-card.entry-615bdd56.mjs → mi-metric-card.entry-cd042b09.mjs} +1 -1
  42. package/dist/{mi-metric-card.entry-9f16f7a5.mjs → mi-metric-card.entry-f7e657ea.mjs} +1 -1
  43. package/dist/{mi-my-position.entry-69e693e7.mjs → mi-my-position.entry-a20cffb4.mjs} +1 -1
  44. package/dist/{mi-my-position.entry-08666036.mjs → mi-my-position.entry-e51c2125.mjs} +1 -1
  45. package/dist/{mi-notification.entry-364eeaa5.mjs → mi-notification.entry-9133e431.mjs} +1 -1
  46. package/dist/{mi-notification.entry-a8f84c13.mjs → mi-notification.entry-d762eceb.mjs} +1 -1
  47. package/dist/{mi-route-instructions-heading.entry-d1c0cfc8.mjs → mi-route-instructions-heading.entry-788bfaf2.mjs} +1 -1
  48. package/dist/{mi-route-instructions-heading.entry-2583e149.mjs → mi-route-instructions-heading.entry-db862537.mjs} +1 -1
  49. package/dist/{mi-route-instructions-maneuver_2.entry-31eced5e.mjs → mi-route-instructions-maneuver_2.entry-2b201d3f.mjs} +1 -1
  50. package/dist/{mi-route-instructions-maneuver_2.entry-46ef3128.mjs → mi-route-instructions-maneuver_2.entry-3e9106ed.mjs} +1 -1
  51. package/dist/{mi-route-instructions-step-legacy.entry-12743148.mjs → mi-route-instructions-step-legacy.entry-3b111960.mjs} +1 -1
  52. package/dist/{mi-route-instructions-step-legacy.entry-ac01eb26.mjs → mi-route-instructions-step-legacy.entry-5e9c3869.mjs} +1 -1
  53. package/dist/{mi-route-instructions-step.entry-06110529.mjs → mi-route-instructions-step.entry-527d8816.mjs} +1 -1
  54. package/dist/{mi-route-instructions-step.entry-ebf5a8ea.mjs → mi-route-instructions-step.entry-9b5783de.mjs} +1 -1
  55. package/dist/{mi-route-instructions.entry-3a65cee0.mjs → mi-route-instructions.entry-863fdf04.mjs} +1 -1
  56. package/dist/{mi-route-instructions.entry-cab470dc.mjs → mi-route-instructions.entry-a1c07e37.mjs} +1 -1
  57. package/dist/{mi-scroll-buttons.entry-9f30ffde.mjs → mi-scroll-buttons.entry-8dd35ab8.mjs} +1 -1
  58. package/dist/{mi-scroll-buttons.entry-ab85c41a.mjs → mi-scroll-buttons.entry-a24ce4b9.mjs} +1 -1
  59. package/dist/{mi-search.entry-c4c2c32d.mjs → mi-search.entry-34f6d81b.mjs} +1 -1
  60. package/dist/{mi-search.entry-6ca0c473.mjs → mi-search.entry-413f35c9.mjs} +1 -1
  61. package/dist/{mi-share-sms.entry-4a159aaf.mjs → mi-share-sms.entry-05347a69.mjs} +1 -1
  62. package/dist/{mi-share-sms.entry-9e046c11.mjs → mi-share-sms.entry-87d0cc49.mjs} +1 -1
  63. package/dist/{mi-step-switcher.entry-2e051a90.mjs → mi-step-switcher.entry-12abf62a.mjs} +1 -1
  64. package/dist/{mi-step-switcher.entry-ac789e5d.mjs → mi-step-switcher.entry-a35d3b34.mjs} +1 -1
  65. package/dist/{mi-tab-panel.entry-4386eec7.mjs → mi-tab-panel.entry-10746cef.mjs} +1 -1
  66. package/dist/{mi-tab-panel.entry-1a7fb9a3.mjs → mi-tab-panel.entry-e2b46da4.mjs} +1 -1
  67. package/dist/{mi-tab.entry-f3b608bf.mjs → mi-tab.entry-6c72fc7a.mjs} +1 -1
  68. package/dist/{mi-tab.entry-dbc6d345.mjs → mi-tab.entry-90e1c929.mjs} +1 -1
  69. package/dist/{mi-tabs.entry-cef1d328.mjs → mi-tabs.entry-713b336a.mjs} +1 -1
  70. package/dist/{mi-tabs.entry-5eefda3d.mjs → mi-tabs.entry-dbc6bd81.mjs} +1 -1
  71. package/dist/{reactcomponent-42217a8b.mjs → reactcomponent-6ee301d4.mjs} +3 -3
  72. package/dist/{webcomponent-180ea9fa.mjs → webcomponent-11ee81df.mjs} +3 -3
  73. package/package.json +1 -1
  74. package/dist/mi-location-info.entry-4183ce2f.mjs +0 -29
  75. package/dist/mi-location-info.entry-df34c5a9.mjs +0 -27
@@ -38,7 +38,7 @@ Recoil Snapshots only last for the duration of the callback they are provided to
38
38
  }
39
39
 
40
40
  This is currently a DEV-only warning but will become a thrown exception in the next release of Recoil.
41
- `;class Dh{constructor(s,c){Pi(this,"_store",void 0),Pi(this,"_refCount",1),Pi(this,"getLoadable",d=>(this.checkRefCount_INTERNAL(),jI(this._store,d))),Pi(this,"getPromise",d=>(this.checkRefCount_INTERNAL(),this.getLoadable(d).toPromise())),Pi(this,"getNodes_UNSTABLE",d=>{if(this.checkRefCount_INTERNAL(),(d==null?void 0:d.isModified)===!0){if((d==null?void 0:d.isInitialized)===!1)return[];const v=this._store.getState().currentTree;return H1(v.dirtyAtoms)}const m=this._store.getState().knownAtoms,w=this._store.getState().knownSelectors;return(d==null?void 0:d.isInitialized)==null?G1.values():d.isInitialized===!0?H1($1([m,w])):ug(G1.values(),({key:v})=>!m.has(v)&&!w.has(v))}),Pi(this,"getInfo_UNSTABLE",({key:d})=>(this.checkRefCount_INTERNAL(),NI(this._store,this._store.getState().currentTree,d))),Pi(this,"map",d=>{this.checkRefCount_INTERNAL();const m=new mg(this,gg);return d(m),m}),Pi(this,"asyncMap",async d=>{this.checkRefCount_INTERNAL();const m=new mg(this,gg);return m.retain(),await d(m),m.autoRelease_INTERNAL(),m}),this._store={storeID:CI(),parentStoreID:c,getState:()=>s,replaceState:d=>{s.currentTree=d(s.currentTree)},getGraph:d=>{const m=s.graphsByVersion;if(m.has(d))return zn(m.get(d));const w=EI();return m.set(d,w),w},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw Ni("Cannot subscribe to Snapshots")}};for(const d of this._store.getState().knownAtoms)AI(this._store,d,"get"),Ih(this._store,d,1);this.autoRelease_INTERNAL()}retain(){if(this._refCount<=0){if(process.env.NODE_ENV!=="production")throw Ni("Snapshot has already been released.");sr("Attempt to retain() Snapshot that was already released.")}this._refCount++;let s=!1;return()=>{s||(s=!0,this._release())}}autoRelease_INTERNAL(){RI||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(s=>s()),this._store.getState().nodeCleanupFunctions.clear(),!wn("recoil_memory_managament_2020"))return}else this._refCount<0&&process.env.NODE_ENV!=="production"&&sr("Snapshot released an extra time.")}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){wn("recoil_memory_managament_2020")&&this._refCount<=0&&process.env.NODE_ENV!=="production"&&sr(BI)}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function q1(r,s,c=!1){const d=r.getState(),m=c?kI():s.version;return{currentTree:{version:c?m:s.version,stateID:c?m:s.stateID,transactionMetadata:{...s.transactionMetadata},dirtyAtoms:new Set(s.dirtyAtoms),atomValues:s.atomValues.clone(),nonvalidatedAtoms:s.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(d.knownAtoms),knownSelectors:new Set(d.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(m,r.getGraph(s.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(yh(d.nodeCleanupFunctions.entries(),([w])=>[w,()=>{}]))}}function FI(r){const s=new Dh(PI());return r!=null?s.map(r):s}const[X1,K1]=UI((r,s)=>{var c;const d=r.getState(),m=s==="latest"?(c=d.nextTree)!==null&&c!==void 0?c:d.currentTree:zn(d.previousTree);return new Dh(q1(r,m),r.storeID)},(r,s)=>{var c,d;return String(s)+String(r.storeID)+String((c=r.getState().nextTree)===null||c===void 0?void 0:c.version)+String(r.getState().currentTree.version)+String((d=r.getState().previousTree)===null||d===void 0?void 0:d.version)});LI(K1);function VI(r,s="latest"){const c=X1(r,s);return c.isRetained()?c:(K1(),X1(r,s))}class mg extends Dh{constructor(s,c){super(q1(s.getStore_INTERNAL(),s.getStore_INTERNAL().getState().currentTree,!0),s.getStoreID()),Pi(this,"_batch",void 0),Pi(this,"set",(d,m)=>{this.checkRefCount_INTERNAL();const w=this.getStore_INTERNAL();this._batch(()=>{Ih(w,d.key,1),W1(this.getStore_INTERNAL(),d,m)})}),Pi(this,"reset",d=>{this.checkRefCount_INTERNAL();const m=this.getStore_INTERNAL();this._batch(()=>{Ih(m,d.key,1),W1(this.getStore_INTERNAL(),d,SI)})}),Pi(this,"setUnvalidatedAtomValues_DEPRECATED",d=>{this.checkRefCount_INTERNAL();const m=this.getStore_INTERNAL();gg(()=>{for(const[w,v]of d.entries())Ih(m,w,1),OI(m,new zI(w),v)})}),this._batch=c}}var Th={Snapshot:Dh,MutableSnapshot:mg,freshSnapshot:FI,cloneSnapshot:VI},QI=Th.Snapshot,YI=Th.MutableSnapshot,$I=Th.freshSnapshot,ZI=Th.cloneSnapshot,Ah=Object.freeze({__proto__:null,Snapshot:QI,MutableSnapshot:YI,freshSnapshot:$I,cloneSnapshot:ZI});function GI(...r){const s=new Set;for(const c of r)for(const d of c)s.add(d);return s}var HI=GI;const{useRef:WI}=lt;function qI(r){const s=WI(r);return s.current===r&&typeof r=="function"&&(s.current=r()),s}var J1=qI;const{getNextTreeStateVersion:XI,makeEmptyStoreState:e_}=w1,{cleanUpNode:KI,getDownstreamNodes:JI,initializeNode:eD,setNodeValue:tD,setUnvalidatedAtomValue_DEPRECATED:iD}=ms,{graph:nD}=vc,{cloneGraph:rD}=vc,{getNextStoreID:t_}=vh,{createMutableSource:yg,reactMode:i_}=Xa,{applyAtomValueWrites:oD}=bo,{releaseScheduledRetainablesNow:n_}=Xs,{freshSnapshot:sD}=Ah,{useCallback:aD,useContext:r_,useEffect:_g,useMemo:lD,useRef:cD,useState:uD}=lt;function Ic(){throw Ni("This component must be used inside a <RecoilRoot> component.")}const o_=Object.freeze({storeID:t_(),getState:Ic,replaceState:Ic,getGraph:Ic,subscribeToTransactions:Ic,addTransactionMetadata:Ic});let xg=!1;function s_(r){if(xg)throw Ni("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const s=r.getState();if(s.nextTree===null){wn("recoil_memory_managament_2020")&&wn("recoil_release_on_cascading_update_killswitch_2021")&&s.commitDepth>0&&n_(r);const c=s.currentTree.version,d=XI();s.nextTree={...s.currentTree,version:d,stateID:d,dirtyAtoms:new Set,transactionMetadata:{}},s.graphsByVersion.set(d,rD(zn(s.graphsByVersion.get(c))))}}const a_=lt.createContext({current:o_}),Nh=()=>r_(a_),l_=lt.createContext(null);function hD(){const r=r_(l_);return r==null&&mh("Attempted to use a Recoil hook outside of a <RecoilRoot>. <RecoilRoot> must be an ancestor of any component that uses Recoil hooks."),r}function vg(r,s,c){const d=JI(r,c,c.dirtyAtoms);for(const m of d){const w=s.nodeToComponentSubscriptions.get(m);if(w)for(const[v,[o,y]]of w)y(c)}}function c_(r){const s=r.getState(),c=s.currentTree,d=c.dirtyAtoms;if(d.size){for(const[m,w]of s.nodeTransactionSubscriptions)if(d.has(m))for(const[v,o]of w)o(r);for(const[m,w]of s.transactionSubscriptions)w(r);(!i_().early||s.suspendedComponentResolvers.size>0)&&(vg(r,s,c),s.suspendedComponentResolvers.forEach(m=>m()),s.suspendedComponentResolvers.clear())}s.queuedComponentCallbacks_DEPRECATED.forEach(m=>m(c)),s.queuedComponentCallbacks_DEPRECATED.splice(0,s.queuedComponentCallbacks_DEPRECATED.length)}function dD(r){const s=r.getState();s.commitDepth++;try{const{nextTree:c}=s;if(c==null)return;s.previousTree=s.currentTree,s.currentTree=c,s.nextTree=null,c_(r),s.previousTree!=null?s.graphsByVersion.delete(s.previousTree.version):sr("Ended batch with no previous state, which is unexpected","recoil"),s.previousTree=null,wn("recoil_memory_managament_2020")&&c==null&&n_(r)}finally{s.commitDepth--}}function fD({setNotifyBatcherOfChange:r}){const s=Nh(),[,c]=uD([]);return r(()=>c({})),_g(()=>(r(()=>c({})),()=>{r(()=>{})}),[r]),_g(()=>{H3.enqueueExecution("Batcher",()=>{dD(s.current)})}),null}process.env.NODE_ENV!=="production"&&typeof window<"u"&&!window.$recoilDebugStates&&(window.$recoilDebugStates=[]);function pD(r,s){const c=e_();return s({set:(d,m)=>{const w=c.currentTree,v=tD(r,w,d.key,m),o=new Set(v.keys()),y=w.nonvalidatedAtoms.clone();for(const T of o)y.delete(T);c.currentTree={...w,dirtyAtoms:HI(w.dirtyAtoms,o),atomValues:oD(w.atomValues,v),nonvalidatedAtoms:y}},setUnvalidatedAtomValues:d=>{d.forEach((m,w)=>{c.currentTree=iD(c.currentTree,w,m)})}}),c}function gD(r){const s=sD(r),c=s.getStore_INTERNAL().getState();return s.retain(),c.nodeCleanupFunctions.forEach(d=>d()),c.nodeCleanupFunctions.clear(),c}let u_=0;function mD({initializeState_DEPRECATED:r,initializeState:s,store_INTERNAL:c,children:d}){let m;const w=U=>{const R=m.current.graphsByVersion;if(R.has(U))return zn(R.get(U));const V=nD();return R.set(U,V),V},v=(U,R)=>{if(R==null){const{transactionSubscriptions:V}=C.current.getState(),W=u_++;return V.set(W,U),{release:()=>{V.delete(W)}}}else{const{nodeTransactionSubscriptions:V}=C.current.getState();V.has(R)||V.set(R,new Map);const W=u_++;return zn(V.get(R)).set(W,U),{release:()=>{const ye=V.get(R);ye&&(ye.delete(W),ye.size===0&&V.delete(R))}}}},o=U=>{s_(C.current);for(const R of Object.keys(U))zn(C.current.getState().nextTree).transactionMetadata[R]=U[R]},y=U=>{s_(C.current);const R=zn(m.current.nextTree);let V;try{xg=!0,V=U(R)}finally{xg=!1}V!==R&&(process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.$recoilDebugStates.push(V),m.current.nextTree=V,i_().early&&vg(C.current,m.current,V),zn(T.current)())},T=cD(null),z=aD(U=>{T.current=U},[T]),C=J1(()=>c??{storeID:t_(),getState:()=>m.current,replaceState:y,getGraph:w,subscribeToTransactions:v,addTransactionMetadata:o});c!=null&&(C.current=c),m=J1(()=>r!=null?pD(C.current,r):s!=null?gD(s):e_());const S=lD(()=>yg==null?void 0:yg(m,()=>m.current.currentTree.version),[m]);return _g(()=>{const U=C.current;for(const R of new Set(U.getState().knownAtoms))eD(U,R,"get");return()=>{for(const R of U.getState().knownAtoms)KI(U,R)}},[C]),lt.createElement(a_.Provider,{value:C},lt.createElement(l_.Provider,{value:S},lt.createElement(fD,{setNotifyBatcherOfChange:z}),d))}function yD(r){const{override:s,...c}=r,d=Nh();return s===!1&&d.current!==o_?r.children:lt.createElement(mD,c)}function _D(){return Nh().current.storeID}var Go={RecoilRoot:yD,useStoreRef:Nh,useRecoilMutableSource:hD,useRecoilStoreID:_D,notifyComponents_FOR_TESTING:vg,sendEndOfBatchNotifications_FOR_TESTING:c_};function xD(r,s){if(r===s)return!0;if(r.length!==s.length)return!1;for(let c=0,d=r.length;c<d;c++)if(r[c]!==s[c])return!1;return!0}var vD=xD;const{useEffect:MD,useRef:bD}=lt;function wD(r){const s=bD();return MD(()=>{s.current=r}),s.current}var h_=wD;const{useStoreRef:ID}=Go,{SUSPENSE_TIMEOUT_MS:DD}=Xs,{updateRetainCount:Dc}=Xs,{RetentionZone:TD}=Mh,{useEffect:AD,useRef:ND}=lt,{isSSR:d_}=wc;function ED(r){if(wn("recoil_memory_managament_2020"))return CD(r)}function CD(r){const c=(Array.isArray(r)?r:[r]).map(v=>v instanceof TD?v:v.key),d=ID();AD(()=>{if(!wn("recoil_memory_managament_2020"))return;const v=d.current;if(m.current&&!d_)window.clearTimeout(m.current),m.current=null;else for(const o of c)Dc(v,o,1);return()=>{for(const o of c)Dc(v,o,-1)}},[d,...c]);const m=ND(),w=h_(c);if(!d_&&(w===void 0||!vD(w,c))){const v=d.current;for(const o of c)Dc(v,o,1);if(w)for(const o of w)Dc(v,o,-1);m.current&&window.clearTimeout(m.current),m.current=window.setTimeout(()=>{m.current=null;for(const o of c)Dc(v,o,-1)},DD)}}var Mg=ED;function SD(){return"<component name not available>"}var Tc=SD;const{batchUpdates:zD}=wh,{DEFAULT_VALUE:f_}=Er,{currentRendererSupportsUseSyncExternalStore:jD,reactMode:Ks,useMutableSource:OD,useSyncExternalStore:LD}=Xa,{useRecoilMutableSource:kD,useStoreRef:wo}=Go,{isRecoilValue:PD}=Ws,{AbstractRecoilValue:bg,getRecoilValueAsLoadable:Ac,setRecoilValue:Eh,setUnvalidatedRecoilValue:RD,subscribeToRecoilValue:Ka}=bo,{useCallback:Cr,useEffect:Ja,useMemo:p_,useRef:Nc,useState:wg}=lt,{setByAddingToSet:UD}=D1,{isSSR:BD}=wc;function Ig(r,s,c){if(r.state==="hasValue")return r.contents;throw r.state==="loading"?new Promise(m=>{const w=c.current.getState().suspendedComponentResolvers;w.add(m),BD&&bn(r.contents)&&r.contents.finally(()=>{w.delete(m)})}):r.state==="hasError"?r.contents:Ni(`Invalid value of loadable atom "${s.key}"`)}function Dr(r,s){if(!PD(r))throw Ni(`Invalid argument to ${s}: expected an atom or selector but got ${String(r)}`)}function FD(){const r=Tc(),s=wo(),[,c]=wg([]),d=Nc(new Set);d.current=new Set;const m=Nc(new Set),w=Nc(new Map),v=Cr(y=>{const T=w.current.get(y);T&&(T.release(),w.current.delete(y))},[w]),o=Cr((y,T)=>{w.current.has(T)&&c([])},[]);return Ja(()=>{const y=s.current;xc(d.current,m.current).forEach(T=>{if(w.current.has(T)){mh(`Double subscription to RecoilValue "${T}"`);return}const z=Ka(y,new bg(T),S=>o(S,T),r);w.current.set(T,z),y.getState().nextTree?y.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{o(y.getState(),T)}):o(y.getState(),T)}),xc(m.current,d.current).forEach(T=>{v(T)}),m.current=d.current}),Ja(()=>{const y=w.current;return xc(d.current,new Set(y.keys())).forEach(T=>{const z=Ka(s.current,new bg(T),C=>o(C,T),r);y.set(T,z)}),()=>y.forEach((T,z)=>v(z))},[r,s,v,o]),p_(()=>{function y(R){return process.env.NODE_ENV!=="production"&&Dr(R,"useSetRecoilState"),V=>{Eh(s.current,R,V)}}function T(R){return process.env.NODE_ENV!=="production"&&Dr(R,"useResetRecoilState"),()=>Eh(s.current,R,f_)}function z(R){var V;process.env.NODE_ENV!=="production"&&Dr(R,"useRecoilValueLoadable"),d.current.has(R.key)||(d.current=UD(d.current,R.key));const W=s.current.getState();return Ac(s.current,R,Ks().early&&(V=W.nextTree)!==null&&V!==void 0?V:W.currentTree)}function C(R){process.env.NODE_ENV!=="production"&&Dr(R,"useRecoilValue");const V=z(R);return Ig(V,R,s)}function S(R){return process.env.NODE_ENV!=="production"&&Dr(R,"useRecoilState"),[C(R),y(R)]}function U(R){return process.env.NODE_ENV!=="production"&&Dr(R,"useRecoilStateLoadable"),[z(R),y(R)]}return{getRecoilValue:C,getRecoilValueLoadable:z,getRecoilState:S,getRecoilStateLoadable:U,getSetRecoilState:y,getResetRecoilState:T}},[d,s])}const Ec={current:0};function VD(r){const s=wo(),c=Tc(),d=Cr(()=>{var o;process.env.NODE_ENV!=="production"&&Ec.current++;const y=s.current,T=y.getState(),z=Ks().early&&(o=T.nextTree)!==null&&o!==void 0?o:T.currentTree;return{loadable:Ac(y,r,z),key:r.key}},[s,r]),m=Cr(o=>{let y;return()=>{var T,z;const C=o();return(T=y)!==null&&T!==void 0&&T.loadable.is(C.loadable)&&((z=y)===null||z===void 0?void 0:z.key)===C.key?y:(y=C,C)}},[]),w=p_(()=>m(d),[d,m]),v=Cr(o=>{const y=s.current;return Ka(y,r,o,c).release},[s,r,c]);return LD(v,w,w).loadable}function QD(r){const s=wo(),c=Cr(()=>{var T;const z=s.current,C=z.getState(),S=Ks().early&&(T=C.nextTree)!==null&&T!==void 0?T:C.currentTree;return Ac(z,r,S)},[s,r]),d=Cr(()=>(process.env.NODE_ENV!=="production"&&Ec.current++,c()),[c]),m=Tc(),w=Cr((T,z)=>{const C=s.current;return Ka(C,r,()=>{if(!wn("recoil_suppress_rerender_in_callback"))return z();const U=c();y.current.is(U)||z(),y.current=U},m).release},[s,r,m,c]),v=kD();if(v==null)throw Ni("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const o=OD(v,d,w),y=Nc(o);return Ja(()=>{y.current=o}),o}function Dg(r){const s=wo(),c=Tc(),d=Cr(()=>{var y;process.env.NODE_ENV!=="production"&&Ec.current++;const T=s.current,z=T.getState(),C=Ks().early&&(y=z.nextTree)!==null&&y!==void 0?y:z.currentTree;return Ac(T,r,C)},[s,r]),m=Cr(()=>({loadable:d(),key:r.key}),[d,r.key]),w=Cr(y=>{const T=m();return y.loadable.is(T.loadable)&&y.key===T.key?y:T},[m]);Ja(()=>{const y=Ka(s.current,r,T=>{o(w)},c);return o(w),y.release},[c,r,s,w]);const[v,o]=wg(m);return v.key!==r.key?m().loadable:v.loadable}function YD(r){const s=wo(),[,c]=wg([]),d=Tc(),m=Cr(()=>{var o;process.env.NODE_ENV!=="production"&&Ec.current++;const y=s.current,T=y.getState(),z=Ks().early&&(o=T.nextTree)!==null&&o!==void 0?o:T.currentTree;return Ac(y,r,z)},[s,r]),w=m(),v=Nc(w);return Ja(()=>{v.current=w}),Ja(()=>{const o=s.current,y=o.getState(),T=Ka(o,r,C=>{var S;if(!wn("recoil_suppress_rerender_in_callback"))return c([]);const U=m();(S=v.current)!==null&&S!==void 0&&S.is(U)||c(U),v.current=U},d);if(y.nextTree)o.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{v.current=null,c([])});else{var z;if(!wn("recoil_suppress_rerender_in_callback"))return c([]);const C=m();(z=v.current)!==null&&z!==void 0&&z.is(C)||c(C),v.current=C}return T.release},[d,m,r,s]),w}function Tg(r){return process.env.NODE_ENV!=="production"&&Dr(r,"useRecoilValueLoadable"),wn("recoil_memory_managament_2020")&&Mg(r),{TRANSITION_SUPPORT:Dg,SYNC_EXTERNAL_STORE:jD()?VD:Dg,MUTABLE_SOURCE:QD,LEGACY:YD}[Ks().mode](r)}function g_(r){process.env.NODE_ENV!=="production"&&Dr(r,"useRecoilValue");const s=wo(),c=Tg(r);return Ig(c,r,s)}function Ch(r){process.env.NODE_ENV!=="production"&&Dr(r,"useSetRecoilState");const s=wo();return Cr(c=>{Eh(s.current,r,c)},[s,r])}function $D(r){process.env.NODE_ENV!=="production"&&Dr(r,"useResetRecoilState");const s=wo();return Cr(()=>{Eh(s.current,r,f_)},[s,r])}function ZD(r){return process.env.NODE_ENV!=="production"&&Dr(r,"useRecoilState"),[g_(r),Ch(r)]}function GD(r){return process.env.NODE_ENV!=="production"&&Dr(r,"useRecoilStateLoadable"),[Tg(r),Ch(r)]}function HD(){const r=wo();return(s,c={})=>{zD(()=>{r.current.addTransactionMetadata(c),s.forEach((d,m)=>RD(r.current,new bg(m),d))})}}function m_(r){return process.env.NODE_ENV!=="production"&&(Dr(r,"useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE"),Ks().early||sr("Attepmt to use a hook with UNSTABLE_TRANSITION_SUPPORT in a rendering mode incompatible with concurrent rendering. Try enabling the recoil_sync_external_store or recoil_transition_support GKs.")),wn("recoil_memory_managament_2020")&&Mg(r),Dg(r)}function y_(r){process.env.NODE_ENV!=="production"&&Dr(r,"useRecoilValue_TRANSITION_SUPPORT_UNSTABLE");const s=wo(),c=m_(r);return Ig(c,r,s)}function WD(r){return process.env.NODE_ENV!=="production"&&Dr(r,"useRecoilState_TRANSITION_SUPPORT_UNSTABLE"),[y_(r),Ch(r)]}var qD={recoilComponentGetRecoilValueCount_FOR_TESTING:Ec,useRecoilInterface:FD,useRecoilState:ZD,useRecoilStateLoadable:GD,useRecoilValue:g_,useRecoilValueLoadable:Tg,useResetRecoilState:$D,useSetRecoilState:Ch,useSetUnvalidatedAtomValues:HD,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:m_,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:y_,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:WD};function XD(r,s){const c=new Map;for(const[d,m]of r)s(m,d)&&c.set(d,m);return c}var KD=XD;function JD(r,s){const c=new Set;for(const d of r)s(d)&&c.add(d);return c}var eT=JD;function tT(...r){const s=new Map;for(let c=0;c<r.length;c++){const d=r[c].keys();let m;for(;!(m=d.next()).done;)s.set(m.value,r[c].get(m.value))}return s}var iT=tT;const{batchUpdates:nT}=wh,{DEFAULT_VALUE:rT,getNode:__,nodes:oT}=Er,{useStoreRef:Ag}=Go,{AbstractRecoilValue:sT,setRecoilValueLoadable:aT}=bo,{SUSPENSE_TIMEOUT_MS:lT}=Xs,{cloneSnapshot:Sh}=Ah,{useCallback:zh,useEffect:x_,useRef:v_,useState:cT}=lt,{isSSR:M_}=wc;function jh(r){const s=Ag();x_(()=>s.current.subscribeToTransactions(r).release,[r,s])}function b_(r){const s=r.atomValues.toMap(),c=xh(KD(s,(d,m)=>{const v=__(m).persistence_UNSTABLE;return v!=null&&v.type!=="none"&&d.state==="hasValue"}),d=>d.contents);return iT(r.nonvalidatedAtoms.toMap(),c)}function uT(r){jh(zh(s=>{let c=s.getState().previousTree;const d=s.getState().currentTree;c||(sr("Transaction subscribers notified without a previous tree being present -- this is a bug in Recoil"),c=s.getState().currentTree);const m=b_(d),w=b_(c),v=xh(oT,y=>{var T,z,C,S;return{persistence_UNSTABLE:{type:(T=(z=y.persistence_UNSTABLE)===null||z===void 0?void 0:z.type)!==null&&T!==void 0?T:"none",backButton:(C=(S=y.persistence_UNSTABLE)===null||S===void 0?void 0:S.backButton)!==null&&C!==void 0?C:!1}}}),o=eT(d.dirtyAtoms,y=>m.has(y)||w.has(y));r({atomValues:m,previousAtomValues:w,atomInfo:v,modifiedAtoms:o,transactionMetadata:{...d.transactionMetadata}})},[r]))}function hT(r){jh(zh(s=>{const c=Sh(s,"latest"),d=Sh(s,"previous");r({snapshot:c,previousSnapshot:d})},[r]))}function dT(){const r=Ag(),[s,c]=cT(()=>Sh(r.current)),d=h_(s),m=v_(),w=v_();if(jh(zh(o=>c(Sh(o)),[])),x_(()=>{const o=s.retain();if(m.current&&!M_){var y;window.clearTimeout(m.current),m.current=null,(y=w.current)===null||y===void 0||y.call(w),w.current=null}return()=>{window.setTimeout(o,10)}},[s]),d!==s&&!M_){if(m.current){var v;window.clearTimeout(m.current),m.current=null,(v=w.current)===null||v===void 0||v.call(w),w.current=null}w.current=s.retain(),m.current=window.setTimeout(()=>{var o;m.current=null,(o=w.current)===null||o===void 0||o.call(w),w.current=null},lT)}return s}function w_(r,s){var c;const d=r.getState(),m=(c=d.nextTree)!==null&&c!==void 0?c:d.currentTree,w=s.getStore_INTERNAL().getState().currentTree;nT(()=>{const v=new Set;for(const T of[m.atomValues.keys(),w.atomValues.keys()])for(const z of T){var o,y;((o=m.atomValues.get(z))===null||o===void 0?void 0:o.contents)!==((y=w.atomValues.get(z))===null||y===void 0?void 0:y.contents)&&__(z).shouldRestoreFromSnapshots&&v.add(z)}v.forEach(T=>{aT(r,new sT(T),w.atomValues.has(T)?zn(w.atomValues.get(T)):rT)}),r.replaceState(T=>({...T,stateID:s.getID()}))})}function fT(){const r=Ag();return zh(s=>w_(r.current,s),[r])}var I_={useRecoilSnapshot:dT,gotoSnapshot:w_,useGotoRecoilSnapshot:fT,useRecoilTransactionObserver:hT,useTransactionObservation_DEPRECATED:uT,useTransactionSubscription_DEPRECATED:jh};const{peekNodeInfo:pT}=ms,{useStoreRef:gT}=Go;function mT(){const r=gT();return({key:s})=>pT(r.current,r.current.getState().currentTree,s)}var yT=mT;const{reactMode:_T}=Xa,{RecoilRoot:xT,useStoreRef:vT}=Go,{useMemo:MT}=lt;function bT(){_T().mode==="MUTABLE_SOURCE"&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.");const r=vT().current;return MT(()=>{function s({children:c}){return lt.createElement(xT,{store_INTERNAL:r},c)}return s},[r])}var wT=bT;const{loadableWithValue:IT}=_c,{initializeNode:DT}=ms,{DEFAULT_VALUE:TT,getNode:AT}=Er,{copyTreeState:NT,getRecoilValueAsLoadable:ET,invalidateDownstreams:CT,writeLoadableToTreeState:ST}=bo;function D_(r){return AT(r.key).nodeType==="atom"}class zT{constructor(s,c){Pi(this,"_store",void 0),Pi(this,"_treeState",void 0),Pi(this,"_changes",void 0),Pi(this,"get",d=>{if(this._changes.has(d.key))return this._changes.get(d.key);if(!D_(d))throw Ni("Reading selectors within atomicUpdate is not supported");const m=ET(this._store,d,this._treeState);if(m.state==="hasValue")return m.contents;throw m.state==="hasError"?m.contents:Ni(`Expected Recoil atom ${d.key} to have a value, but it is in a loading state.`)}),Pi(this,"set",(d,m)=>{if(!D_(d))throw Ni("Setting selectors within atomicUpdate is not supported");if(typeof m=="function"){const w=this.get(d);this._changes.set(d.key,m(w))}else DT(this._store,d.key,"set"),this._changes.set(d.key,m)}),Pi(this,"reset",d=>{this.set(d,TT)}),this._store=s,this._treeState=c,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const s=NT(this._treeState);for(const[c,d]of this._changes)ST(s,c,IT(d));return CT(this._store,s),s}}function jT(r){return s=>{r.replaceState(c=>{const d=new zT(r,c);return s(d),d.newTreeState_INTERNAL()})}}var OT={atomicUpdater:jT},LT=OT.atomicUpdater,T_=Object.freeze({__proto__:null,atomicUpdater:LT});function kT(r,s){if(!r)throw new Error(s)}var PT=kT,Io=PT;const{atomicUpdater:RT}=T_,{batchUpdates:UT}=wh,{DEFAULT_VALUE:BT}=Er,{useStoreRef:FT}=Go,{refreshRecoilValue:VT,setRecoilValue:A_}=bo,{cloneSnapshot:QT}=Ah,{gotoSnapshot:YT}=I_,{useCallback:$T}=lt;class N_{}const ZT=new N_;function E_(r,s,c,d){let m=ZT,w;if(UT(()=>{const o="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof s!="function")throw Ni(o);const y=T1({...d??{},set:(z,C)=>A_(r,z,C),reset:z=>A_(r,z,BT),refresh:z=>VT(r,z),gotoSnapshot:z=>YT(r,z),transact_UNSTABLE:z=>RT(r)(z)},{snapshot:()=>{const z=QT(r);return w=z.retain(),z}}),T=s(y);if(typeof T!="function")throw Ni(o);m=T(...c)}),m instanceof N_&&(process.env.NODE_ENV!=="production"?Io(!1,"batchUpdates should return immediately"):Io(!1)),bn(m))m=m.finally(()=>{var o;(o=w)===null||o===void 0||o()});else{var v;(v=w)===null||v===void 0||v()}return m}function GT(r,s){const c=FT();return $T((...d)=>E_(c.current,r,d),s!=null?[...s,c]:void 0)}var C_={recoilCallback:E_,useRecoilCallback:GT};const{useStoreRef:HT}=Go,{refreshRecoilValue:WT}=bo,{useCallback:qT}=lt;function XT(r){const s=HT();return qT(()=>{const c=s.current;WT(c,r)},[r,s])}var KT=XT;const{atomicUpdater:JT}=T_,{useStoreRef:eA}=Go,{useMemo:tA}=lt;function iA(r,s){const c=eA();return tA(()=>(...d)=>{JT(c.current)(w=>{r(w)(...d)})},s!=null?[...s,c]:void 0)}var nA=iA;class rA{constructor(s){Pi(this,"value",void 0),this.value=s}}var oA={WrappedValue:rA},sA=oA.WrappedValue,S_=Object.freeze({__proto__:null,WrappedValue:sA});const{isFastRefreshEnabled:aA}=Xa;class z_ extends Error{}class lA{constructor(s){var c,d,m;Pi(this,"_name",void 0),Pi(this,"_numLeafs",void 0),Pi(this,"_root",void 0),Pi(this,"_onHit",void 0),Pi(this,"_onSet",void 0),Pi(this,"_mapNodeValue",void 0),this._name=s==null?void 0:s.name,this._numLeafs=0,this._root=null,this._onHit=(c=s==null?void 0:s.onHit)!==null&&c!==void 0?c:()=>{},this._onSet=(d=s==null?void 0:s.onSet)!==null&&d!==void 0?d:()=>{},this._mapNodeValue=(m=s==null?void 0:s.mapNodeValue)!==null&&m!==void 0?m:w=>w}size(){return this._numLeafs}root(){return this._root}get(s,c){var d;return(d=this.getLeafNode(s,c))===null||d===void 0?void 0:d.value}getLeafNode(s,c){if(this._root==null)return;let d=this._root;for(;d;){if(c==null||c.onNodeVisit(d),d.type==="leaf")return this._onHit(d),d;const m=this._mapNodeValue(s(d.nodeKey));d=d.branches.get(m)}}set(s,c,d){const m=()=>{var w,v,o,y;let T,z;for(const[W,ye]of s){var C,S,U;const le=this._root;if((le==null?void 0:le.type)==="leaf")throw this.invalidCacheError();const he=T;if(T=he?he.branches.get(z):le,T=(C=T)!==null&&C!==void 0?C:{type:"branch",nodeKey:W,parent:he,branches:new Map,branchKey:z},T.type!=="branch"||T.nodeKey!==W)throw this.invalidCacheError();he==null||he.branches.set(z,T),d==null||(S=d.onNodeVisit)===null||S===void 0||S.call(d,T),z=this._mapNodeValue(ye),this._root=(U=this._root)!==null&&U!==void 0?U:T}const R=T?(w=T)===null||w===void 0?void 0:w.branches.get(z):this._root;if(R!=null&&(R.type!=="leaf"||R.branchKey!==z))throw this.invalidCacheError();const V={type:"leaf",value:c,parent:T,branchKey:z};(v=T)===null||v===void 0||v.branches.set(z,V),this._root=(o=this._root)!==null&&o!==void 0?o:V,this._numLeafs++,this._onSet(V),d==null||(y=d.onNodeVisit)===null||y===void 0||y.call(d,V)};try{m()}catch(w){if(w instanceof z_)this.clear(),m();else throw w}}delete(s){const c=this.root();if(!c)return!1;if(s===c)return this._root=null,this._numLeafs=0,!0;let d=s.parent,m=s.branchKey;for(;d;){var w;if(d.branches.delete(m),d===c)return d.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(d.branches.size>0)break;m=(w=d)===null||w===void 0?void 0:w.branchKey,d=d.parent}for(;d!==c;d=d.parent)if(d==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){const s=aA()?"Possible Fast Refresh module reload detected. This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache.";throw sr(s+(this._name!=null?` - ${this._name}`:"")),new z_}}var cA={TreeCache:lA},uA=cA.TreeCache,j_=Object.freeze({__proto__:null,TreeCache:uA});class hA{constructor(s){var c;Pi(this,"_maxSize",void 0),Pi(this,"_size",void 0),Pi(this,"_head",void 0),Pi(this,"_tail",void 0),Pi(this,"_map",void 0),Pi(this,"_keyMapper",void 0),this._maxSize=s.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(c=s.mapKey)!==null&&c!==void 0?c:d=>d}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(s){return this._map.has(this._keyMapper(s))}get(s){const c=this._keyMapper(s),d=this._map.get(c);if(d)return this.set(s,d.value),d.value}set(s,c){const d=this._keyMapper(s);this._map.get(d)&&this.delete(s);const w=this.head(),v={key:s,right:w,left:null,value:c};w?w.left=v:this._tail=v,this._map.set(d,v),this._head=v,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const s=this.tail();s&&this.delete(s.key)}delete(s){const c=this._keyMapper(s);if(!this._size||!this._map.has(c))return;const d=zn(this._map.get(c)),m=d.right,w=d.left;m&&(m.left=d.left),w&&(w.right=d.right),d===this.head()&&(this._head=m),d===this.tail()&&(this._tail=w),this._map.delete(c),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var dA={LRUCache:hA},fA=dA.LRUCache,O_=Object.freeze({__proto__:null,LRUCache:fA});const{LRUCache:pA}=O_,{TreeCache:gA}=j_;function mA({name:r,maxSize:s,mapNodeValue:c=d=>d}){const d=new pA({maxSize:s}),m=new gA({name:r,mapNodeValue:c,onHit:w=>{d.set(w,!0)},onSet:w=>{const v=d.tail();d.set(w,!0),v&&m.size()>s&&m.delete(v.key)}});return m}var L_=mA;const yA=15;function Gr(r,s,c){if(typeof r=="string"&&!r.includes('"')&&!r.includes("\\"))return`"${r}"`;switch(typeof r){case"undefined":return"";case"boolean":return r?"true":"false";case"number":case"symbol":return String(r);case"string":return JSON.stringify(r);case"function":if((s==null?void 0:s.allowFunctions)!==!0)throw Ni("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${r.name})__`}if(r===null)return"null";if(typeof r!="object"){var d;return(d=JSON.stringify(r))!==null&&d!==void 0?d:""}if(bn(r))return"__PROMISE__";if(Array.isArray(r))return`[${r.map((m,w)=>Gr(m,s,w.toString()))}]`;if(typeof r.toJSON=="function")return Gr(r.toJSON(c),s,c);if(r instanceof Map){const m={};for(const[w,v]of r)m[typeof w=="string"?w:Gr(w,s)]=v;return Gr(m,s,c)}return r instanceof Set?Gr(Array.from(r).sort((m,w)=>Gr(m,s).localeCompare(Gr(w,s))),s,c):Symbol!==void 0&&r[Symbol.iterator]!=null&&typeof r[Symbol.iterator]=="function"?Gr(Array.from(r),s,c):`{${Object.keys(r).filter(m=>r[m]!==void 0).sort().map(m=>`${Gr(m,s)}:${Gr(r[m],s,m)}`).join(",")}}`}function _A(r,s={allowFunctions:!1}){if(process.env.NODE_ENV!=="production"&&typeof window<"u"){const c=window.performance?window.performance.now():0,d=Gr(r,s),m=window.performance?window.performance.now():0;return m-c>yA&&(console.groupCollapsed(`Recoil: Spent ${m-c}ms computing a cache key`),console.warn(r,d),console.groupEnd()),d}return Gr(r,s)}var Oh=_A;const{TreeCache:xA}=j_,Lh={equality:"reference",eviction:"keep-all",maxSize:1/0};function vA({equality:r=Lh.equality,eviction:s=Lh.eviction,maxSize:c=Lh.maxSize}=Lh,d){const m=MA(r);return bA(s,c,m,d)}function MA(r){switch(r){case"reference":return s=>s;case"value":return s=>Oh(s)}throw Ni(`Unrecognized equality policy ${r}`)}function bA(r,s,c,d){switch(r){case"keep-all":return new xA({name:d,mapNodeValue:c});case"lru":return L_({name:d,maxSize:zn(s),mapNodeValue:c});case"most-recent":return L_({name:d,maxSize:1,mapNodeValue:c})}throw Ni(`Unrecognized eviction policy ${r}`)}var wA=vA;function IA(r){var s,c;if(typeof window>"u")return!1;const m=(c=(r!=null?(s=r.ownerDocument)!==null&&s!==void 0?s:r:document).defaultView)!==null&&c!==void 0?c:window;return r!=null&&(typeof m.Node=="function"?r instanceof m.Node:typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.nodeName=="string")}var DA=IA;const{isReactNative:TA,isWindow:AA}=wc;function NA(r){if(r===null||typeof r!="object")return!0;switch(typeof r.$$typeof){case"symbol":return!0;case"number":return!0}return!!(r["@@__IMMUTABLE_ITERABLE__@@"]!=null||r["@@__IMMUTABLE_KEYED__@@"]!=null||r["@@__IMMUTABLE_INDEXED__@@"]!=null||r["@@__IMMUTABLE_ORDERED__@@"]!=null||r["@@__IMMUTABLE_RECORD__@@"]!=null||DA(r)||bn(r)||r instanceof Error||ArrayBuffer.isView(r)||!TA&&AA(r))}function k_(r){if(!(typeof r!="object"||NA(r))){Object.freeze(r);for(const s in r)if(Object.prototype.hasOwnProperty.call(r,s)){const c=r[s];typeof c=="object"&&c!=null&&!Object.isFrozen(c)&&k_(c)}Object.seal(r)}}var Ng=k_;function EA(r){return()=>null}var CA={startPerfBlock:EA};const{isLoadable:SA,loadableWithError:kh,loadableWithPromise:zA,loadableWithValue:Eg}=_c,{WrappedValue:P_}=S_,{getNodeLoadable:Ph,peekNodeLoadable:jA,setNodeValue:OA}=ms,{saveDepsToStore:LA}=vc,{DEFAULT_VALUE:kA,getConfigDeletionHandler:PA,getNode:RA,registerNode:R_}=Er,{isRecoilValue:UA}=Ws,{markRecoilValueModified:U_}=bo,{retainedByOptionWithDefault:BA}=Xs,{recoilCallback:FA}=C_,{startPerfBlock:VA}=CA;class B_{}const Cc=new B_,Sc=[],Rh=new Map,QA=(()=>{let r=0;return()=>r++})();function F_(r){let s=null;const{key:c,get:d,cachePolicy_UNSTABLE:m}=r,w=r.set!=null?r.set:void 0;if(process.env.NODE_ENV!=="production"){if(typeof c!="string")throw Ni("A key option with a unique string value must be provided when creating a selector.");if(typeof d!="function")throw Ni("Selectors must specify a get callback option to get the selector value.")}const v=new Set,o=wA(m??{equality:"reference",eviction:"keep-all"},c),y=BA(r.retainedBy_UNSTABLE),T=new Map;let z=0;function C(){return!wn("recoil_memory_managament_2020")||z>0}function S(G){return G.getState().knownSelectors.add(c),z++,()=>{z--}}function U(){return PA(c)!==void 0&&!C()}function R(G,P,Q,J,K){Qe(P,J,K),V(G,Q)}function V(G,P){gt(G,P)&&at(G),ye(P,!0)}function W(G,P){gt(G,P)&&(zn(Ze(G)).stateVersions.clear(),ye(P,!1))}function ye(G,P){const Q=Rh.get(G);if(Q!=null){for(const J of Q)U_(J,zn(s));P&&Rh.delete(G)}}function le(G,P){let Q=Rh.get(P);Q==null&&Rh.set(P,Q=new Set),Q.add(G)}function he(G,P,Q,J,K,me){return P.then(Te=>{if(!C())throw at(G),Cc;const de=Eg(Te);return R(G,Q,K,de,J),Te}).catch(Te=>{if(!C())throw at(G),Cc;if(bn(Te))return xe(G,Te,Q,J,K,me);const de=kh(Te);throw R(G,Q,K,de,J),Te})}function xe(G,P,Q,J,K,me){return P.then(Te=>{if(!C())throw at(G),Cc;me.loadingDepKey!=null&&me.loadingDepPromise===P?Q.atomValues.set(me.loadingDepKey,Eg(Te)):G.getState().knownSelectors.forEach(Ce=>{Q.atomValues.delete(Ce)});const de=Pe(G,Q);if(de&&de.state!=="loading"){if((gt(G,K)||Ze(G)==null)&&V(G,K),de.state==="hasValue")return de.contents;throw de.contents}if(!gt(G,K)){const Ce=Ne(G,Q);if(Ce!=null)return Ce.loadingLoadable.contents}const[Oe,qe]=Ee(G,Q,K);if(Oe.state!=="loading"&&R(G,Q,K,Oe,qe),Oe.state==="hasError")throw Oe.contents;return Oe.contents}).catch(Te=>{if(Te instanceof B_)throw Cc;if(!C())throw at(G),Cc;const de=kh(Te);throw R(G,Q,K,de,J),Te})}function X(G,P,Q,J){var K,me,Te,de;if(gt(G,J)||P.version===((K=G.getState())===null||K===void 0||(me=K.currentTree)===null||me===void 0?void 0:me.version)||P.version===((Te=G.getState())===null||Te===void 0||(de=Te.nextTree)===null||de===void 0?void 0:de.version)){var Oe,qe,Ce;LA(c,Q,G,(Oe=(qe=G.getState())===null||qe===void 0||(Ce=qe.nextTree)===null||Ce===void 0?void 0:Ce.version)!==null&&Oe!==void 0?Oe:G.getState().currentTree.version)}for(const Be of Q)v.add(Be)}function Ee(G,P,Q){const J=VA(c);let K=!0,me=!0;const Te=()=>{J(),me=!1};let de,Oe=!1,qe;const Ce={loadingDepKey:null,loadingDepPromise:null},Be=new Map;function et({key:He}){const Tt=Ph(G,P,He);switch(Be.set(He,Tt),K||(X(G,P,new Set(Be.keys()),Q),W(G,Q)),Tt.state){case"hasValue":return Tt.contents;case"hasError":throw Tt.contents;case"loading":throw Ce.loadingDepKey=He,Ce.loadingDepPromise=Tt.contents,Tt.contents}throw Ni("Invalid Loadable state")}const Dt=He=>(...Tt)=>{if(me)throw Ni("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return s==null&&(process.env.NODE_ENV!=="production"?Io(!1,"Recoil Value can never be null"):Io(!1)),FA(G,He,Tt,{node:s})};try{de=d({get:et,getCallback:Dt}),de=UA(de)?et(de):de,SA(de)&&(de.state==="hasError"&&(Oe=!0),de=de.contents),bn(de)?de=he(G,de,P,Be,Q,Ce).finally(Te):Te(),de=de instanceof P_?de.value:de}catch(He){de=He,bn(de)?de=xe(G,de,P,Be,Q,Ce).finally(Te):(Oe=!0,Te())}return Oe?qe=kh(de):bn(de)?qe=zA(de):qe=Eg(de),K=!1,nt(G,Q,Be),X(G,P,new Set(Be.keys()),Q),[qe,Be]}function Pe(G,P){let Q=P.atomValues.get(c);if(Q!=null)return Q;const J=new Set;try{Q=o.get(me=>(typeof me!="string"&&(process.env.NODE_ENV!=="production"?Io(!1,"Cache nodeKey is type string"):Io(!1)),Ph(G,P,me).contents),{onNodeVisit:me=>{me.type==="branch"&&me.nodeKey!==c&&J.add(me.nodeKey)}})}catch(me){throw Ni(`Problem with cache lookup for selector "${c}": ${me.message}`)}if(Q){var K;P.atomValues.set(c,Q),X(G,P,J,(K=Ze(G))===null||K===void 0?void 0:K.executionID)}return Q}function Ve(G,P){const Q=Pe(G,P);if(Q!=null)return at(G),Q;const J=Ne(G,P);if(J!=null){var K;return((K=J.loadingLoadable)===null||K===void 0?void 0:K.state)==="loading"&&le(G,J.executionID),J.loadingLoadable}const me=QA(),[Te,de]=Ee(G,P,me);return Te.state==="loading"?(tt(G,me,Te,de,P),le(G,me)):(at(G),Qe(P,Te,de)),Te}function Ne(G,P){const Q=$1([T.has(G)?[zn(T.get(G))]:[],yh(ug(T,([K])=>K!==G),([,K])=>K)]);function J(K){for(const[me,Te]of K)if(!Ph(G,P,me).is(Te))return!0;return!1}for(const K of Q){if(K.stateVersions.get(P.version)||!J(K.depValuesDiscoveredSoFarDuringAsyncWork))return K.stateVersions.set(P.version,!0),K;K.stateVersions.set(P.version,!1)}}function Ze(G){return T.get(G)}function tt(G,P,Q,J,K){T.set(G,{depValuesDiscoveredSoFarDuringAsyncWork:J,executionID:P,loadingLoadable:Q,stateVersions:new Map([[K.version,!0]])})}function nt(G,P,Q){if(gt(G,P)){const J=Ze(G);J!=null&&(J.depValuesDiscoveredSoFarDuringAsyncWork=Q)}}function at(G){T.delete(G)}function gt(G,P){var Q;return P===((Q=Ze(G))===null||Q===void 0?void 0:Q.executionID)}function Ae(G){return Array.from(G.entries()).map(([P,Q])=>[P,Q.contents])}function Qe(G,P,Q){process.env.NODE_ENV!=="production"&&P.state!=="loading"&&!r.dangerouslyAllowMutability&&Ng(P.contents),G.atomValues.set(c,P);try{o.set(Ae(Q),P)}catch(J){throw Ni(`Problem with setting cache for selector "${c}": ${J.message}`)}}function Ke(G){if(Sc.includes(c)){const P=`Recoil selector has circular dependencies: ${Sc.slice(Sc.indexOf(c)).join(" → ")}`;return kh(Ni(P))}Sc.push(c);try{return G()}finally{Sc.pop()}}function _t(G,P){const Q=P.atomValues.get(c);return Q??o.get(J=>{var K;return typeof J!="string"&&(process.env.NODE_ENV!=="production"?Io(!1,"Cache nodeKey is type string"):Io(!1)),(K=jA(G,P,J))===null||K===void 0?void 0:K.contents})}function ut(G,P){return Ke(()=>Ve(G,P))}function ee(G){G.atomValues.delete(c)}function ie(G,P){s==null&&(process.env.NODE_ENV!=="production"?Io(!1,"Recoil Value can never be null"):Io(!1));for(const J of v){var Q;const K=RA(J);(Q=K.clearCache)===null||Q===void 0||Q.call(K,G,P)}v.clear(),ee(P),o.clear(),U_(G,s)}return w!=null?s=R_({key:c,nodeType:"selector",peek:_t,get:ut,set:(P,Q,J)=>{let K=!1;const me=new Map;function Te({key:Ce}){if(K)throw Ni("Recoil: Async selector sets are not currently supported.");const Be=Ph(P,Q,Ce);if(Be.state==="hasValue")return Be.contents;if(Be.state==="loading"){const et=`Getting value of asynchronous atom or selector "${Ce}" in a pending state while setting selector "${c}" is not yet supported.`;throw sr(et),Ni(et)}else throw Be.contents}function de(Ce,Be){if(K){const He="Recoil: Async selector sets are not currently supported.";throw sr(He),Ni(He)}const et=typeof Be=="function"?Be(Te(Ce)):Be;OA(P,Q,Ce.key,et).forEach((He,Tt)=>me.set(Tt,He))}function Oe(Ce){de(Ce,kA)}const qe=w({set:de,get:Te,reset:Oe},J);if(qe!==void 0)throw bn(qe)?Ni("Recoil: Async selector sets are not currently supported."):Ni("Recoil: selector set should be a void function.");return K=!0,me},init:S,invalidate:ee,clearCache:ie,shouldDeleteConfigOnRelease:U,dangerouslyAllowMutability:r.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:y}):s=R_({key:c,nodeType:"selector",peek:_t,get:ut,init:S,invalidate:ee,clearCache:ie,shouldDeleteConfigOnRelease:U,dangerouslyAllowMutability:r.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:y})}F_.value=r=>new P_(r);var el=F_;const{isLoadable:YA,loadableWithError:Cg,loadableWithPromise:Sg,loadableWithValue:tl}=_c,{WrappedValue:V_}=S_,{peekNodeInfo:$A}=ms,{DEFAULT_VALUE:Js,DefaultValue:ys,getConfigDeletionHandler:Q_,registerNode:ZA,setConfigDeletionHandler:GA}=Er,{isRecoilValue:HA}=Ws,{getRecoilValueAsLoadable:WA,markRecoilValueModified:qA,setRecoilValue:Y_,setRecoilValueLoadable:XA}=bo,{retainedByOptionWithDefault:KA}=Xs,zc=r=>r instanceof V_?r.value:r;function JA(r){const{key:s,persistence_UNSTABLE:c}=r,d=KA(r.retainedBy_UNSTABLE);let m=0;function w(le){return Sg(le.then(he=>(v=tl(he),he)).catch(he=>{throw v=Cg(he),he}))}let v=bn(r.default)?w(r.default):YA(r.default)?r.default.state==="loading"?w(r.default.contents):r.default:tl(zc(r.default));T(v.contents);let o;const y=new Map;function T(le){return process.env.NODE_ENV!=="production"&&r.dangerouslyAllowMutability!==!0?bn(le)?le.then(he=>(Ng(he),he)):(Ng(le),le):le}function z(le,he){const xe=he.then(X=>{var Ee,Pe;return((Pe=((Ee=le.getState().nextTree)!==null&&Ee!==void 0?Ee:le.getState().currentTree).atomValues.get(s))===null||Pe===void 0?void 0:Pe.contents)===xe&&Y_(le,ye,X),X}).catch(X=>{var Ee,Pe;throw((Pe=((Ee=le.getState().nextTree)!==null&&Ee!==void 0?Ee:le.getState().currentTree).atomValues.get(s))===null||Pe===void 0?void 0:Pe.contents)===xe&&XA(le,ye,Cg(X)),X});return xe}function C(le,he,xe){var X;m++;const Ee=()=>{var Ze;m--,(Ze=y.get(le))===null||Ze===void 0||Ze.forEach(tt=>tt()),y.delete(le)};if(le.getState().knownAtoms.add(s),v.state==="loading"){const Ze=()=>{var tt;((tt=le.getState().nextTree)!==null&&tt!==void 0?tt:le.getState().currentTree).atomValues.has(s)||qA(le,ye)};v.contents.finally(Ze)}const Pe=(X=r.effects)!==null&&X!==void 0?X:r.effects_UNSTABLE;if(Pe!=null){let gt=function(ee){if(tt&&ee.key===s){const ie=Ze;return ie instanceof ys?S(le,he):bn(ie)?Sg(ie.then(G=>G instanceof ys?v.toPromise():G)):tl(ie)}return WA(le,ee)},Ae=function(ee){return gt(ee).toPromise()},Qe=function(ee){var ie;const G=$A(le,(ie=le.getState().nextTree)!==null&&ie!==void 0?ie:le.getState().currentTree,ee.key);return tt&&ee.key===s&&!(Ze instanceof ys)?{...G,isSet:!0,loadable:gt(ee)}:G},Ze=Js,tt=!0,nt=!1,at=null;const Ke=ee=>ie=>{if(tt){const G=gt(ye),P=G.state==="hasValue"?G.contents:Js;Ze=typeof ie=="function"?ie(P):ie,bn(Ze)&&(Ze=Ze.then(Q=>(at={effect:ee,value:Q},Q)))}else{if(bn(ie))throw Ni("Setting atoms to async values is not implemented.");typeof ie!="function"&&(at={effect:ee,value:zc(ie)}),Y_(le,ye,typeof ie=="function"?G=>{const P=zc(ie(G));return at={effect:ee,value:P},P}:zc(ie))}},_t=ee=>()=>Ke(ee)(Js),ut=ee=>ie=>{var G;const{release:P}=le.subscribeToTransactions(Q=>{var J;let{currentTree:K,previousTree:me}=Q.getState();me||(sr("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),me=K);const Te=(J=K.atomValues.get(s))!==null&&J!==void 0?J:v;if(Te.state==="hasValue"){var de,Oe,qe,Ce;const Be=Te.contents,et=(de=me.atomValues.get(s))!==null&&de!==void 0?de:v,Dt=et.state==="hasValue"?et.contents:Js;((Oe=at)===null||Oe===void 0?void 0:Oe.effect)!==ee||((qe=at)===null||qe===void 0?void 0:qe.value)!==Be?ie(Be,Dt,!K.atomValues.has(s)):((Ce=at)===null||Ce===void 0?void 0:Ce.effect)===ee&&(at=null)}},s);y.set(le,[...(G=y.get(le))!==null&&G!==void 0?G:[],P])};for(const ee of Pe)try{const ie=ee({node:ye,storeID:le.storeID,parentStoreID_UNSTABLE:le.parentStoreID,trigger:xe,setSelf:Ke(ee),resetSelf:_t(ee),onSet:ut(ee),getPromise:Ae,getLoadable:gt,getInfo_UNSTABLE:Qe});if(ie!=null){var Ve;y.set(le,[...(Ve=y.get(le))!==null&&Ve!==void 0?Ve:[],ie])}}catch(ie){Ze=ie,nt=!0}if(tt=!1,!(Ze instanceof ys)){var Ne;const ee=nt?Cg(Ze):bn(Ze)?Sg(z(le,Ze)):tl(zc(Ze));T(ee.contents),he.atomValues.set(s,ee),(Ne=le.getState().nextTree)===null||Ne===void 0||Ne.atomValues.set(s,ee)}}return Ee}function S(le,he){var xe,X;return(xe=(X=he.atomValues.get(s))!==null&&X!==void 0?X:o)!==null&&xe!==void 0?xe:v}function U(le,he){if(he.atomValues.has(s))return zn(he.atomValues.get(s));if(he.nonvalidatedAtoms.has(s)){if(o!=null)return o;if(c==null)return mh(`Tried to restore a persisted value for atom ${s} but it has no persistence settings.`),v;const xe=he.nonvalidatedAtoms.get(s),X=c.validator(xe,Js);return o=X instanceof ys?v:tl(X),o}else return v}function R(){o=void 0}function V(le,he,xe){if(he.atomValues.has(s)){const X=zn(he.atomValues.get(s));if(X.state==="hasValue"&&xe===X.contents)return new Map}else if(!he.nonvalidatedAtoms.has(s)&&xe instanceof ys)return new Map;return T(xe),o=void 0,new Map().set(s,tl(xe))}function W(){return Q_(s)!==void 0&&m<=0}const ye=ZA({key:s,nodeType:"atom",peek:S,get:U,set:V,init:C,invalidate:R,shouldDeleteConfigOnRelease:W,dangerouslyAllowMutability:r.dangerouslyAllowMutability,persistence_UNSTABLE:r.persistence_UNSTABLE?{type:r.persistence_UNSTABLE.type,backButton:r.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:d});return ye}function zg(r){if(process.env.NODE_ENV!=="production"&&typeof r.key!="string")throw Ni("A key option with a unique string value must be provided when creating an atom.");const{...s}=r,c="default"in r?r.default:new Promise(()=>{});return HA(c)?e5({...s,default:c}):JA({...s,default:c})}function e5(r){const s=zg({...r,default:Js,persistence_UNSTABLE:r.persistence_UNSTABLE===void 0?void 0:{...r.persistence_UNSTABLE,validator:d=>d instanceof ys?d:zn(r.persistence_UNSTABLE).validator(d,Js)},effects:r.effects,effects_UNSTABLE:r.effects_UNSTABLE}),c=el({key:`${r.key}__withFallback`,get:({get:d})=>{const m=d(s);return m instanceof ys?r.default:m},set:({set:d},m)=>d(s,m),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:r.dangerouslyAllowMutability});return GA(c.key,Q_(r.key)),c}zg.value=r=>new V_(r);var $_=zg;class t5{constructor(s){var c;Pi(this,"_map",void 0),Pi(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(c=s==null?void 0:s.mapKey)!==null&&c!==void 0?c:d=>d}size(){return this._map.size}has(s){return this._map.has(this._keyMapper(s))}get(s){return this._map.get(this._keyMapper(s))}set(s,c){this._map.set(this._keyMapper(s),c)}delete(s){this._map.delete(this._keyMapper(s))}clear(){this._map.clear()}}var i5={MapCache:t5},n5=i5.MapCache,r5=Object.freeze({__proto__:null,MapCache:n5});const{LRUCache:Z_}=O_,{MapCache:o5}=r5,Uh={equality:"reference",eviction:"none",maxSize:1/0};function s5({equality:r=Uh.equality,eviction:s=Uh.eviction,maxSize:c=Uh.maxSize}=Uh){const d=a5(r);return l5(s,c,d)}function a5(r){switch(r){case"reference":return s=>s;case"value":return s=>Oh(s)}throw Ni(`Unrecognized equality policy ${r}`)}function l5(r,s,c){switch(r){case"keep-all":return new o5({mapKey:c});case"lru":return new Z_({mapKey:c,maxSize:zn(s)});case"most-recent":return new Z_({mapKey:c,maxSize:1})}throw Ni(`Unrecognized eviction policy ${r}`)}var G_=s5;const{setConfigDeletionHandler:c5}=Er;function u5(r){var s,c;const d=G_({equality:(s=(c=r.cachePolicyForParams_UNSTABLE)===null||c===void 0?void 0:c.equality)!==null&&s!==void 0?s:"value",eviction:"keep-all"});return m=>{var w,v;const o=d.get(m);if(o!=null)return o;const{cachePolicyForParams_UNSTABLE:y,...T}=r,z="default"in r?r.default:new Promise(()=>{}),C=$_({...T,key:`${r.key}__${(w=Oh(m))!==null&&w!==void 0?w:"void"}`,default:typeof z=="function"?z(m):z,retainedBy_UNSTABLE:typeof r.retainedBy_UNSTABLE=="function"?r.retainedBy_UNSTABLE(m):r.retainedBy_UNSTABLE,effects:typeof r.effects=="function"?r.effects(m):typeof r.effects_UNSTABLE=="function"?r.effects_UNSTABLE(m):(v=r.effects)!==null&&v!==void 0?v:r.effects_UNSTABLE});return d.set(m,C),c5(C.key,()=>{d.delete(m)}),C}}var h5=u5;const{setConfigDeletionHandler:d5}=Er;let f5=0;function p5(r){var s,c;const d=G_({equality:(s=(c=r.cachePolicyForParams_UNSTABLE)===null||c===void 0?void 0:c.equality)!==null&&s!==void 0?s:"value",eviction:"keep-all"});return m=>{var w;let v;try{v=d.get(m)}catch(S){throw Ni(`Problem with cache lookup for selector ${r.key}: ${S.message}`)}if(v!=null)return v;const o=`${r.key}__selectorFamily/${(w=Oh(m,{allowFunctions:!0}))!==null&&w!==void 0?w:"void"}/${f5++}`,y=S=>r.get(m)(S),T=r.cachePolicy_UNSTABLE,z=typeof r.retainedBy_UNSTABLE=="function"?r.retainedBy_UNSTABLE(m):r.retainedBy_UNSTABLE;let C;if(r.set!=null){const S=r.set;C=el({key:o,get:y,set:(R,V)=>S(m)(R,V),cachePolicy_UNSTABLE:T,dangerouslyAllowMutability:r.dangerouslyAllowMutability,retainedBy_UNSTABLE:z})}else C=el({key:o,get:y,cachePolicy_UNSTABLE:T,dangerouslyAllowMutability:r.dangerouslyAllowMutability,retainedBy_UNSTABLE:z});return d.set(m,C),d5(C.key,()=>{d.delete(m)}),C}}var _s=p5;const g5=_s({key:"__constant",get:r=>()=>r,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function m5(r){return g5(r)}var y5=m5;const _5=_s({key:"__error",get:r=>()=>{throw Ni(r)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function x5(r){return _5(r)}var v5=x5;function M5(r){return r}var b5=M5;const{loadableWithError:H_,loadableWithPromise:W_,loadableWithValue:q_}=_c;function Bh(r,s){const c=Array(s.length).fill(void 0),d=Array(s.length).fill(void 0);for(const[m,w]of s.entries())try{c[m]=r(w)}catch(v){d[m]=v}return[c,d]}function w5(r){return r!=null&&!bn(r)}function Fh(r){return Array.isArray(r)?r:Object.getOwnPropertyNames(r).map(s=>r[s])}function jg(r,s){return Array.isArray(r)?s:Object.getOwnPropertyNames(r).reduce((c,d,m)=>({...c,[d]:s[m]}),{})}function il(r,s,c){const d=c.map((m,w)=>m==null?q_(s[w]):bn(m)?W_(m):H_(m));return jg(r,d)}function I5(r,s){return s.map((c,d)=>c===void 0?r[d]:c)}const D5=_s({key:"__waitForNone",get:r=>({get:s})=>{const c=Fh(r),[d,m]=Bh(s,c);return il(r,d,m)},dangerouslyAllowMutability:!0}),T5=_s({key:"__waitForAny",get:r=>({get:s})=>{const c=Fh(r),[d,m]=Bh(s,c);return m.some(w=>!bn(w))?il(r,d,m):new Promise(w=>{for(const[v,o]of m.entries())bn(o)&&o.then(y=>{d[v]=y,m[v]=void 0,w(il(r,d,m))}).catch(y=>{m[v]=y,w(il(r,d,m))})})},dangerouslyAllowMutability:!0}),A5=_s({key:"__waitForAll",get:r=>({get:s})=>{const c=Fh(r),[d,m]=Bh(s,c);if(m.every(v=>v==null))return jg(r,d);const w=m.find(w5);if(w!=null)throw w;return Promise.all(m).then(v=>jg(r,I5(d,v)))},dangerouslyAllowMutability:!0}),N5=_s({key:"__waitForAllSettled",get:r=>({get:s})=>{const c=Fh(r),[d,m]=Bh(s,c);return m.every(w=>!bn(w))?il(r,d,m):Promise.all(m.map((w,v)=>bn(w)?w.then(o=>{d[v]=o,m[v]=void 0}).catch(o=>{d[v]=void 0,m[v]=o}):null)).then(()=>il(r,d,m))},dangerouslyAllowMutability:!0}),E5=_s({key:"__noWait",get:r=>({get:s})=>{try{return el.value(q_(s(r)))}catch(c){return el.value(bn(c)?W_(c):H_(c))}},dangerouslyAllowMutability:!0});var C5={waitForNone:D5,waitForAny:T5,waitForAll:A5,waitForAllSettled:N5,noWait:E5};const{RecoilLoadable:S5}=_c,{DefaultValue:z5}=Er,{RecoilRoot:j5,useRecoilStoreID:O5}=Go,{isRecoilValue:L5}=Ws,{retentionZone:k5}=Mh,{freshSnapshot:P5}=Ah,{useRecoilState:R5,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:U5,useRecoilStateLoadable:B5,useRecoilValue:F5,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:V5,useRecoilValueLoadable:Q5,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Y5,useResetRecoilState:$5,useSetRecoilState:Z5}=qD,{useGotoRecoilSnapshot:G5,useRecoilSnapshot:H5,useRecoilTransactionObserver:W5}=I_,{useRecoilCallback:q5}=C_,{noWait:X5,waitForAll:K5,waitForAllSettled:J5,waitForAny:eN,waitForNone:tN}=C5;var Vh={DefaultValue:z5,isRecoilValue:L5,RecoilLoadable:S5,RecoilEnv:qa,RecoilRoot:j5,useRecoilStoreID:O5,useRecoilBridgeAcrossReactRoots_UNSTABLE:wT,atom:$_,selector:el,atomFamily:h5,selectorFamily:_s,constSelector:y5,errorSelector:v5,readOnlySelector:b5,noWait:X5,waitForNone:tN,waitForAny:eN,waitForAll:K5,waitForAllSettled:J5,useRecoilValue:F5,useRecoilValueLoadable:Q5,useRecoilState:R5,useRecoilStateLoadable:B5,useSetRecoilState:Z5,useResetRecoilState:$5,useGetRecoilValueInfo_UNSTABLE:yT,useRecoilRefresher_UNSTABLE:KT,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Y5,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:V5,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:U5,useRecoilCallback:q5,useRecoilTransaction_UNSTABLE:nA,useGotoRecoilSnapshot:G5,useRecoilSnapshot:H5,useRecoilTransactionObserver_UNSTABLE:W5,snapshot_UNSTABLE:P5,useRetain:Mg,retentionZone:k5},iN=Vh.RecoilRoot,Un=Vh.atom,Ui=Vh.useRecoilValue,vn=Vh.useRecoilState;const nN=(r,s)=>{const c=r[s];return c?typeof c=="function"?c():Promise.resolve(c):new Promise((d,m)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(m.bind(null,new Error("Unknown variable dynamic import: "+s)))})},rN="mi-components";let Qh,X_,Fr=!1,Og=!1;const Ho=(r,s="")=>()=>{},oN=(r,s)=>()=>{},sN="{visibility:hidden}.hydrated{visibility:inherit}",K_="http://www.w3.org/1999/xlink",J_={},aN="http://www.w3.org/2000/svg",lN="http://www.w3.org/1999/xhtml",cN=r=>r!=null,Lg=r=>(r=typeof r,r==="object"||r==="function");function ex(r){var s,c,d;return(d=(c=(s=r.head)===null||s===void 0?void 0:s.querySelector('meta[name="csp-nonce"]'))===null||c===void 0?void 0:c.getAttribute("content"))!==null&&d!==void 0?d:void 0}const be=(r,s,...c)=>{let d=null,m=null,w=!1,v=!1;const o=[],y=z=>{for(let C=0;C<z.length;C++)d=z[C],Array.isArray(d)?y(d):d!=null&&typeof d!="boolean"&&((w=typeof r!="function"&&!Lg(d))&&(d=String(d)),w&&v?o[o.length-1].$text$+=d:o.push(w?kg(null,d):d),v=w)};if(y(c),s){s.key&&(m=s.key);{const z=s.className||s.class;z&&(s.class=typeof z!="object"?z:Object.keys(z).filter(C=>z[C]).join(" "))}}const T=kg(r,null);return T.$attrs$=s,o.length>0&&(T.$children$=o),T.$key$=m,T},kg=(r,s)=>{const c={$flags$:0,$tag$:r,$text$:s,$elm$:null,$children$:null};return c.$attrs$=null,c.$key$=null,c},qn={},uN=r=>r&&r.$tag$===qn,hN=(r,s)=>r!=null&&!Lg(r)?s&4?r==="false"?!1:r===""||!!r:s&2?parseFloat(r):s&1?String(r):r:r,Wo=r=>xs(r).$hostElement$,Tn=(r,s,c)=>{const d=Wo(r);return{emit:m=>tx(d,s,{bubbles:!!(c&4),composed:!!(c&2),cancelable:!!(c&1),detail:m})}},tx=(r,s,c)=>{const d=ar.ce(s,c);return r.dispatchEvent(d),d},ix=new WeakMap,dN=(r,s,c)=>{let d=Gh.get(r);jN&&c?(d=d||new CSSStyleSheet,typeof d=="string"?d=s:d.replaceSync(s)):d=s,Gh.set(r,d)},fN=(r,s,c,d)=>{var m;let w=nx(s);const v=Gh.get(w);if(r=r.nodeType===11?r:Do,v)if(typeof v=="string"){r=r.head||r;let o=ix.get(r),y;if(o||ix.set(r,o=new Set),!o.has(w)){{y=Do.createElement("style"),y.innerHTML=v;const T=(m=ar.$nonce$)!==null&&m!==void 0?m:ex(Do);T!=null&&y.setAttribute("nonce",T),r.insertBefore(y,r.querySelector("link"))}o&&o.add(w)}}else r.adoptedStyleSheets.includes(v)||(r.adoptedStyleSheets=[...r.adoptedStyleSheets,v]);return w},pN=r=>{const s=r.$cmpMeta$,c=r.$hostElement$,d=s.$flags$,m=Ho("attachStyles",s.$tagName$),w=fN(c.shadowRoot?c.shadowRoot:c.getRootNode(),s);d&10&&(c["s-sc"]=w,c.classList.add(w+"-h")),m()},nx=(r,s)=>"sc-"+r.$tagName$,rx=(r,s,c,d,m,w)=>{if(c!==d){let v=yx(r,s),o=s.toLowerCase();if(s==="class"){const y=r.classList,T=ox(c),z=ox(d);y.remove(...T.filter(C=>C&&!z.includes(C))),y.add(...z.filter(C=>C&&!T.includes(C)))}else if(s==="style"){for(const y in c)(!d||d[y]==null)&&(y.includes("-")?r.style.removeProperty(y):r.style[y]="");for(const y in d)(!c||d[y]!==c[y])&&(y.includes("-")?r.style.setProperty(y,d[y]):r.style[y]=d[y])}else if(s!=="key")if(s==="ref")d&&d(r);else if(!v&&s[0]==="o"&&s[1]==="n")s[2]==="-"?s=s.slice(3):yx(jc,o)?s=o.slice(2):s=o[2]+s.slice(3),c&&ar.rel(r,s,c,!1),d&&ar.ael(r,s,d,!1);else{const y=Lg(d);if((v||y&&d!==null)&&!m)try{if(r.tagName.includes("-"))r[s]=d;else{const z=d??"";s==="list"?v=!1:(c==null||r[s]!=z)&&(r[s]=z)}}catch{}let T=!1;o!==(o=o.replace(/^xlink\:?/,""))&&(s=o,T=!0),d==null||d===!1?(d!==!1||r.getAttribute(s)==="")&&(T?r.removeAttributeNS(K_,s):r.removeAttribute(s)):(!v||w&4||m)&&!y&&(d=d===!0?"":d,T?r.setAttributeNS(K_,s,d):r.setAttribute(s,d))}}},gN=/\s/,ox=r=>r?r.split(gN):[],sx=(r,s,c,d)=>{const m=s.$elm$.nodeType===11&&s.$elm$.host?s.$elm$.host:s.$elm$,w=r&&r.$attrs$||J_,v=s.$attrs$||J_;for(d in w)d in v||rx(m,d,w[d],void 0,c,s.$flags$);for(d in v)rx(m,d,w[d],v[d],c,s.$flags$)},Yh=(r,s,c,d)=>{const m=s.$children$[c];let w=0,v,o;if(m.$text$!==null)v=m.$elm$=Do.createTextNode(m.$text$);else{if(Fr||(Fr=m.$tag$==="svg"),v=m.$elm$=Do.createElementNS(Fr?aN:lN,m.$tag$),Fr&&m.$tag$==="foreignObject"&&(Fr=!1),sx(null,m,Fr),cN(Qh)&&v["s-si"]!==Qh&&v.classList.add(v["s-si"]=Qh),m.$children$)for(w=0;w<m.$children$.length;++w)o=Yh(r,m,w),o&&v.appendChild(o);m.$tag$==="svg"?Fr=!1:v.tagName==="foreignObject"&&(Fr=!0)}return v},ax=(r,s,c,d,m,w)=>{let v=r,o;for(v.shadowRoot&&v.tagName===X_&&(v=v.shadowRoot);m<=w;++m)d[m]&&(o=Yh(null,c,m),o&&(d[m].$elm$=o,v.insertBefore(o,s)))},lx=(r,s,c,d,m)=>{for(;s<=c;++s)(d=r[s])&&(m=d.$elm$,cx(d),m.remove())},mN=(r,s,c,d)=>{let m=0,w=0,v=0,o=0,y=s.length-1,T=s[0],z=s[y],C=d.length-1,S=d[0],U=d[C],R,V;for(;m<=y&&w<=C;)if(T==null)T=s[++m];else if(z==null)z=s[--y];else if(S==null)S=d[++w];else if(U==null)U=d[--C];else if($h(T,S))nl(T,S),T=s[++m],S=d[++w];else if($h(z,U))nl(z,U),z=s[--y],U=d[--C];else if($h(T,U))nl(T,U),r.insertBefore(T.$elm$,z.$elm$.nextSibling),T=s[++m],U=d[--C];else if($h(z,S))nl(z,S),r.insertBefore(z.$elm$,T.$elm$),z=s[--y],S=d[++w];else{for(v=-1,o=m;o<=y;++o)if(s[o]&&s[o].$key$!==null&&s[o].$key$===S.$key$){v=o;break}v>=0?(V=s[v],V.$tag$!==S.$tag$?R=Yh(s&&s[w],c,v):(nl(V,S),s[v]=void 0,R=V.$elm$),S=d[++w]):(R=Yh(s&&s[w],c,w),S=d[++w]),R&&T.$elm$.parentNode.insertBefore(R,T.$elm$)}m>y?ax(r,d[C+1]==null?null:d[C+1].$elm$,c,d,w,C):w>C&&lx(s,m,y)},$h=(r,s)=>r.$tag$===s.$tag$?r.$key$===s.$key$:!1,nl=(r,s)=>{const c=s.$elm$=r.$elm$,d=r.$children$,m=s.$children$,w=s.$tag$,v=s.$text$;v===null?(Fr=w==="svg"?!0:w==="foreignObject"?!1:Fr,w==="slot"||sx(r,s,Fr),d!==null&&m!==null?mN(c,d,s,m):m!==null?(r.$text$!==null&&(c.textContent=""),ax(c,null,s,m,0,m.length-1)):d!==null&&lx(d,0,d.length-1),Fr&&w==="svg"&&(Fr=!1)):r.$text$!==v&&(c.data=v)},cx=r=>{r.$attrs$&&r.$attrs$.ref&&r.$attrs$.ref(null),r.$children$&&r.$children$.map(cx)},yN=(r,s)=>{const c=r.$hostElement$,d=r.$cmpMeta$,m=r.$vnode$||kg(null,null),w=uN(s)?s:be(null,null,s);X_=c.tagName,d.$attrsToReflect$&&(w.$attrs$=w.$attrs$||{},d.$attrsToReflect$.map(([v,o])=>w.$attrs$[o]=c[v])),w.$tag$=null,w.$flags$|=4,r.$vnode$=w,w.$elm$=m.$elm$=c.shadowRoot||c,Qh=c["s-sc"],nl(m,w)},ux=(r,s)=>{s&&!r.$onRenderResolve$&&s["s-p"]&&s["s-p"].push(new Promise(c=>r.$onRenderResolve$=c))},Zh=(r,s)=>{if(r.$flags$|=16,r.$flags$&4){r.$flags$|=512;return}return ux(r,r.$ancestorComponent$),LN(()=>_N(r,s))},_N=(r,s)=>{const c=Ho("scheduleUpdate",r.$cmpMeta$.$tagName$),d=r.$lazyInstance$;let m;return s&&(r.$flags$|=256,r.$queuedListeners$&&(r.$queuedListeners$.map(([w,v])=>ea(d,w,v)),r.$queuedListeners$=null),m=ea(d,"componentWillLoad")),m=dx(m,()=>ea(d,"componentWillRender")),c(),dx(m,()=>xN(r,d,s))},xN=async(r,s,c)=>{const d=r.$hostElement$,m=Ho("update",r.$cmpMeta$.$tagName$),w=d["s-rc"];c&&pN(r);const v=Ho("render",r.$cmpMeta$.$tagName$);vN(r,s),w&&(w.map(o=>o()),d["s-rc"]=void 0),v(),m();{const o=d["s-p"],y=()=>MN(r);o.length===0?y():(Promise.all(o).then(y),r.$flags$|=4,o.length=0)}},vN=(r,s,c)=>{try{s=s.render&&s.render(),r.$flags$&=-17,r.$flags$|=2,yN(r,s)}catch(d){ta(d,r.$hostElement$)}return null},MN=r=>{const s=r.$cmpMeta$.$tagName$,c=r.$hostElement$,d=Ho("postUpdate",s),m=r.$lazyInstance$,w=r.$ancestorComponent$;ea(m,"componentDidRender"),r.$flags$&64?d():(r.$flags$|=64,fx(c),ea(m,"componentDidLoad"),d(),r.$onReadyResolve$(c),w||hx()),r.$onInstanceResolve$(c),r.$onRenderResolve$&&(r.$onRenderResolve$(),r.$onRenderResolve$=void 0),r.$flags$&512&&Bg(()=>Zh(r,!1)),r.$flags$&=-517},Pg=r=>{{const s=xs(r),c=s.$hostElement$.isConnected;return c&&(s.$flags$&18)===2&&Zh(s,!1),c}},hx=r=>{fx(Do.documentElement),Bg(()=>tx(jc,"appload",{detail:{namespace:rN}}))},ea=(r,s,c)=>{if(r&&r[s])try{return r[s](c)}catch(d){ta(d)}},dx=(r,s)=>r&&r.then?r.then(s):s(),fx=r=>r.classList.add("hydrated"),bN=(r,s)=>xs(r).$instanceValues$.get(s),wN=(r,s,c,d)=>{const m=xs(r),w=m.$hostElement$,v=m.$instanceValues$.get(s),o=m.$flags$,y=m.$lazyInstance$;c=hN(c,d.$members$[s][0]);const T=Number.isNaN(v)&&Number.isNaN(c),z=c!==v&&!T;if((!(o&8)||v===void 0)&&z&&(m.$instanceValues$.set(s,c),y)){if(d.$watchers$&&o&128){const C=d.$watchers$[s];C&&C.map(S=>{try{y[S](c,v,s)}catch(U){ta(U,w)}})}(o&18)===2&&Zh(m,!1)}},px=(r,s,c)=>{if(s.$members$){r.watchers&&(s.$watchers$=r.watchers);const d=Object.entries(s.$members$),m=r.prototype;if(d.map(([w,[v]])=>{v&31||c&2&&v&32?Object.defineProperty(m,w,{get(){return bN(this,w)},set(o){wN(this,w,o,s)},configurable:!0,enumerable:!0}):c&1&&v&64&&Object.defineProperty(m,w,{value(...o){const y=xs(this);return y.$onInstancePromise$.then(()=>y.$lazyInstance$[w](...o))}})}),c&1){const w=new Map;m.attributeChangedCallback=function(v,o,y){ar.jmp(()=>{const T=w.get(v);if(this.hasOwnProperty(T))y=this[T],delete this[T];else if(m.hasOwnProperty(T)&&typeof this[T]=="number"&&this[T]==y)return;this[T]=y===null&&typeof this[T]=="boolean"?!1:y})},r.observedAttributes=d.filter(([v,o])=>o[0]&15).map(([v,o])=>{const y=o[1]||v;return w.set(y,v),o[0]&512&&s.$attrsToReflect$.push([v,y]),y})}}return r},IN=async(r,s,c,d,m)=>{if(!(s.$flags$&32)){{if(s.$flags$|=32,m=zN(c),m.then){const y=oN();m=await m,y()}m.isProxied||(c.$watchers$=m.watchers,px(m,c,2),m.isProxied=!0);const o=Ho("createInstance",c.$tagName$);s.$flags$|=8;try{new m(s)}catch(y){ta(y)}s.$flags$&=-9,s.$flags$|=128,o(),gx(s.$lazyInstance$)}if(m.style){let o=m.style;const y=nx(c);if(!Gh.has(y)){const T=Ho("registerStyles",c.$tagName$);dN(y,o,!!(c.$flags$&1)),T()}}}const w=s.$ancestorComponent$,v=()=>Zh(s,!0);w&&w["s-rc"]?w["s-rc"].push(v):v()},gx=r=>{ea(r,"connectedCallback")},DN=r=>{if(!(ar.$flags$&1)){const s=xs(r),c=s.$cmpMeta$,d=Ho("connectedCallback",c.$tagName$);if(s.$flags$&1)mx(r,s,c.$listeners$),gx(s.$lazyInstance$);else{s.$flags$|=1;{let m=r;for(;m=m.parentNode||m.host;)if(m["s-p"]){ux(s,s.$ancestorComponent$=m);break}}c.$members$&&Object.entries(c.$members$).map(([m,[w]])=>{if(w&31&&r.hasOwnProperty(m)){const v=r[m];delete r[m],r[m]=v}}),IN(r,s,c)}d()}},TN=r=>{if(!(ar.$flags$&1)){const s=xs(r),c=s.$lazyInstance$;s.$rmListeners$&&(s.$rmListeners$.map(d=>d()),s.$rmListeners$=void 0),ea(c,"disconnectedCallback")}},AN=(r,s={})=>{var c;const d=Ho(),m=[],w=s.exclude||[],v=jc.customElements,o=Do.head,y=o.querySelector("meta[charset]"),T=Do.createElement("style"),z=[];let C,S=!0;Object.assign(ar,s),ar.$resourcesUrl$=new URL(s.resourcesUrl||"./",Do.baseURI).href,r.map(U=>{U[1].map(R=>{const V={$flags$:R[0],$tagName$:R[1],$members$:R[2],$listeners$:R[3]};V.$members$=R[2],V.$listeners$=R[3],V.$attrsToReflect$=[],V.$watchers$={};const W=V.$tagName$,ye=class extends HTMLElement{constructor(le){super(le),le=this,SN(le,V),V.$flags$&1&&le.attachShadow({mode:"open"})}connectedCallback(){C&&(clearTimeout(C),C=null),S?z.push(this):ar.jmp(()=>DN(this))}disconnectedCallback(){ar.jmp(()=>TN(this))}componentOnReady(){return xs(this).$onReadyPromise$}};V.$lazyBundleId$=U[0],!w.includes(W)&&!v.get(W)&&(m.push(W),v.define(W,px(ye,V,1)))})});{T.innerHTML=m+sN,T.setAttribute("data-styles","");const U=(c=ar.$nonce$)!==null&&c!==void 0?c:ex(Do);U!=null&&T.setAttribute("nonce",U),o.insertBefore(T,y?y.nextSibling:o.firstChild)}S=!1,z.length?z.map(U=>U.connectedCallback()):ar.jmp(()=>C=setTimeout(hx,30)),d()},mx=(r,s,c,d)=>{c&&c.map(([m,w,v])=>{const o=EN(r,m),y=NN(s,v),T=CN(m);ar.ael(o,w,y,T),(s.$rmListeners$=s.$rmListeners$||[]).push(()=>ar.rel(o,w,y,T))})},NN=(r,s)=>c=>{try{r.$flags$&256?r.$lazyInstance$[s](c):(r.$queuedListeners$=r.$queuedListeners$||[]).push([s,c])}catch(d){ta(d)}},EN=(r,s)=>s&8?jc:r,CN=r=>(r&2)!==0,Rg=new WeakMap,xs=r=>Rg.get(r),Hi=(r,s)=>Rg.set(s.$lazyInstance$=r,s),SN=(r,s)=>{const c={$flags$:0,$hostElement$:r,$cmpMeta$:s,$instanceValues$:new Map};return c.$onInstancePromise$=new Promise(d=>c.$onInstanceResolve$=d),c.$onReadyPromise$=new Promise(d=>c.$onReadyResolve$=d),r["s-p"]=[],r["s-rc"]=[],mx(r,c,s.$listeners$),Rg.set(r,c)},yx=(r,s)=>s in r,ta=(r,s)=>(0,console.error)(r,s),_x=new Map,zN=(r,s,c)=>{const d=r.$tagName$.replace(/-/g,"_"),m=r.$lazyBundleId$,w=_x.get(m);if(w)return w[d];/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return nN(Object.assign({"./combo-box-item.entry.js":()=>Promise.resolve().then(()=>VE),"./mi-card_2.entry.js":()=>Promise.resolve().then(()=>$E),"./mi-chip.entry.js":()=>Promise.resolve().then(()=>GE),"./mi-column.entry.js":()=>Promise.resolve().then(()=>HE),"./mi-combo-box.entry.js":()=>Promise.resolve().then(()=>XE),"./mi-data-table.entry.js":()=>Promise.resolve().then(()=>oC),"./mi-distance_2.entry.js":()=>Promise.resolve().then(()=>lC),"./mi-dropdown-item.entry.js":()=>Promise.resolve().then(()=>cC),"./mi-dropdown.entry.js":()=>Promise.resolve().then(()=>hC),"./mi-floor-selector.entry.js":()=>Promise.resolve().then(()=>fC),"./mi-keyboard.entry.js":()=>Promise.resolve().then(()=>MC),"./mi-list-item-category.entry.js":()=>Promise.resolve().then(()=>wC),"./mi-list-item-location.entry.js":()=>Promise.resolve().then(()=>DC),"./mi-list.entry.js":()=>Promise.resolve().then(()=>AC),"./mi-location-booking.entry.js":()=>Promise.resolve().then(()=>KO),"./mi-location-info.entry.js":()=>Promise.resolve().then(()=>eL),"./mi-map-googlemaps.entry.js":()=>Promise.resolve().then(()=>nL),"./mi-map-mapbox.entry.js":()=>Promise.resolve().then(()=>aL),"./mi-metric-card.entry.js":()=>Promise.resolve().then(()=>cL),"./mi-my-position.entry.js":()=>Promise.resolve().then(()=>TL),"./mi-notification.entry.js":()=>Promise.resolve().then(()=>NL),"./mi-route-instructions-heading.entry.js":()=>Promise.resolve().then(()=>CL),"./mi-route-instructions-maneuver_2.entry.js":()=>Promise.resolve().then(()=>zL),"./mi-route-instructions-step-legacy.entry.js":()=>Promise.resolve().then(()=>OL),"./mi-route-instructions-step.entry.js":()=>Promise.resolve().then(()=>kL),"./mi-route-instructions.entry.js":()=>Promise.resolve().then(()=>RL),"./mi-scroll-buttons.entry.js":()=>Promise.resolve().then(()=>BL),"./mi-search.entry.js":()=>Promise.resolve().then(()=>$L),"./mi-share-sms.entry.js":()=>Promise.resolve().then(()=>GL),"./mi-step-switcher.entry.js":()=>Promise.resolve().then(()=>WL),"./mi-tab-panel.entry.js":()=>Promise.resolve().then(()=>XL),"./mi-tab.entry.js":()=>Promise.resolve().then(()=>KL),"./mi-tabs.entry.js":()=>Promise.resolve().then(()=>ek)}),`./${m}.entry.js`).then(v=>(_x.set(m,v),v[d]),ta)},Gh=new Map,jc=typeof window<"u"?window:{},Do=jc.document||{head:{}},ar={$flags$:0,$resourcesUrl$:"",jmp:r=>r(),raf:r=>requestAnimationFrame(r),ael:(r,s,c,d)=>r.addEventListener(s,c,d),rel:(r,s,c,d)=>r.removeEventListener(s,c,d),ce:(r,s)=>new CustomEvent(r,s)},xx=r=>Promise.resolve(r),jN=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replaceSync=="function"}catch{}return!1})(),vx=[],Mx=[],ON=(r,s)=>c=>{r.push(c),Og||(Og=!0,s&&ar.$flags$&4?Bg(Ug):ar.raf(Ug))},bx=r=>{for(let s=0;s<r.length;s++)try{r[s](performance.now())}catch(c){ta(c)}r.length=0},Ug=()=>{bx(vx),bx(Mx),(Og=vx.length>0)&&ar.raf(Ug)},Bg=r=>xx().then(r),LN=ON(Mx,!0),kN=()=>xx(),PN=(r,s)=>typeof window>"u"?Promise.resolve():kN().then(()=>AN([["mi-route-instructions",[[1,"mi-route-instructions",{activeStep:[1040],unit:[1],route:[16],hideIndoorSubsteps:[4,"hide-indoor-substeps"],travelMode:[1,"travel-mode"],originLocation:[16],originName:[1,"origin-name"],destinationLocation:[16],destinationName:[1,"destination-name"],translations:[16]}]]],["mi-route-instructions-step",[[1,"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"],destinationLocation:[1,"destination-location"],unit:[1],translations:[1],stepData:[32],translationsData:[32],substepsAreOpen:[32]}]]],["mi-route-instructions-heading",[[1,"mi-route-instructions-heading",{originName:[1,"origin-name"],destinationName:[1,"destination-name"],totalTravelTime:[2,"total-travel-time"],totalWalkingDistance:[2,"total-walking-distance"],travelMode:[1,"travel-mode"],unit:[1],translations:[16]}]]],["mi-list-item-location",[[1,"mi-list-item-location",{location:[8],showExternalId:[4,"show-external-id"],unit:[1],icon:[1],iconBadge:[1,"icon-badge"],iconBadgeValue:[1,"icon-badge-value"],iconURLToRender:[32]}]]],["mi-metric-card",[[1,"mi-metric-card",{label:[1],value:[1],tip:[1],spinner:[4],error:[1],showToolTip:[32]}]]],["mi-list",[[1,"mi-list",{scrollButtonsEnabled:[4,"scroll-buttons-enabled"],scrollLength:[2,"scroll-length"]},[[0,"listItemDidRender","updateScrollButtonsState"]]]]],["mi-location-booking",[[1,"mi-location-booking",{location:[16],duration:[2],translations:[16],show:[2],startHour:[2,"start-hour"],stopHour:[2,"stop-hour"],bookingTitle:[1,"booking-title"],timeSlots:[32]}]]],["mi-share-sms",[[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"]}]]],["combo-box-item",[[0,"combo-box-item",{selected:[4],value:[1],text:[1]}]]],["mi-chip",[[0,"mi-chip",{icon:[1],content:[1],backgroundColor:[1,"background-color"],active:[4]}]]],["mi-column",[[1,"mi-column",{monospace:[4],alignContent:[1,"align-content"],label:[1],sortable:[1],sort:[1],binding:[1],fitContent:[4,"fit-content"],width:[1]},[[0,"cellContentClicked","cellContentClickedHandler"]]]]],["mi-combo-box",[[1,"mi-combo-box",{open:[4],items:[16],itemsOrder:[1,"items-order"],filterable:[4],selected:[16],noResultsMessage:[1,"no-results-message"],disabled:[4],currentItems:[32]},[[8,"click","checkForClickOutside"],[1,"mousemove","mouseMoveEventHandler"],[11,"scroll","scrollEventHandler"],[11,"resize","resizeEventHandler"]]]]],["mi-data-table",[[1,"mi-data-table",{rows:[16],maxRows:[2,"max-rows"],selectable:[4],selected:[16],emptyPageHeader:[1,"empty-page-header"],emptyPageSubheader:[1,"empty-page-subheader"],isHeaderSticky:[4,"sticky-header"],numberOfSelectedRows:[32],tableRows:[32],sortByColumn:[32]}]]],["mi-dropdown",[[1,"mi-dropdown",{open:[4],items:[16],itemsOrder:[1,"items-order"],label:[1],filterable:[4],multiple:[4],selected:[16],noResultsMessage:[1,"no-results-message"],iconSrc:[1,"icon"],iconAlt:[1,"icon-alt"],disabled:[4],currentItems:[32]},[[0,"focusout","focusOutEventHandler"],[8,"click","checkForClickOutside"],[1,"mousemove","mouseMoveEventHandler"],[11,"scroll","scrollEventHandler"],[11,"resize","resizeEventHandler"]]]]],["mi-dropdown-item",[[0,"mi-dropdown-item",{selected:[4],value:[1],text:[1]}]]],["mi-floor-selector",[[0,"mi-floor-selector",{mapsindoors:[8],primaryColor:[1,"primary-color"],floors:[32],currentFloor:[32],floorSelectorClosed:[32],fadeFloorSelectorOnTop:[32],fadeFloorSelectorOnBottom:[32]}]]],["mi-list-item-category",[[1,"mi-list-item-category",{category:[8],orientation:[513]}]]],["mi-map-googlemaps",[[1,"mi-map-googlemaps",{gmApiKey:[1,"gm-api-key"],miApiKey:[1,"mi-api-key"],gmOptions:[16],disableExternalLinks:[4,"disable-external-links"],floorSelectorControlPosition:[1,"floor-selector-control-position"],floorIndex:[1537,"floor-index"],myPositionControlPosition:[1,"my-position-control-position"],polygonHighlightOptions:[16],language:[1],polylineOptions:[16],getMapInstance:[64],getMapsIndoorsInstance:[64],getDirectionsServiceInstance:[64],getDirectionsRendererInstance:[64],highlightLocation:[64],clearHighlightLocation:[64]}]]],["mi-map-mapbox",[[1,"mi-map-mapbox",{accessToken:[1,"access-token"],miApiKey:[1,"mi-api-key"],disableExternalLinks:[4,"disable-external-links"],floorSelectorControlPosition:[1,"floor-selector-control-position"],floorIndex:[1537,"floor-index"],myPositionControlPosition:[1,"my-position-control-position"],polygonHighlightOptions:[16],polylineOptions:[16],zoom:[1537],maxPitch:[1538,"max-pitch"],maxZoom:[1537,"max-zoom"],bearing:[1537],pitch:[1537],language:[1],getMapInstance:[64],getMapsIndoorsInstance:[64],getDirectionsServiceInstance:[64],getDirectionsRendererInstance:[64],highlightLocation:[64],clearHighlightLocation:[64]}]]],["mi-my-position",[[0,"mi-my-position",{mapsindoors:[8],myPositionOptions:[8,"my-position-options"],positionState:[32]}]]],["mi-notification",[[1,"mi-notification",{position:[1],duration:[2],push:[64],clearAll:[64]}]]],["mi-search",[[0,"mi-search",{placeholder:[1],idAttribute:[1,"id-attribute"],dataAttributes:[16],mapsindoors:[4],google:[4],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],clear:[64],triggerSearch:[64],setDisplayText:[64],focusInput:[64]}]]],["mi-step-switcher",[[1,"mi-step-switcher",{heading:[1],steps:[16],stepIndex:[514,"step-index"]}]]],["mi-tab",[[1,"mi-tab",{label:[1],tabFor:[1,"tab-for"]}]]],["mi-tab-panel",[[1,"mi-tab-panel",{isActive:[32],active:[64]}]]],["mi-tabs",[[1,"mi-tabs",{active:[2],bordered:[4],tabs:[32]}]]],["mi-route-instructions-step-legacy",[[1,"mi-route-instructions-step-legacy",{step:[1],hideIndoorSubsteps:[4,"hide-indoor-substeps"],fromRouteContext:[1,"from-route-context"],fromTravelMode:[1,"from-travel-mode"],fromTransitStop:[1,"from-transit-stop"],unit:[1],translations:[1],stepData:[32],translationsData:[32],substepsAreOpen:[32]}]]],["mi-keyboard",[[0,"mi-keyboard",{inputElement:[16],layout:[1]}]]],["mi-scroll-buttons",[[1,"mi-scroll-buttons",{scrollContainerElementRef:[16],scrollLength:[2,"scroll-length"],updateScrollButtonsState:[64]}]]],["mi-card_2",[[1,"mi-card"],[1,"mi-spinner",{inverse:[4]}]]],["mi-location-info",[[1,"mi-location-info",{location:[8],showExternalId:[4,"show-external-id"]}]]],["mi-distance_2",[[1,"mi-distance",{meters:[2],unit:[1]}],[1,"mi-icon",{iconName:[1,"icon-name"]}]]],["mi-route-instructions-maneuver_2",[[1,"mi-route-instructions-maneuver",{maneuver:[1],translations:[1],unit:[1],maneuverData:[32],translationsData:[32]}],[1,"mi-time",{seconds:[2],translations:[1],translationsData:[32]}]]]],s)),j9="",vs={Google:"google",Mapbox:"mapbox"},qo=Un({key:"mapsIndoorsInstance",default:null,dangerouslyAllowMutability:!0}),RN=r=>{const s=Ui(qo),c=lt.useRef(),[d,m]=lt.useState([]);lt.useEffect(()=>{(async()=>{if(s&&r){for(const o of d)c.current.disableLiveData(o);c.current=new window.mapsindoors.LiveDataManager(s);const v=await c.current.LiveDataInfo.activeDomainTypes();for(const o of v)await c.current.enableLiveData(o);m(v)}})()},[r,s])},Fg=Un({key:"venues",default:[]});var UN=function r(s,c){if(s===c)return!0;if(s&&c&&typeof s=="object"&&typeof c=="object"){if(s.constructor!==c.constructor)return!1;var d,m,w;if(Array.isArray(s)){if(d=s.length,d!=c.length)return!1;for(m=d;m--!==0;)if(!r(s[m],c[m]))return!1;return!0}if(s.constructor===RegExp)return s.source===c.source&&s.flags===c.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===c.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===c.toString();if(w=Object.keys(s),d=w.length,d!==Object.keys(c).length)return!1;for(m=d;m--!==0;)if(!Object.prototype.hasOwnProperty.call(c,w[m]))return!1;for(m=d;m--!==0;){var v=w[m];if(!r(s[v],c[v]))return!1}return!0}return s!==s&&c!==c};const wx="__googleMapsScriptId";var rl;(function(r){r[r.INITIALIZED=0]="INITIALIZED",r[r.LOADING=1]="LOADING",r[r.SUCCESS=2]="SUCCESS",r[r.FAILURE=3]="FAILURE"})(rl||(rl={}));let BN=class pc{constructor({apiKey:s,authReferrerPolicy:c,channel:d,client:m,id:w=wx,language:v,libraries:o=[],mapIds:y,nonce:T,region:z,retries:C=3,url:S="https://maps.googleapis.com/maps/api/js",version:U}){if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=s,this.authReferrerPolicy=c,this.channel=d,this.client=m,this.id=w||wx,this.language=v,this.libraries=o,this.mapIds=y,this.nonce=T,this.region=z,this.retries=C,this.url=S,this.version=U,pc.instance){if(!UN(this.options,pc.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(pc.instance.options)}`);return pc.instance}pc.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?rl.FAILURE:this.done?rl.SUCCESS:this.loading?rl.LOADING:rl.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let s=this.url;return s+=`?callback=${this.CALLBACK}`,this.apiKey&&(s+=`&key=${this.apiKey}`),this.channel&&(s+=`&channel=${this.channel}`),this.client&&(s+=`&client=${this.client}`),this.libraries.length>0&&(s+=`&libraries=${this.libraries.join(",")}`),this.language&&(s+=`&language=${this.language}`),this.region&&(s+=`&region=${this.region}`),this.version&&(s+=`&v=${this.version}`),this.mapIds&&(s+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(s+=`&auth_referrer_policy=${this.authReferrerPolicy}`),s}deleteScript(){const s=document.getElementById(this.id);s&&s.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((s,c)=>{this.loadCallback(d=>{d?c(d.error):s(window.google)})})}loadCallback(s){this.callbacks.push(s),this.execute()}setScript(){if(document.getElementById(this.id)){this.callback();return}const s=this.createUrl(),c=document.createElement("script");c.id=this.id,c.type="text/javascript",c.src=s,c.onerror=this.loadErrorCallback.bind(this),c.defer=!0,c.async=!0,this.nonce&&(c.nonce=this.nonce),document.head.appendChild(c)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(s){if(this.errors.push(s),this.errors.length<=this.retries){const c=this.errors.length*Math.pow(2,this.errors.length);console.log(`Failed to load Google Maps script, retrying in ${c} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},c)}else this.onerrorEvent=s,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(s=>{s(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}};const Vg=Un({key:"gmApiKey",default:null}),ia=Un({key:"primaryColor",default:"#005655"});function FN({onMapView:r,onPositionControl:s}){const c=Ui(Vg),[d,m]=lt.useState(),[w,v]=lt.useState(),[o,y]=lt.useState(!1),[T,z]=lt.useState(!1),C=Ui(qo),S=Ui(ia);return lt.useEffect(()=>{new BN({apiKey:c,version:"quarterly",libraries:["geometry","places"]}).load().then(R=>{m(R);const V={element:document.getElementById("map"),disableDefaultUI:!0,center:{lat:0,lng:0},zoom:21},W=new window.mapsindoors.mapView.GoogleMapsView(V);v(W);const ye=new window.mapsindoors.directions.GoogleMapsProvider;r(W,ye)})},[]),lt.useEffect(()=>{if(C&&w&&d&&!T){const U=document.createElement("mi-my-position");U.mapsindoors=C,w.getMap().controls[d.maps.ControlPosition.RIGHT_TOP].push(U),z(!0),s(U)}if(C&&w&&d&&!o){const U=document.createElement("mi-floor-selector");U.mapsindoors=C,U.primaryColor=S,w.getMap().controls[d.maps.ControlPosition.RIGHT_TOP].push(U),y(!0)}},[C,w,d,o,T]),$e.jsx("div",{className:"map-container",id:"map"})}var Ix={exports:{}};(function(r,s){(function(c,d){r.exports=d()})(i3,function(){var c,d,m;function w(o,y){if(!c)c=y;else if(!d)d=y;else{var T="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+c+")(sharedChunk); ("+d+")(sharedChunk); self.onerror = null;",z={};c(z),m=y(z),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(m.workerUrl=window.URL.createObjectURL(new Blob([T],{type:"text/javascript"})))}}w(["exports"],function(o){var y=typeof self<"u"?self:{},T="2.12.1";let z;const C={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(z==null){const t=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{z=process.env.API_URL_REGEX!=null?new RegExp(process.env.API_URL_REGEX):t}catch{z=t}}return z},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},S={supported:!1,testSupport:function(t){!V&&R&&(W?ye(t):U=t)}};let U,R,V=!1,W=!1;function ye(t){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,R),t.isContextLost())return;S.supported=!0}catch{}t.deleteTexture(e),V=!0}y.document&&(R=y.document.createElement("img"),R.onload=function(){U&&ye(U),U=null,W=!0},R.onerror=function(){V=!0,U=null},R.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const le="01";var he=xe;function xe(t,e,i,a){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(a-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=i,this.p2y=a}xe.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,e){if(e===void 0&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var i=t,a=0;a<8;a++){var u=this.sampleCurveX(i)-t;if(Math.abs(u)<e)return i;var f=this.sampleCurveDerivativeX(i);if(Math.abs(f)<1e-6)break;i-=u/f}var g=0,x=1;for(i=t,a=0;a<20&&(u=this.sampleCurveX(i),!(Math.abs(u-t)<e));a++)t>u?g=i:x=i,i=.5*(x-g)+g;return i},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}};var X=Ee;function Ee(t,e){this.x=t,this.y=e}Ee.prototype={clone:function(){return new Ee(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),i=Math.sin(t),a=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=a,this},_rotateAround:function(t,e){var i=Math.cos(t),a=Math.sin(t),u=e.y+a*(this.x-e.x)+i*(this.y-e.y);return this.x=e.x+i*(this.x-e.x)-a*(this.y-e.y),this.y=u,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Ee.convert=function(t){return t instanceof Ee?t:Array.isArray(t)?new Ee(t[0],t[1]):t};const Pe=Math.PI/180,Ve=180/Math.PI;function Ne(t){return t*Pe}function Ze(t){return t*Ve}const tt=[[0,0],[1,0],[1,1],[0,1]];function nt(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,i=e*t;return 4*(t<.5?i:3*(t-e)+i-.75)}function at(t,e,i,a){const u=new he(t,e,i,a);return function(f){return u.solve(f)}}const gt=at(.25,.1,.25,1);function Ae(t,e,i){return Math.min(i,Math.max(e,t))}function Qe(t,e,i){return(i=Ae((i-t)/(e-t),0,1))*i*(3-2*i)}function Ke(t,e,i){const a=i-e,u=((t-e)%a+a)%a+e;return u===e?i:u}function _t(t,e,i){if(!t.length)return i(null,[]);let a=t.length;const u=new Array(t.length);let f=null;t.forEach((g,x)=>{e(g,(b,I)=>{b&&(f=b),u[x]=I,--a==0&&i(f,u)})})}function ut(t){const e=[];for(const i in t)e.push(t[i]);return e}function ee(t,...e){for(const i of e)for(const a in i)t[a]=i[a];return t}let ie=1;function G(){return ie++}function P(){return function t(e){return e?(e^Math.random()*(16>>e/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function Q(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function J(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function K(t,e){t.forEach(i=>{e[i]&&(e[i]=e[i].bind(e))})}function me(t,e){return t.indexOf(e,t.length-e.length)!==-1}function Te(t,e,i){const a={};for(const u in t)a[u]=e.call(i||this,t[u],u,t);return a}function de(t,e,i){const a={};for(const u in t)e.call(i||this,t[u],u,t)&&(a[u]=t[u]);return a}function Oe(t){return Array.isArray(t)?t.map(Oe):typeof t=="object"&&t?Te(t,Oe):t}const qe={};function Ce(t){qe[t]||(typeof console<"u"&&console.warn(t),qe[t]=!0)}function Be(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}function et(t){let e=0;for(let i,a,u=0,f=t.length,g=f-1;u<f;g=u++)i=t[u],a=t[g],e+=(a.x-i.x)*(i.y+a.y);return e}function Dt(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function He(t){const e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(i,a,u,f)=>{const g=u||f;return e[a]=!g||g.toLowerCase(),""}),e["max-age"]){const i=parseInt(e["max-age"],10);isNaN(i)?delete e["max-age"]:e["max-age"]=i}return e}let Tt=null;function ti(t){if(Tt==null){const e=t.navigator?t.navigator.userAgent:null;Tt=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return Tt}function ni(t){try{const e=y[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch{return!1}}function vi(t,e){return[t[4*e],t[4*e+1],t[4*e+2],t[4*e+3]]}const Ji="mapbox-tiles";let yi,Bi,wi=500,hi=50;function di(){try{return y.caches}catch{}}function Pt(){di()&&!yi&&(yi=y.caches.open(Ji))}function Ii(t){const e=t.indexOf("?");if(e<0)return t;const i=function(u){const f=u.indexOf("?");return f>0?u.slice(f+1).split("&"):[]}(t),a=i.filter(u=>{const f=u.split("=");return f[0]==="language"||f[0]==="worldview"});return a.length?`${t.slice(0,e)}?${a.join("&")}`:t.slice(0,e)}let Vi=1/0;const zi={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(zi);class _i extends Error{constructor(e,i,a){i===401&&ci(a)&&(e+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(e),this.status=i,this.url=a}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const si=Dt()?()=>self.worker&&self.worker.referrer:()=>(y.location.protocol==="blob:"?y.parent:y).location.href,ln=function(t,e){if(!(/^file:/.test(i=t.url)||/^file:/.test(si())&&!/^\w+:/.test(i))){if(y.fetch&&y.Request&&y.AbortController&&y.Request.prototype.hasOwnProperty("signal"))return function(a,u){const f=new y.AbortController,g=new y.Request(a.url,{method:a.method||"GET",body:a.body,credentials:a.credentials,headers:a.headers,referrer:si(),signal:f.signal});let x=!1,b=!1;const I=(N=g.url).indexOf("sku=")>0&&ci(N);var N;a.type==="json"&&g.headers.set("Accept","application/json");const j=(B,F,Z)=>{if(b)return;if(B&&B.message!=="SecurityError"&&Ce(B),F&&Z)return O(F);const ne=Date.now();y.fetch(g).then(Me=>{if(Me.ok){const ze=I?Me.clone():null;return O(Me,ze,ne)}return u(new _i(Me.statusText,Me.status,a.url))}).catch(Me=>{Me.code!==20&&u(new Error(Me.message))})},O=(B,F,Z)=>{(a.type==="arrayBuffer"?B.arrayBuffer():a.type==="json"?B.json():B.text()).then(ne=>{b||(F&&Z&&function(Me,ze,ve){if(Pt(),!yi)return;const De={status:ze.status,statusText:ze.statusText,headers:new y.Headers};ze.headers.forEach((ct,ot)=>De.headers.set(ot,ct));const ke=He(ze.headers.get("Cache-Control")||"");if(ke["no-store"])return;ke["max-age"]&&De.headers.set("Expires",new Date(ve+1e3*ke["max-age"]).toUTCString());const je=De.headers.get("Expires");je&&(new Date(je).getTime()-ve<42e4||function(ct,ot){if(Bi===void 0)try{new Response(new ReadableStream),Bi=!0}catch{Bi=!1}Bi?ot(ct.body):ct.blob().then(ot)}(ze,ct=>{const ot=new y.Response(ct,De);Pt(),yi&&yi.then(vt=>vt.put(Ii(Me.url),ot)).catch(vt=>Ce(vt.message))}))}(g,F,Z),x=!0,u(null,ne,B.headers.get("Cache-Control"),B.headers.get("Expires")))}).catch(ne=>{b||u(new Error(ne.message))})};return I?function(B,F){if(Pt(),!yi)return F(null);const Z=Ii(B.url);yi.then(ne=>{ne.match(Z).then(Me=>{const ze=function(ve){if(!ve)return!1;const De=new Date(ve.headers.get("Expires")||0),ke=He(ve.headers.get("Cache-Control")||"");return De>Date.now()&&!ke["no-cache"]}(Me);ne.delete(Z),ze&&ne.put(Z,Me.clone()),F(null,Me,ze)}).catch(F)}).catch(F)}(g,j):j(null,null),{cancel:()=>{b=!0,x||f.abort()}}}(t,e);if(Dt()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var i;return function(a,u){const f=new y.XMLHttpRequest;f.open(a.method||"GET",a.url,!0),a.type==="arrayBuffer"&&(f.responseType="arraybuffer");for(const g in a.headers)f.setRequestHeader(g,a.headers[g]);return a.type==="json"&&(f.responseType="text",f.setRequestHeader("Accept","application/json")),f.withCredentials=a.credentials==="include",f.onerror=()=>{u(new Error(f.statusText))},f.onload=()=>{if((f.status>=200&&f.status<300||f.status===0)&&f.response!==null){let g=f.response;if(a.type==="json")try{g=JSON.parse(f.response)}catch(x){return u(x)}u(null,g,f.getResponseHeader("Cache-Control"),f.getResponseHeader("Expires"))}else u(new _i(f.statusText,f.status,a.url))},f.send(a.body),{cancel:()=>f.abort()}}(t,e)},An=function(t,e){return ln(ee(t,{type:"arrayBuffer"}),e)};function Ye(t){const e=y.document.createElement("a");return e.href=t,e.protocol===y.document.location.protocol&&e.host===y.document.location.host}const Fe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let wt,zt;wt=[],zt=0;const Ut=function(t,e){if(S.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),zt>=C.MAX_PARALLEL_IMAGE_REQUESTS){const f={requestParameters:t,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return wt.push(f),f}zt++;let i=!1;const a=()=>{if(!i)for(i=!0,zt--;wt.length&&zt<C.MAX_PARALLEL_IMAGE_REQUESTS;){const f=wt.shift(),{requestParameters:g,callback:x,cancelled:b}=f;b||(f.cancel=Ut(g,x).cancel)}},u=An(t,(f,g,x,b)=>{a(),f?e(f):g&&(y.createImageBitmap?function(I,N){const j=new y.Blob([new Uint8Array(I)],{type:"image/png"});y.createImageBitmap(j).then(O=>{N(null,O)}).catch(O=>{N(new Error(`Could not load image because of ${O.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(g,(I,N)=>e(I,N,x,b)):function(I,N){const j=new y.Image,O=y.URL;j.onload=()=>{N(null,j),O.revokeObjectURL(j.src),j.onload=null,y.requestAnimationFrame(()=>{j.src=Fe})},j.onerror=()=>N(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const B=new y.Blob([new Uint8Array(I)],{type:"image/png"});j.src=I.byteLength?O.createObjectURL(B):Fe}(g,(I,N)=>e(I,N,x,b)))});return{cancel:()=>{u.cancel(),a()}}},qt="NO_ACCESS_TOKEN";function ii(t){return t.indexOf("mapbox:")===0}function ci(t){return C.API_URL_REGEX.test(t)}function gi(t){return C.API_CDN_URL_REGEX.test(t)}function Mi(t){return C.API_STYLE_REGEX.test(t)&&!Wi(t)}function Wi(t){return C.API_SPRITE_REGEX.test(t)}const Nn=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function en(t){const e=t.match(Nn);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function En(t){const e=t.params.length?`?${t.params.join("&")}`:"";return`${t.protocol}://${t.authority}${t.path}${e}`}function Fn(t){if(!t)return null;const e=t.split(".");if(!e||e.length!==3)return null;try{return JSON.parse(decodeURIComponent(y.atob(e[1]).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch{return null}}class pe{constructor(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(e){const i=Fn(C.ACCESS_TOKEN);let a="";return a=i&&i.u?y.btoa(encodeURIComponent(i.u).replace(/%([0-9A-F]{2})/g,(u,f)=>String.fromCharCode(+("0x"+f)))):C.ACCESS_TOKEN||"",e?`mapbox.eventData.${e}:${a}`:`mapbox.eventData:${a}`}fetchEventData(){const e=ni("localStorage"),i=this.getStorageKey(),a=this.getStorageKey("uuid");if(e)try{const u=y.localStorage.getItem(i);u&&(this.eventData=JSON.parse(u));const f=y.localStorage.getItem(a);f&&(this.anonId=f)}catch{Ce("Unable to read from LocalStorage")}}saveEventData(){const e=ni("localStorage"),i=this.getStorageKey(),a=this.getStorageKey("uuid");if(e)try{y.localStorage.setItem(a,this.anonId),Object.keys(this.eventData).length>=1&&y.localStorage.setItem(i,JSON.stringify(this.eventData))}catch{Ce("Unable to write to LocalStorage")}}processRequests(e){}postEvent(e,i,a,u){if(!C.EVENTS_URL)return;const f=en(C.EVENTS_URL);f.params.push(`access_token=${u||C.ACCESS_TOKEN||""}`);const g={event:this.type,created:new Date(e).toISOString()},x=i?ee(g,i):g,b={url:En(f),headers:{"Content-Type":"text/plain"},body:JSON.stringify([x])};this.pendingRequest=function(I,N){return ln(ee(I,{method:"POST"}),N)}(b,I=>{this.pendingRequest=null,a(I),this.saveEventData(),this.processRequests(u)})}queueRequest(e,i){this.queue.push(e),this.processRequests(i)}}const Y=new class extends pe{constructor(t){super("appUserTurnstile"),this._customAccessToken=t}postTurnstileEvent(t,e){C.EVENTS_URL&&C.ACCESS_TOKEN&&Array.isArray(t)&&t.some(i=>ii(i)||ci(i))&&this.queueRequest(Date.now(),e)}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const e=Fn(C.ACCESS_TOKEN),i=e?e.u:C.ACCESS_TOKEN;let a=i!==this.eventData.tokenU;J(this.anonId)||(this.anonId=P(),a=!0);const u=this.queue.shift();if(this.eventData.lastSuccess){const f=new Date(this.eventData.lastSuccess),g=new Date(u),x=(u-this.eventData.lastSuccess)/864e5;a=a||x>=1||x<-1||f.getDate()!==g.getDate()}else a=!0;a?this.postEvent(u,{sdkIdentifier:"mapbox-gl-js",sdkVersion:T,skuId:le,"enabled.telemetry":!1,userId:this.anonId},f=>{f||(this.eventData.lastSuccess=u,this.eventData.tokenU=i)},t):this.processRequests()}},H=Y.postTurnstileEvent.bind(Y),ce=new class extends pe{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(t,e,i,a){this.skuToken=e,this.errorCb=a,C.EVENTS_URL&&(i||C.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(qt)))}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{id:e,timestamp:i}=this.queue.shift();e&&this.success[e]||(this.anonId||this.fetchEventData(),J(this.anonId)||(this.anonId=P()),this.postEvent(i,{sdkIdentifier:"mapbox-gl-js",sdkVersion:T,skuId:le,skuToken:this.skuToken,userId:this.anonId},a=>{a?this.errorCb(a):e&&(this.success[e]=!0)},t))}},we=ce.postMapLoadEvent.bind(ce),Ue=new class extends pe{constructor(){super("gljs.performance")}postPerformanceEvent(t,e){C.EVENTS_URL&&(t||C.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:e},t)}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{timestamp:e,performanceData:i}=this.queue.shift(),a=function(u){const f=y.performance.getEntriesByType("resource"),g=y.performance.getEntriesByType("mark"),x=function(O){const B={};if(O){for(const F in O)if(F!=="other")for(const Z of O[F]){const ne=`${F}ResolveRangeMin`,Me=`${F}ResolveRangeMax`,ze=`${F}RequestCount`,ve=`${F}RequestCachedCount`;B[ne]=Math.min(B[ne]||1/0,Z.startTime),B[Me]=Math.max(B[Me]||-1/0,Z.responseEnd);const De=ke=>{B[ke]===void 0&&(B[ke]=0),++B[ke]};Z.transferSize!==void 0&&Z.transferSize===0&&De(ve),De(ze)}}return B}(function(O,B){const F={};if(O)for(const Z of O){const ne=B(Z);F[ne]===void 0&&(F[ne]=[]),F[ne].push(Z)}return F}(f,xt)),b=y.devicePixelRatio,I=y.navigator.connection||y.navigator.mozConnection||y.navigator.webkitConnection,N={counters:[],metadata:[],attributes:[]},j=(O,B,F)=>{F!=null&&O.push({name:B,value:F.toString()})};for(const O in x)j(N.counters,O,x[O]);if(u.interactionRange[0]!==1/0&&u.interactionRange[1]!==-1/0&&(j(N.counters,"interactionRangeMin",u.interactionRange[0]),j(N.counters,"interactionRangeMax",u.interactionRange[1])),g)for(const O of Object.keys(st)){const B=st[O],F=g.find(Z=>Z.name===B);F&&j(N.counters,B,F.startTime)}return j(N.counters,"visibilityHidden",u.visibilityHidden),j(N.attributes,"style",function(O){if(O)for(const B of O){const F=B.name.split("?")[0];if(Mi(F)){const Z=F.split("/").slice(-2);if(Z.length===2)return`mapbox://styles/${Z[0]}/${Z[1]}`}}}(f)),j(N.attributes,"terrainEnabled",u.terrainEnabled?"true":"false"),j(N.attributes,"fogEnabled",u.fogEnabled?"true":"false"),j(N.attributes,"projection",u.projection),j(N.attributes,"zoom",u.zoom),j(N.metadata,"devicePixelRatio",b),j(N.metadata,"connectionEffectiveType",I?I.effectiveType:void 0),j(N.metadata,"navigatorUserAgent",y.navigator.userAgent),j(N.metadata,"screenWidth",y.screen.width),j(N.metadata,"screenHeight",y.screen.height),j(N.metadata,"windowWidth",y.innerWidth),j(N.metadata,"windowHeight",y.innerHeight),j(N.metadata,"mapWidth",u.width/b),j(N.metadata,"mapHeight",u.height/b),j(N.metadata,"webglRenderer",u.renderer),j(N.metadata,"webglVendor",u.vendor),j(N.metadata,"sdkVersion",T),j(N.metadata,"sdkIdentifier","mapbox-gl-js"),N}(i);for(const u of a.metadata);for(const u of a.counters);for(const u of a.attributes);this.postEvent(e,a,()=>{},t)}},Je=Ue.postPerformanceEvent.bind(Ue),q=new class extends pe{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(t,e,i,a){if(!C.API_URL||!C.SESSION_PATH)return;const u=en(C.API_URL+C.SESSION_PATH);u.params.push(`sku=${e||""}`),u.params.push(`access_token=${a||C.ACCESS_TOKEN||""}`);const f={url:En(u),headers:{"Content-Type":"text/plain"}};this.pendingRequest=function(g,x){return ln(ee(g,{method:"GET"}),x)}(f,g=>{this.pendingRequest=null,i(g),this.saveEventData(),this.processRequests(a)})}getSessionAPI(t,e,i,a){this.skuToken=e,this.errorCb=a,C.SESSION_PATH&&C.API_URL&&(i||C.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(qt)))}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{id:e,timestamp:i}=this.queue.shift();e&&this.success[e]||this.getSession(i,this.skuToken,a=>{a?this.errorCb(a):e&&(this.success[e]=!0)},t)}},fe=q.getSessionAPI.bind(q),Se=new Set,st={create:"create",load:"load",fullLoad:"fullLoad"},Ct={mark(t){y.performance.mark(t)},measure(t,e,i){y.performance.measure(t,e,i)}};function xt(t){const e=t.name.split("?")[0];return gi(e)&&e.includes("mapbox-gl.js")?"javascript":gi(e)&&e.includes("mapbox-gl.css")?"css":function(i){return C.API_FONTS_REGEX.test(i)}(e)?"fontRange":Wi(e)?"sprite":Mi(e)?"style":function(i){return C.API_TILEJSON_REGEX.test(i)}(e)?"tilejson":"other"}const Bt=y.performance;function Rt(t){const e=t?t.url.toString():void 0;return Bt.getEntriesByName(e)}let Zt,Wt,ai,bi;const ei={now:()=>ai!==void 0?ai:y.performance.now(),setNow(t){ai=t},restoreNow(){ai=void 0},frame(t){const e=y.requestAnimationFrame(t);return{cancel:()=>y.cancelAnimationFrame(e)}},getImageData(t,e=0){const{width:i,height:a}=t;bi||(bi=y.document.createElement("canvas"));const u=bi.getContext("2d",{willReadFrequently:!0});if(!u)throw new Error("failed to create canvas 2d context");return(i>bi.width||a>bi.height)&&(bi.width=i,bi.height=a),u.clearRect(-e,-e,i+2*e,a+2*e),u.drawImage(t,0,0,i,a),u.getImageData(-e,-e,i+2*e,a+2*e)},resolveURL:t=>(Zt||(Zt=y.document.createElement("a")),Zt.href=t,Zt.href),get devicePixelRatio(){return y.devicePixelRatio},get prefersReducedMotion(){return!!y.matchMedia&&(Wt==null&&(Wt=y.matchMedia("(prefers-reduced-motion: reduce)")),Wt.matches)}};function Ki(t,e,i){i[t]&&i[t].indexOf(e)!==-1||(i[t]=i[t]||[],i[t].push(e))}function Fi(t,e,i){if(i&&i[t]){const a=i[t].indexOf(e);a!==-1&&i[t].splice(a,1)}}class Wr{constructor(e,i={}){ee(this,i),this.type=e}}class Co extends Wr{constructor(e,i={}){super("error",ee({error:e},i))}}class jr{on(e,i){return this._listeners=this._listeners||{},Ki(e,i,this._listeners),this}off(e,i){return Fi(e,i,this._listeners),Fi(e,i,this._oneTimeListeners),this}once(e,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},Ki(e,i,this._oneTimeListeners),this):new Promise(a=>this.once(e,a))}fire(e,i){typeof e=="string"&&(e=new Wr(e,i||{}));const a=e.type;if(this.listens(a)){e.target=this;const u=this._listeners&&this._listeners[a]?this._listeners[a].slice():[];for(const x of u)x.call(this,e);const f=this._oneTimeListeners&&this._oneTimeListeners[a]?this._oneTimeListeners[a].slice():[];for(const x of f)Fi(a,x,this._oneTimeListeners),x.call(this,e);const g=this._eventedParent;g&&(ee(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),g.fire(e))}else e instanceof Co&&console.error(e.error);return this}listens(e){return!!(this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e))}setEventedParent(e,i){return this._eventedParent=e,this._eventedParentData=i,this}}var bt=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"light":{"type":"light"},"terrain":{"type":"terrain"},"fog":{"type":"fog"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":{},"mapbox":{}},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":{}}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":{}}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":{}}},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"background":{},"sky":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],"layout_background":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":{},"round":{},"square":{}},"default":"butt","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":{},"round":{},"miter":{}},"default":"miter","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"requires":[{"line-join":"miter"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"requires":[{"line-join":"round"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":{},"line":{},"line-center":{}},"default":"point","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"units":"pixels","requires":[{"symbol-placement":"line"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":{},"viewport-y":{},"source":{}},"default":"auto","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"units":"factor of the original icon size","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":{},"width":{},"height":{},"both":{}},"default":"none","requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","requires":["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"ems","requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":{},"left":{},"center":{},"right":{}},"default":"center","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","units":"ems","default":0,"requires":["text-field"],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["text-field",{"!":"text-variable-anchor"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"units":"degrees","requires":["text-field",{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":{},"vertical":{}},"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":{},"uppercase":{},"lowercase":{}},"default":"none","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","units":"ems","length":2,"default":[0,0],"requires":["text-field",{"!":"text-radial-offset"}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"requires":["text-field","icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},"in":{},"!in":{},"all":{},"any":{},"none":{},"has":{},"!has":{},"within":{}}},"geometry_type":{"type":"enum","values":{"Point":{},"LineString":{},"Polygon":{}}},"function":{"expression":{"type":"expression"},"stops":{"type":"array","value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":{"identity":{},"exponential":{},"interval":{},"categorical":{}},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":{},"lab":{},"hcl":{}},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":{},"viewport":{}},"property-type":"data-constant","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":{},"equalEarth":{},"equirectangular":{},"lambertConformalConic":{},"mercator":{},"naturalEarth":{},"winkelTripel":{},"globe":{}},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["source"]}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-extrusion-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-extrusion-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"requires":["fill-extrusion-height"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["fill-extrusion-edge-radius"]}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"line-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["line-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"transition":false,"units":"line widths","requires":[{"!":"line-pattern"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","transition":false,"requires":[{"!":"line-pattern"},{"source":"geojson","has":{"lineMetrics":true}}],"expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"transition":false,"requires":[{"source":"geojson","has":{"lineMetrics":true}}],"property-type":"constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["circle-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"transition":false,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"transition":false,"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["icon-image","icon-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["text-field","text-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"units":"degrees","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":{},"nearest":{}},"default":"linear","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"transition":false,"units":"milliseconds","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"transition":false,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"background-pattern"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":{},"atmosphere":{}},"default":"atmosphere","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"requires":[{"sky-type":"atmosphere"}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","requires":[{"sky-type":"atmosphere"}],"default":10,"minimum":0,"maximum":100,"transition":false,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","requires":[{"sky-type":"gradient"}],"value":"number","default":[0,0],"length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","requires":[{"sky-type":"gradient"}],"default":90,"minimum":0,"maximum":180,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"transition":false,"requires":[{"sky-type":"gradient"}],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');function uo(t,...e){for(const i of e)for(const a in i)t[a]=i[a];return t}function Vn(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function ho(t){if(Array.isArray(t))return t.map(ho);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const i in t)e[i]=ho(t[i]);return e}return Vn(t)}class F0 extends Error{constructor(e,i){super(i),this.message=i,this.key=e}}var Tr=F0;class fl{constructor(e,i=[]){this.parent=e,this.bindings={};for(const[a,u]of i)this.bindings[a]=u}concat(e){return new fl(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}var _f=fl;const pr={kind:"null"},Yt={kind:"number"},Ri={kind:"string"},ji={kind:"boolean"},Qr={kind:"color"},Jo={kind:"object"},Ei={kind:"value"},aa={kind:"collator"},Ms={kind:"formatted"},So={kind:"resolvedImage"};function Jn(t,e){return{kind:"array",itemType:t,N:e}}function In(t){if(t.kind==="array"){const e=In(t.itemType);return typeof t.N=="number"?`array<${e}, ${t.N}>`:t.itemType.kind==="value"?"array":`array<${e}>`}return t.kind}const qr=[pr,Yt,Ri,ji,Qr,Ms,Jo,Jn(Ei),So];function la(t,e){if(e.kind==="error")return null;if(t.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!la(t.itemType,e.itemType))&&(typeof t.N!="number"||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(t.kind==="value"){for(const i of qr)if(!la(i,e))return null}}return`Expected ${In(t)} but found ${In(e)} instead.`}function ca(t,e){return e.some(i=>i.kind===t.kind)}function ua(t,e){return e.some(i=>i==="null"?t===null:i==="array"?Array.isArray(t):i==="object"?t&&!Array.isArray(t)&&typeof t=="object":i===typeof t)}var ha,$c={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function zo(t){return(t=Math.round(t))<0?0:t>255?255:t}function da(t){return zo(t[t.length-1]==="%"?parseFloat(t)/100*255:parseInt(t))}function pl(t){return(e=t[t.length-1]==="%"?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function Zc(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}try{ha={}.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in $c)return $c[i].slice();if(i[0]==="#")return i.length===4?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:i.length===7&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var a=i.indexOf("("),u=i.indexOf(")");if(a!==-1&&u+1===i.length){var f=i.substr(0,a),g=i.substr(a+1,u-(a+1)).split(","),x=1;switch(f){case"rgba":if(g.length!==4)return null;x=pl(g.pop());case"rgb":return g.length!==3?null:[da(g[0]),da(g[1]),da(g[2]),x];case"hsla":if(g.length!==4)return null;x=pl(g.pop());case"hsl":if(g.length!==3)return null;var b=(parseFloat(g[0])%360+360)%360/360,I=pl(g[1]),N=pl(g[2]),j=N<=.5?N*(I+1):N+I-N*I,O=2*N-j;return[zo(255*Zc(O,j,b+1/3)),zo(255*Zc(O,j,b)),zo(255*Zc(O,j,b-1/3)),x];default:return null}}return null}}catch{}class _r{constructor(e,i,a,u=1){this.r=e,this.g=i,this.b=a,this.a=u}static parse(e){if(!e)return;if(e instanceof _r)return e;if(typeof e!="string")return;const i=ha(e);return i?new _r(i[0]/255*i[3],i[1]/255*i[3],i[2]/255*i[3],i[3]):void 0}toString(){const[e,i,a,u]=this.toArray();return`rgba(${Math.round(e)},${Math.round(i)},${Math.round(a)},${u})`}toArray(){const{r:e,g:i,b:a,a:u}=this;return u===0?[0,0,0,0]:[255*e/u,255*i/u,255*a/u,u]}toArray01(){const{r:e,g:i,b:a,a:u}=this;return u===0?[0,0,0,0]:[e/u,i/u,a/u,u]}toArray01PremultipliedAlpha(){const{r:e,g:i,b:a,a:u}=this;return[e,i,a,u]}}_r.black=new _r(0,0,0,1),_r.white=new _r(1,1,1,1),_r.transparent=new _r(0,0,0,0),_r.red=new _r(1,0,0,1),_r.blue=new _r(0,0,1,1);var Cn=_r;class fa{constructor(e,i,a){this.sensitivity=e?i?"variant":"case":i?"accent":"base",this.locale=a,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,i){return this.collator.compare(e,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Gc{constructor(e,i,a,u,f){this.text=e.normalize?e.normalize():e,this.image=i,this.scale=a,this.fontStack=u,this.textColor=f}}class er{constructor(e){this.sections=e}static fromString(e){return new er([new Gc(e,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof er?e:er.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const i of this.sections){if(i.image){e.push(["image",i.image.name]);continue}e.push(i.text);const a={};i.fontStack&&(a["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(a["font-scale"]=i.scale),i.textColor&&(a["text-color"]=["rgba"].concat(i.textColor.toArray())),e.push(a)}return e}}class Or{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new Or({name:e,available:!1}):null}serialize(){return["image",this.name]}}function xf(t,e,i,a){return typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof i=="number"&&i>=0&&i<=255?a===void 0||typeof a=="number"&&a>=0&&a<=1?null:`Invalid rgba value [${[t,e,i,a].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof a=="number"?[t,e,i,a]:[t,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function gl(t){if(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||t instanceof Cn||t instanceof fa||t instanceof er||t instanceof Or)return!0;if(Array.isArray(t)){for(const e of t)if(!gl(e))return!1;return!0}if(typeof t=="object"){for(const e in t)if(!gl(t[e]))return!1;return!0}return!1}function Qn(t){if(t===null)return pr;if(typeof t=="string")return Ri;if(typeof t=="boolean")return ji;if(typeof t=="number")return Yt;if(t instanceof Cn)return Qr;if(t instanceof fa)return aa;if(t instanceof er)return Ms;if(t instanceof Or)return So;if(Array.isArray(t)){const e=t.length;let i;for(const a of t){const u=Qn(a);if(i){if(i===u)continue;i=Ei;break}i=u}return Jn(i||Ei,e)}return Jo}function pa(t){const e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof Cn||t instanceof er||t instanceof Or?t.toString():JSON.stringify(t)}class Hc{constructor(e,i){this.type=e,this.value=i}static parse(e,i){if(e.length!==2)return i.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!gl(e[1]))return i.error("invalid value");const a=e[1];let u=Qn(a);const f=i.expectedType;return u.kind!=="array"||u.N!==0||!f||f.kind!=="array"||typeof f.N=="number"&&f.N!==0||(u=f),new Hc(u,a)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Cn?["rgba"].concat(this.value.toArray()):this.value instanceof er?this.value.serialize():this.value}}var ga=Hc,Wn=class{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}};const bs={string:Ri,number:Yt,boolean:ji,object:Jo};class Wc{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");let a,u=1;const f=e[0];if(f==="array"){let x,b;if(e.length>2){const I=e[1];if(typeof I!="string"||!(I in bs)||I==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);x=bs[I],u++}else x=Ei;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return i.error('The length argument to "array" must be a positive integer literal',2);b=e[2],u++}a=Jn(x,b)}else a=bs[f];const g=[];for(;u<e.length;u++){const x=i.parse(e[u],u,Ei);if(!x)return null;g.push(x)}return new Wc(a,g)}evaluate(e){for(let i=0;i<this.args.length;i++){const a=this.args[i].evaluate(e);if(!la(this.type,Qn(a)))return a;if(i===this.args.length-1)throw new Wn(`Expected value to be of type ${In(this.type)}, but found ${In(Qn(a))} instead.`)}return null}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=this.type,i=[e.kind];if(e.kind==="array"){const a=e.itemType;if(a.kind==="string"||a.kind==="number"||a.kind==="boolean"){i.push(a.kind);const u=e.N;(typeof u=="number"||this.args.length>1)&&i.push(u)}}return i.concat(this.args.map(a=>a.serialize()))}}var fo=Wc;class ma{constructor(e){this.type=Ms,this.sections=e}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const a=e[1];if(!Array.isArray(a)&&typeof a=="object")return i.error("First argument must be an image or text section.");const u=[];let f=!1;for(let g=1;g<=e.length-1;++g){const x=e[g];if(f&&typeof x=="object"&&!Array.isArray(x)){f=!1;let b=null;if(x["font-scale"]&&(b=i.parse(x["font-scale"],1,Yt),!b))return null;let I=null;if(x["text-font"]&&(I=i.parse(x["text-font"],1,Jn(Ri)),!I))return null;let N=null;if(x["text-color"]&&(N=i.parse(x["text-color"],1,Qr),!N))return null;const j=u[u.length-1];j.scale=b,j.font=I,j.textColor=N}else{const b=i.parse(e[g],1,Ei);if(!b)return null;const I=b.type.kind;if(I!=="string"&&I!=="value"&&I!=="null"&&I!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");f=!0,u.push({content:b,scale:null,font:null,textColor:null})}}return new ma(u)}evaluate(e){return new er(this.sections.map(i=>{const a=i.content.evaluate(e);return Qn(a)===So?new Gc("",a,null,null,null):new Gc(pa(a),null,i.scale?i.scale.evaluate(e):null,i.font?i.font.evaluate(e).join(","):null,i.textColor?i.textColor.evaluate(e):null)}))}eachChild(e){for(const i of this.sections)e(i.content),i.scale&&e(i.scale),i.font&&e(i.font),i.textColor&&e(i.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const i of this.sections){e.push(i.content.serialize());const a={};i.scale&&(a["font-scale"]=i.scale.serialize()),i.font&&(a["text-font"]=i.font.serialize()),i.textColor&&(a["text-color"]=i.textColor.serialize()),e.push(a)}return e}}class ml{constructor(e){this.type=So,this.input=e}static parse(e,i){if(e.length!==2)return i.error("Expected two arguments.");const a=i.parse(e[1],1,Ri);return a?new ml(a):i.error("No image name provided.")}evaluate(e){const i=this.input.evaluate(e),a=Or.fromString(i);return a&&e.availableImages&&(a.available=e.availableImages.indexOf(i)>-1),a}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const V0={"to-boolean":ji,"to-color":Qr,"to-number":Yt,"to-string":Ri};class qc{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const a=e[0];if((a==="to-boolean"||a==="to-string")&&e.length!==2)return i.error("Expected one argument.");const u=V0[a],f=[];for(let g=1;g<e.length;g++){const x=i.parse(e[g],g,Ei);if(!x)return null;f.push(x)}return new qc(u,f)}evaluate(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){let i,a;for(const u of this.args){if(i=u.evaluate(e),a=null,i instanceof Cn)return i;if(typeof i=="string"){const f=e.parseColor(i);if(f)return f}else if(Array.isArray(i)&&(a=i.length<3||i.length>4?`Invalid rbga value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:xf(i[0],i[1],i[2],i[3]),!a))return new Cn(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new Wn(a||`Could not parse color from value '${typeof i=="string"?i:String(JSON.stringify(i))}'`)}if(this.type.kind==="number"){let i=null;for(const a of this.args){if(i=a.evaluate(e),i===null)return 0;const u=Number(i);if(!isNaN(u))return u}throw new Wn(`Could not convert ${JSON.stringify(i)} to number.`)}return this.type.kind==="formatted"?er.fromString(pa(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?Or.fromString(pa(this.args[0].evaluate(e))):pa(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if(this.type.kind==="formatted")return new ma([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new ml(this.args[0]).serialize();const e=[`to-${this.type.kind}`];return this.eachChild(i=>{e.push(i.serialize())}),e}}var es=qc;const yl=["Unknown","Point","LineString","Polygon"];var vf=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?yl[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const t=this.featureDistanceData.center,e=this.featureDistanceData.scale,{x:i,y:a}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(i*e-t[0])+this.featureDistanceData.bearing[1]*(a*e-t[1])}return 0}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Cn.parse(t)),e}};class ws{constructor(e,i,a,u){this.name=e,this.type=i,this._evaluate=a,this.args=u}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,i){const a=e[0],u=ws.definitions[a];if(!u)return i.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0);const f=Array.isArray(u)?u[0]:u.type,g=Array.isArray(u)?[[u[1],u[2]]]:u.overloads,x=g.filter(([I])=>!Array.isArray(I)||I.length===e.length-1);let b=null;for(const[I,N]of x){b=new is(i.registry,i.path,null,i.scope);const j=[];let O=!1;for(let B=1;B<e.length;B++){const F=e[B],Z=Array.isArray(I)?I[B-1]:I.type,ne=b.parse(F,1+j.length,Z);if(!ne){O=!0;break}j.push(ne)}if(!O)if(Array.isArray(I)&&I.length!==j.length)b.error(`Expected ${I.length} arguments, but found ${j.length} instead.`);else{for(let B=0;B<j.length;B++){const F=Array.isArray(I)?I[B]:I.type,Z=j[B];b.concat(B+1).checkSubtype(F,Z.type)}if(b.errors.length===0)return new ws(a,f,N,j)}}if(x.length===1)i.errors.push(...b.errors);else{const I=(x.length?x:g).map(([j])=>{return O=j,Array.isArray(O)?`(${O.map(In).join(", ")})`:`(${In(O.type)}...)`;var O}).join(" | "),N=[];for(let j=1;j<e.length;j++){const O=i.parse(e[j],1+N.length);if(!O)return null;N.push(In(O.type))}i.error(`Expected arguments of type ${I}, but found (${N.join(", ")}) instead.`)}return null}static register(e,i){ws.definitions=i;for(const a in i)e[a]=ws}}var jo=ws;class _l{constructor(e,i,a){this.type=aa,this.locale=a,this.caseSensitive=e,this.diacriticSensitive=i}static parse(e,i){if(e.length!==2)return i.error("Expected one argument.");const a=e[1];if(typeof a!="object"||Array.isArray(a))return i.error("Collator options argument must be an object.");const u=i.parse(a["case-sensitive"]!==void 0&&a["case-sensitive"],1,ji);if(!u)return null;const f=i.parse(a["diacritic-sensitive"]!==void 0&&a["diacritic-sensitive"],1,ji);if(!f)return null;let g=null;return a.locale&&(g=i.parse(a.locale,1,Ri),!g)?null:new _l(u,f,g)}evaluate(e){return new fa(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}serialize(){const e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]}}const tr=8192;function xl(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function ya(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Mf(t,e){const i=(180+t[0])/360,a=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,u=Math.pow(2,e.z);return[Math.round(i*u*tr),Math.round(a*u*tr)]}function bf(t,e,i){const a=t[0]-e[0],u=t[1]-e[1],f=t[0]-i[0],g=t[1]-i[1];return a*g-f*u==0&&a*f<=0&&u*g<=0}function vl(t,e){let i=!1;for(let g=0,x=e.length;g<x;g++){const b=e[g];for(let I=0,N=b.length;I<N-1;I++){if(bf(t,b[I],b[I+1]))return!1;(u=b[I])[1]>(a=t)[1]!=(f=b[I+1])[1]>a[1]&&a[0]<(f[0]-u[0])*(a[1]-u[1])/(f[1]-u[1])+u[0]&&(i=!i)}}var a,u,f;return i}function wf(t,e){for(let i=0;i<e.length;i++)if(vl(t,e[i]))return!0;return!1}function Ml(t,e,i,a){const u=a[0]-i[0],f=a[1]-i[1],g=(t[0]-i[0])*f-u*(t[1]-i[1]),x=(e[0]-i[0])*f-u*(e[1]-i[1]);return g>0&&x<0||g<0&&x>0}function _a(t,e,i){for(const I of i)for(let N=0;N<I.length-1;++N)if((x=[(g=I[N+1])[0]-(f=I[N])[0],g[1]-f[1]])[0]*(b=[(u=e)[0]-(a=t)[0],u[1]-a[1]])[1]-x[1]*b[0]!=0&&Ml(a,u,f,g)&&Ml(f,g,a,u))return!0;var a,u,f,g,x,b;return!1}function Xc(t,e){for(let i=0;i<t.length;++i)if(!vl(t[i],e))return!1;for(let i=0;i<t.length-1;++i)if(_a(t[i],t[i+1],e))return!1;return!0}function If(t,e){for(let i=0;i<e.length;i++)if(Xc(t,e[i]))return!0;return!1}function xa(t,e,i){const a=[];for(let u=0;u<t.length;u++){const f=[];for(let g=0;g<t[u].length;g++){const x=Mf(t[u][g],i);xl(e,x),f.push(x)}a.push(f)}return a}function Kc(t,e,i){const a=[];for(let u=0;u<t.length;u++){const f=xa(t[u],e,i);a.push(f)}return a}function ts(t,e,i,a){if(t[0]<i[0]||t[0]>i[2]){const u=.5*a;let f=t[0]-i[0]>u?-a:i[0]-t[0]>u?a:0;f===0&&(f=t[0]-i[2]>u?-a:i[2]-t[0]>u?a:0),t[0]+=f}xl(e,t)}function qi(t,e,i,a){const u=Math.pow(2,a.z)*tr,f=[a.x*tr,a.y*tr],g=[];if(!t)return g;for(const x of t)for(const b of x){const I=[b.x+f[0],b.y+f[1]];ts(I,e,i,u),g.push(I)}return g}function Df(t,e,i,a){const u=Math.pow(2,a.z)*tr,f=[a.x*tr,a.y*tr],g=[];if(!t)return g;for(const b of t){const I=[];for(const N of b){const j=[N.x+f[0],N.y+f[1]];xl(e,j),I.push(j)}g.push(I)}if(e[2]-e[0]<=u/2){(x=e)[0]=x[1]=1/0,x[2]=x[3]=-1/0;for(const b of g)for(const I of b)ts(I,e,i,u)}var x;return g}class va{constructor(e,i){this.type=ji,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(gl(e[1])){const a=e[1];if(a.type==="FeatureCollection")for(let u=0;u<a.features.length;++u){const f=a.features[u].geometry.type;if(f==="Polygon"||f==="MultiPolygon")return new va(a,a.features[u].geometry)}else if(a.type==="Feature"){const u=a.geometry.type;if(u==="Polygon"||u==="MultiPolygon")return new va(a,a.geometry)}else if(a.type==="Polygon"||a.type==="MultiPolygon")return new va(a,a)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return function(i,a){const u=[1/0,1/0,-1/0,-1/0],f=[1/0,1/0,-1/0,-1/0],g=i.canonicalID();if(!g)return!1;if(a.type==="Polygon"){const x=xa(a.coordinates,f,g),b=qi(i.geometry(),u,f,g);if(!ya(u,f))return!1;for(const I of b)if(!vl(I,x))return!1}if(a.type==="MultiPolygon"){const x=Kc(a.coordinates,f,g),b=qi(i.geometry(),u,f,g);if(!ya(u,f))return!1;for(const I of b)if(!wf(I,x))return!1}return!0}(e,this.geometries);if(e.geometryType()==="LineString")return function(i,a){const u=[1/0,1/0,-1/0,-1/0],f=[1/0,1/0,-1/0,-1/0],g=i.canonicalID();if(!g)return!1;if(a.type==="Polygon"){const x=xa(a.coordinates,f,g),b=Df(i.geometry(),u,f,g);if(!ya(u,f))return!1;for(const I of b)if(!Xc(I,x))return!1}if(a.type==="MultiPolygon"){const x=Kc(a.coordinates,f,g),b=Df(i.geometry(),u,f,g);if(!ya(u,f))return!1;for(const I of b)if(!If(I,x))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}var Jc=va;function Is(t){if(t instanceof jo&&(t.name==="get"&&t.args.length===1||t.name==="feature-state"||t.name==="has"&&t.args.length===1||t.name==="properties"||t.name==="geometry-type"||t.name==="id"||/^filter-/.test(t.name))||t instanceof Jc)return!1;let e=!0;return t.eachChild(i=>{e&&!Is(i)&&(e=!1)}),e}function bl(t){if(t instanceof jo&&t.name==="feature-state")return!1;let e=!0;return t.eachChild(i=>{e&&!bl(i)&&(e=!1)}),e}function Ma(t,e){if(t instanceof jo&&e.indexOf(t.name)>=0)return!1;let i=!0;return t.eachChild(a=>{i&&!Ma(a,e)&&(i=!1)}),i}class wl{constructor(e,i){this.type=i.type,this.name=e,this.boundExpression=i}static parse(e,i){if(e.length!==2||typeof e[1]!="string")return i.error("'var' expression requires exactly one string literal argument.");const a=e[1];return i.scope.has(a)?new wl(a,i.scope.get(a)):i.error(`Unknown variable "${a}". Make sure "${a}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var eu=wl;class Il{constructor(e,i=[],a,u=new _f,f=[]){this.registry=e,this.path=i,this.key=i.map(g=>`[${g}]`).join(""),this.scope=u,this.errors=f,this.expectedType=a}parse(e,i,a,u,f={}){return i?this.concat(i,a,u)._parse(e,f):this._parse(e,f)}_parse(e,i){function a(u,f,g){return g==="assert"?new fo(f,[u]):g==="coerce"?new es(f,[u]):u}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const u=e[0];if(typeof u!="string")return this.error(`Expression name must be a string, but found ${typeof u} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const f=this.registry[u];if(f){let g=f.parse(e,this);if(!g)return null;if(this.expectedType){const x=this.expectedType,b=g.type;if(x.kind!=="string"&&x.kind!=="number"&&x.kind!=="boolean"&&x.kind!=="object"&&x.kind!=="array"||b.kind!=="value")if(x.kind!=="color"&&x.kind!=="formatted"&&x.kind!=="resolvedImage"||b.kind!=="value"&&b.kind!=="string"){if(this.checkSubtype(x,b))return null}else g=a(g,x,i.typeAnnotation||"coerce");else g=a(g,x,i.typeAnnotation||"assert")}if(!(g instanceof ga)&&g.type.kind!=="resolvedImage"&&Ds(g)){const x=new vf;try{g=new ga(g.type,g.evaluate(x))}catch(b){return this.error(b.message),null}}return g}return this.error(`Unknown expression "${u}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,i,a){const u=typeof e=="number"?this.path.concat(e):this.path,f=a?this.scope.concat(a):this.scope;return new Il(this.registry,u,i||null,f,this.errors)}error(e,...i){const a=`${this.key}${i.map(u=>`[${u}]`).join("")}`;this.errors.push(new Tr(a,e))}checkSubtype(e,i){const a=la(e,i);return a&&this.error(a),a}}var is=Il;function Ds(t){if(t instanceof eu)return Ds(t.boundExpression);if(t instanceof jo&&t.name==="error"||t instanceof _l||t instanceof Jc)return!1;const e=t instanceof es||t instanceof fo;let i=!0;return t.eachChild(a=>{i=e?i&&Ds(a):i&&a instanceof ga}),!!i&&Is(t)&&Ma(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function Dl(t,e){const i=t.length-1;let a,u,f=0,g=i,x=0;for(;f<=g;)if(x=Math.floor((f+g)/2),a=t[x],u=t[x+1],a<=e){if(x===i||e<u)return x;f=x+1}else{if(!(a>e))throw new Wn("Input is not a number.");g=x-1}return 0}class ba{constructor(e,i,a){this.type=e,this.input=i,this.labels=[],this.outputs=[];for(const[u,f]of a)this.labels.push(u),this.outputs.push(f)}static parse(e,i){if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");const a=i.parse(e[1],1,Yt);if(!a)return null;const u=[];let f=null;i.expectedType&&i.expectedType.kind!=="value"&&(f=i.expectedType);for(let g=1;g<e.length;g+=2){const x=g===1?-1/0:e[g],b=e[g+1],I=g,N=g+1;if(typeof x!="number")return i.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',I);if(u.length&&u[u.length-1][0]>=x)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',I);const j=i.parse(b,N,f);if(!j)return null;f=f||j.type,u.push([x,j])}return new ba(f,a,u)}evaluate(e){const i=this.labels,a=this.outputs;if(i.length===1)return a[0].evaluate(e);const u=this.input.evaluate(e);if(u<=i[0])return a[0].evaluate(e);const f=i.length;return u>=i[f-1]?a[f-1].evaluate(e):a[Dl(i,u)].evaluate(e)}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let i=0;i<this.labels.length;i++)i>0&&e.push(this.labels[i]),e.push(this.outputs[i].serialize());return e}}var Tl=ba;function Yi(t,e,i){return t*(1-i)+e*i}var Al=Object.freeze({__proto__:null,number:Yi,color:function(t,e,i){return new Cn(Yi(t.r,e.r,i),Yi(t.g,e.g,i),Yi(t.b,e.b,i),Yi(t.a,e.a,i))},array:function(t,e,i){return t.map((a,u)=>Yi(a,e[u],i))}});const tu=.95047,Tf=1.08883,iu=4/29,Nl=6/29,Af=3*Nl*Nl,Nf=Math.PI/180,Q0=180/Math.PI;function El(t){return t>.008856451679035631?Math.pow(t,1/3):t/Af+iu}function Cl(t){return t>Nl?t*t*t:Af*(t-iu)}function nu(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ru(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ef(t){const e=ru(t.r),i=ru(t.g),a=ru(t.b),u=El((.4124564*e+.3575761*i+.1804375*a)/tu),f=El((.2126729*e+.7151522*i+.072175*a)/1);return{l:116*f-16,a:500*(u-f),b:200*(f-El((.0193339*e+.119192*i+.9503041*a)/Tf)),alpha:t.a}}function Cf(t){let e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,a=isNaN(t.b)?e:e-t.b/200;return e=1*Cl(e),i=tu*Cl(i),a=Tf*Cl(a),new Cn(nu(3.2404542*i-1.5371385*e-.4985314*a),nu(-.969266*i+1.8760108*e+.041556*a),nu(.0556434*i-.2040259*e+1.0572252*a),t.alpha)}function Y0(t,e,i){const a=e-t;return t+i*(a>180||a<-180?a-360*Math.round(a/360):a)}const wa={forward:Ef,reverse:Cf,interpolate:function(t,e,i){return{l:Yi(t.l,e.l,i),a:Yi(t.a,e.a,i),b:Yi(t.b,e.b,i),alpha:Yi(t.alpha,e.alpha,i)}}},Ts={forward:function(t){const{l:e,a:i,b:a}=Ef(t),u=Math.atan2(a,i)*Q0;return{h:u<0?u+360:u,c:Math.sqrt(i*i+a*a),l:e,alpha:t.a}},reverse:function(t){const e=t.h*Nf,i=t.c;return Cf({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},interpolate:function(t,e,i){return{h:Y0(t.h,e.h,i),c:Yi(t.c,e.c,i),l:Yi(t.l,e.l,i),alpha:Yi(t.alpha,e.alpha,i)}}};var Sf=Object.freeze({__proto__:null,lab:wa,hcl:Ts});class Sl{constructor(e,i,a,u,f){this.type=e,this.operator=i,this.interpolation=a,this.input=u,this.labels=[],this.outputs=[];for(const[g,x]of f)this.labels.push(g),this.outputs.push(x)}static interpolationFactor(e,i,a,u){let f=0;if(e.name==="exponential")f=ou(i,e.base,a,u);else if(e.name==="linear")f=ou(i,1,a,u);else if(e.name==="cubic-bezier"){const g=e.controlPoints;f=new he(g[0],g[1],g[2],g[3]).solve(ou(i,1,a,u))}return f}static parse(e,i){let[a,u,f,...g]=e;if(!Array.isArray(u)||u.length===0)return i.error("Expected an interpolation type expression.",1);if(u[0]==="linear")u={name:"linear"};else if(u[0]==="exponential"){const I=u[1];if(typeof I!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);u={name:"exponential",base:I}}else{if(u[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(u[0])}`,1,0);{const I=u.slice(1);if(I.length!==4||I.some(N=>typeof N!="number"||N<0||N>1))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);u={name:"cubic-bezier",controlPoints:I}}}if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(f=i.parse(f,2,Yt),!f)return null;const x=[];let b=null;a==="interpolate-hcl"||a==="interpolate-lab"?b=Qr:i.expectedType&&i.expectedType.kind!=="value"&&(b=i.expectedType);for(let I=0;I<g.length;I+=2){const N=g[I],j=g[I+1],O=I+3,B=I+4;if(typeof N!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',O);if(x.length&&x[x.length-1][0]>=N)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',O);const F=i.parse(j,B,b);if(!F)return null;b=b||F.type,x.push([N,F])}return b.kind==="number"||b.kind==="color"||b.kind==="array"&&b.itemType.kind==="number"&&typeof b.N=="number"?new Sl(b,a,u,f,x):i.error(`Type ${In(b)} is not interpolatable.`)}evaluate(e){const i=this.labels,a=this.outputs;if(i.length===1)return a[0].evaluate(e);const u=this.input.evaluate(e);if(u<=i[0])return a[0].evaluate(e);const f=i.length;if(u>=i[f-1])return a[f-1].evaluate(e);const g=Dl(i,u),x=Sl.interpolationFactor(this.interpolation,u,i[g],i[g+1]),b=a[g].evaluate(e),I=a[g+1].evaluate(e);return this.operator==="interpolate"?Al[this.type.kind.toLowerCase()](b,I,x):this.operator==="interpolate-hcl"?Ts.reverse(Ts.interpolate(Ts.forward(b),Ts.forward(I),x)):wa.reverse(wa.interpolate(wa.forward(b),wa.forward(I),x))}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;e=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const i=[this.operator,e,this.input.serialize()];for(let a=0;a<this.labels.length;a++)i.push(this.labels[a],this.outputs[a].serialize());return i}}function ou(t,e,i,a){const u=a-i,f=t-i;return u===0?0:e===1?f/u:(Math.pow(e,f)-1)/(Math.pow(e,u)-1)}var Xr=Sl;class zl{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expectected at least one argument.");let a=null;const u=i.expectedType;u&&u.kind!=="value"&&(a=u);const f=[];for(const x of e.slice(1)){const b=i.parse(x,1+f.length,a,void 0,{typeAnnotation:"omit"});if(!b)return null;a=a||b.type,f.push(b)}const g=u&&f.some(x=>la(u,x.type));return new zl(g?Ei:a,f)}evaluate(e){let i,a=null,u=0;for(const f of this.args){if(u++,a=f.evaluate(e),a&&a instanceof Or&&!a.available&&(i||(i=a),a=null,u===this.args.length))return i;if(a!==null)break}return a}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(i=>{e.push(i.serialize())}),e}}var su=zl;class jl{constructor(e,i){this.type=i.type,this.bindings=[].concat(e),this.result=i}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const i of this.bindings)e(i[1]);e(this.result)}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const a=[];for(let f=1;f<e.length-1;f+=2){const g=e[f];if(typeof g!="string")return i.error(`Expected string, but found ${typeof g} instead.`,f);if(/[^a-zA-Z0-9_]/.test(g))return i.error("Variable names must contain only alphanumeric characters or '_'.",f);const x=i.parse(e[f+1],f+1);if(!x)return null;a.push([g,x])}const u=i.parse(e[e.length-1],e.length-1,i.expectedType,a);return u?new jl(a,u):null}outputDefined(){return this.result.outputDefined()}serialize(){const e=["let"];for(const[i,a]of this.bindings)e.push(i,a.serialize());return e.push(this.result.serialize()),e}}var zf=jl;class au{constructor(e,i,a){this.type=e,this.index=i,this.input=a}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const a=i.parse(e[1],1,Yt),u=i.parse(e[2],2,Jn(i.expectedType||Ei));return a&&u?new au(u.type.itemType,a,u):null}evaluate(e){const i=this.index.evaluate(e),a=this.input.evaluate(e);if(i<0)throw new Wn(`Array index out of bounds: ${i} < 0.`);if(i>=a.length)throw new Wn(`Array index out of bounds: ${i} > ${a.length-1}.`);if(i!==Math.floor(i))throw new Wn(`Array index must be an integer, but found ${i} instead.`);return a[i]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var jf=au;class Ol{constructor(e,i){this.type=ji,this.needle=e,this.haystack=i}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const a=i.parse(e[1],1,Ei),u=i.parse(e[2],2,Ei);return a&&u?ca(a.type,[ji,Ri,Yt,pr,Ei])?new Ol(a,u):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${In(a.type)} instead`):null}evaluate(e){const i=this.needle.evaluate(e),a=this.haystack.evaluate(e);if(a==null)return!1;if(!ua(i,["boolean","string","number","null"]))throw new Wn(`Expected first argument to be of type boolean, string, number or null, but found ${In(Qn(i))} instead.`);if(!ua(a,["string","array"]))throw new Wn(`Expected second argument to be of type array or string, but found ${In(Qn(a))} instead.`);return a.indexOf(i)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var Of=Ol;class Ll{constructor(e,i,a){this.type=Yt,this.needle=e,this.haystack=i,this.fromIndex=a}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const a=i.parse(e[1],1,Ei),u=i.parse(e[2],2,Ei);if(!a||!u)return null;if(!ca(a.type,[ji,Ri,Yt,pr,Ei]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${In(a.type)} instead`);if(e.length===4){const f=i.parse(e[3],3,Yt);return f?new Ll(a,u,f):null}return new Ll(a,u)}evaluate(e){const i=this.needle.evaluate(e),a=this.haystack.evaluate(e);if(!ua(i,["boolean","string","number","null"]))throw new Wn(`Expected first argument to be of type boolean, string, number or null, but found ${In(Qn(i))} instead.`);if(!ua(a,["string","array"]))throw new Wn(`Expected second argument to be of type array or string, but found ${In(Qn(a))} instead.`);if(this.fromIndex){const u=this.fromIndex.evaluate(e);return a.indexOf(i,u)}return a.indexOf(i)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var $0=Ll;class lu{constructor(e,i,a,u,f,g){this.inputType=e,this.type=i,this.input=a,this.cases=u,this.outputs=f,this.otherwise=g}static parse(e,i){if(e.length<5)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return i.error("Expected an even number of arguments.");let a,u;i.expectedType&&i.expectedType.kind!=="value"&&(u=i.expectedType);const f={},g=[];for(let I=2;I<e.length-1;I+=2){let N=e[I];const j=e[I+1];Array.isArray(N)||(N=[N]);const O=i.concat(I);if(N.length===0)return O.error("Expected at least one branch label.");for(const F of N){if(typeof F!="number"&&typeof F!="string")return O.error("Branch labels must be numbers or strings.");if(typeof F=="number"&&Math.abs(F)>Number.MAX_SAFE_INTEGER)return O.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof F=="number"&&Math.floor(F)!==F)return O.error("Numeric branch labels must be integer values.");if(a){if(O.checkSubtype(a,Qn(F)))return null}else a=Qn(F);if(f[String(F)]!==void 0)return O.error("Branch labels must be unique.");f[String(F)]=g.length}const B=i.parse(j,I,u);if(!B)return null;u=u||B.type,g.push(B)}const x=i.parse(e[1],1,Ei);if(!x)return null;const b=i.parse(e[e.length-1],e.length-1,u);return b?x.type.kind!=="value"&&i.concat(1).checkSubtype(a,x.type)?null:new lu(a,u,x,f,g,b):null}evaluate(e){const i=this.input.evaluate(e);return(Qn(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],i=Object.keys(this.cases).sort(),a=[],u={};for(const g of i){const x=u[this.cases[g]];x===void 0?(u[this.cases[g]]=a.length,a.push([this.cases[g],[g]])):a[x][1].push(g)}const f=g=>this.inputType.kind==="number"?Number(g):g;for(const[g,x]of a)e.push(x.length===1?f(x[0]):x.map(f)),e.push(this.outputs[g].serialize());return e.push(this.otherwise.serialize()),e}}var Z0=lu;class As{constructor(e,i,a){this.type=e,this.branches=i,this.otherwise=a}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return i.error("Expected an odd number of arguments.");let a;i.expectedType&&i.expectedType.kind!=="value"&&(a=i.expectedType);const u=[];for(let g=1;g<e.length-1;g+=2){const x=i.parse(e[g],g,ji);if(!x)return null;const b=i.parse(e[g+1],g+1,a);if(!b)return null;u.push([x,b]),a=a||b.type}const f=i.parse(e[e.length-1],e.length-1,a);return f?new As(a,u,f):null}evaluate(e){for(const[i,a]of this.branches)if(i.evaluate(e))return a.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[i,a]of this.branches)e(i),e(a);e(this.otherwise)}outputDefined(){return this.branches.every(([e,i])=>i.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(i=>{e.push(i.serialize())}),e}}var Lf=As;class Ia{constructor(e,i,a,u){this.type=e,this.input=i,this.beginIndex=a,this.endIndex=u}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const a=i.parse(e[1],1,Ei),u=i.parse(e[2],2,Yt);if(!a||!u)return null;if(!ca(a.type,[Jn(Ei),Ri,Ei]))return i.error(`Expected first argument to be of type array or string, but found ${In(a.type)} instead`);if(e.length===4){const f=i.parse(e[3],3,Yt);return f?new Ia(a.type,a,u,f):null}return new Ia(a.type,a,u)}evaluate(e){const i=this.input.evaluate(e),a=this.beginIndex.evaluate(e);if(!ua(i,["string","array"]))throw new Wn(`Expected first argument to be of type array or string, but found ${In(Qn(i))} instead.`);if(this.endIndex){const u=this.endIndex.evaluate(e);return i.slice(a,u)}return i.slice(a)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var G0=Ia;function kf(t,e){return t==="=="||t==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function Pf(t,e,i,a){return a.compare(e,i)===0}function ns(t,e,i){const a=t!=="=="&&t!=="!=";return class e3{constructor(f,g,x){this.type=ji,this.lhs=f,this.rhs=g,this.collator=x,this.hasUntypedArgument=f.type.kind==="value"||g.type.kind==="value"}static parse(f,g){if(f.length!==3&&f.length!==4)return g.error("Expected two or three arguments.");const x=f[0];let b=g.parse(f[1],1,Ei);if(!b)return null;if(!kf(x,b.type))return g.concat(1).error(`"${x}" comparisons are not supported for type '${In(b.type)}'.`);let I=g.parse(f[2],2,Ei);if(!I)return null;if(!kf(x,I.type))return g.concat(2).error(`"${x}" comparisons are not supported for type '${In(I.type)}'.`);if(b.type.kind!==I.type.kind&&b.type.kind!=="value"&&I.type.kind!=="value")return g.error(`Cannot compare types '${In(b.type)}' and '${In(I.type)}'.`);a&&(b.type.kind==="value"&&I.type.kind!=="value"?b=new fo(I.type,[b]):b.type.kind!=="value"&&I.type.kind==="value"&&(I=new fo(b.type,[I])));let N=null;if(f.length===4){if(b.type.kind!=="string"&&I.type.kind!=="string"&&b.type.kind!=="value"&&I.type.kind!=="value")return g.error("Cannot use collator to compare non-string types.");if(N=g.parse(f[3],3,aa),!N)return null}return new e3(b,I,N)}evaluate(f){const g=this.lhs.evaluate(f),x=this.rhs.evaluate(f);if(a&&this.hasUntypedArgument){const b=Qn(g),I=Qn(x);if(b.kind!==I.kind||b.kind!=="string"&&b.kind!=="number")throw new Wn(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${b.kind}, ${I.kind}) instead.`)}if(this.collator&&!a&&this.hasUntypedArgument){const b=Qn(g),I=Qn(x);if(b.kind!=="string"||I.kind!=="string")return e(f,g,x)}return this.collator?i(f,g,x,this.collator.evaluate(f)):e(f,g,x)}eachChild(f){f(this.lhs),f(this.rhs),this.collator&&f(this.collator)}outputDefined(){return!0}serialize(){const f=[t];return this.eachChild(g=>{f.push(g.serialize())}),f}}}const Rf=ns("==",function(t,e,i){return e===i},Pf),Uf=ns("!=",function(t,e,i){return e!==i},function(t,e,i,a){return!Pf(0,e,i,a)}),cu=ns("<",function(t,e,i){return e<i},function(t,e,i,a){return a.compare(e,i)<0}),H0=ns(">",function(t,e,i){return e>i},function(t,e,i,a){return a.compare(e,i)>0}),W0=ns("<=",function(t,e,i){return e<=i},function(t,e,i,a){return a.compare(e,i)<=0}),q0=ns(">=",function(t,e,i){return e>=i},function(t,e,i,a){return a.compare(e,i)>=0});class uu{constructor(e,i,a,u,f,g){this.type=Ri,this.number=e,this.locale=i,this.currency=a,this.unit=u,this.minFractionDigits=f,this.maxFractionDigits=g}static parse(e,i){if(e.length!==3)return i.error("Expected two arguments.");const a=i.parse(e[1],1,Yt);if(!a)return null;const u=e[2];if(typeof u!="object"||Array.isArray(u))return i.error("NumberFormat options argument must be an object.");let f=null;if(u.locale&&(f=i.parse(u.locale,1,Ri),!f))return null;let g=null;if(u.currency&&(g=i.parse(u.currency,1,Ri),!g))return null;let x=null;if(u.unit&&(x=i.parse(u.unit,1,Ri),!x))return null;let b=null;if(u["min-fraction-digits"]&&(b=i.parse(u["min-fraction-digits"],1,Yt),!b))return null;let I=null;return u["max-fraction-digits"]&&(I=i.parse(u["max-fraction-digits"],1,Yt),!I)?null:new uu(a,f,g,x,b,I)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class hu{constructor(e){this.type=Yt,this.input=e}static parse(e,i){if(e.length!==2)return i.error(`Expected 1 argument, but found ${e.length-1} instead.`);const a=i.parse(e[1],1);return a?a.type.kind!=="array"&&a.type.kind!=="string"&&a.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${In(a.type)} instead.`):new hu(a):null}evaluate(e){const i=this.input.evaluate(e);if(typeof i=="string"||Array.isArray(i))return i.length;throw new Wn(`Expected value to be of type string or array, but found ${In(Qn(i))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(i=>{e.push(i.serialize())}),e}}const Bf={"==":Rf,"!=":Uf,">":H0,"<":cu,">=":q0,"<=":W0,array:fo,at:jf,boolean:fo,case:Lf,coalesce:su,collator:_l,format:ma,image:ml,in:Of,"index-of":$0,interpolate:Xr,"interpolate-hcl":Xr,"interpolate-lab":Xr,length:hu,let:zf,literal:ga,match:Z0,number:fo,"number-format":uu,object:fo,slice:G0,step:Tl,string:fo,"to-boolean":es,"to-color":es,"to-number":es,"to-string":es,var:eu,within:Jc};function Ff(t,[e,i,a,u]){e=e.evaluate(t),i=i.evaluate(t),a=a.evaluate(t);const f=u?u.evaluate(t):1,g=xf(e,i,a,f);if(g)throw new Wn(g);return new Cn(e/255*f,i/255*f,a/255*f,f)}function du(t,e){return t in e}function kl(t,e){const i=e[t];return i===void 0?null:i}function Kr(t){return{type:t}}jo.register(Bf,{error:[{kind:"error"},[Ri],(t,[e])=>{throw new Wn(e.evaluate(t))}],typeof:[Ri,[Ei],(t,[e])=>In(Qn(e.evaluate(t)))],"to-rgba":[Jn(Yt,4),[Qr],(t,[e])=>e.evaluate(t).toArray()],rgb:[Qr,[Yt,Yt,Yt],Ff],rgba:[Qr,[Yt,Yt,Yt,Yt],Ff],has:{type:ji,overloads:[[[Ri],(t,[e])=>du(e.evaluate(t),t.properties())],[[Ri,Jo],(t,[e,i])=>du(e.evaluate(t),i.evaluate(t))]]},get:{type:Ei,overloads:[[[Ri],(t,[e])=>kl(e.evaluate(t),t.properties())],[[Ri,Jo],(t,[e,i])=>kl(e.evaluate(t),i.evaluate(t))]]},"feature-state":[Ei,[Ri],(t,[e])=>kl(e.evaluate(t),t.featureState||{})],properties:[Jo,[],t=>t.properties()],"geometry-type":[Ri,[],t=>t.geometryType()],id:[Ei,[],t=>t.id()],zoom:[Yt,[],t=>t.globals.zoom],pitch:[Yt,[],t=>t.globals.pitch||0],"distance-from-center":[Yt,[],t=>t.distanceFromCenter()],"heatmap-density":[Yt,[],t=>t.globals.heatmapDensity||0],"line-progress":[Yt,[],t=>t.globals.lineProgress||0],"sky-radial-progress":[Yt,[],t=>t.globals.skyRadialProgress||0],accumulated:[Ei,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[Yt,Kr(Yt),(t,e)=>{let i=0;for(const a of e)i+=a.evaluate(t);return i}],"*":[Yt,Kr(Yt),(t,e)=>{let i=1;for(const a of e)i*=a.evaluate(t);return i}],"-":{type:Yt,overloads:[[[Yt,Yt],(t,[e,i])=>e.evaluate(t)-i.evaluate(t)],[[Yt],(t,[e])=>-e.evaluate(t)]]},"/":[Yt,[Yt,Yt],(t,[e,i])=>e.evaluate(t)/i.evaluate(t)],"%":[Yt,[Yt,Yt],(t,[e,i])=>e.evaluate(t)%i.evaluate(t)],ln2:[Yt,[],()=>Math.LN2],pi:[Yt,[],()=>Math.PI],e:[Yt,[],()=>Math.E],"^":[Yt,[Yt,Yt],(t,[e,i])=>Math.pow(e.evaluate(t),i.evaluate(t))],sqrt:[Yt,[Yt],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[Yt,[Yt],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[Yt,[Yt],(t,[e])=>Math.log(e.evaluate(t))],log2:[Yt,[Yt],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[Yt,[Yt],(t,[e])=>Math.sin(e.evaluate(t))],cos:[Yt,[Yt],(t,[e])=>Math.cos(e.evaluate(t))],tan:[Yt,[Yt],(t,[e])=>Math.tan(e.evaluate(t))],asin:[Yt,[Yt],(t,[e])=>Math.asin(e.evaluate(t))],acos:[Yt,[Yt],(t,[e])=>Math.acos(e.evaluate(t))],atan:[Yt,[Yt],(t,[e])=>Math.atan(e.evaluate(t))],min:[Yt,Kr(Yt),(t,e)=>Math.min(...e.map(i=>i.evaluate(t)))],max:[Yt,Kr(Yt),(t,e)=>Math.max(...e.map(i=>i.evaluate(t)))],abs:[Yt,[Yt],(t,[e])=>Math.abs(e.evaluate(t))],round:[Yt,[Yt],(t,[e])=>{const i=e.evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[Yt,[Yt],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[Yt,[Yt],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[ji,[Ri,Ei],(t,[e,i])=>t.properties()[e.value]===i.value],"filter-id-==":[ji,[Ei],(t,[e])=>t.id()===e.value],"filter-type-==":[ji,[Ri],(t,[e])=>t.geometryType()===e.value],"filter-<":[ji,[Ri,Ei],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a<u}],"filter-id-<":[ji,[Ei],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i<a}],"filter->":[ji,[Ri,Ei],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a>u}],"filter-id->":[ji,[Ei],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i>a}],"filter-<=":[ji,[Ri,Ei],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a<=u}],"filter-id-<=":[ji,[Ei],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i<=a}],"filter->=":[ji,[Ri,Ei],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a>=u}],"filter-id->=":[ji,[Ei],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i>=a}],"filter-has":[ji,[Ei],(t,[e])=>e.value in t.properties()],"filter-has-id":[ji,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[ji,[Jn(Ri)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[ji,[Jn(Ei)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[ji,[Ri,Jn(Ei)],(t,[e,i])=>i.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[ji,[Ri,Jn(Ei)],(t,[e,i])=>function(a,u,f,g){for(;f<=g;){const x=f+g>>1;if(u[x]===a)return!0;u[x]>a?g=x-1:f=x+1}return!1}(t.properties()[e.value],i.value,0,i.value.length-1)],all:{type:ji,overloads:[[[ji,ji],(t,[e,i])=>e.evaluate(t)&&i.evaluate(t)],[Kr(ji),(t,e)=>{for(const i of e)if(!i.evaluate(t))return!1;return!0}]]},any:{type:ji,overloads:[[[ji,ji],(t,[e,i])=>e.evaluate(t)||i.evaluate(t)],[Kr(ji),(t,e)=>{for(const i of e)if(i.evaluate(t))return!0;return!1}]]},"!":[ji,[ji],(t,[e])=>!e.evaluate(t)],"is-supported-script":[ji,[Ri],(t,[e])=>{const i=t.globals&&t.globals.isSupportedScript;return!i||i(e.evaluate(t))}],upcase:[Ri,[Ri],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Ri,[Ri],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Ri,Kr(Ei),(t,e)=>e.map(i=>pa(i.evaluate(t))).join("")],"resolved-locale":[Ri,[aa],(t,[e])=>e.evaluate(t).resolvedLocale()]});var Da=Bf;function Vf(t){return{result:"success",value:t}}function Ar(t){return{result:"error",value:t}}function rs(t){return t["property-type"]==="data-driven"}function os(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function fu(t){return!!t.expression&&t.expression.interpolated}function Xi(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":t===null?"null":typeof t}function Ta(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function X0(t){return t}function Pl(t,e){const i=e.type==="color",a=t.stops&&typeof t.stops[0][0]=="object",u=a||!(a||t.property!==void 0),f=t.type||(fu(e)?"exponential":"interval");if(i&&((t=uo({},t)).stops&&(t.stops=t.stops.map(I=>[I[0],Cn.parse(I[1])])),t.default=Cn.parse(t.default?t.default:e.default)),t.colorSpace&&t.colorSpace!=="rgb"&&!Sf[t.colorSpace])throw new Error(`Unknown color space: ${t.colorSpace}`);let g,x,b;if(f==="exponential")g=gu;else if(f==="interval")g=Qf;else if(f==="categorical"){g=pu,x=Object.create(null);for(const I of t.stops)x[I[0]]=I[1];b=typeof t.stops[0][0]}else{if(f!=="identity")throw new Error(`Unknown function type "${f}"`);g=mu}if(a){const I={},N=[];for(let B=0;B<t.stops.length;B++){const F=t.stops[B],Z=F[0].zoom;I[Z]===void 0&&(I[Z]={zoom:Z,type:t.type,property:t.property,default:t.default,stops:[]},N.push(Z)),I[Z].stops.push([F[0].value,F[1]])}const j=[];for(const B of N)j.push([I[B].zoom,Pl(I[B],e)]);const O={name:"linear"};return{kind:"composite",interpolationType:O,interpolationFactor:Xr.interpolationFactor.bind(void 0,O),zoomStops:j.map(B=>B[0]),evaluate:({zoom:B},F)=>gu({stops:j,base:t.base},e,B).evaluate(B,F)}}if(u){const I=f==="exponential"?{name:"exponential",base:t.base!==void 0?t.base:1}:null;return{kind:"camera",interpolationType:I,interpolationFactor:Xr.interpolationFactor.bind(void 0,I),zoomStops:t.stops.map(N=>N[0]),evaluate:({zoom:N})=>g(t,e,N,x,b)}}return{kind:"source",evaluate(I,N){const j=N&&N.properties?N.properties[t.property]:void 0;return j===void 0?Ns(t.default,e.default):g(t,e,j,x,b)}}}function Ns(t,e,i){return t!==void 0?t:e!==void 0?e:i!==void 0?i:void 0}function pu(t,e,i,a,u){return Ns(typeof i===u?a[i]:void 0,t.default,e.default)}function Qf(t,e,i){if(Xi(i)!=="number")return Ns(t.default,e.default);const a=t.stops.length;if(a===1||i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[a-1][0])return t.stops[a-1][1];const u=Dl(t.stops.map(f=>f[0]),i);return t.stops[u][1]}function gu(t,e,i){const a=t.base!==void 0?t.base:1;if(Xi(i)!=="number")return Ns(t.default,e.default);const u=t.stops.length;if(u===1||i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[u-1][0])return t.stops[u-1][1];const f=Dl(t.stops.map(N=>N[0]),i),g=function(N,j,O,B){const F=B-O,Z=N-O;return F===0?0:j===1?Z/F:(Math.pow(j,Z)-1)/(Math.pow(j,F)-1)}(i,a,t.stops[f][0],t.stops[f+1][0]),x=t.stops[f][1],b=t.stops[f+1][1];let I=Al[e.type]||X0;if(t.colorSpace&&t.colorSpace!=="rgb"){const N=Sf[t.colorSpace];I=(j,O)=>N.reverse(N.interpolate(N.forward(j),N.forward(O),g))}return typeof x.evaluate=="function"?{evaluate(...N){const j=x.evaluate.apply(void 0,N),O=b.evaluate.apply(void 0,N);if(j!==void 0&&O!==void 0)return I(j,O,g)}}:I(x,b,g)}function mu(t,e,i){return e.type==="color"?i=Cn.parse(i):e.type==="formatted"?i=er.fromString(i.toString()):e.type==="resolvedImage"?i=Or.fromString(i.toString()):Xi(i)===e.type||e.type==="enum"&&e.values[i]||(i=void 0),Ns(i,t.default,e.default)}class Rl{constructor(e,i){this.expression=e,this._warningHistory={},this._evaluator=new vf,this._defaultValue=i?function(a){return a.type==="color"&&(Ta(a.default)||Array.isArray(a.default))?new Cn(0,0,0,0):a.type==="color"?Cn.parse(a.default)||null:a.default===void 0?null:a.default}(i):null,this._enumValues=i&&i.type==="enum"?i.values:null}evaluateWithoutErrorHandling(e,i,a,u,f,g,x,b){return this._evaluator.globals=e,this._evaluator.feature=i,this._evaluator.featureState=a,this._evaluator.canonical=u||null,this._evaluator.availableImages=f||null,this._evaluator.formattedSection=g,this._evaluator.featureTileCoord=x||null,this._evaluator.featureDistanceData=b||null,this.expression.evaluate(this._evaluator)}evaluate(e,i,a,u,f,g,x,b){this._evaluator.globals=e,this._evaluator.feature=i||null,this._evaluator.featureState=a||null,this._evaluator.canonical=u||null,this._evaluator.availableImages=f||null,this._evaluator.formattedSection=g||null,this._evaluator.featureTileCoord=x||null,this._evaluator.featureDistanceData=b||null;try{const I=this.expression.evaluate(this._evaluator);if(I==null||typeof I=="number"&&I!=I)return this._defaultValue;if(this._enumValues&&!(I in this._enumValues))throw new Wn(`Expected value to be one of ${Object.keys(this._enumValues).map(N=>JSON.stringify(N)).join(", ")}, but found ${JSON.stringify(I)} instead.`);return I}catch(I){return this._warningHistory[I.message]||(this._warningHistory[I.message]=!0,typeof console<"u"&&console.warn(I.message)),this._defaultValue}}}function Aa(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="string"&&t[0]in Da}function Oo(t,e){const i=new is(Da,[],e?function(u){const f={color:Qr,string:Ri,number:Yt,enum:Ri,boolean:ji,formatted:Ms,resolvedImage:So};return u.type==="array"?Jn(f[u.value]||Ei,u.length):f[u.type]}(e):void 0),a=i.parse(t,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?Vf(new Rl(a,e)):Ar(i.errors)}class Lo{constructor(e,i){this.kind=e,this._styleExpression=i,this.isStateDependent=e!=="constant"&&!bl(i.expression)}evaluateWithoutErrorHandling(e,i,a,u,f,g){return this._styleExpression.evaluateWithoutErrorHandling(e,i,a,u,f,g)}evaluate(e,i,a,u,f,g){return this._styleExpression.evaluate(e,i,a,u,f,g)}}class Ul{constructor(e,i,a,u){this.kind=e,this.zoomStops=a,this._styleExpression=i,this.isStateDependent=e!=="camera"&&!bl(i.expression),this.interpolationType=u}evaluateWithoutErrorHandling(e,i,a,u,f,g){return this._styleExpression.evaluateWithoutErrorHandling(e,i,a,u,f,g)}evaluate(e,i,a,u,f,g){return this._styleExpression.evaluate(e,i,a,u,f,g)}interpolationFactor(e,i,a){return this.interpolationType?Xr.interpolationFactor(this.interpolationType,e,i,a):0}}function yu(t,e){if((t=Oo(t,e)).result==="error")return t;const i=t.value.expression,a=Is(i);if(!a&&!rs(e))return Ar([new Tr("","data expressions not supported")]);const u=Ma(i,["zoom","pitch","distance-from-center"]);if(!u&&!os(e))return Ar([new Tr("","zoom expressions not supported")]);const f=Na(i);return f||u?f instanceof Tr?Ar([f]):f instanceof Xr&&!fu(e)?Ar([new Tr("",'"interpolate" expressions cannot be used with this property')]):Vf(f?new Ul(a?"camera":"composite",t.value,f.labels,f instanceof Xr?f.interpolation:void 0):new Lo(a?"constant":"source",t.value)):Ar([new Tr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Es{constructor(e,i){this._parameters=e,this._specification=i,uo(this,Pl(this._parameters,this._specification))}static deserialize(e){return new Es(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Na(t){let e=null;if(t instanceof zf)e=Na(t.result);else if(t instanceof su){for(const i of t.args)if(e=Na(i),e)break}else(t instanceof Tl||t instanceof Xr)&&t.input instanceof jo&&t.input.name==="zoom"&&(e=t);return e instanceof Tr||t.eachChild(i=>{const a=Na(i);a instanceof Tr?e=a:!e&&a?e=new Tr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&a&&e!==a&&(e=new Tr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}class $t{constructor(e,i,a,u){this.message=(e?`${e}: `:"")+a,u&&(this.identifier=u),i!=null&&i.__line__&&(this.line=i.__line__)}}function Lr(t){const e=t.key,i=t.value,a=t.valueSpec||{},u=t.objectElementValidators||{},f=t.style,g=t.styleSpec;let x=[];const b=Xi(i);if(b!=="object")return[new $t(e,i,`object expected, ${b} found`)];for(const I in i){const N=I.split(".")[0],j=a[N]||a["*"];let O;u[N]?O=u[N]:a[N]?O=cr:u["*"]?O=u["*"]:a["*"]&&(O=cr),O?x=x.concat(O({key:(e&&`${e}.`)+I,value:i[I],valueSpec:j,style:f,styleSpec:g,object:i,objectKey:I},i)):x.push(new $t(e,i[I],`unknown property "${I}"`))}for(const I in a)u[I]||a[I].required&&a[I].default===void 0&&i[I]===void 0&&x.push(new $t(e,i,`missing required property "${I}"`));return x}function Ea(t){const e=t.value,i=t.valueSpec,a=t.style,u=t.styleSpec,f=t.key,g=t.arrayElementValidator||cr;if(Xi(e)!=="array")return[new $t(f,e,`array expected, ${Xi(e)} found`)];if(i.length&&e.length!==i.length)return[new $t(f,e,`array length ${i.length} expected, length ${e.length} found`)];if(i["min-length"]&&e.length<i["min-length"])return[new $t(f,e,`array length at least ${i["min-length"]} expected, length ${e.length} found`)];let x={type:i.value,values:i.values,minimum:i.minimum,maximum:i.maximum,function:void 0};u.$version<7&&(x.function=i.function),Xi(i.value)==="object"&&(x=i.value);let b=[];for(let I=0;I<e.length;I++)b=b.concat(g({array:e,arrayIndex:I,value:e[I],valueSpec:x,style:a,styleSpec:u,key:`${f}[${I}]`}));return b}function Yf(t){const e=t.key,i=t.value,a=t.valueSpec;let u=Xi(i);if(u==="number"&&i!=i&&(u="NaN"),u!=="number")return[new $t(e,i,`number expected, ${u} found`)];if("minimum"in a){let f=a.minimum;if(Xi(a.minimum)==="array"&&(f=a.minimum[t.arrayIndex]),i<f)return[new $t(e,i,`${i} is less than the minimum value ${f}`)]}if("maximum"in a){let f=a.maximum;if(Xi(a.maximum)==="array"&&(f=a.maximum[t.arrayIndex]),i>f)return[new $t(e,i,`${i} is greater than the maximum value ${f}`)]}return[]}function $f(t){const e=t.valueSpec,i=Vn(t.value.type);let a,u,f,g={};const x=i!=="categorical"&&t.value.property===void 0,b=!x,I=Xi(t.value.stops)==="array"&&Xi(t.value.stops[0])==="array"&&Xi(t.value.stops[0][0])==="object",N=Lr({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(B){if(i==="identity")return[new $t(B.key,B.value,'identity function may not have a "stops" property')];let F=[];const Z=B.value;return F=F.concat(Ea({key:B.key,value:Z,valueSpec:B.valueSpec,style:B.style,styleSpec:B.styleSpec,arrayElementValidator:j})),Xi(Z)==="array"&&Z.length===0&&F.push(new $t(B.key,Z,"array must have at least one stop")),F},default:function(B){return cr({key:B.key,value:B.value,valueSpec:e,style:B.style,styleSpec:B.styleSpec})}}});return i==="identity"&&x&&N.push(new $t(t.key,t.value,'missing required property "property"')),i==="identity"||t.value.stops||N.push(new $t(t.key,t.value,'missing required property "stops"')),i==="exponential"&&t.valueSpec.expression&&!fu(t.valueSpec)&&N.push(new $t(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(b&&!rs(t.valueSpec)?N.push(new $t(t.key,t.value,"property functions not supported")):x&&!os(t.valueSpec)&&N.push(new $t(t.key,t.value,"zoom functions not supported"))),i!=="categorical"&&!I||t.value.property!==void 0||N.push(new $t(t.key,t.value,'"property" property is required')),N;function j(B){let F=[];const Z=B.value,ne=B.key;if(Xi(Z)!=="array")return[new $t(ne,Z,`array expected, ${Xi(Z)} found`)];if(Z.length!==2)return[new $t(ne,Z,`array length 2 expected, length ${Z.length} found`)];if(I){if(Xi(Z[0])!=="object")return[new $t(ne,Z,`object expected, ${Xi(Z[0])} found`)];if(Z[0].zoom===void 0)return[new $t(ne,Z,"object stop key must have zoom")];if(Z[0].value===void 0)return[new $t(ne,Z,"object stop key must have value")];const Me=Vn(Z[0].zoom);if(typeof Me!="number")return[new $t(ne,Z[0].zoom,"stop zoom values must be numbers")];if(f&&f>Me)return[new $t(ne,Z[0].zoom,"stop zoom values must appear in ascending order")];Me!==f&&(f=Me,u=void 0,g={}),F=F.concat(Lr({key:`${ne}[0]`,value:Z[0],valueSpec:{zoom:{}},style:B.style,styleSpec:B.styleSpec,objectElementValidators:{zoom:Yf,value:O}}))}else F=F.concat(O({key:`${ne}[0]`,value:Z[0],valueSpec:{},style:B.style,styleSpec:B.styleSpec},Z));return Aa(ho(Z[1]))?F.concat([new $t(`${ne}[1]`,Z[1],"expressions are not allowed in function stops.")]):F.concat(cr({key:`${ne}[1]`,value:Z[1],valueSpec:e,style:B.style,styleSpec:B.styleSpec}))}function O(B,F){const Z=Xi(B.value),ne=Vn(B.value),Me=B.value!==null?B.value:F;if(a){if(Z!==a)return[new $t(B.key,Me,`${Z} stop domain type must match previous stop domain type ${a}`)]}else a=Z;if(Z!=="number"&&Z!=="string"&&Z!=="boolean"&&typeof ne!="number"&&typeof ne!="string"&&typeof ne!="boolean")return[new $t(B.key,Me,"stop domain value must be a number, string, or boolean")];if(Z!=="number"&&i!=="categorical"){let ze=`number expected, ${Z} found`;return rs(e)&&i===void 0&&(ze+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new $t(B.key,Me,ze)]}return i!=="categorical"||Z!=="number"||typeof ne=="number"&&isFinite(ne)&&Math.floor(ne)===ne?i!=="categorical"&&Z==="number"&&typeof ne=="number"&&typeof u=="number"&&u!==void 0&&ne<u?[new $t(B.key,Me,"stop domain values must appear in ascending order")]:(u=ne,i==="categorical"&&ne in g?[new $t(B.key,Me,"stop domain values must be unique")]:(g[ne]=!0,[])):[new $t(B.key,Me,`integer expected, found ${String(ne)}`)]}}function Cs(t){const e=(t.expressionContext==="property"?yu:Oo)(ho(t.value),t.valueSpec);if(e.result==="error")return e.value.map(a=>new $t(`${t.key}${a.key}`,t.value,a.message));const i=e.value.expression||e.value._styleExpression.expression;if(t.expressionContext==="property"&&t.propertyKey==="text-font"&&!i.outputDefined())return[new $t(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if(t.expressionContext==="property"&&t.propertyType==="layout"&&!bl(i))return[new $t(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if(t.expressionContext==="filter")return Zf(i,t);if(t.expressionContext&&t.expressionContext.indexOf("cluster")===0){if(!Ma(i,["zoom","feature-state"]))return[new $t(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(t.expressionContext==="cluster-initial"&&!Is(i))return[new $t(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Zf(t,e){const i=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(e.valueSpec&&e.valueSpec.expression)for(const u of e.valueSpec.expression.parameters)i.delete(u);if(i.size===0)return[];const a=[];return t instanceof jo&&i.has(t.name)?[new $t(e.key,e.value,`["${t.name}"] expression is not supported in a filter for a ${e.object.type} layer with id: ${e.object.id}`)]:(t.eachChild(u=>{a.push(...Zf(u,e))}),a)}function Bl(t){const e=t.key,i=t.value,a=t.valueSpec,u=[];return Array.isArray(a.values)?a.values.indexOf(Vn(i))===-1&&u.push(new $t(e,i,`expected one of [${a.values.join(", ")}], ${JSON.stringify(i)} found`)):Object.keys(a.values).indexOf(Vn(i))===-1&&u.push(new $t(e,i,`expected one of [${Object.keys(a.values).join(", ")}], ${JSON.stringify(i)} found`)),u}function Ss(t){if(t===!0||t===!1)return!0;if(!Array.isArray(t)||t.length===0)return!1;switch(t[0]){case"has":return t.length>=2&&t[1]!=="$id"&&t[1]!=="$type";case"in":return t.length>=3&&(typeof t[1]!="string"||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return t.length!==3||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!Ss(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function ss(t,e="fill"){if(t==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Ss(t)||(t=js(t));const i=t;let a=!0;try{a=function(I){if(!zs(I))return I;let N=ho(I);return Ca(N),N=xr(N),N}(i)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
41
+ `;class Dh{constructor(s,c){Pi(this,"_store",void 0),Pi(this,"_refCount",1),Pi(this,"getLoadable",d=>(this.checkRefCount_INTERNAL(),jI(this._store,d))),Pi(this,"getPromise",d=>(this.checkRefCount_INTERNAL(),this.getLoadable(d).toPromise())),Pi(this,"getNodes_UNSTABLE",d=>{if(this.checkRefCount_INTERNAL(),(d==null?void 0:d.isModified)===!0){if((d==null?void 0:d.isInitialized)===!1)return[];const v=this._store.getState().currentTree;return H1(v.dirtyAtoms)}const m=this._store.getState().knownAtoms,w=this._store.getState().knownSelectors;return(d==null?void 0:d.isInitialized)==null?G1.values():d.isInitialized===!0?H1($1([m,w])):ug(G1.values(),({key:v})=>!m.has(v)&&!w.has(v))}),Pi(this,"getInfo_UNSTABLE",({key:d})=>(this.checkRefCount_INTERNAL(),NI(this._store,this._store.getState().currentTree,d))),Pi(this,"map",d=>{this.checkRefCount_INTERNAL();const m=new mg(this,gg);return d(m),m}),Pi(this,"asyncMap",async d=>{this.checkRefCount_INTERNAL();const m=new mg(this,gg);return m.retain(),await d(m),m.autoRelease_INTERNAL(),m}),this._store={storeID:CI(),parentStoreID:c,getState:()=>s,replaceState:d=>{s.currentTree=d(s.currentTree)},getGraph:d=>{const m=s.graphsByVersion;if(m.has(d))return zn(m.get(d));const w=EI();return m.set(d,w),w},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw Ni("Cannot subscribe to Snapshots")}};for(const d of this._store.getState().knownAtoms)AI(this._store,d,"get"),Ih(this._store,d,1);this.autoRelease_INTERNAL()}retain(){if(this._refCount<=0){if(process.env.NODE_ENV!=="production")throw Ni("Snapshot has already been released.");sr("Attempt to retain() Snapshot that was already released.")}this._refCount++;let s=!1;return()=>{s||(s=!0,this._release())}}autoRelease_INTERNAL(){RI||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(s=>s()),this._store.getState().nodeCleanupFunctions.clear(),!wn("recoil_memory_managament_2020"))return}else this._refCount<0&&process.env.NODE_ENV!=="production"&&sr("Snapshot released an extra time.")}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){wn("recoil_memory_managament_2020")&&this._refCount<=0&&process.env.NODE_ENV!=="production"&&sr(BI)}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function q1(r,s,c=!1){const d=r.getState(),m=c?kI():s.version;return{currentTree:{version:c?m:s.version,stateID:c?m:s.stateID,transactionMetadata:{...s.transactionMetadata},dirtyAtoms:new Set(s.dirtyAtoms),atomValues:s.atomValues.clone(),nonvalidatedAtoms:s.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(d.knownAtoms),knownSelectors:new Set(d.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(m,r.getGraph(s.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(yh(d.nodeCleanupFunctions.entries(),([w])=>[w,()=>{}]))}}function FI(r){const s=new Dh(PI());return r!=null?s.map(r):s}const[X1,K1]=UI((r,s)=>{var c;const d=r.getState(),m=s==="latest"?(c=d.nextTree)!==null&&c!==void 0?c:d.currentTree:zn(d.previousTree);return new Dh(q1(r,m),r.storeID)},(r,s)=>{var c,d;return String(s)+String(r.storeID)+String((c=r.getState().nextTree)===null||c===void 0?void 0:c.version)+String(r.getState().currentTree.version)+String((d=r.getState().previousTree)===null||d===void 0?void 0:d.version)});LI(K1);function VI(r,s="latest"){const c=X1(r,s);return c.isRetained()?c:(K1(),X1(r,s))}class mg extends Dh{constructor(s,c){super(q1(s.getStore_INTERNAL(),s.getStore_INTERNAL().getState().currentTree,!0),s.getStoreID()),Pi(this,"_batch",void 0),Pi(this,"set",(d,m)=>{this.checkRefCount_INTERNAL();const w=this.getStore_INTERNAL();this._batch(()=>{Ih(w,d.key,1),W1(this.getStore_INTERNAL(),d,m)})}),Pi(this,"reset",d=>{this.checkRefCount_INTERNAL();const m=this.getStore_INTERNAL();this._batch(()=>{Ih(m,d.key,1),W1(this.getStore_INTERNAL(),d,SI)})}),Pi(this,"setUnvalidatedAtomValues_DEPRECATED",d=>{this.checkRefCount_INTERNAL();const m=this.getStore_INTERNAL();gg(()=>{for(const[w,v]of d.entries())Ih(m,w,1),OI(m,new zI(w),v)})}),this._batch=c}}var Th={Snapshot:Dh,MutableSnapshot:mg,freshSnapshot:FI,cloneSnapshot:VI},QI=Th.Snapshot,YI=Th.MutableSnapshot,$I=Th.freshSnapshot,ZI=Th.cloneSnapshot,Ah=Object.freeze({__proto__:null,Snapshot:QI,MutableSnapshot:YI,freshSnapshot:$I,cloneSnapshot:ZI});function GI(...r){const s=new Set;for(const c of r)for(const d of c)s.add(d);return s}var HI=GI;const{useRef:WI}=lt;function qI(r){const s=WI(r);return s.current===r&&typeof r=="function"&&(s.current=r()),s}var J1=qI;const{getNextTreeStateVersion:XI,makeEmptyStoreState:e_}=w1,{cleanUpNode:KI,getDownstreamNodes:JI,initializeNode:eD,setNodeValue:tD,setUnvalidatedAtomValue_DEPRECATED:iD}=ms,{graph:nD}=vc,{cloneGraph:rD}=vc,{getNextStoreID:t_}=vh,{createMutableSource:yg,reactMode:i_}=Xa,{applyAtomValueWrites:oD}=bo,{releaseScheduledRetainablesNow:n_}=Xs,{freshSnapshot:sD}=Ah,{useCallback:aD,useContext:r_,useEffect:_g,useMemo:lD,useRef:cD,useState:uD}=lt;function Ic(){throw Ni("This component must be used inside a <RecoilRoot> component.")}const o_=Object.freeze({storeID:t_(),getState:Ic,replaceState:Ic,getGraph:Ic,subscribeToTransactions:Ic,addTransactionMetadata:Ic});let xg=!1;function s_(r){if(xg)throw Ni("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const s=r.getState();if(s.nextTree===null){wn("recoil_memory_managament_2020")&&wn("recoil_release_on_cascading_update_killswitch_2021")&&s.commitDepth>0&&n_(r);const c=s.currentTree.version,d=XI();s.nextTree={...s.currentTree,version:d,stateID:d,dirtyAtoms:new Set,transactionMetadata:{}},s.graphsByVersion.set(d,rD(zn(s.graphsByVersion.get(c))))}}const a_=lt.createContext({current:o_}),Nh=()=>r_(a_),l_=lt.createContext(null);function hD(){const r=r_(l_);return r==null&&mh("Attempted to use a Recoil hook outside of a <RecoilRoot>. <RecoilRoot> must be an ancestor of any component that uses Recoil hooks."),r}function vg(r,s,c){const d=JI(r,c,c.dirtyAtoms);for(const m of d){const w=s.nodeToComponentSubscriptions.get(m);if(w)for(const[v,[o,y]]of w)y(c)}}function c_(r){const s=r.getState(),c=s.currentTree,d=c.dirtyAtoms;if(d.size){for(const[m,w]of s.nodeTransactionSubscriptions)if(d.has(m))for(const[v,o]of w)o(r);for(const[m,w]of s.transactionSubscriptions)w(r);(!i_().early||s.suspendedComponentResolvers.size>0)&&(vg(r,s,c),s.suspendedComponentResolvers.forEach(m=>m()),s.suspendedComponentResolvers.clear())}s.queuedComponentCallbacks_DEPRECATED.forEach(m=>m(c)),s.queuedComponentCallbacks_DEPRECATED.splice(0,s.queuedComponentCallbacks_DEPRECATED.length)}function dD(r){const s=r.getState();s.commitDepth++;try{const{nextTree:c}=s;if(c==null)return;s.previousTree=s.currentTree,s.currentTree=c,s.nextTree=null,c_(r),s.previousTree!=null?s.graphsByVersion.delete(s.previousTree.version):sr("Ended batch with no previous state, which is unexpected","recoil"),s.previousTree=null,wn("recoil_memory_managament_2020")&&c==null&&n_(r)}finally{s.commitDepth--}}function fD({setNotifyBatcherOfChange:r}){const s=Nh(),[,c]=uD([]);return r(()=>c({})),_g(()=>(r(()=>c({})),()=>{r(()=>{})}),[r]),_g(()=>{H3.enqueueExecution("Batcher",()=>{dD(s.current)})}),null}process.env.NODE_ENV!=="production"&&typeof window<"u"&&!window.$recoilDebugStates&&(window.$recoilDebugStates=[]);function pD(r,s){const c=e_();return s({set:(d,m)=>{const w=c.currentTree,v=tD(r,w,d.key,m),o=new Set(v.keys()),y=w.nonvalidatedAtoms.clone();for(const T of o)y.delete(T);c.currentTree={...w,dirtyAtoms:HI(w.dirtyAtoms,o),atomValues:oD(w.atomValues,v),nonvalidatedAtoms:y}},setUnvalidatedAtomValues:d=>{d.forEach((m,w)=>{c.currentTree=iD(c.currentTree,w,m)})}}),c}function gD(r){const s=sD(r),c=s.getStore_INTERNAL().getState();return s.retain(),c.nodeCleanupFunctions.forEach(d=>d()),c.nodeCleanupFunctions.clear(),c}let u_=0;function mD({initializeState_DEPRECATED:r,initializeState:s,store_INTERNAL:c,children:d}){let m;const w=U=>{const R=m.current.graphsByVersion;if(R.has(U))return zn(R.get(U));const V=nD();return R.set(U,V),V},v=(U,R)=>{if(R==null){const{transactionSubscriptions:V}=C.current.getState(),W=u_++;return V.set(W,U),{release:()=>{V.delete(W)}}}else{const{nodeTransactionSubscriptions:V}=C.current.getState();V.has(R)||V.set(R,new Map);const W=u_++;return zn(V.get(R)).set(W,U),{release:()=>{const ye=V.get(R);ye&&(ye.delete(W),ye.size===0&&V.delete(R))}}}},o=U=>{s_(C.current);for(const R of Object.keys(U))zn(C.current.getState().nextTree).transactionMetadata[R]=U[R]},y=U=>{s_(C.current);const R=zn(m.current.nextTree);let V;try{xg=!0,V=U(R)}finally{xg=!1}V!==R&&(process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.$recoilDebugStates.push(V),m.current.nextTree=V,i_().early&&vg(C.current,m.current,V),zn(T.current)())},T=cD(null),z=aD(U=>{T.current=U},[T]),C=J1(()=>c??{storeID:t_(),getState:()=>m.current,replaceState:y,getGraph:w,subscribeToTransactions:v,addTransactionMetadata:o});c!=null&&(C.current=c),m=J1(()=>r!=null?pD(C.current,r):s!=null?gD(s):e_());const S=lD(()=>yg==null?void 0:yg(m,()=>m.current.currentTree.version),[m]);return _g(()=>{const U=C.current;for(const R of new Set(U.getState().knownAtoms))eD(U,R,"get");return()=>{for(const R of U.getState().knownAtoms)KI(U,R)}},[C]),lt.createElement(a_.Provider,{value:C},lt.createElement(l_.Provider,{value:S},lt.createElement(fD,{setNotifyBatcherOfChange:z}),d))}function yD(r){const{override:s,...c}=r,d=Nh();return s===!1&&d.current!==o_?r.children:lt.createElement(mD,c)}function _D(){return Nh().current.storeID}var Go={RecoilRoot:yD,useStoreRef:Nh,useRecoilMutableSource:hD,useRecoilStoreID:_D,notifyComponents_FOR_TESTING:vg,sendEndOfBatchNotifications_FOR_TESTING:c_};function xD(r,s){if(r===s)return!0;if(r.length!==s.length)return!1;for(let c=0,d=r.length;c<d;c++)if(r[c]!==s[c])return!1;return!0}var vD=xD;const{useEffect:MD,useRef:bD}=lt;function wD(r){const s=bD();return MD(()=>{s.current=r}),s.current}var h_=wD;const{useStoreRef:ID}=Go,{SUSPENSE_TIMEOUT_MS:DD}=Xs,{updateRetainCount:Dc}=Xs,{RetentionZone:TD}=Mh,{useEffect:AD,useRef:ND}=lt,{isSSR:d_}=wc;function ED(r){if(wn("recoil_memory_managament_2020"))return CD(r)}function CD(r){const c=(Array.isArray(r)?r:[r]).map(v=>v instanceof TD?v:v.key),d=ID();AD(()=>{if(!wn("recoil_memory_managament_2020"))return;const v=d.current;if(m.current&&!d_)window.clearTimeout(m.current),m.current=null;else for(const o of c)Dc(v,o,1);return()=>{for(const o of c)Dc(v,o,-1)}},[d,...c]);const m=ND(),w=h_(c);if(!d_&&(w===void 0||!vD(w,c))){const v=d.current;for(const o of c)Dc(v,o,1);if(w)for(const o of w)Dc(v,o,-1);m.current&&window.clearTimeout(m.current),m.current=window.setTimeout(()=>{m.current=null;for(const o of c)Dc(v,o,-1)},DD)}}var Mg=ED;function SD(){return"<component name not available>"}var Tc=SD;const{batchUpdates:zD}=wh,{DEFAULT_VALUE:f_}=Er,{currentRendererSupportsUseSyncExternalStore:jD,reactMode:Ks,useMutableSource:OD,useSyncExternalStore:LD}=Xa,{useRecoilMutableSource:kD,useStoreRef:wo}=Go,{isRecoilValue:PD}=Ws,{AbstractRecoilValue:bg,getRecoilValueAsLoadable:Ac,setRecoilValue:Eh,setUnvalidatedRecoilValue:RD,subscribeToRecoilValue:Ka}=bo,{useCallback:Cr,useEffect:Ja,useMemo:p_,useRef:Nc,useState:wg}=lt,{setByAddingToSet:UD}=D1,{isSSR:BD}=wc;function Ig(r,s,c){if(r.state==="hasValue")return r.contents;throw r.state==="loading"?new Promise(m=>{const w=c.current.getState().suspendedComponentResolvers;w.add(m),BD&&bn(r.contents)&&r.contents.finally(()=>{w.delete(m)})}):r.state==="hasError"?r.contents:Ni(`Invalid value of loadable atom "${s.key}"`)}function Dr(r,s){if(!PD(r))throw Ni(`Invalid argument to ${s}: expected an atom or selector but got ${String(r)}`)}function FD(){const r=Tc(),s=wo(),[,c]=wg([]),d=Nc(new Set);d.current=new Set;const m=Nc(new Set),w=Nc(new Map),v=Cr(y=>{const T=w.current.get(y);T&&(T.release(),w.current.delete(y))},[w]),o=Cr((y,T)=>{w.current.has(T)&&c([])},[]);return Ja(()=>{const y=s.current;xc(d.current,m.current).forEach(T=>{if(w.current.has(T)){mh(`Double subscription to RecoilValue "${T}"`);return}const z=Ka(y,new bg(T),S=>o(S,T),r);w.current.set(T,z),y.getState().nextTree?y.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{o(y.getState(),T)}):o(y.getState(),T)}),xc(m.current,d.current).forEach(T=>{v(T)}),m.current=d.current}),Ja(()=>{const y=w.current;return xc(d.current,new Set(y.keys())).forEach(T=>{const z=Ka(s.current,new bg(T),C=>o(C,T),r);y.set(T,z)}),()=>y.forEach((T,z)=>v(z))},[r,s,v,o]),p_(()=>{function y(R){return process.env.NODE_ENV!=="production"&&Dr(R,"useSetRecoilState"),V=>{Eh(s.current,R,V)}}function T(R){return process.env.NODE_ENV!=="production"&&Dr(R,"useResetRecoilState"),()=>Eh(s.current,R,f_)}function z(R){var V;process.env.NODE_ENV!=="production"&&Dr(R,"useRecoilValueLoadable"),d.current.has(R.key)||(d.current=UD(d.current,R.key));const W=s.current.getState();return Ac(s.current,R,Ks().early&&(V=W.nextTree)!==null&&V!==void 0?V:W.currentTree)}function C(R){process.env.NODE_ENV!=="production"&&Dr(R,"useRecoilValue");const V=z(R);return Ig(V,R,s)}function S(R){return process.env.NODE_ENV!=="production"&&Dr(R,"useRecoilState"),[C(R),y(R)]}function U(R){return process.env.NODE_ENV!=="production"&&Dr(R,"useRecoilStateLoadable"),[z(R),y(R)]}return{getRecoilValue:C,getRecoilValueLoadable:z,getRecoilState:S,getRecoilStateLoadable:U,getSetRecoilState:y,getResetRecoilState:T}},[d,s])}const Ec={current:0};function VD(r){const s=wo(),c=Tc(),d=Cr(()=>{var o;process.env.NODE_ENV!=="production"&&Ec.current++;const y=s.current,T=y.getState(),z=Ks().early&&(o=T.nextTree)!==null&&o!==void 0?o:T.currentTree;return{loadable:Ac(y,r,z),key:r.key}},[s,r]),m=Cr(o=>{let y;return()=>{var T,z;const C=o();return(T=y)!==null&&T!==void 0&&T.loadable.is(C.loadable)&&((z=y)===null||z===void 0?void 0:z.key)===C.key?y:(y=C,C)}},[]),w=p_(()=>m(d),[d,m]),v=Cr(o=>{const y=s.current;return Ka(y,r,o,c).release},[s,r,c]);return LD(v,w,w).loadable}function QD(r){const s=wo(),c=Cr(()=>{var T;const z=s.current,C=z.getState(),S=Ks().early&&(T=C.nextTree)!==null&&T!==void 0?T:C.currentTree;return Ac(z,r,S)},[s,r]),d=Cr(()=>(process.env.NODE_ENV!=="production"&&Ec.current++,c()),[c]),m=Tc(),w=Cr((T,z)=>{const C=s.current;return Ka(C,r,()=>{if(!wn("recoil_suppress_rerender_in_callback"))return z();const U=c();y.current.is(U)||z(),y.current=U},m).release},[s,r,m,c]),v=kD();if(v==null)throw Ni("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const o=OD(v,d,w),y=Nc(o);return Ja(()=>{y.current=o}),o}function Dg(r){const s=wo(),c=Tc(),d=Cr(()=>{var y;process.env.NODE_ENV!=="production"&&Ec.current++;const T=s.current,z=T.getState(),C=Ks().early&&(y=z.nextTree)!==null&&y!==void 0?y:z.currentTree;return Ac(T,r,C)},[s,r]),m=Cr(()=>({loadable:d(),key:r.key}),[d,r.key]),w=Cr(y=>{const T=m();return y.loadable.is(T.loadable)&&y.key===T.key?y:T},[m]);Ja(()=>{const y=Ka(s.current,r,T=>{o(w)},c);return o(w),y.release},[c,r,s,w]);const[v,o]=wg(m);return v.key!==r.key?m().loadable:v.loadable}function YD(r){const s=wo(),[,c]=wg([]),d=Tc(),m=Cr(()=>{var o;process.env.NODE_ENV!=="production"&&Ec.current++;const y=s.current,T=y.getState(),z=Ks().early&&(o=T.nextTree)!==null&&o!==void 0?o:T.currentTree;return Ac(y,r,z)},[s,r]),w=m(),v=Nc(w);return Ja(()=>{v.current=w}),Ja(()=>{const o=s.current,y=o.getState(),T=Ka(o,r,C=>{var S;if(!wn("recoil_suppress_rerender_in_callback"))return c([]);const U=m();(S=v.current)!==null&&S!==void 0&&S.is(U)||c(U),v.current=U},d);if(y.nextTree)o.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{v.current=null,c([])});else{var z;if(!wn("recoil_suppress_rerender_in_callback"))return c([]);const C=m();(z=v.current)!==null&&z!==void 0&&z.is(C)||c(C),v.current=C}return T.release},[d,m,r,s]),w}function Tg(r){return process.env.NODE_ENV!=="production"&&Dr(r,"useRecoilValueLoadable"),wn("recoil_memory_managament_2020")&&Mg(r),{TRANSITION_SUPPORT:Dg,SYNC_EXTERNAL_STORE:jD()?VD:Dg,MUTABLE_SOURCE:QD,LEGACY:YD}[Ks().mode](r)}function g_(r){process.env.NODE_ENV!=="production"&&Dr(r,"useRecoilValue");const s=wo(),c=Tg(r);return Ig(c,r,s)}function Ch(r){process.env.NODE_ENV!=="production"&&Dr(r,"useSetRecoilState");const s=wo();return Cr(c=>{Eh(s.current,r,c)},[s,r])}function $D(r){process.env.NODE_ENV!=="production"&&Dr(r,"useResetRecoilState");const s=wo();return Cr(()=>{Eh(s.current,r,f_)},[s,r])}function ZD(r){return process.env.NODE_ENV!=="production"&&Dr(r,"useRecoilState"),[g_(r),Ch(r)]}function GD(r){return process.env.NODE_ENV!=="production"&&Dr(r,"useRecoilStateLoadable"),[Tg(r),Ch(r)]}function HD(){const r=wo();return(s,c={})=>{zD(()=>{r.current.addTransactionMetadata(c),s.forEach((d,m)=>RD(r.current,new bg(m),d))})}}function m_(r){return process.env.NODE_ENV!=="production"&&(Dr(r,"useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE"),Ks().early||sr("Attepmt to use a hook with UNSTABLE_TRANSITION_SUPPORT in a rendering mode incompatible with concurrent rendering. Try enabling the recoil_sync_external_store or recoil_transition_support GKs.")),wn("recoil_memory_managament_2020")&&Mg(r),Dg(r)}function y_(r){process.env.NODE_ENV!=="production"&&Dr(r,"useRecoilValue_TRANSITION_SUPPORT_UNSTABLE");const s=wo(),c=m_(r);return Ig(c,r,s)}function WD(r){return process.env.NODE_ENV!=="production"&&Dr(r,"useRecoilState_TRANSITION_SUPPORT_UNSTABLE"),[y_(r),Ch(r)]}var qD={recoilComponentGetRecoilValueCount_FOR_TESTING:Ec,useRecoilInterface:FD,useRecoilState:ZD,useRecoilStateLoadable:GD,useRecoilValue:g_,useRecoilValueLoadable:Tg,useResetRecoilState:$D,useSetRecoilState:Ch,useSetUnvalidatedAtomValues:HD,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:m_,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:y_,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:WD};function XD(r,s){const c=new Map;for(const[d,m]of r)s(m,d)&&c.set(d,m);return c}var KD=XD;function JD(r,s){const c=new Set;for(const d of r)s(d)&&c.add(d);return c}var eT=JD;function tT(...r){const s=new Map;for(let c=0;c<r.length;c++){const d=r[c].keys();let m;for(;!(m=d.next()).done;)s.set(m.value,r[c].get(m.value))}return s}var iT=tT;const{batchUpdates:nT}=wh,{DEFAULT_VALUE:rT,getNode:__,nodes:oT}=Er,{useStoreRef:Ag}=Go,{AbstractRecoilValue:sT,setRecoilValueLoadable:aT}=bo,{SUSPENSE_TIMEOUT_MS:lT}=Xs,{cloneSnapshot:Sh}=Ah,{useCallback:zh,useEffect:x_,useRef:v_,useState:cT}=lt,{isSSR:M_}=wc;function jh(r){const s=Ag();x_(()=>s.current.subscribeToTransactions(r).release,[r,s])}function b_(r){const s=r.atomValues.toMap(),c=xh(KD(s,(d,m)=>{const v=__(m).persistence_UNSTABLE;return v!=null&&v.type!=="none"&&d.state==="hasValue"}),d=>d.contents);return iT(r.nonvalidatedAtoms.toMap(),c)}function uT(r){jh(zh(s=>{let c=s.getState().previousTree;const d=s.getState().currentTree;c||(sr("Transaction subscribers notified without a previous tree being present -- this is a bug in Recoil"),c=s.getState().currentTree);const m=b_(d),w=b_(c),v=xh(oT,y=>{var T,z,C,S;return{persistence_UNSTABLE:{type:(T=(z=y.persistence_UNSTABLE)===null||z===void 0?void 0:z.type)!==null&&T!==void 0?T:"none",backButton:(C=(S=y.persistence_UNSTABLE)===null||S===void 0?void 0:S.backButton)!==null&&C!==void 0?C:!1}}}),o=eT(d.dirtyAtoms,y=>m.has(y)||w.has(y));r({atomValues:m,previousAtomValues:w,atomInfo:v,modifiedAtoms:o,transactionMetadata:{...d.transactionMetadata}})},[r]))}function hT(r){jh(zh(s=>{const c=Sh(s,"latest"),d=Sh(s,"previous");r({snapshot:c,previousSnapshot:d})},[r]))}function dT(){const r=Ag(),[s,c]=cT(()=>Sh(r.current)),d=h_(s),m=v_(),w=v_();if(jh(zh(o=>c(Sh(o)),[])),x_(()=>{const o=s.retain();if(m.current&&!M_){var y;window.clearTimeout(m.current),m.current=null,(y=w.current)===null||y===void 0||y.call(w),w.current=null}return()=>{window.setTimeout(o,10)}},[s]),d!==s&&!M_){if(m.current){var v;window.clearTimeout(m.current),m.current=null,(v=w.current)===null||v===void 0||v.call(w),w.current=null}w.current=s.retain(),m.current=window.setTimeout(()=>{var o;m.current=null,(o=w.current)===null||o===void 0||o.call(w),w.current=null},lT)}return s}function w_(r,s){var c;const d=r.getState(),m=(c=d.nextTree)!==null&&c!==void 0?c:d.currentTree,w=s.getStore_INTERNAL().getState().currentTree;nT(()=>{const v=new Set;for(const T of[m.atomValues.keys(),w.atomValues.keys()])for(const z of T){var o,y;((o=m.atomValues.get(z))===null||o===void 0?void 0:o.contents)!==((y=w.atomValues.get(z))===null||y===void 0?void 0:y.contents)&&__(z).shouldRestoreFromSnapshots&&v.add(z)}v.forEach(T=>{aT(r,new sT(T),w.atomValues.has(T)?zn(w.atomValues.get(T)):rT)}),r.replaceState(T=>({...T,stateID:s.getID()}))})}function fT(){const r=Ag();return zh(s=>w_(r.current,s),[r])}var I_={useRecoilSnapshot:dT,gotoSnapshot:w_,useGotoRecoilSnapshot:fT,useRecoilTransactionObserver:hT,useTransactionObservation_DEPRECATED:uT,useTransactionSubscription_DEPRECATED:jh};const{peekNodeInfo:pT}=ms,{useStoreRef:gT}=Go;function mT(){const r=gT();return({key:s})=>pT(r.current,r.current.getState().currentTree,s)}var yT=mT;const{reactMode:_T}=Xa,{RecoilRoot:xT,useStoreRef:vT}=Go,{useMemo:MT}=lt;function bT(){_T().mode==="MUTABLE_SOURCE"&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.");const r=vT().current;return MT(()=>{function s({children:c}){return lt.createElement(xT,{store_INTERNAL:r},c)}return s},[r])}var wT=bT;const{loadableWithValue:IT}=_c,{initializeNode:DT}=ms,{DEFAULT_VALUE:TT,getNode:AT}=Er,{copyTreeState:NT,getRecoilValueAsLoadable:ET,invalidateDownstreams:CT,writeLoadableToTreeState:ST}=bo;function D_(r){return AT(r.key).nodeType==="atom"}class zT{constructor(s,c){Pi(this,"_store",void 0),Pi(this,"_treeState",void 0),Pi(this,"_changes",void 0),Pi(this,"get",d=>{if(this._changes.has(d.key))return this._changes.get(d.key);if(!D_(d))throw Ni("Reading selectors within atomicUpdate is not supported");const m=ET(this._store,d,this._treeState);if(m.state==="hasValue")return m.contents;throw m.state==="hasError"?m.contents:Ni(`Expected Recoil atom ${d.key} to have a value, but it is in a loading state.`)}),Pi(this,"set",(d,m)=>{if(!D_(d))throw Ni("Setting selectors within atomicUpdate is not supported");if(typeof m=="function"){const w=this.get(d);this._changes.set(d.key,m(w))}else DT(this._store,d.key,"set"),this._changes.set(d.key,m)}),Pi(this,"reset",d=>{this.set(d,TT)}),this._store=s,this._treeState=c,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const s=NT(this._treeState);for(const[c,d]of this._changes)ST(s,c,IT(d));return CT(this._store,s),s}}function jT(r){return s=>{r.replaceState(c=>{const d=new zT(r,c);return s(d),d.newTreeState_INTERNAL()})}}var OT={atomicUpdater:jT},LT=OT.atomicUpdater,T_=Object.freeze({__proto__:null,atomicUpdater:LT});function kT(r,s){if(!r)throw new Error(s)}var PT=kT,Io=PT;const{atomicUpdater:RT}=T_,{batchUpdates:UT}=wh,{DEFAULT_VALUE:BT}=Er,{useStoreRef:FT}=Go,{refreshRecoilValue:VT,setRecoilValue:A_}=bo,{cloneSnapshot:QT}=Ah,{gotoSnapshot:YT}=I_,{useCallback:$T}=lt;class N_{}const ZT=new N_;function E_(r,s,c,d){let m=ZT,w;if(UT(()=>{const o="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof s!="function")throw Ni(o);const y=T1({...d??{},set:(z,C)=>A_(r,z,C),reset:z=>A_(r,z,BT),refresh:z=>VT(r,z),gotoSnapshot:z=>YT(r,z),transact_UNSTABLE:z=>RT(r)(z)},{snapshot:()=>{const z=QT(r);return w=z.retain(),z}}),T=s(y);if(typeof T!="function")throw Ni(o);m=T(...c)}),m instanceof N_&&(process.env.NODE_ENV!=="production"?Io(!1,"batchUpdates should return immediately"):Io(!1)),bn(m))m=m.finally(()=>{var o;(o=w)===null||o===void 0||o()});else{var v;(v=w)===null||v===void 0||v()}return m}function GT(r,s){const c=FT();return $T((...d)=>E_(c.current,r,d),s!=null?[...s,c]:void 0)}var C_={recoilCallback:E_,useRecoilCallback:GT};const{useStoreRef:HT}=Go,{refreshRecoilValue:WT}=bo,{useCallback:qT}=lt;function XT(r){const s=HT();return qT(()=>{const c=s.current;WT(c,r)},[r,s])}var KT=XT;const{atomicUpdater:JT}=T_,{useStoreRef:eA}=Go,{useMemo:tA}=lt;function iA(r,s){const c=eA();return tA(()=>(...d)=>{JT(c.current)(w=>{r(w)(...d)})},s!=null?[...s,c]:void 0)}var nA=iA;class rA{constructor(s){Pi(this,"value",void 0),this.value=s}}var oA={WrappedValue:rA},sA=oA.WrappedValue,S_=Object.freeze({__proto__:null,WrappedValue:sA});const{isFastRefreshEnabled:aA}=Xa;class z_ extends Error{}class lA{constructor(s){var c,d,m;Pi(this,"_name",void 0),Pi(this,"_numLeafs",void 0),Pi(this,"_root",void 0),Pi(this,"_onHit",void 0),Pi(this,"_onSet",void 0),Pi(this,"_mapNodeValue",void 0),this._name=s==null?void 0:s.name,this._numLeafs=0,this._root=null,this._onHit=(c=s==null?void 0:s.onHit)!==null&&c!==void 0?c:()=>{},this._onSet=(d=s==null?void 0:s.onSet)!==null&&d!==void 0?d:()=>{},this._mapNodeValue=(m=s==null?void 0:s.mapNodeValue)!==null&&m!==void 0?m:w=>w}size(){return this._numLeafs}root(){return this._root}get(s,c){var d;return(d=this.getLeafNode(s,c))===null||d===void 0?void 0:d.value}getLeafNode(s,c){if(this._root==null)return;let d=this._root;for(;d;){if(c==null||c.onNodeVisit(d),d.type==="leaf")return this._onHit(d),d;const m=this._mapNodeValue(s(d.nodeKey));d=d.branches.get(m)}}set(s,c,d){const m=()=>{var w,v,o,y;let T,z;for(const[W,ye]of s){var C,S,U;const le=this._root;if((le==null?void 0:le.type)==="leaf")throw this.invalidCacheError();const he=T;if(T=he?he.branches.get(z):le,T=(C=T)!==null&&C!==void 0?C:{type:"branch",nodeKey:W,parent:he,branches:new Map,branchKey:z},T.type!=="branch"||T.nodeKey!==W)throw this.invalidCacheError();he==null||he.branches.set(z,T),d==null||(S=d.onNodeVisit)===null||S===void 0||S.call(d,T),z=this._mapNodeValue(ye),this._root=(U=this._root)!==null&&U!==void 0?U:T}const R=T?(w=T)===null||w===void 0?void 0:w.branches.get(z):this._root;if(R!=null&&(R.type!=="leaf"||R.branchKey!==z))throw this.invalidCacheError();const V={type:"leaf",value:c,parent:T,branchKey:z};(v=T)===null||v===void 0||v.branches.set(z,V),this._root=(o=this._root)!==null&&o!==void 0?o:V,this._numLeafs++,this._onSet(V),d==null||(y=d.onNodeVisit)===null||y===void 0||y.call(d,V)};try{m()}catch(w){if(w instanceof z_)this.clear(),m();else throw w}}delete(s){const c=this.root();if(!c)return!1;if(s===c)return this._root=null,this._numLeafs=0,!0;let d=s.parent,m=s.branchKey;for(;d;){var w;if(d.branches.delete(m),d===c)return d.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(d.branches.size>0)break;m=(w=d)===null||w===void 0?void 0:w.branchKey,d=d.parent}for(;d!==c;d=d.parent)if(d==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){const s=aA()?"Possible Fast Refresh module reload detected. This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache.";throw sr(s+(this._name!=null?` - ${this._name}`:"")),new z_}}var cA={TreeCache:lA},uA=cA.TreeCache,j_=Object.freeze({__proto__:null,TreeCache:uA});class hA{constructor(s){var c;Pi(this,"_maxSize",void 0),Pi(this,"_size",void 0),Pi(this,"_head",void 0),Pi(this,"_tail",void 0),Pi(this,"_map",void 0),Pi(this,"_keyMapper",void 0),this._maxSize=s.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(c=s.mapKey)!==null&&c!==void 0?c:d=>d}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(s){return this._map.has(this._keyMapper(s))}get(s){const c=this._keyMapper(s),d=this._map.get(c);if(d)return this.set(s,d.value),d.value}set(s,c){const d=this._keyMapper(s);this._map.get(d)&&this.delete(s);const w=this.head(),v={key:s,right:w,left:null,value:c};w?w.left=v:this._tail=v,this._map.set(d,v),this._head=v,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const s=this.tail();s&&this.delete(s.key)}delete(s){const c=this._keyMapper(s);if(!this._size||!this._map.has(c))return;const d=zn(this._map.get(c)),m=d.right,w=d.left;m&&(m.left=d.left),w&&(w.right=d.right),d===this.head()&&(this._head=m),d===this.tail()&&(this._tail=w),this._map.delete(c),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var dA={LRUCache:hA},fA=dA.LRUCache,O_=Object.freeze({__proto__:null,LRUCache:fA});const{LRUCache:pA}=O_,{TreeCache:gA}=j_;function mA({name:r,maxSize:s,mapNodeValue:c=d=>d}){const d=new pA({maxSize:s}),m=new gA({name:r,mapNodeValue:c,onHit:w=>{d.set(w,!0)},onSet:w=>{const v=d.tail();d.set(w,!0),v&&m.size()>s&&m.delete(v.key)}});return m}var L_=mA;const yA=15;function Gr(r,s,c){if(typeof r=="string"&&!r.includes('"')&&!r.includes("\\"))return`"${r}"`;switch(typeof r){case"undefined":return"";case"boolean":return r?"true":"false";case"number":case"symbol":return String(r);case"string":return JSON.stringify(r);case"function":if((s==null?void 0:s.allowFunctions)!==!0)throw Ni("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${r.name})__`}if(r===null)return"null";if(typeof r!="object"){var d;return(d=JSON.stringify(r))!==null&&d!==void 0?d:""}if(bn(r))return"__PROMISE__";if(Array.isArray(r))return`[${r.map((m,w)=>Gr(m,s,w.toString()))}]`;if(typeof r.toJSON=="function")return Gr(r.toJSON(c),s,c);if(r instanceof Map){const m={};for(const[w,v]of r)m[typeof w=="string"?w:Gr(w,s)]=v;return Gr(m,s,c)}return r instanceof Set?Gr(Array.from(r).sort((m,w)=>Gr(m,s).localeCompare(Gr(w,s))),s,c):Symbol!==void 0&&r[Symbol.iterator]!=null&&typeof r[Symbol.iterator]=="function"?Gr(Array.from(r),s,c):`{${Object.keys(r).filter(m=>r[m]!==void 0).sort().map(m=>`${Gr(m,s)}:${Gr(r[m],s,m)}`).join(",")}}`}function _A(r,s={allowFunctions:!1}){if(process.env.NODE_ENV!=="production"&&typeof window<"u"){const c=window.performance?window.performance.now():0,d=Gr(r,s),m=window.performance?window.performance.now():0;return m-c>yA&&(console.groupCollapsed(`Recoil: Spent ${m-c}ms computing a cache key`),console.warn(r,d),console.groupEnd()),d}return Gr(r,s)}var Oh=_A;const{TreeCache:xA}=j_,Lh={equality:"reference",eviction:"keep-all",maxSize:1/0};function vA({equality:r=Lh.equality,eviction:s=Lh.eviction,maxSize:c=Lh.maxSize}=Lh,d){const m=MA(r);return bA(s,c,m,d)}function MA(r){switch(r){case"reference":return s=>s;case"value":return s=>Oh(s)}throw Ni(`Unrecognized equality policy ${r}`)}function bA(r,s,c,d){switch(r){case"keep-all":return new xA({name:d,mapNodeValue:c});case"lru":return L_({name:d,maxSize:zn(s),mapNodeValue:c});case"most-recent":return L_({name:d,maxSize:1,mapNodeValue:c})}throw Ni(`Unrecognized eviction policy ${r}`)}var wA=vA;function IA(r){var s,c;if(typeof window>"u")return!1;const m=(c=(r!=null?(s=r.ownerDocument)!==null&&s!==void 0?s:r:document).defaultView)!==null&&c!==void 0?c:window;return r!=null&&(typeof m.Node=="function"?r instanceof m.Node:typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.nodeName=="string")}var DA=IA;const{isReactNative:TA,isWindow:AA}=wc;function NA(r){if(r===null||typeof r!="object")return!0;switch(typeof r.$$typeof){case"symbol":return!0;case"number":return!0}return!!(r["@@__IMMUTABLE_ITERABLE__@@"]!=null||r["@@__IMMUTABLE_KEYED__@@"]!=null||r["@@__IMMUTABLE_INDEXED__@@"]!=null||r["@@__IMMUTABLE_ORDERED__@@"]!=null||r["@@__IMMUTABLE_RECORD__@@"]!=null||DA(r)||bn(r)||r instanceof Error||ArrayBuffer.isView(r)||!TA&&AA(r))}function k_(r){if(!(typeof r!="object"||NA(r))){Object.freeze(r);for(const s in r)if(Object.prototype.hasOwnProperty.call(r,s)){const c=r[s];typeof c=="object"&&c!=null&&!Object.isFrozen(c)&&k_(c)}Object.seal(r)}}var Ng=k_;function EA(r){return()=>null}var CA={startPerfBlock:EA};const{isLoadable:SA,loadableWithError:kh,loadableWithPromise:zA,loadableWithValue:Eg}=_c,{WrappedValue:P_}=S_,{getNodeLoadable:Ph,peekNodeLoadable:jA,setNodeValue:OA}=ms,{saveDepsToStore:LA}=vc,{DEFAULT_VALUE:kA,getConfigDeletionHandler:PA,getNode:RA,registerNode:R_}=Er,{isRecoilValue:UA}=Ws,{markRecoilValueModified:U_}=bo,{retainedByOptionWithDefault:BA}=Xs,{recoilCallback:FA}=C_,{startPerfBlock:VA}=CA;class B_{}const Cc=new B_,Sc=[],Rh=new Map,QA=(()=>{let r=0;return()=>r++})();function F_(r){let s=null;const{key:c,get:d,cachePolicy_UNSTABLE:m}=r,w=r.set!=null?r.set:void 0;if(process.env.NODE_ENV!=="production"){if(typeof c!="string")throw Ni("A key option with a unique string value must be provided when creating a selector.");if(typeof d!="function")throw Ni("Selectors must specify a get callback option to get the selector value.")}const v=new Set,o=wA(m??{equality:"reference",eviction:"keep-all"},c),y=BA(r.retainedBy_UNSTABLE),T=new Map;let z=0;function C(){return!wn("recoil_memory_managament_2020")||z>0}function S(G){return G.getState().knownSelectors.add(c),z++,()=>{z--}}function U(){return PA(c)!==void 0&&!C()}function R(G,P,Q,J,K){Qe(P,J,K),V(G,Q)}function V(G,P){gt(G,P)&&at(G),ye(P,!0)}function W(G,P){gt(G,P)&&(zn(Ze(G)).stateVersions.clear(),ye(P,!1))}function ye(G,P){const Q=Rh.get(G);if(Q!=null){for(const J of Q)U_(J,zn(s));P&&Rh.delete(G)}}function le(G,P){let Q=Rh.get(P);Q==null&&Rh.set(P,Q=new Set),Q.add(G)}function he(G,P,Q,J,K,me){return P.then(Te=>{if(!C())throw at(G),Cc;const de=Eg(Te);return R(G,Q,K,de,J),Te}).catch(Te=>{if(!C())throw at(G),Cc;if(bn(Te))return xe(G,Te,Q,J,K,me);const de=kh(Te);throw R(G,Q,K,de,J),Te})}function xe(G,P,Q,J,K,me){return P.then(Te=>{if(!C())throw at(G),Cc;me.loadingDepKey!=null&&me.loadingDepPromise===P?Q.atomValues.set(me.loadingDepKey,Eg(Te)):G.getState().knownSelectors.forEach(Ce=>{Q.atomValues.delete(Ce)});const de=Pe(G,Q);if(de&&de.state!=="loading"){if((gt(G,K)||Ze(G)==null)&&V(G,K),de.state==="hasValue")return de.contents;throw de.contents}if(!gt(G,K)){const Ce=Ne(G,Q);if(Ce!=null)return Ce.loadingLoadable.contents}const[Oe,qe]=Ee(G,Q,K);if(Oe.state!=="loading"&&R(G,Q,K,Oe,qe),Oe.state==="hasError")throw Oe.contents;return Oe.contents}).catch(Te=>{if(Te instanceof B_)throw Cc;if(!C())throw at(G),Cc;const de=kh(Te);throw R(G,Q,K,de,J),Te})}function X(G,P,Q,J){var K,me,Te,de;if(gt(G,J)||P.version===((K=G.getState())===null||K===void 0||(me=K.currentTree)===null||me===void 0?void 0:me.version)||P.version===((Te=G.getState())===null||Te===void 0||(de=Te.nextTree)===null||de===void 0?void 0:de.version)){var Oe,qe,Ce;LA(c,Q,G,(Oe=(qe=G.getState())===null||qe===void 0||(Ce=qe.nextTree)===null||Ce===void 0?void 0:Ce.version)!==null&&Oe!==void 0?Oe:G.getState().currentTree.version)}for(const Be of Q)v.add(Be)}function Ee(G,P,Q){const J=VA(c);let K=!0,me=!0;const Te=()=>{J(),me=!1};let de,Oe=!1,qe;const Ce={loadingDepKey:null,loadingDepPromise:null},Be=new Map;function et({key:He}){const Tt=Ph(G,P,He);switch(Be.set(He,Tt),K||(X(G,P,new Set(Be.keys()),Q),W(G,Q)),Tt.state){case"hasValue":return Tt.contents;case"hasError":throw Tt.contents;case"loading":throw Ce.loadingDepKey=He,Ce.loadingDepPromise=Tt.contents,Tt.contents}throw Ni("Invalid Loadable state")}const Dt=He=>(...Tt)=>{if(me)throw Ni("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return s==null&&(process.env.NODE_ENV!=="production"?Io(!1,"Recoil Value can never be null"):Io(!1)),FA(G,He,Tt,{node:s})};try{de=d({get:et,getCallback:Dt}),de=UA(de)?et(de):de,SA(de)&&(de.state==="hasError"&&(Oe=!0),de=de.contents),bn(de)?de=he(G,de,P,Be,Q,Ce).finally(Te):Te(),de=de instanceof P_?de.value:de}catch(He){de=He,bn(de)?de=xe(G,de,P,Be,Q,Ce).finally(Te):(Oe=!0,Te())}return Oe?qe=kh(de):bn(de)?qe=zA(de):qe=Eg(de),K=!1,nt(G,Q,Be),X(G,P,new Set(Be.keys()),Q),[qe,Be]}function Pe(G,P){let Q=P.atomValues.get(c);if(Q!=null)return Q;const J=new Set;try{Q=o.get(me=>(typeof me!="string"&&(process.env.NODE_ENV!=="production"?Io(!1,"Cache nodeKey is type string"):Io(!1)),Ph(G,P,me).contents),{onNodeVisit:me=>{me.type==="branch"&&me.nodeKey!==c&&J.add(me.nodeKey)}})}catch(me){throw Ni(`Problem with cache lookup for selector "${c}": ${me.message}`)}if(Q){var K;P.atomValues.set(c,Q),X(G,P,J,(K=Ze(G))===null||K===void 0?void 0:K.executionID)}return Q}function Ve(G,P){const Q=Pe(G,P);if(Q!=null)return at(G),Q;const J=Ne(G,P);if(J!=null){var K;return((K=J.loadingLoadable)===null||K===void 0?void 0:K.state)==="loading"&&le(G,J.executionID),J.loadingLoadable}const me=QA(),[Te,de]=Ee(G,P,me);return Te.state==="loading"?(tt(G,me,Te,de,P),le(G,me)):(at(G),Qe(P,Te,de)),Te}function Ne(G,P){const Q=$1([T.has(G)?[zn(T.get(G))]:[],yh(ug(T,([K])=>K!==G),([,K])=>K)]);function J(K){for(const[me,Te]of K)if(!Ph(G,P,me).is(Te))return!0;return!1}for(const K of Q){if(K.stateVersions.get(P.version)||!J(K.depValuesDiscoveredSoFarDuringAsyncWork))return K.stateVersions.set(P.version,!0),K;K.stateVersions.set(P.version,!1)}}function Ze(G){return T.get(G)}function tt(G,P,Q,J,K){T.set(G,{depValuesDiscoveredSoFarDuringAsyncWork:J,executionID:P,loadingLoadable:Q,stateVersions:new Map([[K.version,!0]])})}function nt(G,P,Q){if(gt(G,P)){const J=Ze(G);J!=null&&(J.depValuesDiscoveredSoFarDuringAsyncWork=Q)}}function at(G){T.delete(G)}function gt(G,P){var Q;return P===((Q=Ze(G))===null||Q===void 0?void 0:Q.executionID)}function Ae(G){return Array.from(G.entries()).map(([P,Q])=>[P,Q.contents])}function Qe(G,P,Q){process.env.NODE_ENV!=="production"&&P.state!=="loading"&&!r.dangerouslyAllowMutability&&Ng(P.contents),G.atomValues.set(c,P);try{o.set(Ae(Q),P)}catch(J){throw Ni(`Problem with setting cache for selector "${c}": ${J.message}`)}}function Ke(G){if(Sc.includes(c)){const P=`Recoil selector has circular dependencies: ${Sc.slice(Sc.indexOf(c)).join(" → ")}`;return kh(Ni(P))}Sc.push(c);try{return G()}finally{Sc.pop()}}function _t(G,P){const Q=P.atomValues.get(c);return Q??o.get(J=>{var K;return typeof J!="string"&&(process.env.NODE_ENV!=="production"?Io(!1,"Cache nodeKey is type string"):Io(!1)),(K=jA(G,P,J))===null||K===void 0?void 0:K.contents})}function ut(G,P){return Ke(()=>Ve(G,P))}function ee(G){G.atomValues.delete(c)}function ie(G,P){s==null&&(process.env.NODE_ENV!=="production"?Io(!1,"Recoil Value can never be null"):Io(!1));for(const J of v){var Q;const K=RA(J);(Q=K.clearCache)===null||Q===void 0||Q.call(K,G,P)}v.clear(),ee(P),o.clear(),U_(G,s)}return w!=null?s=R_({key:c,nodeType:"selector",peek:_t,get:ut,set:(P,Q,J)=>{let K=!1;const me=new Map;function Te({key:Ce}){if(K)throw Ni("Recoil: Async selector sets are not currently supported.");const Be=Ph(P,Q,Ce);if(Be.state==="hasValue")return Be.contents;if(Be.state==="loading"){const et=`Getting value of asynchronous atom or selector "${Ce}" in a pending state while setting selector "${c}" is not yet supported.`;throw sr(et),Ni(et)}else throw Be.contents}function de(Ce,Be){if(K){const He="Recoil: Async selector sets are not currently supported.";throw sr(He),Ni(He)}const et=typeof Be=="function"?Be(Te(Ce)):Be;OA(P,Q,Ce.key,et).forEach((He,Tt)=>me.set(Tt,He))}function Oe(Ce){de(Ce,kA)}const qe=w({set:de,get:Te,reset:Oe},J);if(qe!==void 0)throw bn(qe)?Ni("Recoil: Async selector sets are not currently supported."):Ni("Recoil: selector set should be a void function.");return K=!0,me},init:S,invalidate:ee,clearCache:ie,shouldDeleteConfigOnRelease:U,dangerouslyAllowMutability:r.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:y}):s=R_({key:c,nodeType:"selector",peek:_t,get:ut,init:S,invalidate:ee,clearCache:ie,shouldDeleteConfigOnRelease:U,dangerouslyAllowMutability:r.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:y})}F_.value=r=>new P_(r);var el=F_;const{isLoadable:YA,loadableWithError:Cg,loadableWithPromise:Sg,loadableWithValue:tl}=_c,{WrappedValue:V_}=S_,{peekNodeInfo:$A}=ms,{DEFAULT_VALUE:Js,DefaultValue:ys,getConfigDeletionHandler:Q_,registerNode:ZA,setConfigDeletionHandler:GA}=Er,{isRecoilValue:HA}=Ws,{getRecoilValueAsLoadable:WA,markRecoilValueModified:qA,setRecoilValue:Y_,setRecoilValueLoadable:XA}=bo,{retainedByOptionWithDefault:KA}=Xs,zc=r=>r instanceof V_?r.value:r;function JA(r){const{key:s,persistence_UNSTABLE:c}=r,d=KA(r.retainedBy_UNSTABLE);let m=0;function w(le){return Sg(le.then(he=>(v=tl(he),he)).catch(he=>{throw v=Cg(he),he}))}let v=bn(r.default)?w(r.default):YA(r.default)?r.default.state==="loading"?w(r.default.contents):r.default:tl(zc(r.default));T(v.contents);let o;const y=new Map;function T(le){return process.env.NODE_ENV!=="production"&&r.dangerouslyAllowMutability!==!0?bn(le)?le.then(he=>(Ng(he),he)):(Ng(le),le):le}function z(le,he){const xe=he.then(X=>{var Ee,Pe;return((Pe=((Ee=le.getState().nextTree)!==null&&Ee!==void 0?Ee:le.getState().currentTree).atomValues.get(s))===null||Pe===void 0?void 0:Pe.contents)===xe&&Y_(le,ye,X),X}).catch(X=>{var Ee,Pe;throw((Pe=((Ee=le.getState().nextTree)!==null&&Ee!==void 0?Ee:le.getState().currentTree).atomValues.get(s))===null||Pe===void 0?void 0:Pe.contents)===xe&&XA(le,ye,Cg(X)),X});return xe}function C(le,he,xe){var X;m++;const Ee=()=>{var Ze;m--,(Ze=y.get(le))===null||Ze===void 0||Ze.forEach(tt=>tt()),y.delete(le)};if(le.getState().knownAtoms.add(s),v.state==="loading"){const Ze=()=>{var tt;((tt=le.getState().nextTree)!==null&&tt!==void 0?tt:le.getState().currentTree).atomValues.has(s)||qA(le,ye)};v.contents.finally(Ze)}const Pe=(X=r.effects)!==null&&X!==void 0?X:r.effects_UNSTABLE;if(Pe!=null){let gt=function(ee){if(tt&&ee.key===s){const ie=Ze;return ie instanceof ys?S(le,he):bn(ie)?Sg(ie.then(G=>G instanceof ys?v.toPromise():G)):tl(ie)}return WA(le,ee)},Ae=function(ee){return gt(ee).toPromise()},Qe=function(ee){var ie;const G=$A(le,(ie=le.getState().nextTree)!==null&&ie!==void 0?ie:le.getState().currentTree,ee.key);return tt&&ee.key===s&&!(Ze instanceof ys)?{...G,isSet:!0,loadable:gt(ee)}:G},Ze=Js,tt=!0,nt=!1,at=null;const Ke=ee=>ie=>{if(tt){const G=gt(ye),P=G.state==="hasValue"?G.contents:Js;Ze=typeof ie=="function"?ie(P):ie,bn(Ze)&&(Ze=Ze.then(Q=>(at={effect:ee,value:Q},Q)))}else{if(bn(ie))throw Ni("Setting atoms to async values is not implemented.");typeof ie!="function"&&(at={effect:ee,value:zc(ie)}),Y_(le,ye,typeof ie=="function"?G=>{const P=zc(ie(G));return at={effect:ee,value:P},P}:zc(ie))}},_t=ee=>()=>Ke(ee)(Js),ut=ee=>ie=>{var G;const{release:P}=le.subscribeToTransactions(Q=>{var J;let{currentTree:K,previousTree:me}=Q.getState();me||(sr("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),me=K);const Te=(J=K.atomValues.get(s))!==null&&J!==void 0?J:v;if(Te.state==="hasValue"){var de,Oe,qe,Ce;const Be=Te.contents,et=(de=me.atomValues.get(s))!==null&&de!==void 0?de:v,Dt=et.state==="hasValue"?et.contents:Js;((Oe=at)===null||Oe===void 0?void 0:Oe.effect)!==ee||((qe=at)===null||qe===void 0?void 0:qe.value)!==Be?ie(Be,Dt,!K.atomValues.has(s)):((Ce=at)===null||Ce===void 0?void 0:Ce.effect)===ee&&(at=null)}},s);y.set(le,[...(G=y.get(le))!==null&&G!==void 0?G:[],P])};for(const ee of Pe)try{const ie=ee({node:ye,storeID:le.storeID,parentStoreID_UNSTABLE:le.parentStoreID,trigger:xe,setSelf:Ke(ee),resetSelf:_t(ee),onSet:ut(ee),getPromise:Ae,getLoadable:gt,getInfo_UNSTABLE:Qe});if(ie!=null){var Ve;y.set(le,[...(Ve=y.get(le))!==null&&Ve!==void 0?Ve:[],ie])}}catch(ie){Ze=ie,nt=!0}if(tt=!1,!(Ze instanceof ys)){var Ne;const ee=nt?Cg(Ze):bn(Ze)?Sg(z(le,Ze)):tl(zc(Ze));T(ee.contents),he.atomValues.set(s,ee),(Ne=le.getState().nextTree)===null||Ne===void 0||Ne.atomValues.set(s,ee)}}return Ee}function S(le,he){var xe,X;return(xe=(X=he.atomValues.get(s))!==null&&X!==void 0?X:o)!==null&&xe!==void 0?xe:v}function U(le,he){if(he.atomValues.has(s))return zn(he.atomValues.get(s));if(he.nonvalidatedAtoms.has(s)){if(o!=null)return o;if(c==null)return mh(`Tried to restore a persisted value for atom ${s} but it has no persistence settings.`),v;const xe=he.nonvalidatedAtoms.get(s),X=c.validator(xe,Js);return o=X instanceof ys?v:tl(X),o}else return v}function R(){o=void 0}function V(le,he,xe){if(he.atomValues.has(s)){const X=zn(he.atomValues.get(s));if(X.state==="hasValue"&&xe===X.contents)return new Map}else if(!he.nonvalidatedAtoms.has(s)&&xe instanceof ys)return new Map;return T(xe),o=void 0,new Map().set(s,tl(xe))}function W(){return Q_(s)!==void 0&&m<=0}const ye=ZA({key:s,nodeType:"atom",peek:S,get:U,set:V,init:C,invalidate:R,shouldDeleteConfigOnRelease:W,dangerouslyAllowMutability:r.dangerouslyAllowMutability,persistence_UNSTABLE:r.persistence_UNSTABLE?{type:r.persistence_UNSTABLE.type,backButton:r.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:d});return ye}function zg(r){if(process.env.NODE_ENV!=="production"&&typeof r.key!="string")throw Ni("A key option with a unique string value must be provided when creating an atom.");const{...s}=r,c="default"in r?r.default:new Promise(()=>{});return HA(c)?e5({...s,default:c}):JA({...s,default:c})}function e5(r){const s=zg({...r,default:Js,persistence_UNSTABLE:r.persistence_UNSTABLE===void 0?void 0:{...r.persistence_UNSTABLE,validator:d=>d instanceof ys?d:zn(r.persistence_UNSTABLE).validator(d,Js)},effects:r.effects,effects_UNSTABLE:r.effects_UNSTABLE}),c=el({key:`${r.key}__withFallback`,get:({get:d})=>{const m=d(s);return m instanceof ys?r.default:m},set:({set:d},m)=>d(s,m),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:r.dangerouslyAllowMutability});return GA(c.key,Q_(r.key)),c}zg.value=r=>new V_(r);var $_=zg;class t5{constructor(s){var c;Pi(this,"_map",void 0),Pi(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(c=s==null?void 0:s.mapKey)!==null&&c!==void 0?c:d=>d}size(){return this._map.size}has(s){return this._map.has(this._keyMapper(s))}get(s){return this._map.get(this._keyMapper(s))}set(s,c){this._map.set(this._keyMapper(s),c)}delete(s){this._map.delete(this._keyMapper(s))}clear(){this._map.clear()}}var i5={MapCache:t5},n5=i5.MapCache,r5=Object.freeze({__proto__:null,MapCache:n5});const{LRUCache:Z_}=O_,{MapCache:o5}=r5,Uh={equality:"reference",eviction:"none",maxSize:1/0};function s5({equality:r=Uh.equality,eviction:s=Uh.eviction,maxSize:c=Uh.maxSize}=Uh){const d=a5(r);return l5(s,c,d)}function a5(r){switch(r){case"reference":return s=>s;case"value":return s=>Oh(s)}throw Ni(`Unrecognized equality policy ${r}`)}function l5(r,s,c){switch(r){case"keep-all":return new o5({mapKey:c});case"lru":return new Z_({mapKey:c,maxSize:zn(s)});case"most-recent":return new Z_({mapKey:c,maxSize:1})}throw Ni(`Unrecognized eviction policy ${r}`)}var G_=s5;const{setConfigDeletionHandler:c5}=Er;function u5(r){var s,c;const d=G_({equality:(s=(c=r.cachePolicyForParams_UNSTABLE)===null||c===void 0?void 0:c.equality)!==null&&s!==void 0?s:"value",eviction:"keep-all"});return m=>{var w,v;const o=d.get(m);if(o!=null)return o;const{cachePolicyForParams_UNSTABLE:y,...T}=r,z="default"in r?r.default:new Promise(()=>{}),C=$_({...T,key:`${r.key}__${(w=Oh(m))!==null&&w!==void 0?w:"void"}`,default:typeof z=="function"?z(m):z,retainedBy_UNSTABLE:typeof r.retainedBy_UNSTABLE=="function"?r.retainedBy_UNSTABLE(m):r.retainedBy_UNSTABLE,effects:typeof r.effects=="function"?r.effects(m):typeof r.effects_UNSTABLE=="function"?r.effects_UNSTABLE(m):(v=r.effects)!==null&&v!==void 0?v:r.effects_UNSTABLE});return d.set(m,C),c5(C.key,()=>{d.delete(m)}),C}}var h5=u5;const{setConfigDeletionHandler:d5}=Er;let f5=0;function p5(r){var s,c;const d=G_({equality:(s=(c=r.cachePolicyForParams_UNSTABLE)===null||c===void 0?void 0:c.equality)!==null&&s!==void 0?s:"value",eviction:"keep-all"});return m=>{var w;let v;try{v=d.get(m)}catch(S){throw Ni(`Problem with cache lookup for selector ${r.key}: ${S.message}`)}if(v!=null)return v;const o=`${r.key}__selectorFamily/${(w=Oh(m,{allowFunctions:!0}))!==null&&w!==void 0?w:"void"}/${f5++}`,y=S=>r.get(m)(S),T=r.cachePolicy_UNSTABLE,z=typeof r.retainedBy_UNSTABLE=="function"?r.retainedBy_UNSTABLE(m):r.retainedBy_UNSTABLE;let C;if(r.set!=null){const S=r.set;C=el({key:o,get:y,set:(R,V)=>S(m)(R,V),cachePolicy_UNSTABLE:T,dangerouslyAllowMutability:r.dangerouslyAllowMutability,retainedBy_UNSTABLE:z})}else C=el({key:o,get:y,cachePolicy_UNSTABLE:T,dangerouslyAllowMutability:r.dangerouslyAllowMutability,retainedBy_UNSTABLE:z});return d.set(m,C),d5(C.key,()=>{d.delete(m)}),C}}var _s=p5;const g5=_s({key:"__constant",get:r=>()=>r,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function m5(r){return g5(r)}var y5=m5;const _5=_s({key:"__error",get:r=>()=>{throw Ni(r)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function x5(r){return _5(r)}var v5=x5;function M5(r){return r}var b5=M5;const{loadableWithError:H_,loadableWithPromise:W_,loadableWithValue:q_}=_c;function Bh(r,s){const c=Array(s.length).fill(void 0),d=Array(s.length).fill(void 0);for(const[m,w]of s.entries())try{c[m]=r(w)}catch(v){d[m]=v}return[c,d]}function w5(r){return r!=null&&!bn(r)}function Fh(r){return Array.isArray(r)?r:Object.getOwnPropertyNames(r).map(s=>r[s])}function jg(r,s){return Array.isArray(r)?s:Object.getOwnPropertyNames(r).reduce((c,d,m)=>({...c,[d]:s[m]}),{})}function il(r,s,c){const d=c.map((m,w)=>m==null?q_(s[w]):bn(m)?W_(m):H_(m));return jg(r,d)}function I5(r,s){return s.map((c,d)=>c===void 0?r[d]:c)}const D5=_s({key:"__waitForNone",get:r=>({get:s})=>{const c=Fh(r),[d,m]=Bh(s,c);return il(r,d,m)},dangerouslyAllowMutability:!0}),T5=_s({key:"__waitForAny",get:r=>({get:s})=>{const c=Fh(r),[d,m]=Bh(s,c);return m.some(w=>!bn(w))?il(r,d,m):new Promise(w=>{for(const[v,o]of m.entries())bn(o)&&o.then(y=>{d[v]=y,m[v]=void 0,w(il(r,d,m))}).catch(y=>{m[v]=y,w(il(r,d,m))})})},dangerouslyAllowMutability:!0}),A5=_s({key:"__waitForAll",get:r=>({get:s})=>{const c=Fh(r),[d,m]=Bh(s,c);if(m.every(v=>v==null))return jg(r,d);const w=m.find(w5);if(w!=null)throw w;return Promise.all(m).then(v=>jg(r,I5(d,v)))},dangerouslyAllowMutability:!0}),N5=_s({key:"__waitForAllSettled",get:r=>({get:s})=>{const c=Fh(r),[d,m]=Bh(s,c);return m.every(w=>!bn(w))?il(r,d,m):Promise.all(m.map((w,v)=>bn(w)?w.then(o=>{d[v]=o,m[v]=void 0}).catch(o=>{d[v]=void 0,m[v]=o}):null)).then(()=>il(r,d,m))},dangerouslyAllowMutability:!0}),E5=_s({key:"__noWait",get:r=>({get:s})=>{try{return el.value(q_(s(r)))}catch(c){return el.value(bn(c)?W_(c):H_(c))}},dangerouslyAllowMutability:!0});var C5={waitForNone:D5,waitForAny:T5,waitForAll:A5,waitForAllSettled:N5,noWait:E5};const{RecoilLoadable:S5}=_c,{DefaultValue:z5}=Er,{RecoilRoot:j5,useRecoilStoreID:O5}=Go,{isRecoilValue:L5}=Ws,{retentionZone:k5}=Mh,{freshSnapshot:P5}=Ah,{useRecoilState:R5,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:U5,useRecoilStateLoadable:B5,useRecoilValue:F5,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:V5,useRecoilValueLoadable:Q5,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Y5,useResetRecoilState:$5,useSetRecoilState:Z5}=qD,{useGotoRecoilSnapshot:G5,useRecoilSnapshot:H5,useRecoilTransactionObserver:W5}=I_,{useRecoilCallback:q5}=C_,{noWait:X5,waitForAll:K5,waitForAllSettled:J5,waitForAny:eN,waitForNone:tN}=C5;var Vh={DefaultValue:z5,isRecoilValue:L5,RecoilLoadable:S5,RecoilEnv:qa,RecoilRoot:j5,useRecoilStoreID:O5,useRecoilBridgeAcrossReactRoots_UNSTABLE:wT,atom:$_,selector:el,atomFamily:h5,selectorFamily:_s,constSelector:y5,errorSelector:v5,readOnlySelector:b5,noWait:X5,waitForNone:tN,waitForAny:eN,waitForAll:K5,waitForAllSettled:J5,useRecoilValue:F5,useRecoilValueLoadable:Q5,useRecoilState:R5,useRecoilStateLoadable:B5,useSetRecoilState:Z5,useResetRecoilState:$5,useGetRecoilValueInfo_UNSTABLE:yT,useRecoilRefresher_UNSTABLE:KT,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Y5,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:V5,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:U5,useRecoilCallback:q5,useRecoilTransaction_UNSTABLE:nA,useGotoRecoilSnapshot:G5,useRecoilSnapshot:H5,useRecoilTransactionObserver_UNSTABLE:W5,snapshot_UNSTABLE:P5,useRetain:Mg,retentionZone:k5},iN=Vh.RecoilRoot,Un=Vh.atom,Ui=Vh.useRecoilValue,vn=Vh.useRecoilState;const nN=(r,s)=>{const c=r[s];return c?typeof c=="function"?c():Promise.resolve(c):new Promise((d,m)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(m.bind(null,new Error("Unknown variable dynamic import: "+s)))})},rN="mi-components";let Qh,X_,Fr=!1,Og=!1;const Ho=(r,s="")=>()=>{},oN=(r,s)=>()=>{},sN="{visibility:hidden}.hydrated{visibility:inherit}",K_="http://www.w3.org/1999/xlink",J_={},aN="http://www.w3.org/2000/svg",lN="http://www.w3.org/1999/xhtml",cN=r=>r!=null,Lg=r=>(r=typeof r,r==="object"||r==="function");function ex(r){var s,c,d;return(d=(c=(s=r.head)===null||s===void 0?void 0:s.querySelector('meta[name="csp-nonce"]'))===null||c===void 0?void 0:c.getAttribute("content"))!==null&&d!==void 0?d:void 0}const be=(r,s,...c)=>{let d=null,m=null,w=!1,v=!1;const o=[],y=z=>{for(let C=0;C<z.length;C++)d=z[C],Array.isArray(d)?y(d):d!=null&&typeof d!="boolean"&&((w=typeof r!="function"&&!Lg(d))&&(d=String(d)),w&&v?o[o.length-1].$text$+=d:o.push(w?kg(null,d):d),v=w)};if(y(c),s){s.key&&(m=s.key);{const z=s.className||s.class;z&&(s.class=typeof z!="object"?z:Object.keys(z).filter(C=>z[C]).join(" "))}}const T=kg(r,null);return T.$attrs$=s,o.length>0&&(T.$children$=o),T.$key$=m,T},kg=(r,s)=>{const c={$flags$:0,$tag$:r,$text$:s,$elm$:null,$children$:null};return c.$attrs$=null,c.$key$=null,c},qn={},uN=r=>r&&r.$tag$===qn,hN=(r,s)=>r!=null&&!Lg(r)?s&4?r==="false"?!1:r===""||!!r:s&2?parseFloat(r):s&1?String(r):r:r,Wo=r=>xs(r).$hostElement$,Tn=(r,s,c)=>{const d=Wo(r);return{emit:m=>tx(d,s,{bubbles:!!(c&4),composed:!!(c&2),cancelable:!!(c&1),detail:m})}},tx=(r,s,c)=>{const d=ar.ce(s,c);return r.dispatchEvent(d),d},ix=new WeakMap,dN=(r,s,c)=>{let d=Gh.get(r);jN&&c?(d=d||new CSSStyleSheet,typeof d=="string"?d=s:d.replaceSync(s)):d=s,Gh.set(r,d)},fN=(r,s,c,d)=>{var m;let w=nx(s);const v=Gh.get(w);if(r=r.nodeType===11?r:Do,v)if(typeof v=="string"){r=r.head||r;let o=ix.get(r),y;if(o||ix.set(r,o=new Set),!o.has(w)){{y=Do.createElement("style"),y.innerHTML=v;const T=(m=ar.$nonce$)!==null&&m!==void 0?m:ex(Do);T!=null&&y.setAttribute("nonce",T),r.insertBefore(y,r.querySelector("link"))}o&&o.add(w)}}else r.adoptedStyleSheets.includes(v)||(r.adoptedStyleSheets=[...r.adoptedStyleSheets,v]);return w},pN=r=>{const s=r.$cmpMeta$,c=r.$hostElement$,d=s.$flags$,m=Ho("attachStyles",s.$tagName$),w=fN(c.shadowRoot?c.shadowRoot:c.getRootNode(),s);d&10&&(c["s-sc"]=w,c.classList.add(w+"-h")),m()},nx=(r,s)=>"sc-"+r.$tagName$,rx=(r,s,c,d,m,w)=>{if(c!==d){let v=yx(r,s),o=s.toLowerCase();if(s==="class"){const y=r.classList,T=ox(c),z=ox(d);y.remove(...T.filter(C=>C&&!z.includes(C))),y.add(...z.filter(C=>C&&!T.includes(C)))}else if(s==="style"){for(const y in c)(!d||d[y]==null)&&(y.includes("-")?r.style.removeProperty(y):r.style[y]="");for(const y in d)(!c||d[y]!==c[y])&&(y.includes("-")?r.style.setProperty(y,d[y]):r.style[y]=d[y])}else if(s!=="key")if(s==="ref")d&&d(r);else if(!v&&s[0]==="o"&&s[1]==="n")s[2]==="-"?s=s.slice(3):yx(jc,o)?s=o.slice(2):s=o[2]+s.slice(3),c&&ar.rel(r,s,c,!1),d&&ar.ael(r,s,d,!1);else{const y=Lg(d);if((v||y&&d!==null)&&!m)try{if(r.tagName.includes("-"))r[s]=d;else{const z=d??"";s==="list"?v=!1:(c==null||r[s]!=z)&&(r[s]=z)}}catch{}let T=!1;o!==(o=o.replace(/^xlink\:?/,""))&&(s=o,T=!0),d==null||d===!1?(d!==!1||r.getAttribute(s)==="")&&(T?r.removeAttributeNS(K_,s):r.removeAttribute(s)):(!v||w&4||m)&&!y&&(d=d===!0?"":d,T?r.setAttributeNS(K_,s,d):r.setAttribute(s,d))}}},gN=/\s/,ox=r=>r?r.split(gN):[],sx=(r,s,c,d)=>{const m=s.$elm$.nodeType===11&&s.$elm$.host?s.$elm$.host:s.$elm$,w=r&&r.$attrs$||J_,v=s.$attrs$||J_;for(d in w)d in v||rx(m,d,w[d],void 0,c,s.$flags$);for(d in v)rx(m,d,w[d],v[d],c,s.$flags$)},Yh=(r,s,c,d)=>{const m=s.$children$[c];let w=0,v,o;if(m.$text$!==null)v=m.$elm$=Do.createTextNode(m.$text$);else{if(Fr||(Fr=m.$tag$==="svg"),v=m.$elm$=Do.createElementNS(Fr?aN:lN,m.$tag$),Fr&&m.$tag$==="foreignObject"&&(Fr=!1),sx(null,m,Fr),cN(Qh)&&v["s-si"]!==Qh&&v.classList.add(v["s-si"]=Qh),m.$children$)for(w=0;w<m.$children$.length;++w)o=Yh(r,m,w),o&&v.appendChild(o);m.$tag$==="svg"?Fr=!1:v.tagName==="foreignObject"&&(Fr=!0)}return v},ax=(r,s,c,d,m,w)=>{let v=r,o;for(v.shadowRoot&&v.tagName===X_&&(v=v.shadowRoot);m<=w;++m)d[m]&&(o=Yh(null,c,m),o&&(d[m].$elm$=o,v.insertBefore(o,s)))},lx=(r,s,c,d,m)=>{for(;s<=c;++s)(d=r[s])&&(m=d.$elm$,cx(d),m.remove())},mN=(r,s,c,d)=>{let m=0,w=0,v=0,o=0,y=s.length-1,T=s[0],z=s[y],C=d.length-1,S=d[0],U=d[C],R,V;for(;m<=y&&w<=C;)if(T==null)T=s[++m];else if(z==null)z=s[--y];else if(S==null)S=d[++w];else if(U==null)U=d[--C];else if($h(T,S))nl(T,S),T=s[++m],S=d[++w];else if($h(z,U))nl(z,U),z=s[--y],U=d[--C];else if($h(T,U))nl(T,U),r.insertBefore(T.$elm$,z.$elm$.nextSibling),T=s[++m],U=d[--C];else if($h(z,S))nl(z,S),r.insertBefore(z.$elm$,T.$elm$),z=s[--y],S=d[++w];else{for(v=-1,o=m;o<=y;++o)if(s[o]&&s[o].$key$!==null&&s[o].$key$===S.$key$){v=o;break}v>=0?(V=s[v],V.$tag$!==S.$tag$?R=Yh(s&&s[w],c,v):(nl(V,S),s[v]=void 0,R=V.$elm$),S=d[++w]):(R=Yh(s&&s[w],c,w),S=d[++w]),R&&T.$elm$.parentNode.insertBefore(R,T.$elm$)}m>y?ax(r,d[C+1]==null?null:d[C+1].$elm$,c,d,w,C):w>C&&lx(s,m,y)},$h=(r,s)=>r.$tag$===s.$tag$?r.$key$===s.$key$:!1,nl=(r,s)=>{const c=s.$elm$=r.$elm$,d=r.$children$,m=s.$children$,w=s.$tag$,v=s.$text$;v===null?(Fr=w==="svg"?!0:w==="foreignObject"?!1:Fr,w==="slot"||sx(r,s,Fr),d!==null&&m!==null?mN(c,d,s,m):m!==null?(r.$text$!==null&&(c.textContent=""),ax(c,null,s,m,0,m.length-1)):d!==null&&lx(d,0,d.length-1),Fr&&w==="svg"&&(Fr=!1)):r.$text$!==v&&(c.data=v)},cx=r=>{r.$attrs$&&r.$attrs$.ref&&r.$attrs$.ref(null),r.$children$&&r.$children$.map(cx)},yN=(r,s)=>{const c=r.$hostElement$,d=r.$cmpMeta$,m=r.$vnode$||kg(null,null),w=uN(s)?s:be(null,null,s);X_=c.tagName,d.$attrsToReflect$&&(w.$attrs$=w.$attrs$||{},d.$attrsToReflect$.map(([v,o])=>w.$attrs$[o]=c[v])),w.$tag$=null,w.$flags$|=4,r.$vnode$=w,w.$elm$=m.$elm$=c.shadowRoot||c,Qh=c["s-sc"],nl(m,w)},ux=(r,s)=>{s&&!r.$onRenderResolve$&&s["s-p"]&&s["s-p"].push(new Promise(c=>r.$onRenderResolve$=c))},Zh=(r,s)=>{if(r.$flags$|=16,r.$flags$&4){r.$flags$|=512;return}return ux(r,r.$ancestorComponent$),LN(()=>_N(r,s))},_N=(r,s)=>{const c=Ho("scheduleUpdate",r.$cmpMeta$.$tagName$),d=r.$lazyInstance$;let m;return s&&(r.$flags$|=256,r.$queuedListeners$&&(r.$queuedListeners$.map(([w,v])=>ea(d,w,v)),r.$queuedListeners$=null),m=ea(d,"componentWillLoad")),m=dx(m,()=>ea(d,"componentWillRender")),c(),dx(m,()=>xN(r,d,s))},xN=async(r,s,c)=>{const d=r.$hostElement$,m=Ho("update",r.$cmpMeta$.$tagName$),w=d["s-rc"];c&&pN(r);const v=Ho("render",r.$cmpMeta$.$tagName$);vN(r,s),w&&(w.map(o=>o()),d["s-rc"]=void 0),v(),m();{const o=d["s-p"],y=()=>MN(r);o.length===0?y():(Promise.all(o).then(y),r.$flags$|=4,o.length=0)}},vN=(r,s,c)=>{try{s=s.render&&s.render(),r.$flags$&=-17,r.$flags$|=2,yN(r,s)}catch(d){ta(d,r.$hostElement$)}return null},MN=r=>{const s=r.$cmpMeta$.$tagName$,c=r.$hostElement$,d=Ho("postUpdate",s),m=r.$lazyInstance$,w=r.$ancestorComponent$;ea(m,"componentDidRender"),r.$flags$&64?d():(r.$flags$|=64,fx(c),ea(m,"componentDidLoad"),d(),r.$onReadyResolve$(c),w||hx()),r.$onInstanceResolve$(c),r.$onRenderResolve$&&(r.$onRenderResolve$(),r.$onRenderResolve$=void 0),r.$flags$&512&&Bg(()=>Zh(r,!1)),r.$flags$&=-517},Pg=r=>{{const s=xs(r),c=s.$hostElement$.isConnected;return c&&(s.$flags$&18)===2&&Zh(s,!1),c}},hx=r=>{fx(Do.documentElement),Bg(()=>tx(jc,"appload",{detail:{namespace:rN}}))},ea=(r,s,c)=>{if(r&&r[s])try{return r[s](c)}catch(d){ta(d)}},dx=(r,s)=>r&&r.then?r.then(s):s(),fx=r=>r.classList.add("hydrated"),bN=(r,s)=>xs(r).$instanceValues$.get(s),wN=(r,s,c,d)=>{const m=xs(r),w=m.$hostElement$,v=m.$instanceValues$.get(s),o=m.$flags$,y=m.$lazyInstance$;c=hN(c,d.$members$[s][0]);const T=Number.isNaN(v)&&Number.isNaN(c),z=c!==v&&!T;if((!(o&8)||v===void 0)&&z&&(m.$instanceValues$.set(s,c),y)){if(d.$watchers$&&o&128){const C=d.$watchers$[s];C&&C.map(S=>{try{y[S](c,v,s)}catch(U){ta(U,w)}})}(o&18)===2&&Zh(m,!1)}},px=(r,s,c)=>{if(s.$members$){r.watchers&&(s.$watchers$=r.watchers);const d=Object.entries(s.$members$),m=r.prototype;if(d.map(([w,[v]])=>{v&31||c&2&&v&32?Object.defineProperty(m,w,{get(){return bN(this,w)},set(o){wN(this,w,o,s)},configurable:!0,enumerable:!0}):c&1&&v&64&&Object.defineProperty(m,w,{value(...o){const y=xs(this);return y.$onInstancePromise$.then(()=>y.$lazyInstance$[w](...o))}})}),c&1){const w=new Map;m.attributeChangedCallback=function(v,o,y){ar.jmp(()=>{const T=w.get(v);if(this.hasOwnProperty(T))y=this[T],delete this[T];else if(m.hasOwnProperty(T)&&typeof this[T]=="number"&&this[T]==y)return;this[T]=y===null&&typeof this[T]=="boolean"?!1:y})},r.observedAttributes=d.filter(([v,o])=>o[0]&15).map(([v,o])=>{const y=o[1]||v;return w.set(y,v),o[0]&512&&s.$attrsToReflect$.push([v,y]),y})}}return r},IN=async(r,s,c,d,m)=>{if(!(s.$flags$&32)){{if(s.$flags$|=32,m=zN(c),m.then){const y=oN();m=await m,y()}m.isProxied||(c.$watchers$=m.watchers,px(m,c,2),m.isProxied=!0);const o=Ho("createInstance",c.$tagName$);s.$flags$|=8;try{new m(s)}catch(y){ta(y)}s.$flags$&=-9,s.$flags$|=128,o(),gx(s.$lazyInstance$)}if(m.style){let o=m.style;const y=nx(c);if(!Gh.has(y)){const T=Ho("registerStyles",c.$tagName$);dN(y,o,!!(c.$flags$&1)),T()}}}const w=s.$ancestorComponent$,v=()=>Zh(s,!0);w&&w["s-rc"]?w["s-rc"].push(v):v()},gx=r=>{ea(r,"connectedCallback")},DN=r=>{if(!(ar.$flags$&1)){const s=xs(r),c=s.$cmpMeta$,d=Ho("connectedCallback",c.$tagName$);if(s.$flags$&1)mx(r,s,c.$listeners$),gx(s.$lazyInstance$);else{s.$flags$|=1;{let m=r;for(;m=m.parentNode||m.host;)if(m["s-p"]){ux(s,s.$ancestorComponent$=m);break}}c.$members$&&Object.entries(c.$members$).map(([m,[w]])=>{if(w&31&&r.hasOwnProperty(m)){const v=r[m];delete r[m],r[m]=v}}),IN(r,s,c)}d()}},TN=r=>{if(!(ar.$flags$&1)){const s=xs(r),c=s.$lazyInstance$;s.$rmListeners$&&(s.$rmListeners$.map(d=>d()),s.$rmListeners$=void 0),ea(c,"disconnectedCallback")}},AN=(r,s={})=>{var c;const d=Ho(),m=[],w=s.exclude||[],v=jc.customElements,o=Do.head,y=o.querySelector("meta[charset]"),T=Do.createElement("style"),z=[];let C,S=!0;Object.assign(ar,s),ar.$resourcesUrl$=new URL(s.resourcesUrl||"./",Do.baseURI).href,r.map(U=>{U[1].map(R=>{const V={$flags$:R[0],$tagName$:R[1],$members$:R[2],$listeners$:R[3]};V.$members$=R[2],V.$listeners$=R[3],V.$attrsToReflect$=[],V.$watchers$={};const W=V.$tagName$,ye=class extends HTMLElement{constructor(le){super(le),le=this,SN(le,V),V.$flags$&1&&le.attachShadow({mode:"open"})}connectedCallback(){C&&(clearTimeout(C),C=null),S?z.push(this):ar.jmp(()=>DN(this))}disconnectedCallback(){ar.jmp(()=>TN(this))}componentOnReady(){return xs(this).$onReadyPromise$}};V.$lazyBundleId$=U[0],!w.includes(W)&&!v.get(W)&&(m.push(W),v.define(W,px(ye,V,1)))})});{T.innerHTML=m+sN,T.setAttribute("data-styles","");const U=(c=ar.$nonce$)!==null&&c!==void 0?c:ex(Do);U!=null&&T.setAttribute("nonce",U),o.insertBefore(T,y?y.nextSibling:o.firstChild)}S=!1,z.length?z.map(U=>U.connectedCallback()):ar.jmp(()=>C=setTimeout(hx,30)),d()},mx=(r,s,c,d)=>{c&&c.map(([m,w,v])=>{const o=EN(r,m),y=NN(s,v),T=CN(m);ar.ael(o,w,y,T),(s.$rmListeners$=s.$rmListeners$||[]).push(()=>ar.rel(o,w,y,T))})},NN=(r,s)=>c=>{try{r.$flags$&256?r.$lazyInstance$[s](c):(r.$queuedListeners$=r.$queuedListeners$||[]).push([s,c])}catch(d){ta(d)}},EN=(r,s)=>s&8?jc:r,CN=r=>(r&2)!==0,Rg=new WeakMap,xs=r=>Rg.get(r),Hi=(r,s)=>Rg.set(s.$lazyInstance$=r,s),SN=(r,s)=>{const c={$flags$:0,$hostElement$:r,$cmpMeta$:s,$instanceValues$:new Map};return c.$onInstancePromise$=new Promise(d=>c.$onInstanceResolve$=d),c.$onReadyPromise$=new Promise(d=>c.$onReadyResolve$=d),r["s-p"]=[],r["s-rc"]=[],mx(r,c,s.$listeners$),Rg.set(r,c)},yx=(r,s)=>s in r,ta=(r,s)=>(0,console.error)(r,s),_x=new Map,zN=(r,s,c)=>{const d=r.$tagName$.replace(/-/g,"_"),m=r.$lazyBundleId$,w=_x.get(m);if(w)return w[d];/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return nN(Object.assign({"./combo-box-item.entry.js":()=>Promise.resolve().then(()=>VE),"./mi-card_2.entry.js":()=>Promise.resolve().then(()=>$E),"./mi-chip.entry.js":()=>Promise.resolve().then(()=>GE),"./mi-column.entry.js":()=>Promise.resolve().then(()=>HE),"./mi-combo-box.entry.js":()=>Promise.resolve().then(()=>XE),"./mi-data-table.entry.js":()=>Promise.resolve().then(()=>oC),"./mi-distance_2.entry.js":()=>Promise.resolve().then(()=>lC),"./mi-dropdown-item.entry.js":()=>Promise.resolve().then(()=>cC),"./mi-dropdown.entry.js":()=>Promise.resolve().then(()=>hC),"./mi-floor-selector.entry.js":()=>Promise.resolve().then(()=>fC),"./mi-keyboard.entry.js":()=>Promise.resolve().then(()=>MC),"./mi-list-item-category.entry.js":()=>Promise.resolve().then(()=>wC),"./mi-list-item-location.entry.js":()=>Promise.resolve().then(()=>DC),"./mi-list.entry.js":()=>Promise.resolve().then(()=>AC),"./mi-location-booking.entry.js":()=>Promise.resolve().then(()=>KO),"./mi-location-info.entry.js":()=>Promise.resolve().then(()=>eL),"./mi-map-googlemaps.entry.js":()=>Promise.resolve().then(()=>nL),"./mi-map-mapbox.entry.js":()=>Promise.resolve().then(()=>aL),"./mi-metric-card.entry.js":()=>Promise.resolve().then(()=>cL),"./mi-my-position.entry.js":()=>Promise.resolve().then(()=>TL),"./mi-notification.entry.js":()=>Promise.resolve().then(()=>NL),"./mi-route-instructions-heading.entry.js":()=>Promise.resolve().then(()=>CL),"./mi-route-instructions-maneuver_2.entry.js":()=>Promise.resolve().then(()=>zL),"./mi-route-instructions-step-legacy.entry.js":()=>Promise.resolve().then(()=>OL),"./mi-route-instructions-step.entry.js":()=>Promise.resolve().then(()=>kL),"./mi-route-instructions.entry.js":()=>Promise.resolve().then(()=>RL),"./mi-scroll-buttons.entry.js":()=>Promise.resolve().then(()=>BL),"./mi-search.entry.js":()=>Promise.resolve().then(()=>$L),"./mi-share-sms.entry.js":()=>Promise.resolve().then(()=>GL),"./mi-step-switcher.entry.js":()=>Promise.resolve().then(()=>WL),"./mi-tab-panel.entry.js":()=>Promise.resolve().then(()=>XL),"./mi-tab.entry.js":()=>Promise.resolve().then(()=>KL),"./mi-tabs.entry.js":()=>Promise.resolve().then(()=>ek)}),`./${m}.entry.js`).then(v=>(_x.set(m,v),v[d]),ta)},Gh=new Map,jc=typeof window<"u"?window:{},Do=jc.document||{head:{}},ar={$flags$:0,$resourcesUrl$:"",jmp:r=>r(),raf:r=>requestAnimationFrame(r),ael:(r,s,c,d)=>r.addEventListener(s,c,d),rel:(r,s,c,d)=>r.removeEventListener(s,c,d),ce:(r,s)=>new CustomEvent(r,s)},xx=r=>Promise.resolve(r),jN=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replaceSync=="function"}catch{}return!1})(),vx=[],Mx=[],ON=(r,s)=>c=>{r.push(c),Og||(Og=!0,s&&ar.$flags$&4?Bg(Ug):ar.raf(Ug))},bx=r=>{for(let s=0;s<r.length;s++)try{r[s](performance.now())}catch(c){ta(c)}r.length=0},Ug=()=>{bx(vx),bx(Mx),(Og=vx.length>0)&&ar.raf(Ug)},Bg=r=>xx().then(r),LN=ON(Mx,!0),kN=()=>xx(),PN=(r,s)=>typeof window>"u"?Promise.resolve():kN().then(()=>AN([["mi-route-instructions",[[1,"mi-route-instructions",{activeStep:[1040],unit:[1],route:[16],hideIndoorSubsteps:[4,"hide-indoor-substeps"],travelMode:[1,"travel-mode"],originLocation:[16],originName:[1,"origin-name"],destinationLocation:[16],destinationName:[1,"destination-name"],translations:[16]}]]],["mi-route-instructions-step",[[1,"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"],destinationLocation:[1,"destination-location"],unit:[1],translations:[1],stepData:[32],translationsData:[32],substepsAreOpen:[32]}]]],["mi-route-instructions-heading",[[1,"mi-route-instructions-heading",{originName:[1,"origin-name"],destinationName:[1,"destination-name"],totalTravelTime:[2,"total-travel-time"],totalWalkingDistance:[2,"total-walking-distance"],travelMode:[1,"travel-mode"],unit:[1],translations:[16]}]]],["mi-list-item-location",[[1,"mi-list-item-location",{location:[8],showExternalId:[4,"show-external-id"],unit:[1],icon:[1],iconBadge:[1,"icon-badge"],iconBadgeValue:[1,"icon-badge-value"],iconURLToRender:[32]}]]],["mi-metric-card",[[1,"mi-metric-card",{label:[1],value:[1],tip:[1],spinner:[4],error:[1],showToolTip:[32]}]]],["mi-list",[[1,"mi-list",{scrollButtonsEnabled:[4,"scroll-buttons-enabled"],scrollLength:[2,"scroll-length"]},[[0,"listItemDidRender","updateScrollButtonsState"]]]]],["mi-location-booking",[[1,"mi-location-booking",{location:[16],duration:[2],translations:[16],show:[2],startHour:[2,"start-hour"],stopHour:[2,"stop-hour"],bookingTitle:[1,"booking-title"],timeSlots:[32]}]]],["mi-share-sms",[[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"]}]]],["combo-box-item",[[0,"combo-box-item",{selected:[4],value:[1],text:[1]}]]],["mi-chip",[[0,"mi-chip",{icon:[1],content:[1],backgroundColor:[1,"background-color"],active:[4]}]]],["mi-column",[[1,"mi-column",{monospace:[4],alignContent:[1,"align-content"],label:[1],sortable:[1],sort:[1],binding:[1],fitContent:[4,"fit-content"],width:[1]},[[0,"cellContentClicked","cellContentClickedHandler"]]]]],["mi-combo-box",[[1,"mi-combo-box",{open:[4],items:[16],itemsOrder:[1,"items-order"],filterable:[4],selected:[16],noResultsMessage:[1,"no-results-message"],disabled:[4],currentItems:[32]},[[8,"click","checkForClickOutside"],[1,"mousemove","mouseMoveEventHandler"],[11,"scroll","scrollEventHandler"],[11,"resize","resizeEventHandler"]]]]],["mi-data-table",[[1,"mi-data-table",{rows:[16],maxRows:[2,"max-rows"],selectable:[4],selected:[16],emptyPageHeader:[1,"empty-page-header"],emptyPageSubheader:[1,"empty-page-subheader"],isHeaderSticky:[4,"sticky-header"],numberOfSelectedRows:[32],tableRows:[32],sortByColumn:[32]}]]],["mi-dropdown",[[1,"mi-dropdown",{open:[4],items:[16],itemsOrder:[1,"items-order"],label:[1],filterable:[4],multiple:[4],selected:[16],noResultsMessage:[1,"no-results-message"],iconSrc:[1,"icon"],iconAlt:[1,"icon-alt"],disabled:[4],currentItems:[32]},[[0,"focusout","focusOutEventHandler"],[8,"click","checkForClickOutside"],[1,"mousemove","mouseMoveEventHandler"],[11,"scroll","scrollEventHandler"],[11,"resize","resizeEventHandler"]]]]],["mi-dropdown-item",[[0,"mi-dropdown-item",{selected:[4],value:[1],text:[1]}]]],["mi-floor-selector",[[0,"mi-floor-selector",{mapsindoors:[8],primaryColor:[1,"primary-color"],floors:[32],currentFloor:[32],floorSelectorClosed:[32],fadeFloorSelectorOnTop:[32],fadeFloorSelectorOnBottom:[32]}]]],["mi-list-item-category",[[1,"mi-list-item-category",{category:[8],orientation:[513]}]]],["mi-map-googlemaps",[[1,"mi-map-googlemaps",{gmApiKey:[1,"gm-api-key"],miApiKey:[1,"mi-api-key"],gmOptions:[16],disableExternalLinks:[4,"disable-external-links"],floorSelectorControlPosition:[1,"floor-selector-control-position"],floorIndex:[1537,"floor-index"],myPositionControlPosition:[1,"my-position-control-position"],polygonHighlightOptions:[16],language:[1],polylineOptions:[16],getMapInstance:[64],getMapsIndoorsInstance:[64],getDirectionsServiceInstance:[64],getDirectionsRendererInstance:[64],highlightLocation:[64],clearHighlightLocation:[64]}]]],["mi-map-mapbox",[[1,"mi-map-mapbox",{accessToken:[1,"access-token"],miApiKey:[1,"mi-api-key"],disableExternalLinks:[4,"disable-external-links"],floorSelectorControlPosition:[1,"floor-selector-control-position"],floorIndex:[1537,"floor-index"],myPositionControlPosition:[1,"my-position-control-position"],polygonHighlightOptions:[16],polylineOptions:[16],zoom:[1537],maxPitch:[1538,"max-pitch"],maxZoom:[1537,"max-zoom"],bearing:[1537],pitch:[1537],language:[1],getMapInstance:[64],getMapsIndoorsInstance:[64],getDirectionsServiceInstance:[64],getDirectionsRendererInstance:[64],highlightLocation:[64],clearHighlightLocation:[64]}]]],["mi-my-position",[[0,"mi-my-position",{mapsindoors:[8],myPositionOptions:[8,"my-position-options"],positionState:[32]}]]],["mi-notification",[[1,"mi-notification",{position:[1],duration:[2],push:[64],clearAll:[64]}]]],["mi-search",[[0,"mi-search",{placeholder:[1],idAttribute:[1,"id-attribute"],dataAttributes:[16],mapsindoors:[4],google:[4],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],clear:[64],triggerSearch:[64],setDisplayText:[64],focusInput:[64]}]]],["mi-step-switcher",[[1,"mi-step-switcher",{heading:[1],steps:[16],stepIndex:[514,"step-index"]}]]],["mi-tab",[[1,"mi-tab",{label:[1],tabFor:[1,"tab-for"]}]]],["mi-tab-panel",[[1,"mi-tab-panel",{isActive:[32],active:[64]}]]],["mi-tabs",[[1,"mi-tabs",{active:[2],bordered:[4],tabs:[32]}]]],["mi-route-instructions-step-legacy",[[1,"mi-route-instructions-step-legacy",{step:[1],hideIndoorSubsteps:[4,"hide-indoor-substeps"],fromRouteContext:[1,"from-route-context"],fromTravelMode:[1,"from-travel-mode"],fromTransitStop:[1,"from-transit-stop"],unit:[1],translations:[1],stepData:[32],translationsData:[32],substepsAreOpen:[32]}]]],["mi-keyboard",[[0,"mi-keyboard",{inputElement:[16],layout:[1]}]]],["mi-scroll-buttons",[[1,"mi-scroll-buttons",{scrollContainerElementRef:[16],scrollLength:[2,"scroll-length"],updateScrollButtonsState:[64]}]]],["mi-card_2",[[1,"mi-card"],[1,"mi-spinner",{inverse:[4]}]]],["mi-location-info",[[1,"mi-location-info",{location:[8],level:[1],showExternalId:[4,"show-external-id"]}]]],["mi-distance_2",[[1,"mi-distance",{meters:[2],unit:[1]}],[1,"mi-icon",{iconName:[1,"icon-name"]}]]],["mi-route-instructions-maneuver_2",[[1,"mi-route-instructions-maneuver",{maneuver:[1],translations:[1],unit:[1],maneuverData:[32],translationsData:[32]}],[1,"mi-time",{seconds:[2],translations:[1],translationsData:[32]}]]]],s)),j9="",vs={Google:"google",Mapbox:"mapbox"},qo=Un({key:"mapsIndoorsInstance",default:null,dangerouslyAllowMutability:!0}),RN=r=>{const s=Ui(qo),c=lt.useRef(),[d,m]=lt.useState([]);lt.useEffect(()=>{(async()=>{if(s&&r){for(const o of d)c.current.disableLiveData(o);c.current=new window.mapsindoors.LiveDataManager(s);const v=await c.current.LiveDataInfo.activeDomainTypes();for(const o of v)await c.current.enableLiveData(o);m(v)}})()},[r,s])},Fg=Un({key:"venues",default:[]});var UN=function r(s,c){if(s===c)return!0;if(s&&c&&typeof s=="object"&&typeof c=="object"){if(s.constructor!==c.constructor)return!1;var d,m,w;if(Array.isArray(s)){if(d=s.length,d!=c.length)return!1;for(m=d;m--!==0;)if(!r(s[m],c[m]))return!1;return!0}if(s.constructor===RegExp)return s.source===c.source&&s.flags===c.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===c.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===c.toString();if(w=Object.keys(s),d=w.length,d!==Object.keys(c).length)return!1;for(m=d;m--!==0;)if(!Object.prototype.hasOwnProperty.call(c,w[m]))return!1;for(m=d;m--!==0;){var v=w[m];if(!r(s[v],c[v]))return!1}return!0}return s!==s&&c!==c};const wx="__googleMapsScriptId";var rl;(function(r){r[r.INITIALIZED=0]="INITIALIZED",r[r.LOADING=1]="LOADING",r[r.SUCCESS=2]="SUCCESS",r[r.FAILURE=3]="FAILURE"})(rl||(rl={}));let BN=class pc{constructor({apiKey:s,authReferrerPolicy:c,channel:d,client:m,id:w=wx,language:v,libraries:o=[],mapIds:y,nonce:T,region:z,retries:C=3,url:S="https://maps.googleapis.com/maps/api/js",version:U}){if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=s,this.authReferrerPolicy=c,this.channel=d,this.client=m,this.id=w||wx,this.language=v,this.libraries=o,this.mapIds=y,this.nonce=T,this.region=z,this.retries=C,this.url=S,this.version=U,pc.instance){if(!UN(this.options,pc.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(pc.instance.options)}`);return pc.instance}pc.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?rl.FAILURE:this.done?rl.SUCCESS:this.loading?rl.LOADING:rl.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let s=this.url;return s+=`?callback=${this.CALLBACK}`,this.apiKey&&(s+=`&key=${this.apiKey}`),this.channel&&(s+=`&channel=${this.channel}`),this.client&&(s+=`&client=${this.client}`),this.libraries.length>0&&(s+=`&libraries=${this.libraries.join(",")}`),this.language&&(s+=`&language=${this.language}`),this.region&&(s+=`&region=${this.region}`),this.version&&(s+=`&v=${this.version}`),this.mapIds&&(s+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(s+=`&auth_referrer_policy=${this.authReferrerPolicy}`),s}deleteScript(){const s=document.getElementById(this.id);s&&s.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((s,c)=>{this.loadCallback(d=>{d?c(d.error):s(window.google)})})}loadCallback(s){this.callbacks.push(s),this.execute()}setScript(){if(document.getElementById(this.id)){this.callback();return}const s=this.createUrl(),c=document.createElement("script");c.id=this.id,c.type="text/javascript",c.src=s,c.onerror=this.loadErrorCallback.bind(this),c.defer=!0,c.async=!0,this.nonce&&(c.nonce=this.nonce),document.head.appendChild(c)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(s){if(this.errors.push(s),this.errors.length<=this.retries){const c=this.errors.length*Math.pow(2,this.errors.length);console.log(`Failed to load Google Maps script, retrying in ${c} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},c)}else this.onerrorEvent=s,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(s=>{s(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}};const Vg=Un({key:"gmApiKey",default:null}),ia=Un({key:"primaryColor",default:"#005655"});function FN({onMapView:r,onPositionControl:s}){const c=Ui(Vg),[d,m]=lt.useState(),[w,v]=lt.useState(),[o,y]=lt.useState(!1),[T,z]=lt.useState(!1),C=Ui(qo),S=Ui(ia);return lt.useEffect(()=>{new BN({apiKey:c,version:"quarterly",libraries:["geometry","places"]}).load().then(R=>{m(R);const V={element:document.getElementById("map"),disableDefaultUI:!0,center:{lat:0,lng:0},zoom:21},W=new window.mapsindoors.mapView.GoogleMapsView(V);v(W);const ye=new window.mapsindoors.directions.GoogleMapsProvider;r(W,ye)})},[]),lt.useEffect(()=>{if(C&&w&&d&&!T){const U=document.createElement("mi-my-position");U.mapsindoors=C,w.getMap().controls[d.maps.ControlPosition.RIGHT_TOP].push(U),z(!0),s(U)}if(C&&w&&d&&!o){const U=document.createElement("mi-floor-selector");U.mapsindoors=C,U.primaryColor=S,w.getMap().controls[d.maps.ControlPosition.RIGHT_TOP].push(U),y(!0)}},[C,w,d,o,T]),$e.jsx("div",{className:"map-container",id:"map"})}var Ix={exports:{}};(function(r,s){(function(c,d){r.exports=d()})(i3,function(){var c,d,m;function w(o,y){if(!c)c=y;else if(!d)d=y;else{var T="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+c+")(sharedChunk); ("+d+")(sharedChunk); self.onerror = null;",z={};c(z),m=y(z),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(m.workerUrl=window.URL.createObjectURL(new Blob([T],{type:"text/javascript"})))}}w(["exports"],function(o){var y=typeof self<"u"?self:{},T="2.12.1";let z;const C={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(z==null){const t=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{z=process.env.API_URL_REGEX!=null?new RegExp(process.env.API_URL_REGEX):t}catch{z=t}}return z},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},S={supported:!1,testSupport:function(t){!V&&R&&(W?ye(t):U=t)}};let U,R,V=!1,W=!1;function ye(t){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,R),t.isContextLost())return;S.supported=!0}catch{}t.deleteTexture(e),V=!0}y.document&&(R=y.document.createElement("img"),R.onload=function(){U&&ye(U),U=null,W=!0},R.onerror=function(){V=!0,U=null},R.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const le="01";var he=xe;function xe(t,e,i,a){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(a-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=i,this.p2y=a}xe.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,e){if(e===void 0&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var i=t,a=0;a<8;a++){var u=this.sampleCurveX(i)-t;if(Math.abs(u)<e)return i;var f=this.sampleCurveDerivativeX(i);if(Math.abs(f)<1e-6)break;i-=u/f}var g=0,x=1;for(i=t,a=0;a<20&&(u=this.sampleCurveX(i),!(Math.abs(u-t)<e));a++)t>u?g=i:x=i,i=.5*(x-g)+g;return i},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}};var X=Ee;function Ee(t,e){this.x=t,this.y=e}Ee.prototype={clone:function(){return new Ee(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),i=Math.sin(t),a=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=a,this},_rotateAround:function(t,e){var i=Math.cos(t),a=Math.sin(t),u=e.y+a*(this.x-e.x)+i*(this.y-e.y);return this.x=e.x+i*(this.x-e.x)-a*(this.y-e.y),this.y=u,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Ee.convert=function(t){return t instanceof Ee?t:Array.isArray(t)?new Ee(t[0],t[1]):t};const Pe=Math.PI/180,Ve=180/Math.PI;function Ne(t){return t*Pe}function Ze(t){return t*Ve}const tt=[[0,0],[1,0],[1,1],[0,1]];function nt(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,i=e*t;return 4*(t<.5?i:3*(t-e)+i-.75)}function at(t,e,i,a){const u=new he(t,e,i,a);return function(f){return u.solve(f)}}const gt=at(.25,.1,.25,1);function Ae(t,e,i){return Math.min(i,Math.max(e,t))}function Qe(t,e,i){return(i=Ae((i-t)/(e-t),0,1))*i*(3-2*i)}function Ke(t,e,i){const a=i-e,u=((t-e)%a+a)%a+e;return u===e?i:u}function _t(t,e,i){if(!t.length)return i(null,[]);let a=t.length;const u=new Array(t.length);let f=null;t.forEach((g,x)=>{e(g,(b,I)=>{b&&(f=b),u[x]=I,--a==0&&i(f,u)})})}function ut(t){const e=[];for(const i in t)e.push(t[i]);return e}function ee(t,...e){for(const i of e)for(const a in i)t[a]=i[a];return t}let ie=1;function G(){return ie++}function P(){return function t(e){return e?(e^Math.random()*(16>>e/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function Q(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function J(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function K(t,e){t.forEach(i=>{e[i]&&(e[i]=e[i].bind(e))})}function me(t,e){return t.indexOf(e,t.length-e.length)!==-1}function Te(t,e,i){const a={};for(const u in t)a[u]=e.call(i||this,t[u],u,t);return a}function de(t,e,i){const a={};for(const u in t)e.call(i||this,t[u],u,t)&&(a[u]=t[u]);return a}function Oe(t){return Array.isArray(t)?t.map(Oe):typeof t=="object"&&t?Te(t,Oe):t}const qe={};function Ce(t){qe[t]||(typeof console<"u"&&console.warn(t),qe[t]=!0)}function Be(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}function et(t){let e=0;for(let i,a,u=0,f=t.length,g=f-1;u<f;g=u++)i=t[u],a=t[g],e+=(a.x-i.x)*(i.y+a.y);return e}function Dt(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function He(t){const e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(i,a,u,f)=>{const g=u||f;return e[a]=!g||g.toLowerCase(),""}),e["max-age"]){const i=parseInt(e["max-age"],10);isNaN(i)?delete e["max-age"]:e["max-age"]=i}return e}let Tt=null;function ti(t){if(Tt==null){const e=t.navigator?t.navigator.userAgent:null;Tt=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return Tt}function ni(t){try{const e=y[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch{return!1}}function vi(t,e){return[t[4*e],t[4*e+1],t[4*e+2],t[4*e+3]]}const Ji="mapbox-tiles";let yi,Bi,wi=500,hi=50;function di(){try{return y.caches}catch{}}function Pt(){di()&&!yi&&(yi=y.caches.open(Ji))}function Ii(t){const e=t.indexOf("?");if(e<0)return t;const i=function(u){const f=u.indexOf("?");return f>0?u.slice(f+1).split("&"):[]}(t),a=i.filter(u=>{const f=u.split("=");return f[0]==="language"||f[0]==="worldview"});return a.length?`${t.slice(0,e)}?${a.join("&")}`:t.slice(0,e)}let Vi=1/0;const zi={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(zi);class _i extends Error{constructor(e,i,a){i===401&&ci(a)&&(e+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(e),this.status=i,this.url=a}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const si=Dt()?()=>self.worker&&self.worker.referrer:()=>(y.location.protocol==="blob:"?y.parent:y).location.href,ln=function(t,e){if(!(/^file:/.test(i=t.url)||/^file:/.test(si())&&!/^\w+:/.test(i))){if(y.fetch&&y.Request&&y.AbortController&&y.Request.prototype.hasOwnProperty("signal"))return function(a,u){const f=new y.AbortController,g=new y.Request(a.url,{method:a.method||"GET",body:a.body,credentials:a.credentials,headers:a.headers,referrer:si(),signal:f.signal});let x=!1,b=!1;const I=(N=g.url).indexOf("sku=")>0&&ci(N);var N;a.type==="json"&&g.headers.set("Accept","application/json");const j=(B,F,Z)=>{if(b)return;if(B&&B.message!=="SecurityError"&&Ce(B),F&&Z)return O(F);const ne=Date.now();y.fetch(g).then(Me=>{if(Me.ok){const ze=I?Me.clone():null;return O(Me,ze,ne)}return u(new _i(Me.statusText,Me.status,a.url))}).catch(Me=>{Me.code!==20&&u(new Error(Me.message))})},O=(B,F,Z)=>{(a.type==="arrayBuffer"?B.arrayBuffer():a.type==="json"?B.json():B.text()).then(ne=>{b||(F&&Z&&function(Me,ze,ve){if(Pt(),!yi)return;const De={status:ze.status,statusText:ze.statusText,headers:new y.Headers};ze.headers.forEach((ct,ot)=>De.headers.set(ot,ct));const ke=He(ze.headers.get("Cache-Control")||"");if(ke["no-store"])return;ke["max-age"]&&De.headers.set("Expires",new Date(ve+1e3*ke["max-age"]).toUTCString());const je=De.headers.get("Expires");je&&(new Date(je).getTime()-ve<42e4||function(ct,ot){if(Bi===void 0)try{new Response(new ReadableStream),Bi=!0}catch{Bi=!1}Bi?ot(ct.body):ct.blob().then(ot)}(ze,ct=>{const ot=new y.Response(ct,De);Pt(),yi&&yi.then(vt=>vt.put(Ii(Me.url),ot)).catch(vt=>Ce(vt.message))}))}(g,F,Z),x=!0,u(null,ne,B.headers.get("Cache-Control"),B.headers.get("Expires")))}).catch(ne=>{b||u(new Error(ne.message))})};return I?function(B,F){if(Pt(),!yi)return F(null);const Z=Ii(B.url);yi.then(ne=>{ne.match(Z).then(Me=>{const ze=function(ve){if(!ve)return!1;const De=new Date(ve.headers.get("Expires")||0),ke=He(ve.headers.get("Cache-Control")||"");return De>Date.now()&&!ke["no-cache"]}(Me);ne.delete(Z),ze&&ne.put(Z,Me.clone()),F(null,Me,ze)}).catch(F)}).catch(F)}(g,j):j(null,null),{cancel:()=>{b=!0,x||f.abort()}}}(t,e);if(Dt()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var i;return function(a,u){const f=new y.XMLHttpRequest;f.open(a.method||"GET",a.url,!0),a.type==="arrayBuffer"&&(f.responseType="arraybuffer");for(const g in a.headers)f.setRequestHeader(g,a.headers[g]);return a.type==="json"&&(f.responseType="text",f.setRequestHeader("Accept","application/json")),f.withCredentials=a.credentials==="include",f.onerror=()=>{u(new Error(f.statusText))},f.onload=()=>{if((f.status>=200&&f.status<300||f.status===0)&&f.response!==null){let g=f.response;if(a.type==="json")try{g=JSON.parse(f.response)}catch(x){return u(x)}u(null,g,f.getResponseHeader("Cache-Control"),f.getResponseHeader("Expires"))}else u(new _i(f.statusText,f.status,a.url))},f.send(a.body),{cancel:()=>f.abort()}}(t,e)},An=function(t,e){return ln(ee(t,{type:"arrayBuffer"}),e)};function Ye(t){const e=y.document.createElement("a");return e.href=t,e.protocol===y.document.location.protocol&&e.host===y.document.location.host}const Fe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let wt,zt;wt=[],zt=0;const Ut=function(t,e){if(S.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),zt>=C.MAX_PARALLEL_IMAGE_REQUESTS){const f={requestParameters:t,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return wt.push(f),f}zt++;let i=!1;const a=()=>{if(!i)for(i=!0,zt--;wt.length&&zt<C.MAX_PARALLEL_IMAGE_REQUESTS;){const f=wt.shift(),{requestParameters:g,callback:x,cancelled:b}=f;b||(f.cancel=Ut(g,x).cancel)}},u=An(t,(f,g,x,b)=>{a(),f?e(f):g&&(y.createImageBitmap?function(I,N){const j=new y.Blob([new Uint8Array(I)],{type:"image/png"});y.createImageBitmap(j).then(O=>{N(null,O)}).catch(O=>{N(new Error(`Could not load image because of ${O.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(g,(I,N)=>e(I,N,x,b)):function(I,N){const j=new y.Image,O=y.URL;j.onload=()=>{N(null,j),O.revokeObjectURL(j.src),j.onload=null,y.requestAnimationFrame(()=>{j.src=Fe})},j.onerror=()=>N(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const B=new y.Blob([new Uint8Array(I)],{type:"image/png"});j.src=I.byteLength?O.createObjectURL(B):Fe}(g,(I,N)=>e(I,N,x,b)))});return{cancel:()=>{u.cancel(),a()}}},qt="NO_ACCESS_TOKEN";function ii(t){return t.indexOf("mapbox:")===0}function ci(t){return C.API_URL_REGEX.test(t)}function gi(t){return C.API_CDN_URL_REGEX.test(t)}function Mi(t){return C.API_STYLE_REGEX.test(t)&&!Wi(t)}function Wi(t){return C.API_SPRITE_REGEX.test(t)}const Nn=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function en(t){const e=t.match(Nn);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function En(t){const e=t.params.length?`?${t.params.join("&")}`:"";return`${t.protocol}://${t.authority}${t.path}${e}`}function Fn(t){if(!t)return null;const e=t.split(".");if(!e||e.length!==3)return null;try{return JSON.parse(decodeURIComponent(y.atob(e[1]).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch{return null}}class pe{constructor(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(e){const i=Fn(C.ACCESS_TOKEN);let a="";return a=i&&i.u?y.btoa(encodeURIComponent(i.u).replace(/%([0-9A-F]{2})/g,(u,f)=>String.fromCharCode(+("0x"+f)))):C.ACCESS_TOKEN||"",e?`mapbox.eventData.${e}:${a}`:`mapbox.eventData:${a}`}fetchEventData(){const e=ni("localStorage"),i=this.getStorageKey(),a=this.getStorageKey("uuid");if(e)try{const u=y.localStorage.getItem(i);u&&(this.eventData=JSON.parse(u));const f=y.localStorage.getItem(a);f&&(this.anonId=f)}catch{Ce("Unable to read from LocalStorage")}}saveEventData(){const e=ni("localStorage"),i=this.getStorageKey(),a=this.getStorageKey("uuid");if(e)try{y.localStorage.setItem(a,this.anonId),Object.keys(this.eventData).length>=1&&y.localStorage.setItem(i,JSON.stringify(this.eventData))}catch{Ce("Unable to write to LocalStorage")}}processRequests(e){}postEvent(e,i,a,u){if(!C.EVENTS_URL)return;const f=en(C.EVENTS_URL);f.params.push(`access_token=${u||C.ACCESS_TOKEN||""}`);const g={event:this.type,created:new Date(e).toISOString()},x=i?ee(g,i):g,b={url:En(f),headers:{"Content-Type":"text/plain"},body:JSON.stringify([x])};this.pendingRequest=function(I,N){return ln(ee(I,{method:"POST"}),N)}(b,I=>{this.pendingRequest=null,a(I),this.saveEventData(),this.processRequests(u)})}queueRequest(e,i){this.queue.push(e),this.processRequests(i)}}const Y=new class extends pe{constructor(t){super("appUserTurnstile"),this._customAccessToken=t}postTurnstileEvent(t,e){C.EVENTS_URL&&C.ACCESS_TOKEN&&Array.isArray(t)&&t.some(i=>ii(i)||ci(i))&&this.queueRequest(Date.now(),e)}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const e=Fn(C.ACCESS_TOKEN),i=e?e.u:C.ACCESS_TOKEN;let a=i!==this.eventData.tokenU;J(this.anonId)||(this.anonId=P(),a=!0);const u=this.queue.shift();if(this.eventData.lastSuccess){const f=new Date(this.eventData.lastSuccess),g=new Date(u),x=(u-this.eventData.lastSuccess)/864e5;a=a||x>=1||x<-1||f.getDate()!==g.getDate()}else a=!0;a?this.postEvent(u,{sdkIdentifier:"mapbox-gl-js",sdkVersion:T,skuId:le,"enabled.telemetry":!1,userId:this.anonId},f=>{f||(this.eventData.lastSuccess=u,this.eventData.tokenU=i)},t):this.processRequests()}},H=Y.postTurnstileEvent.bind(Y),ce=new class extends pe{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(t,e,i,a){this.skuToken=e,this.errorCb=a,C.EVENTS_URL&&(i||C.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(qt)))}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{id:e,timestamp:i}=this.queue.shift();e&&this.success[e]||(this.anonId||this.fetchEventData(),J(this.anonId)||(this.anonId=P()),this.postEvent(i,{sdkIdentifier:"mapbox-gl-js",sdkVersion:T,skuId:le,skuToken:this.skuToken,userId:this.anonId},a=>{a?this.errorCb(a):e&&(this.success[e]=!0)},t))}},we=ce.postMapLoadEvent.bind(ce),Ue=new class extends pe{constructor(){super("gljs.performance")}postPerformanceEvent(t,e){C.EVENTS_URL&&(t||C.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:e},t)}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{timestamp:e,performanceData:i}=this.queue.shift(),a=function(u){const f=y.performance.getEntriesByType("resource"),g=y.performance.getEntriesByType("mark"),x=function(O){const B={};if(O){for(const F in O)if(F!=="other")for(const Z of O[F]){const ne=`${F}ResolveRangeMin`,Me=`${F}ResolveRangeMax`,ze=`${F}RequestCount`,ve=`${F}RequestCachedCount`;B[ne]=Math.min(B[ne]||1/0,Z.startTime),B[Me]=Math.max(B[Me]||-1/0,Z.responseEnd);const De=ke=>{B[ke]===void 0&&(B[ke]=0),++B[ke]};Z.transferSize!==void 0&&Z.transferSize===0&&De(ve),De(ze)}}return B}(function(O,B){const F={};if(O)for(const Z of O){const ne=B(Z);F[ne]===void 0&&(F[ne]=[]),F[ne].push(Z)}return F}(f,xt)),b=y.devicePixelRatio,I=y.navigator.connection||y.navigator.mozConnection||y.navigator.webkitConnection,N={counters:[],metadata:[],attributes:[]},j=(O,B,F)=>{F!=null&&O.push({name:B,value:F.toString()})};for(const O in x)j(N.counters,O,x[O]);if(u.interactionRange[0]!==1/0&&u.interactionRange[1]!==-1/0&&(j(N.counters,"interactionRangeMin",u.interactionRange[0]),j(N.counters,"interactionRangeMax",u.interactionRange[1])),g)for(const O of Object.keys(st)){const B=st[O],F=g.find(Z=>Z.name===B);F&&j(N.counters,B,F.startTime)}return j(N.counters,"visibilityHidden",u.visibilityHidden),j(N.attributes,"style",function(O){if(O)for(const B of O){const F=B.name.split("?")[0];if(Mi(F)){const Z=F.split("/").slice(-2);if(Z.length===2)return`mapbox://styles/${Z[0]}/${Z[1]}`}}}(f)),j(N.attributes,"terrainEnabled",u.terrainEnabled?"true":"false"),j(N.attributes,"fogEnabled",u.fogEnabled?"true":"false"),j(N.attributes,"projection",u.projection),j(N.attributes,"zoom",u.zoom),j(N.metadata,"devicePixelRatio",b),j(N.metadata,"connectionEffectiveType",I?I.effectiveType:void 0),j(N.metadata,"navigatorUserAgent",y.navigator.userAgent),j(N.metadata,"screenWidth",y.screen.width),j(N.metadata,"screenHeight",y.screen.height),j(N.metadata,"windowWidth",y.innerWidth),j(N.metadata,"windowHeight",y.innerHeight),j(N.metadata,"mapWidth",u.width/b),j(N.metadata,"mapHeight",u.height/b),j(N.metadata,"webglRenderer",u.renderer),j(N.metadata,"webglVendor",u.vendor),j(N.metadata,"sdkVersion",T),j(N.metadata,"sdkIdentifier","mapbox-gl-js"),N}(i);for(const u of a.metadata);for(const u of a.counters);for(const u of a.attributes);this.postEvent(e,a,()=>{},t)}},Je=Ue.postPerformanceEvent.bind(Ue),q=new class extends pe{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(t,e,i,a){if(!C.API_URL||!C.SESSION_PATH)return;const u=en(C.API_URL+C.SESSION_PATH);u.params.push(`sku=${e||""}`),u.params.push(`access_token=${a||C.ACCESS_TOKEN||""}`);const f={url:En(u),headers:{"Content-Type":"text/plain"}};this.pendingRequest=function(g,x){return ln(ee(g,{method:"GET"}),x)}(f,g=>{this.pendingRequest=null,i(g),this.saveEventData(),this.processRequests(a)})}getSessionAPI(t,e,i,a){this.skuToken=e,this.errorCb=a,C.SESSION_PATH&&C.API_URL&&(i||C.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(qt)))}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{id:e,timestamp:i}=this.queue.shift();e&&this.success[e]||this.getSession(i,this.skuToken,a=>{a?this.errorCb(a):e&&(this.success[e]=!0)},t)}},fe=q.getSessionAPI.bind(q),Se=new Set,st={create:"create",load:"load",fullLoad:"fullLoad"},Ct={mark(t){y.performance.mark(t)},measure(t,e,i){y.performance.measure(t,e,i)}};function xt(t){const e=t.name.split("?")[0];return gi(e)&&e.includes("mapbox-gl.js")?"javascript":gi(e)&&e.includes("mapbox-gl.css")?"css":function(i){return C.API_FONTS_REGEX.test(i)}(e)?"fontRange":Wi(e)?"sprite":Mi(e)?"style":function(i){return C.API_TILEJSON_REGEX.test(i)}(e)?"tilejson":"other"}const Bt=y.performance;function Rt(t){const e=t?t.url.toString():void 0;return Bt.getEntriesByName(e)}let Zt,Wt,ai,bi;const ei={now:()=>ai!==void 0?ai:y.performance.now(),setNow(t){ai=t},restoreNow(){ai=void 0},frame(t){const e=y.requestAnimationFrame(t);return{cancel:()=>y.cancelAnimationFrame(e)}},getImageData(t,e=0){const{width:i,height:a}=t;bi||(bi=y.document.createElement("canvas"));const u=bi.getContext("2d",{willReadFrequently:!0});if(!u)throw new Error("failed to create canvas 2d context");return(i>bi.width||a>bi.height)&&(bi.width=i,bi.height=a),u.clearRect(-e,-e,i+2*e,a+2*e),u.drawImage(t,0,0,i,a),u.getImageData(-e,-e,i+2*e,a+2*e)},resolveURL:t=>(Zt||(Zt=y.document.createElement("a")),Zt.href=t,Zt.href),get devicePixelRatio(){return y.devicePixelRatio},get prefersReducedMotion(){return!!y.matchMedia&&(Wt==null&&(Wt=y.matchMedia("(prefers-reduced-motion: reduce)")),Wt.matches)}};function Ki(t,e,i){i[t]&&i[t].indexOf(e)!==-1||(i[t]=i[t]||[],i[t].push(e))}function Fi(t,e,i){if(i&&i[t]){const a=i[t].indexOf(e);a!==-1&&i[t].splice(a,1)}}class Wr{constructor(e,i={}){ee(this,i),this.type=e}}class Co extends Wr{constructor(e,i={}){super("error",ee({error:e},i))}}class jr{on(e,i){return this._listeners=this._listeners||{},Ki(e,i,this._listeners),this}off(e,i){return Fi(e,i,this._listeners),Fi(e,i,this._oneTimeListeners),this}once(e,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},Ki(e,i,this._oneTimeListeners),this):new Promise(a=>this.once(e,a))}fire(e,i){typeof e=="string"&&(e=new Wr(e,i||{}));const a=e.type;if(this.listens(a)){e.target=this;const u=this._listeners&&this._listeners[a]?this._listeners[a].slice():[];for(const x of u)x.call(this,e);const f=this._oneTimeListeners&&this._oneTimeListeners[a]?this._oneTimeListeners[a].slice():[];for(const x of f)Fi(a,x,this._oneTimeListeners),x.call(this,e);const g=this._eventedParent;g&&(ee(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),g.fire(e))}else e instanceof Co&&console.error(e.error);return this}listens(e){return!!(this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e))}setEventedParent(e,i){return this._eventedParent=e,this._eventedParentData=i,this}}var bt=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"light":{"type":"light"},"terrain":{"type":"terrain"},"fog":{"type":"fog"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":{},"mapbox":{}},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":{}}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":{}}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":{}}},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"background":{},"sky":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],"layout_background":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":{},"round":{},"square":{}},"default":"butt","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":{},"round":{},"miter":{}},"default":"miter","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"requires":[{"line-join":"miter"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"requires":[{"line-join":"round"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":{},"line":{},"line-center":{}},"default":"point","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"units":"pixels","requires":[{"symbol-placement":"line"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":{},"viewport-y":{},"source":{}},"default":"auto","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"units":"factor of the original icon size","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":{},"width":{},"height":{},"both":{}},"default":"none","requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","requires":["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"ems","requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":{},"left":{},"center":{},"right":{}},"default":"center","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","units":"ems","default":0,"requires":["text-field"],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["text-field",{"!":"text-variable-anchor"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"units":"degrees","requires":["text-field",{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":{},"vertical":{}},"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":{},"uppercase":{},"lowercase":{}},"default":"none","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","units":"ems","length":2,"default":[0,0],"requires":["text-field",{"!":"text-radial-offset"}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"requires":["text-field","icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},"in":{},"!in":{},"all":{},"any":{},"none":{},"has":{},"!has":{},"within":{}}},"geometry_type":{"type":"enum","values":{"Point":{},"LineString":{},"Polygon":{}}},"function":{"expression":{"type":"expression"},"stops":{"type":"array","value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":{"identity":{},"exponential":{},"interval":{},"categorical":{}},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":{},"lab":{},"hcl":{}},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":{},"viewport":{}},"property-type":"data-constant","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":{},"equalEarth":{},"equirectangular":{},"lambertConformalConic":{},"mercator":{},"naturalEarth":{},"winkelTripel":{},"globe":{}},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["source"]}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-extrusion-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-extrusion-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"requires":["fill-extrusion-height"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["fill-extrusion-edge-radius"]}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"line-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["line-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"transition":false,"units":"line widths","requires":[{"!":"line-pattern"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","transition":false,"requires":[{"!":"line-pattern"},{"source":"geojson","has":{"lineMetrics":true}}],"expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"transition":false,"requires":[{"source":"geojson","has":{"lineMetrics":true}}],"property-type":"constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["circle-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"transition":false,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"transition":false,"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["icon-image","icon-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["text-field","text-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"units":"degrees","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":{},"nearest":{}},"default":"linear","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"transition":false,"units":"milliseconds","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"transition":false,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"background-pattern"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":{},"atmosphere":{}},"default":"atmosphere","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"requires":[{"sky-type":"atmosphere"}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","requires":[{"sky-type":"atmosphere"}],"default":10,"minimum":0,"maximum":100,"transition":false,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","requires":[{"sky-type":"gradient"}],"value":"number","default":[0,0],"length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","requires":[{"sky-type":"gradient"}],"default":90,"minimum":0,"maximum":180,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"transition":false,"requires":[{"sky-type":"gradient"}],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');function uo(t,...e){for(const i of e)for(const a in i)t[a]=i[a];return t}function Vn(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function ho(t){if(Array.isArray(t))return t.map(ho);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const i in t)e[i]=ho(t[i]);return e}return Vn(t)}class F0 extends Error{constructor(e,i){super(i),this.message=i,this.key=e}}var Tr=F0;class fl{constructor(e,i=[]){this.parent=e,this.bindings={};for(const[a,u]of i)this.bindings[a]=u}concat(e){return new fl(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}var _f=fl;const pr={kind:"null"},Yt={kind:"number"},Ri={kind:"string"},ji={kind:"boolean"},Qr={kind:"color"},Jo={kind:"object"},Ei={kind:"value"},aa={kind:"collator"},Ms={kind:"formatted"},So={kind:"resolvedImage"};function Jn(t,e){return{kind:"array",itemType:t,N:e}}function In(t){if(t.kind==="array"){const e=In(t.itemType);return typeof t.N=="number"?`array<${e}, ${t.N}>`:t.itemType.kind==="value"?"array":`array<${e}>`}return t.kind}const qr=[pr,Yt,Ri,ji,Qr,Ms,Jo,Jn(Ei),So];function la(t,e){if(e.kind==="error")return null;if(t.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!la(t.itemType,e.itemType))&&(typeof t.N!="number"||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(t.kind==="value"){for(const i of qr)if(!la(i,e))return null}}return`Expected ${In(t)} but found ${In(e)} instead.`}function ca(t,e){return e.some(i=>i.kind===t.kind)}function ua(t,e){return e.some(i=>i==="null"?t===null:i==="array"?Array.isArray(t):i==="object"?t&&!Array.isArray(t)&&typeof t=="object":i===typeof t)}var ha,$c={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function zo(t){return(t=Math.round(t))<0?0:t>255?255:t}function da(t){return zo(t[t.length-1]==="%"?parseFloat(t)/100*255:parseInt(t))}function pl(t){return(e=t[t.length-1]==="%"?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function Zc(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}try{ha={}.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in $c)return $c[i].slice();if(i[0]==="#")return i.length===4?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:i.length===7&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var a=i.indexOf("("),u=i.indexOf(")");if(a!==-1&&u+1===i.length){var f=i.substr(0,a),g=i.substr(a+1,u-(a+1)).split(","),x=1;switch(f){case"rgba":if(g.length!==4)return null;x=pl(g.pop());case"rgb":return g.length!==3?null:[da(g[0]),da(g[1]),da(g[2]),x];case"hsla":if(g.length!==4)return null;x=pl(g.pop());case"hsl":if(g.length!==3)return null;var b=(parseFloat(g[0])%360+360)%360/360,I=pl(g[1]),N=pl(g[2]),j=N<=.5?N*(I+1):N+I-N*I,O=2*N-j;return[zo(255*Zc(O,j,b+1/3)),zo(255*Zc(O,j,b)),zo(255*Zc(O,j,b-1/3)),x];default:return null}}return null}}catch{}class _r{constructor(e,i,a,u=1){this.r=e,this.g=i,this.b=a,this.a=u}static parse(e){if(!e)return;if(e instanceof _r)return e;if(typeof e!="string")return;const i=ha(e);return i?new _r(i[0]/255*i[3],i[1]/255*i[3],i[2]/255*i[3],i[3]):void 0}toString(){const[e,i,a,u]=this.toArray();return`rgba(${Math.round(e)},${Math.round(i)},${Math.round(a)},${u})`}toArray(){const{r:e,g:i,b:a,a:u}=this;return u===0?[0,0,0,0]:[255*e/u,255*i/u,255*a/u,u]}toArray01(){const{r:e,g:i,b:a,a:u}=this;return u===0?[0,0,0,0]:[e/u,i/u,a/u,u]}toArray01PremultipliedAlpha(){const{r:e,g:i,b:a,a:u}=this;return[e,i,a,u]}}_r.black=new _r(0,0,0,1),_r.white=new _r(1,1,1,1),_r.transparent=new _r(0,0,0,0),_r.red=new _r(1,0,0,1),_r.blue=new _r(0,0,1,1);var Cn=_r;class fa{constructor(e,i,a){this.sensitivity=e?i?"variant":"case":i?"accent":"base",this.locale=a,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,i){return this.collator.compare(e,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Gc{constructor(e,i,a,u,f){this.text=e.normalize?e.normalize():e,this.image=i,this.scale=a,this.fontStack=u,this.textColor=f}}class er{constructor(e){this.sections=e}static fromString(e){return new er([new Gc(e,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof er?e:er.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const i of this.sections){if(i.image){e.push(["image",i.image.name]);continue}e.push(i.text);const a={};i.fontStack&&(a["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(a["font-scale"]=i.scale),i.textColor&&(a["text-color"]=["rgba"].concat(i.textColor.toArray())),e.push(a)}return e}}class Or{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new Or({name:e,available:!1}):null}serialize(){return["image",this.name]}}function xf(t,e,i,a){return typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof i=="number"&&i>=0&&i<=255?a===void 0||typeof a=="number"&&a>=0&&a<=1?null:`Invalid rgba value [${[t,e,i,a].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof a=="number"?[t,e,i,a]:[t,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function gl(t){if(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||t instanceof Cn||t instanceof fa||t instanceof er||t instanceof Or)return!0;if(Array.isArray(t)){for(const e of t)if(!gl(e))return!1;return!0}if(typeof t=="object"){for(const e in t)if(!gl(t[e]))return!1;return!0}return!1}function Qn(t){if(t===null)return pr;if(typeof t=="string")return Ri;if(typeof t=="boolean")return ji;if(typeof t=="number")return Yt;if(t instanceof Cn)return Qr;if(t instanceof fa)return aa;if(t instanceof er)return Ms;if(t instanceof Or)return So;if(Array.isArray(t)){const e=t.length;let i;for(const a of t){const u=Qn(a);if(i){if(i===u)continue;i=Ei;break}i=u}return Jn(i||Ei,e)}return Jo}function pa(t){const e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof Cn||t instanceof er||t instanceof Or?t.toString():JSON.stringify(t)}class Hc{constructor(e,i){this.type=e,this.value=i}static parse(e,i){if(e.length!==2)return i.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!gl(e[1]))return i.error("invalid value");const a=e[1];let u=Qn(a);const f=i.expectedType;return u.kind!=="array"||u.N!==0||!f||f.kind!=="array"||typeof f.N=="number"&&f.N!==0||(u=f),new Hc(u,a)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Cn?["rgba"].concat(this.value.toArray()):this.value instanceof er?this.value.serialize():this.value}}var ga=Hc,Wn=class{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}};const bs={string:Ri,number:Yt,boolean:ji,object:Jo};class Wc{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");let a,u=1;const f=e[0];if(f==="array"){let x,b;if(e.length>2){const I=e[1];if(typeof I!="string"||!(I in bs)||I==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);x=bs[I],u++}else x=Ei;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return i.error('The length argument to "array" must be a positive integer literal',2);b=e[2],u++}a=Jn(x,b)}else a=bs[f];const g=[];for(;u<e.length;u++){const x=i.parse(e[u],u,Ei);if(!x)return null;g.push(x)}return new Wc(a,g)}evaluate(e){for(let i=0;i<this.args.length;i++){const a=this.args[i].evaluate(e);if(!la(this.type,Qn(a)))return a;if(i===this.args.length-1)throw new Wn(`Expected value to be of type ${In(this.type)}, but found ${In(Qn(a))} instead.`)}return null}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=this.type,i=[e.kind];if(e.kind==="array"){const a=e.itemType;if(a.kind==="string"||a.kind==="number"||a.kind==="boolean"){i.push(a.kind);const u=e.N;(typeof u=="number"||this.args.length>1)&&i.push(u)}}return i.concat(this.args.map(a=>a.serialize()))}}var fo=Wc;class ma{constructor(e){this.type=Ms,this.sections=e}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const a=e[1];if(!Array.isArray(a)&&typeof a=="object")return i.error("First argument must be an image or text section.");const u=[];let f=!1;for(let g=1;g<=e.length-1;++g){const x=e[g];if(f&&typeof x=="object"&&!Array.isArray(x)){f=!1;let b=null;if(x["font-scale"]&&(b=i.parse(x["font-scale"],1,Yt),!b))return null;let I=null;if(x["text-font"]&&(I=i.parse(x["text-font"],1,Jn(Ri)),!I))return null;let N=null;if(x["text-color"]&&(N=i.parse(x["text-color"],1,Qr),!N))return null;const j=u[u.length-1];j.scale=b,j.font=I,j.textColor=N}else{const b=i.parse(e[g],1,Ei);if(!b)return null;const I=b.type.kind;if(I!=="string"&&I!=="value"&&I!=="null"&&I!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");f=!0,u.push({content:b,scale:null,font:null,textColor:null})}}return new ma(u)}evaluate(e){return new er(this.sections.map(i=>{const a=i.content.evaluate(e);return Qn(a)===So?new Gc("",a,null,null,null):new Gc(pa(a),null,i.scale?i.scale.evaluate(e):null,i.font?i.font.evaluate(e).join(","):null,i.textColor?i.textColor.evaluate(e):null)}))}eachChild(e){for(const i of this.sections)e(i.content),i.scale&&e(i.scale),i.font&&e(i.font),i.textColor&&e(i.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const i of this.sections){e.push(i.content.serialize());const a={};i.scale&&(a["font-scale"]=i.scale.serialize()),i.font&&(a["text-font"]=i.font.serialize()),i.textColor&&(a["text-color"]=i.textColor.serialize()),e.push(a)}return e}}class ml{constructor(e){this.type=So,this.input=e}static parse(e,i){if(e.length!==2)return i.error("Expected two arguments.");const a=i.parse(e[1],1,Ri);return a?new ml(a):i.error("No image name provided.")}evaluate(e){const i=this.input.evaluate(e),a=Or.fromString(i);return a&&e.availableImages&&(a.available=e.availableImages.indexOf(i)>-1),a}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const V0={"to-boolean":ji,"to-color":Qr,"to-number":Yt,"to-string":Ri};class qc{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const a=e[0];if((a==="to-boolean"||a==="to-string")&&e.length!==2)return i.error("Expected one argument.");const u=V0[a],f=[];for(let g=1;g<e.length;g++){const x=i.parse(e[g],g,Ei);if(!x)return null;f.push(x)}return new qc(u,f)}evaluate(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){let i,a;for(const u of this.args){if(i=u.evaluate(e),a=null,i instanceof Cn)return i;if(typeof i=="string"){const f=e.parseColor(i);if(f)return f}else if(Array.isArray(i)&&(a=i.length<3||i.length>4?`Invalid rbga value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:xf(i[0],i[1],i[2],i[3]),!a))return new Cn(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new Wn(a||`Could not parse color from value '${typeof i=="string"?i:String(JSON.stringify(i))}'`)}if(this.type.kind==="number"){let i=null;for(const a of this.args){if(i=a.evaluate(e),i===null)return 0;const u=Number(i);if(!isNaN(u))return u}throw new Wn(`Could not convert ${JSON.stringify(i)} to number.`)}return this.type.kind==="formatted"?er.fromString(pa(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?Or.fromString(pa(this.args[0].evaluate(e))):pa(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if(this.type.kind==="formatted")return new ma([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new ml(this.args[0]).serialize();const e=[`to-${this.type.kind}`];return this.eachChild(i=>{e.push(i.serialize())}),e}}var es=qc;const yl=["Unknown","Point","LineString","Polygon"];var vf=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?yl[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const t=this.featureDistanceData.center,e=this.featureDistanceData.scale,{x:i,y:a}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(i*e-t[0])+this.featureDistanceData.bearing[1]*(a*e-t[1])}return 0}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Cn.parse(t)),e}};class ws{constructor(e,i,a,u){this.name=e,this.type=i,this._evaluate=a,this.args=u}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,i){const a=e[0],u=ws.definitions[a];if(!u)return i.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0);const f=Array.isArray(u)?u[0]:u.type,g=Array.isArray(u)?[[u[1],u[2]]]:u.overloads,x=g.filter(([I])=>!Array.isArray(I)||I.length===e.length-1);let b=null;for(const[I,N]of x){b=new is(i.registry,i.path,null,i.scope);const j=[];let O=!1;for(let B=1;B<e.length;B++){const F=e[B],Z=Array.isArray(I)?I[B-1]:I.type,ne=b.parse(F,1+j.length,Z);if(!ne){O=!0;break}j.push(ne)}if(!O)if(Array.isArray(I)&&I.length!==j.length)b.error(`Expected ${I.length} arguments, but found ${j.length} instead.`);else{for(let B=0;B<j.length;B++){const F=Array.isArray(I)?I[B]:I.type,Z=j[B];b.concat(B+1).checkSubtype(F,Z.type)}if(b.errors.length===0)return new ws(a,f,N,j)}}if(x.length===1)i.errors.push(...b.errors);else{const I=(x.length?x:g).map(([j])=>{return O=j,Array.isArray(O)?`(${O.map(In).join(", ")})`:`(${In(O.type)}...)`;var O}).join(" | "),N=[];for(let j=1;j<e.length;j++){const O=i.parse(e[j],1+N.length);if(!O)return null;N.push(In(O.type))}i.error(`Expected arguments of type ${I}, but found (${N.join(", ")}) instead.`)}return null}static register(e,i){ws.definitions=i;for(const a in i)e[a]=ws}}var jo=ws;class _l{constructor(e,i,a){this.type=aa,this.locale=a,this.caseSensitive=e,this.diacriticSensitive=i}static parse(e,i){if(e.length!==2)return i.error("Expected one argument.");const a=e[1];if(typeof a!="object"||Array.isArray(a))return i.error("Collator options argument must be an object.");const u=i.parse(a["case-sensitive"]!==void 0&&a["case-sensitive"],1,ji);if(!u)return null;const f=i.parse(a["diacritic-sensitive"]!==void 0&&a["diacritic-sensitive"],1,ji);if(!f)return null;let g=null;return a.locale&&(g=i.parse(a.locale,1,Ri),!g)?null:new _l(u,f,g)}evaluate(e){return new fa(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}serialize(){const e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]}}const tr=8192;function xl(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function ya(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Mf(t,e){const i=(180+t[0])/360,a=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,u=Math.pow(2,e.z);return[Math.round(i*u*tr),Math.round(a*u*tr)]}function bf(t,e,i){const a=t[0]-e[0],u=t[1]-e[1],f=t[0]-i[0],g=t[1]-i[1];return a*g-f*u==0&&a*f<=0&&u*g<=0}function vl(t,e){let i=!1;for(let g=0,x=e.length;g<x;g++){const b=e[g];for(let I=0,N=b.length;I<N-1;I++){if(bf(t,b[I],b[I+1]))return!1;(u=b[I])[1]>(a=t)[1]!=(f=b[I+1])[1]>a[1]&&a[0]<(f[0]-u[0])*(a[1]-u[1])/(f[1]-u[1])+u[0]&&(i=!i)}}var a,u,f;return i}function wf(t,e){for(let i=0;i<e.length;i++)if(vl(t,e[i]))return!0;return!1}function Ml(t,e,i,a){const u=a[0]-i[0],f=a[1]-i[1],g=(t[0]-i[0])*f-u*(t[1]-i[1]),x=(e[0]-i[0])*f-u*(e[1]-i[1]);return g>0&&x<0||g<0&&x>0}function _a(t,e,i){for(const I of i)for(let N=0;N<I.length-1;++N)if((x=[(g=I[N+1])[0]-(f=I[N])[0],g[1]-f[1]])[0]*(b=[(u=e)[0]-(a=t)[0],u[1]-a[1]])[1]-x[1]*b[0]!=0&&Ml(a,u,f,g)&&Ml(f,g,a,u))return!0;var a,u,f,g,x,b;return!1}function Xc(t,e){for(let i=0;i<t.length;++i)if(!vl(t[i],e))return!1;for(let i=0;i<t.length-1;++i)if(_a(t[i],t[i+1],e))return!1;return!0}function If(t,e){for(let i=0;i<e.length;i++)if(Xc(t,e[i]))return!0;return!1}function xa(t,e,i){const a=[];for(let u=0;u<t.length;u++){const f=[];for(let g=0;g<t[u].length;g++){const x=Mf(t[u][g],i);xl(e,x),f.push(x)}a.push(f)}return a}function Kc(t,e,i){const a=[];for(let u=0;u<t.length;u++){const f=xa(t[u],e,i);a.push(f)}return a}function ts(t,e,i,a){if(t[0]<i[0]||t[0]>i[2]){const u=.5*a;let f=t[0]-i[0]>u?-a:i[0]-t[0]>u?a:0;f===0&&(f=t[0]-i[2]>u?-a:i[2]-t[0]>u?a:0),t[0]+=f}xl(e,t)}function qi(t,e,i,a){const u=Math.pow(2,a.z)*tr,f=[a.x*tr,a.y*tr],g=[];if(!t)return g;for(const x of t)for(const b of x){const I=[b.x+f[0],b.y+f[1]];ts(I,e,i,u),g.push(I)}return g}function Df(t,e,i,a){const u=Math.pow(2,a.z)*tr,f=[a.x*tr,a.y*tr],g=[];if(!t)return g;for(const b of t){const I=[];for(const N of b){const j=[N.x+f[0],N.y+f[1]];xl(e,j),I.push(j)}g.push(I)}if(e[2]-e[0]<=u/2){(x=e)[0]=x[1]=1/0,x[2]=x[3]=-1/0;for(const b of g)for(const I of b)ts(I,e,i,u)}var x;return g}class va{constructor(e,i){this.type=ji,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(gl(e[1])){const a=e[1];if(a.type==="FeatureCollection")for(let u=0;u<a.features.length;++u){const f=a.features[u].geometry.type;if(f==="Polygon"||f==="MultiPolygon")return new va(a,a.features[u].geometry)}else if(a.type==="Feature"){const u=a.geometry.type;if(u==="Polygon"||u==="MultiPolygon")return new va(a,a.geometry)}else if(a.type==="Polygon"||a.type==="MultiPolygon")return new va(a,a)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return function(i,a){const u=[1/0,1/0,-1/0,-1/0],f=[1/0,1/0,-1/0,-1/0],g=i.canonicalID();if(!g)return!1;if(a.type==="Polygon"){const x=xa(a.coordinates,f,g),b=qi(i.geometry(),u,f,g);if(!ya(u,f))return!1;for(const I of b)if(!vl(I,x))return!1}if(a.type==="MultiPolygon"){const x=Kc(a.coordinates,f,g),b=qi(i.geometry(),u,f,g);if(!ya(u,f))return!1;for(const I of b)if(!wf(I,x))return!1}return!0}(e,this.geometries);if(e.geometryType()==="LineString")return function(i,a){const u=[1/0,1/0,-1/0,-1/0],f=[1/0,1/0,-1/0,-1/0],g=i.canonicalID();if(!g)return!1;if(a.type==="Polygon"){const x=xa(a.coordinates,f,g),b=Df(i.geometry(),u,f,g);if(!ya(u,f))return!1;for(const I of b)if(!Xc(I,x))return!1}if(a.type==="MultiPolygon"){const x=Kc(a.coordinates,f,g),b=Df(i.geometry(),u,f,g);if(!ya(u,f))return!1;for(const I of b)if(!If(I,x))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}var Jc=va;function Is(t){if(t instanceof jo&&(t.name==="get"&&t.args.length===1||t.name==="feature-state"||t.name==="has"&&t.args.length===1||t.name==="properties"||t.name==="geometry-type"||t.name==="id"||/^filter-/.test(t.name))||t instanceof Jc)return!1;let e=!0;return t.eachChild(i=>{e&&!Is(i)&&(e=!1)}),e}function bl(t){if(t instanceof jo&&t.name==="feature-state")return!1;let e=!0;return t.eachChild(i=>{e&&!bl(i)&&(e=!1)}),e}function Ma(t,e){if(t instanceof jo&&e.indexOf(t.name)>=0)return!1;let i=!0;return t.eachChild(a=>{i&&!Ma(a,e)&&(i=!1)}),i}class wl{constructor(e,i){this.type=i.type,this.name=e,this.boundExpression=i}static parse(e,i){if(e.length!==2||typeof e[1]!="string")return i.error("'var' expression requires exactly one string literal argument.");const a=e[1];return i.scope.has(a)?new wl(a,i.scope.get(a)):i.error(`Unknown variable "${a}". Make sure "${a}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var eu=wl;class Il{constructor(e,i=[],a,u=new _f,f=[]){this.registry=e,this.path=i,this.key=i.map(g=>`[${g}]`).join(""),this.scope=u,this.errors=f,this.expectedType=a}parse(e,i,a,u,f={}){return i?this.concat(i,a,u)._parse(e,f):this._parse(e,f)}_parse(e,i){function a(u,f,g){return g==="assert"?new fo(f,[u]):g==="coerce"?new es(f,[u]):u}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const u=e[0];if(typeof u!="string")return this.error(`Expression name must be a string, but found ${typeof u} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const f=this.registry[u];if(f){let g=f.parse(e,this);if(!g)return null;if(this.expectedType){const x=this.expectedType,b=g.type;if(x.kind!=="string"&&x.kind!=="number"&&x.kind!=="boolean"&&x.kind!=="object"&&x.kind!=="array"||b.kind!=="value")if(x.kind!=="color"&&x.kind!=="formatted"&&x.kind!=="resolvedImage"||b.kind!=="value"&&b.kind!=="string"){if(this.checkSubtype(x,b))return null}else g=a(g,x,i.typeAnnotation||"coerce");else g=a(g,x,i.typeAnnotation||"assert")}if(!(g instanceof ga)&&g.type.kind!=="resolvedImage"&&Ds(g)){const x=new vf;try{g=new ga(g.type,g.evaluate(x))}catch(b){return this.error(b.message),null}}return g}return this.error(`Unknown expression "${u}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,i,a){const u=typeof e=="number"?this.path.concat(e):this.path,f=a?this.scope.concat(a):this.scope;return new Il(this.registry,u,i||null,f,this.errors)}error(e,...i){const a=`${this.key}${i.map(u=>`[${u}]`).join("")}`;this.errors.push(new Tr(a,e))}checkSubtype(e,i){const a=la(e,i);return a&&this.error(a),a}}var is=Il;function Ds(t){if(t instanceof eu)return Ds(t.boundExpression);if(t instanceof jo&&t.name==="error"||t instanceof _l||t instanceof Jc)return!1;const e=t instanceof es||t instanceof fo;let i=!0;return t.eachChild(a=>{i=e?i&&Ds(a):i&&a instanceof ga}),!!i&&Is(t)&&Ma(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function Dl(t,e){const i=t.length-1;let a,u,f=0,g=i,x=0;for(;f<=g;)if(x=Math.floor((f+g)/2),a=t[x],u=t[x+1],a<=e){if(x===i||e<u)return x;f=x+1}else{if(!(a>e))throw new Wn("Input is not a number.");g=x-1}return 0}class ba{constructor(e,i,a){this.type=e,this.input=i,this.labels=[],this.outputs=[];for(const[u,f]of a)this.labels.push(u),this.outputs.push(f)}static parse(e,i){if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");const a=i.parse(e[1],1,Yt);if(!a)return null;const u=[];let f=null;i.expectedType&&i.expectedType.kind!=="value"&&(f=i.expectedType);for(let g=1;g<e.length;g+=2){const x=g===1?-1/0:e[g],b=e[g+1],I=g,N=g+1;if(typeof x!="number")return i.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',I);if(u.length&&u[u.length-1][0]>=x)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',I);const j=i.parse(b,N,f);if(!j)return null;f=f||j.type,u.push([x,j])}return new ba(f,a,u)}evaluate(e){const i=this.labels,a=this.outputs;if(i.length===1)return a[0].evaluate(e);const u=this.input.evaluate(e);if(u<=i[0])return a[0].evaluate(e);const f=i.length;return u>=i[f-1]?a[f-1].evaluate(e):a[Dl(i,u)].evaluate(e)}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let i=0;i<this.labels.length;i++)i>0&&e.push(this.labels[i]),e.push(this.outputs[i].serialize());return e}}var Tl=ba;function Yi(t,e,i){return t*(1-i)+e*i}var Al=Object.freeze({__proto__:null,number:Yi,color:function(t,e,i){return new Cn(Yi(t.r,e.r,i),Yi(t.g,e.g,i),Yi(t.b,e.b,i),Yi(t.a,e.a,i))},array:function(t,e,i){return t.map((a,u)=>Yi(a,e[u],i))}});const tu=.95047,Tf=1.08883,iu=4/29,Nl=6/29,Af=3*Nl*Nl,Nf=Math.PI/180,Q0=180/Math.PI;function El(t){return t>.008856451679035631?Math.pow(t,1/3):t/Af+iu}function Cl(t){return t>Nl?t*t*t:Af*(t-iu)}function nu(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ru(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ef(t){const e=ru(t.r),i=ru(t.g),a=ru(t.b),u=El((.4124564*e+.3575761*i+.1804375*a)/tu),f=El((.2126729*e+.7151522*i+.072175*a)/1);return{l:116*f-16,a:500*(u-f),b:200*(f-El((.0193339*e+.119192*i+.9503041*a)/Tf)),alpha:t.a}}function Cf(t){let e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,a=isNaN(t.b)?e:e-t.b/200;return e=1*Cl(e),i=tu*Cl(i),a=Tf*Cl(a),new Cn(nu(3.2404542*i-1.5371385*e-.4985314*a),nu(-.969266*i+1.8760108*e+.041556*a),nu(.0556434*i-.2040259*e+1.0572252*a),t.alpha)}function Y0(t,e,i){const a=e-t;return t+i*(a>180||a<-180?a-360*Math.round(a/360):a)}const wa={forward:Ef,reverse:Cf,interpolate:function(t,e,i){return{l:Yi(t.l,e.l,i),a:Yi(t.a,e.a,i),b:Yi(t.b,e.b,i),alpha:Yi(t.alpha,e.alpha,i)}}},Ts={forward:function(t){const{l:e,a:i,b:a}=Ef(t),u=Math.atan2(a,i)*Q0;return{h:u<0?u+360:u,c:Math.sqrt(i*i+a*a),l:e,alpha:t.a}},reverse:function(t){const e=t.h*Nf,i=t.c;return Cf({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},interpolate:function(t,e,i){return{h:Y0(t.h,e.h,i),c:Yi(t.c,e.c,i),l:Yi(t.l,e.l,i),alpha:Yi(t.alpha,e.alpha,i)}}};var Sf=Object.freeze({__proto__:null,lab:wa,hcl:Ts});class Sl{constructor(e,i,a,u,f){this.type=e,this.operator=i,this.interpolation=a,this.input=u,this.labels=[],this.outputs=[];for(const[g,x]of f)this.labels.push(g),this.outputs.push(x)}static interpolationFactor(e,i,a,u){let f=0;if(e.name==="exponential")f=ou(i,e.base,a,u);else if(e.name==="linear")f=ou(i,1,a,u);else if(e.name==="cubic-bezier"){const g=e.controlPoints;f=new he(g[0],g[1],g[2],g[3]).solve(ou(i,1,a,u))}return f}static parse(e,i){let[a,u,f,...g]=e;if(!Array.isArray(u)||u.length===0)return i.error("Expected an interpolation type expression.",1);if(u[0]==="linear")u={name:"linear"};else if(u[0]==="exponential"){const I=u[1];if(typeof I!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);u={name:"exponential",base:I}}else{if(u[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(u[0])}`,1,0);{const I=u.slice(1);if(I.length!==4||I.some(N=>typeof N!="number"||N<0||N>1))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);u={name:"cubic-bezier",controlPoints:I}}}if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(f=i.parse(f,2,Yt),!f)return null;const x=[];let b=null;a==="interpolate-hcl"||a==="interpolate-lab"?b=Qr:i.expectedType&&i.expectedType.kind!=="value"&&(b=i.expectedType);for(let I=0;I<g.length;I+=2){const N=g[I],j=g[I+1],O=I+3,B=I+4;if(typeof N!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',O);if(x.length&&x[x.length-1][0]>=N)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',O);const F=i.parse(j,B,b);if(!F)return null;b=b||F.type,x.push([N,F])}return b.kind==="number"||b.kind==="color"||b.kind==="array"&&b.itemType.kind==="number"&&typeof b.N=="number"?new Sl(b,a,u,f,x):i.error(`Type ${In(b)} is not interpolatable.`)}evaluate(e){const i=this.labels,a=this.outputs;if(i.length===1)return a[0].evaluate(e);const u=this.input.evaluate(e);if(u<=i[0])return a[0].evaluate(e);const f=i.length;if(u>=i[f-1])return a[f-1].evaluate(e);const g=Dl(i,u),x=Sl.interpolationFactor(this.interpolation,u,i[g],i[g+1]),b=a[g].evaluate(e),I=a[g+1].evaluate(e);return this.operator==="interpolate"?Al[this.type.kind.toLowerCase()](b,I,x):this.operator==="interpolate-hcl"?Ts.reverse(Ts.interpolate(Ts.forward(b),Ts.forward(I),x)):wa.reverse(wa.interpolate(wa.forward(b),wa.forward(I),x))}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;e=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const i=[this.operator,e,this.input.serialize()];for(let a=0;a<this.labels.length;a++)i.push(this.labels[a],this.outputs[a].serialize());return i}}function ou(t,e,i,a){const u=a-i,f=t-i;return u===0?0:e===1?f/u:(Math.pow(e,f)-1)/(Math.pow(e,u)-1)}var Xr=Sl;class zl{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expectected at least one argument.");let a=null;const u=i.expectedType;u&&u.kind!=="value"&&(a=u);const f=[];for(const x of e.slice(1)){const b=i.parse(x,1+f.length,a,void 0,{typeAnnotation:"omit"});if(!b)return null;a=a||b.type,f.push(b)}const g=u&&f.some(x=>la(u,x.type));return new zl(g?Ei:a,f)}evaluate(e){let i,a=null,u=0;for(const f of this.args){if(u++,a=f.evaluate(e),a&&a instanceof Or&&!a.available&&(i||(i=a),a=null,u===this.args.length))return i;if(a!==null)break}return a}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(i=>{e.push(i.serialize())}),e}}var su=zl;class jl{constructor(e,i){this.type=i.type,this.bindings=[].concat(e),this.result=i}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const i of this.bindings)e(i[1]);e(this.result)}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const a=[];for(let f=1;f<e.length-1;f+=2){const g=e[f];if(typeof g!="string")return i.error(`Expected string, but found ${typeof g} instead.`,f);if(/[^a-zA-Z0-9_]/.test(g))return i.error("Variable names must contain only alphanumeric characters or '_'.",f);const x=i.parse(e[f+1],f+1);if(!x)return null;a.push([g,x])}const u=i.parse(e[e.length-1],e.length-1,i.expectedType,a);return u?new jl(a,u):null}outputDefined(){return this.result.outputDefined()}serialize(){const e=["let"];for(const[i,a]of this.bindings)e.push(i,a.serialize());return e.push(this.result.serialize()),e}}var zf=jl;class au{constructor(e,i,a){this.type=e,this.index=i,this.input=a}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const a=i.parse(e[1],1,Yt),u=i.parse(e[2],2,Jn(i.expectedType||Ei));return a&&u?new au(u.type.itemType,a,u):null}evaluate(e){const i=this.index.evaluate(e),a=this.input.evaluate(e);if(i<0)throw new Wn(`Array index out of bounds: ${i} < 0.`);if(i>=a.length)throw new Wn(`Array index out of bounds: ${i} > ${a.length-1}.`);if(i!==Math.floor(i))throw new Wn(`Array index must be an integer, but found ${i} instead.`);return a[i]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var jf=au;class Ol{constructor(e,i){this.type=ji,this.needle=e,this.haystack=i}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const a=i.parse(e[1],1,Ei),u=i.parse(e[2],2,Ei);return a&&u?ca(a.type,[ji,Ri,Yt,pr,Ei])?new Ol(a,u):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${In(a.type)} instead`):null}evaluate(e){const i=this.needle.evaluate(e),a=this.haystack.evaluate(e);if(a==null)return!1;if(!ua(i,["boolean","string","number","null"]))throw new Wn(`Expected first argument to be of type boolean, string, number or null, but found ${In(Qn(i))} instead.`);if(!ua(a,["string","array"]))throw new Wn(`Expected second argument to be of type array or string, but found ${In(Qn(a))} instead.`);return a.indexOf(i)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var Of=Ol;class Ll{constructor(e,i,a){this.type=Yt,this.needle=e,this.haystack=i,this.fromIndex=a}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const a=i.parse(e[1],1,Ei),u=i.parse(e[2],2,Ei);if(!a||!u)return null;if(!ca(a.type,[ji,Ri,Yt,pr,Ei]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${In(a.type)} instead`);if(e.length===4){const f=i.parse(e[3],3,Yt);return f?new Ll(a,u,f):null}return new Ll(a,u)}evaluate(e){const i=this.needle.evaluate(e),a=this.haystack.evaluate(e);if(!ua(i,["boolean","string","number","null"]))throw new Wn(`Expected first argument to be of type boolean, string, number or null, but found ${In(Qn(i))} instead.`);if(!ua(a,["string","array"]))throw new Wn(`Expected second argument to be of type array or string, but found ${In(Qn(a))} instead.`);if(this.fromIndex){const u=this.fromIndex.evaluate(e);return a.indexOf(i,u)}return a.indexOf(i)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var $0=Ll;class lu{constructor(e,i,a,u,f,g){this.inputType=e,this.type=i,this.input=a,this.cases=u,this.outputs=f,this.otherwise=g}static parse(e,i){if(e.length<5)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return i.error("Expected an even number of arguments.");let a,u;i.expectedType&&i.expectedType.kind!=="value"&&(u=i.expectedType);const f={},g=[];for(let I=2;I<e.length-1;I+=2){let N=e[I];const j=e[I+1];Array.isArray(N)||(N=[N]);const O=i.concat(I);if(N.length===0)return O.error("Expected at least one branch label.");for(const F of N){if(typeof F!="number"&&typeof F!="string")return O.error("Branch labels must be numbers or strings.");if(typeof F=="number"&&Math.abs(F)>Number.MAX_SAFE_INTEGER)return O.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof F=="number"&&Math.floor(F)!==F)return O.error("Numeric branch labels must be integer values.");if(a){if(O.checkSubtype(a,Qn(F)))return null}else a=Qn(F);if(f[String(F)]!==void 0)return O.error("Branch labels must be unique.");f[String(F)]=g.length}const B=i.parse(j,I,u);if(!B)return null;u=u||B.type,g.push(B)}const x=i.parse(e[1],1,Ei);if(!x)return null;const b=i.parse(e[e.length-1],e.length-1,u);return b?x.type.kind!=="value"&&i.concat(1).checkSubtype(a,x.type)?null:new lu(a,u,x,f,g,b):null}evaluate(e){const i=this.input.evaluate(e);return(Qn(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],i=Object.keys(this.cases).sort(),a=[],u={};for(const g of i){const x=u[this.cases[g]];x===void 0?(u[this.cases[g]]=a.length,a.push([this.cases[g],[g]])):a[x][1].push(g)}const f=g=>this.inputType.kind==="number"?Number(g):g;for(const[g,x]of a)e.push(x.length===1?f(x[0]):x.map(f)),e.push(this.outputs[g].serialize());return e.push(this.otherwise.serialize()),e}}var Z0=lu;class As{constructor(e,i,a){this.type=e,this.branches=i,this.otherwise=a}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return i.error("Expected an odd number of arguments.");let a;i.expectedType&&i.expectedType.kind!=="value"&&(a=i.expectedType);const u=[];for(let g=1;g<e.length-1;g+=2){const x=i.parse(e[g],g,ji);if(!x)return null;const b=i.parse(e[g+1],g+1,a);if(!b)return null;u.push([x,b]),a=a||b.type}const f=i.parse(e[e.length-1],e.length-1,a);return f?new As(a,u,f):null}evaluate(e){for(const[i,a]of this.branches)if(i.evaluate(e))return a.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[i,a]of this.branches)e(i),e(a);e(this.otherwise)}outputDefined(){return this.branches.every(([e,i])=>i.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(i=>{e.push(i.serialize())}),e}}var Lf=As;class Ia{constructor(e,i,a,u){this.type=e,this.input=i,this.beginIndex=a,this.endIndex=u}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const a=i.parse(e[1],1,Ei),u=i.parse(e[2],2,Yt);if(!a||!u)return null;if(!ca(a.type,[Jn(Ei),Ri,Ei]))return i.error(`Expected first argument to be of type array or string, but found ${In(a.type)} instead`);if(e.length===4){const f=i.parse(e[3],3,Yt);return f?new Ia(a.type,a,u,f):null}return new Ia(a.type,a,u)}evaluate(e){const i=this.input.evaluate(e),a=this.beginIndex.evaluate(e);if(!ua(i,["string","array"]))throw new Wn(`Expected first argument to be of type array or string, but found ${In(Qn(i))} instead.`);if(this.endIndex){const u=this.endIndex.evaluate(e);return i.slice(a,u)}return i.slice(a)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var G0=Ia;function kf(t,e){return t==="=="||t==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function Pf(t,e,i,a){return a.compare(e,i)===0}function ns(t,e,i){const a=t!=="=="&&t!=="!=";return class e3{constructor(f,g,x){this.type=ji,this.lhs=f,this.rhs=g,this.collator=x,this.hasUntypedArgument=f.type.kind==="value"||g.type.kind==="value"}static parse(f,g){if(f.length!==3&&f.length!==4)return g.error("Expected two or three arguments.");const x=f[0];let b=g.parse(f[1],1,Ei);if(!b)return null;if(!kf(x,b.type))return g.concat(1).error(`"${x}" comparisons are not supported for type '${In(b.type)}'.`);let I=g.parse(f[2],2,Ei);if(!I)return null;if(!kf(x,I.type))return g.concat(2).error(`"${x}" comparisons are not supported for type '${In(I.type)}'.`);if(b.type.kind!==I.type.kind&&b.type.kind!=="value"&&I.type.kind!=="value")return g.error(`Cannot compare types '${In(b.type)}' and '${In(I.type)}'.`);a&&(b.type.kind==="value"&&I.type.kind!=="value"?b=new fo(I.type,[b]):b.type.kind!=="value"&&I.type.kind==="value"&&(I=new fo(b.type,[I])));let N=null;if(f.length===4){if(b.type.kind!=="string"&&I.type.kind!=="string"&&b.type.kind!=="value"&&I.type.kind!=="value")return g.error("Cannot use collator to compare non-string types.");if(N=g.parse(f[3],3,aa),!N)return null}return new e3(b,I,N)}evaluate(f){const g=this.lhs.evaluate(f),x=this.rhs.evaluate(f);if(a&&this.hasUntypedArgument){const b=Qn(g),I=Qn(x);if(b.kind!==I.kind||b.kind!=="string"&&b.kind!=="number")throw new Wn(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${b.kind}, ${I.kind}) instead.`)}if(this.collator&&!a&&this.hasUntypedArgument){const b=Qn(g),I=Qn(x);if(b.kind!=="string"||I.kind!=="string")return e(f,g,x)}return this.collator?i(f,g,x,this.collator.evaluate(f)):e(f,g,x)}eachChild(f){f(this.lhs),f(this.rhs),this.collator&&f(this.collator)}outputDefined(){return!0}serialize(){const f=[t];return this.eachChild(g=>{f.push(g.serialize())}),f}}}const Rf=ns("==",function(t,e,i){return e===i},Pf),Uf=ns("!=",function(t,e,i){return e!==i},function(t,e,i,a){return!Pf(0,e,i,a)}),cu=ns("<",function(t,e,i){return e<i},function(t,e,i,a){return a.compare(e,i)<0}),H0=ns(">",function(t,e,i){return e>i},function(t,e,i,a){return a.compare(e,i)>0}),W0=ns("<=",function(t,e,i){return e<=i},function(t,e,i,a){return a.compare(e,i)<=0}),q0=ns(">=",function(t,e,i){return e>=i},function(t,e,i,a){return a.compare(e,i)>=0});class uu{constructor(e,i,a,u,f,g){this.type=Ri,this.number=e,this.locale=i,this.currency=a,this.unit=u,this.minFractionDigits=f,this.maxFractionDigits=g}static parse(e,i){if(e.length!==3)return i.error("Expected two arguments.");const a=i.parse(e[1],1,Yt);if(!a)return null;const u=e[2];if(typeof u!="object"||Array.isArray(u))return i.error("NumberFormat options argument must be an object.");let f=null;if(u.locale&&(f=i.parse(u.locale,1,Ri),!f))return null;let g=null;if(u.currency&&(g=i.parse(u.currency,1,Ri),!g))return null;let x=null;if(u.unit&&(x=i.parse(u.unit,1,Ri),!x))return null;let b=null;if(u["min-fraction-digits"]&&(b=i.parse(u["min-fraction-digits"],1,Yt),!b))return null;let I=null;return u["max-fraction-digits"]&&(I=i.parse(u["max-fraction-digits"],1,Yt),!I)?null:new uu(a,f,g,x,b,I)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class hu{constructor(e){this.type=Yt,this.input=e}static parse(e,i){if(e.length!==2)return i.error(`Expected 1 argument, but found ${e.length-1} instead.`);const a=i.parse(e[1],1);return a?a.type.kind!=="array"&&a.type.kind!=="string"&&a.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${In(a.type)} instead.`):new hu(a):null}evaluate(e){const i=this.input.evaluate(e);if(typeof i=="string"||Array.isArray(i))return i.length;throw new Wn(`Expected value to be of type string or array, but found ${In(Qn(i))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(i=>{e.push(i.serialize())}),e}}const Bf={"==":Rf,"!=":Uf,">":H0,"<":cu,">=":q0,"<=":W0,array:fo,at:jf,boolean:fo,case:Lf,coalesce:su,collator:_l,format:ma,image:ml,in:Of,"index-of":$0,interpolate:Xr,"interpolate-hcl":Xr,"interpolate-lab":Xr,length:hu,let:zf,literal:ga,match:Z0,number:fo,"number-format":uu,object:fo,slice:G0,step:Tl,string:fo,"to-boolean":es,"to-color":es,"to-number":es,"to-string":es,var:eu,within:Jc};function Ff(t,[e,i,a,u]){e=e.evaluate(t),i=i.evaluate(t),a=a.evaluate(t);const f=u?u.evaluate(t):1,g=xf(e,i,a,f);if(g)throw new Wn(g);return new Cn(e/255*f,i/255*f,a/255*f,f)}function du(t,e){return t in e}function kl(t,e){const i=e[t];return i===void 0?null:i}function Kr(t){return{type:t}}jo.register(Bf,{error:[{kind:"error"},[Ri],(t,[e])=>{throw new Wn(e.evaluate(t))}],typeof:[Ri,[Ei],(t,[e])=>In(Qn(e.evaluate(t)))],"to-rgba":[Jn(Yt,4),[Qr],(t,[e])=>e.evaluate(t).toArray()],rgb:[Qr,[Yt,Yt,Yt],Ff],rgba:[Qr,[Yt,Yt,Yt,Yt],Ff],has:{type:ji,overloads:[[[Ri],(t,[e])=>du(e.evaluate(t),t.properties())],[[Ri,Jo],(t,[e,i])=>du(e.evaluate(t),i.evaluate(t))]]},get:{type:Ei,overloads:[[[Ri],(t,[e])=>kl(e.evaluate(t),t.properties())],[[Ri,Jo],(t,[e,i])=>kl(e.evaluate(t),i.evaluate(t))]]},"feature-state":[Ei,[Ri],(t,[e])=>kl(e.evaluate(t),t.featureState||{})],properties:[Jo,[],t=>t.properties()],"geometry-type":[Ri,[],t=>t.geometryType()],id:[Ei,[],t=>t.id()],zoom:[Yt,[],t=>t.globals.zoom],pitch:[Yt,[],t=>t.globals.pitch||0],"distance-from-center":[Yt,[],t=>t.distanceFromCenter()],"heatmap-density":[Yt,[],t=>t.globals.heatmapDensity||0],"line-progress":[Yt,[],t=>t.globals.lineProgress||0],"sky-radial-progress":[Yt,[],t=>t.globals.skyRadialProgress||0],accumulated:[Ei,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[Yt,Kr(Yt),(t,e)=>{let i=0;for(const a of e)i+=a.evaluate(t);return i}],"*":[Yt,Kr(Yt),(t,e)=>{let i=1;for(const a of e)i*=a.evaluate(t);return i}],"-":{type:Yt,overloads:[[[Yt,Yt],(t,[e,i])=>e.evaluate(t)-i.evaluate(t)],[[Yt],(t,[e])=>-e.evaluate(t)]]},"/":[Yt,[Yt,Yt],(t,[e,i])=>e.evaluate(t)/i.evaluate(t)],"%":[Yt,[Yt,Yt],(t,[e,i])=>e.evaluate(t)%i.evaluate(t)],ln2:[Yt,[],()=>Math.LN2],pi:[Yt,[],()=>Math.PI],e:[Yt,[],()=>Math.E],"^":[Yt,[Yt,Yt],(t,[e,i])=>Math.pow(e.evaluate(t),i.evaluate(t))],sqrt:[Yt,[Yt],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[Yt,[Yt],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[Yt,[Yt],(t,[e])=>Math.log(e.evaluate(t))],log2:[Yt,[Yt],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[Yt,[Yt],(t,[e])=>Math.sin(e.evaluate(t))],cos:[Yt,[Yt],(t,[e])=>Math.cos(e.evaluate(t))],tan:[Yt,[Yt],(t,[e])=>Math.tan(e.evaluate(t))],asin:[Yt,[Yt],(t,[e])=>Math.asin(e.evaluate(t))],acos:[Yt,[Yt],(t,[e])=>Math.acos(e.evaluate(t))],atan:[Yt,[Yt],(t,[e])=>Math.atan(e.evaluate(t))],min:[Yt,Kr(Yt),(t,e)=>Math.min(...e.map(i=>i.evaluate(t)))],max:[Yt,Kr(Yt),(t,e)=>Math.max(...e.map(i=>i.evaluate(t)))],abs:[Yt,[Yt],(t,[e])=>Math.abs(e.evaluate(t))],round:[Yt,[Yt],(t,[e])=>{const i=e.evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[Yt,[Yt],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[Yt,[Yt],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[ji,[Ri,Ei],(t,[e,i])=>t.properties()[e.value]===i.value],"filter-id-==":[ji,[Ei],(t,[e])=>t.id()===e.value],"filter-type-==":[ji,[Ri],(t,[e])=>t.geometryType()===e.value],"filter-<":[ji,[Ri,Ei],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a<u}],"filter-id-<":[ji,[Ei],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i<a}],"filter->":[ji,[Ri,Ei],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a>u}],"filter-id->":[ji,[Ei],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i>a}],"filter-<=":[ji,[Ri,Ei],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a<=u}],"filter-id-<=":[ji,[Ei],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i<=a}],"filter->=":[ji,[Ri,Ei],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a>=u}],"filter-id->=":[ji,[Ei],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i>=a}],"filter-has":[ji,[Ei],(t,[e])=>e.value in t.properties()],"filter-has-id":[ji,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[ji,[Jn(Ri)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[ji,[Jn(Ei)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[ji,[Ri,Jn(Ei)],(t,[e,i])=>i.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[ji,[Ri,Jn(Ei)],(t,[e,i])=>function(a,u,f,g){for(;f<=g;){const x=f+g>>1;if(u[x]===a)return!0;u[x]>a?g=x-1:f=x+1}return!1}(t.properties()[e.value],i.value,0,i.value.length-1)],all:{type:ji,overloads:[[[ji,ji],(t,[e,i])=>e.evaluate(t)&&i.evaluate(t)],[Kr(ji),(t,e)=>{for(const i of e)if(!i.evaluate(t))return!1;return!0}]]},any:{type:ji,overloads:[[[ji,ji],(t,[e,i])=>e.evaluate(t)||i.evaluate(t)],[Kr(ji),(t,e)=>{for(const i of e)if(i.evaluate(t))return!0;return!1}]]},"!":[ji,[ji],(t,[e])=>!e.evaluate(t)],"is-supported-script":[ji,[Ri],(t,[e])=>{const i=t.globals&&t.globals.isSupportedScript;return!i||i(e.evaluate(t))}],upcase:[Ri,[Ri],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Ri,[Ri],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Ri,Kr(Ei),(t,e)=>e.map(i=>pa(i.evaluate(t))).join("")],"resolved-locale":[Ri,[aa],(t,[e])=>e.evaluate(t).resolvedLocale()]});var Da=Bf;function Vf(t){return{result:"success",value:t}}function Ar(t){return{result:"error",value:t}}function rs(t){return t["property-type"]==="data-driven"}function os(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function fu(t){return!!t.expression&&t.expression.interpolated}function Xi(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":t===null?"null":typeof t}function Ta(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function X0(t){return t}function Pl(t,e){const i=e.type==="color",a=t.stops&&typeof t.stops[0][0]=="object",u=a||!(a||t.property!==void 0),f=t.type||(fu(e)?"exponential":"interval");if(i&&((t=uo({},t)).stops&&(t.stops=t.stops.map(I=>[I[0],Cn.parse(I[1])])),t.default=Cn.parse(t.default?t.default:e.default)),t.colorSpace&&t.colorSpace!=="rgb"&&!Sf[t.colorSpace])throw new Error(`Unknown color space: ${t.colorSpace}`);let g,x,b;if(f==="exponential")g=gu;else if(f==="interval")g=Qf;else if(f==="categorical"){g=pu,x=Object.create(null);for(const I of t.stops)x[I[0]]=I[1];b=typeof t.stops[0][0]}else{if(f!=="identity")throw new Error(`Unknown function type "${f}"`);g=mu}if(a){const I={},N=[];for(let B=0;B<t.stops.length;B++){const F=t.stops[B],Z=F[0].zoom;I[Z]===void 0&&(I[Z]={zoom:Z,type:t.type,property:t.property,default:t.default,stops:[]},N.push(Z)),I[Z].stops.push([F[0].value,F[1]])}const j=[];for(const B of N)j.push([I[B].zoom,Pl(I[B],e)]);const O={name:"linear"};return{kind:"composite",interpolationType:O,interpolationFactor:Xr.interpolationFactor.bind(void 0,O),zoomStops:j.map(B=>B[0]),evaluate:({zoom:B},F)=>gu({stops:j,base:t.base},e,B).evaluate(B,F)}}if(u){const I=f==="exponential"?{name:"exponential",base:t.base!==void 0?t.base:1}:null;return{kind:"camera",interpolationType:I,interpolationFactor:Xr.interpolationFactor.bind(void 0,I),zoomStops:t.stops.map(N=>N[0]),evaluate:({zoom:N})=>g(t,e,N,x,b)}}return{kind:"source",evaluate(I,N){const j=N&&N.properties?N.properties[t.property]:void 0;return j===void 0?Ns(t.default,e.default):g(t,e,j,x,b)}}}function Ns(t,e,i){return t!==void 0?t:e!==void 0?e:i!==void 0?i:void 0}function pu(t,e,i,a,u){return Ns(typeof i===u?a[i]:void 0,t.default,e.default)}function Qf(t,e,i){if(Xi(i)!=="number")return Ns(t.default,e.default);const a=t.stops.length;if(a===1||i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[a-1][0])return t.stops[a-1][1];const u=Dl(t.stops.map(f=>f[0]),i);return t.stops[u][1]}function gu(t,e,i){const a=t.base!==void 0?t.base:1;if(Xi(i)!=="number")return Ns(t.default,e.default);const u=t.stops.length;if(u===1||i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[u-1][0])return t.stops[u-1][1];const f=Dl(t.stops.map(N=>N[0]),i),g=function(N,j,O,B){const F=B-O,Z=N-O;return F===0?0:j===1?Z/F:(Math.pow(j,Z)-1)/(Math.pow(j,F)-1)}(i,a,t.stops[f][0],t.stops[f+1][0]),x=t.stops[f][1],b=t.stops[f+1][1];let I=Al[e.type]||X0;if(t.colorSpace&&t.colorSpace!=="rgb"){const N=Sf[t.colorSpace];I=(j,O)=>N.reverse(N.interpolate(N.forward(j),N.forward(O),g))}return typeof x.evaluate=="function"?{evaluate(...N){const j=x.evaluate.apply(void 0,N),O=b.evaluate.apply(void 0,N);if(j!==void 0&&O!==void 0)return I(j,O,g)}}:I(x,b,g)}function mu(t,e,i){return e.type==="color"?i=Cn.parse(i):e.type==="formatted"?i=er.fromString(i.toString()):e.type==="resolvedImage"?i=Or.fromString(i.toString()):Xi(i)===e.type||e.type==="enum"&&e.values[i]||(i=void 0),Ns(i,t.default,e.default)}class Rl{constructor(e,i){this.expression=e,this._warningHistory={},this._evaluator=new vf,this._defaultValue=i?function(a){return a.type==="color"&&(Ta(a.default)||Array.isArray(a.default))?new Cn(0,0,0,0):a.type==="color"?Cn.parse(a.default)||null:a.default===void 0?null:a.default}(i):null,this._enumValues=i&&i.type==="enum"?i.values:null}evaluateWithoutErrorHandling(e,i,a,u,f,g,x,b){return this._evaluator.globals=e,this._evaluator.feature=i,this._evaluator.featureState=a,this._evaluator.canonical=u||null,this._evaluator.availableImages=f||null,this._evaluator.formattedSection=g,this._evaluator.featureTileCoord=x||null,this._evaluator.featureDistanceData=b||null,this.expression.evaluate(this._evaluator)}evaluate(e,i,a,u,f,g,x,b){this._evaluator.globals=e,this._evaluator.feature=i||null,this._evaluator.featureState=a||null,this._evaluator.canonical=u||null,this._evaluator.availableImages=f||null,this._evaluator.formattedSection=g||null,this._evaluator.featureTileCoord=x||null,this._evaluator.featureDistanceData=b||null;try{const I=this.expression.evaluate(this._evaluator);if(I==null||typeof I=="number"&&I!=I)return this._defaultValue;if(this._enumValues&&!(I in this._enumValues))throw new Wn(`Expected value to be one of ${Object.keys(this._enumValues).map(N=>JSON.stringify(N)).join(", ")}, but found ${JSON.stringify(I)} instead.`);return I}catch(I){return this._warningHistory[I.message]||(this._warningHistory[I.message]=!0,typeof console<"u"&&console.warn(I.message)),this._defaultValue}}}function Aa(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="string"&&t[0]in Da}function Oo(t,e){const i=new is(Da,[],e?function(u){const f={color:Qr,string:Ri,number:Yt,enum:Ri,boolean:ji,formatted:Ms,resolvedImage:So};return u.type==="array"?Jn(f[u.value]||Ei,u.length):f[u.type]}(e):void 0),a=i.parse(t,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?Vf(new Rl(a,e)):Ar(i.errors)}class Lo{constructor(e,i){this.kind=e,this._styleExpression=i,this.isStateDependent=e!=="constant"&&!bl(i.expression)}evaluateWithoutErrorHandling(e,i,a,u,f,g){return this._styleExpression.evaluateWithoutErrorHandling(e,i,a,u,f,g)}evaluate(e,i,a,u,f,g){return this._styleExpression.evaluate(e,i,a,u,f,g)}}class Ul{constructor(e,i,a,u){this.kind=e,this.zoomStops=a,this._styleExpression=i,this.isStateDependent=e!=="camera"&&!bl(i.expression),this.interpolationType=u}evaluateWithoutErrorHandling(e,i,a,u,f,g){return this._styleExpression.evaluateWithoutErrorHandling(e,i,a,u,f,g)}evaluate(e,i,a,u,f,g){return this._styleExpression.evaluate(e,i,a,u,f,g)}interpolationFactor(e,i,a){return this.interpolationType?Xr.interpolationFactor(this.interpolationType,e,i,a):0}}function yu(t,e){if((t=Oo(t,e)).result==="error")return t;const i=t.value.expression,a=Is(i);if(!a&&!rs(e))return Ar([new Tr("","data expressions not supported")]);const u=Ma(i,["zoom","pitch","distance-from-center"]);if(!u&&!os(e))return Ar([new Tr("","zoom expressions not supported")]);const f=Na(i);return f||u?f instanceof Tr?Ar([f]):f instanceof Xr&&!fu(e)?Ar([new Tr("",'"interpolate" expressions cannot be used with this property')]):Vf(f?new Ul(a?"camera":"composite",t.value,f.labels,f instanceof Xr?f.interpolation:void 0):new Lo(a?"constant":"source",t.value)):Ar([new Tr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Es{constructor(e,i){this._parameters=e,this._specification=i,uo(this,Pl(this._parameters,this._specification))}static deserialize(e){return new Es(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Na(t){let e=null;if(t instanceof zf)e=Na(t.result);else if(t instanceof su){for(const i of t.args)if(e=Na(i),e)break}else(t instanceof Tl||t instanceof Xr)&&t.input instanceof jo&&t.input.name==="zoom"&&(e=t);return e instanceof Tr||t.eachChild(i=>{const a=Na(i);a instanceof Tr?e=a:!e&&a?e=new Tr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&a&&e!==a&&(e=new Tr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}class $t{constructor(e,i,a,u){this.message=(e?`${e}: `:"")+a,u&&(this.identifier=u),i!=null&&i.__line__&&(this.line=i.__line__)}}function Lr(t){const e=t.key,i=t.value,a=t.valueSpec||{},u=t.objectElementValidators||{},f=t.style,g=t.styleSpec;let x=[];const b=Xi(i);if(b!=="object")return[new $t(e,i,`object expected, ${b} found`)];for(const I in i){const N=I.split(".")[0],j=a[N]||a["*"];let O;u[N]?O=u[N]:a[N]?O=cr:u["*"]?O=u["*"]:a["*"]&&(O=cr),O?x=x.concat(O({key:(e&&`${e}.`)+I,value:i[I],valueSpec:j,style:f,styleSpec:g,object:i,objectKey:I},i)):x.push(new $t(e,i[I],`unknown property "${I}"`))}for(const I in a)u[I]||a[I].required&&a[I].default===void 0&&i[I]===void 0&&x.push(new $t(e,i,`missing required property "${I}"`));return x}function Ea(t){const e=t.value,i=t.valueSpec,a=t.style,u=t.styleSpec,f=t.key,g=t.arrayElementValidator||cr;if(Xi(e)!=="array")return[new $t(f,e,`array expected, ${Xi(e)} found`)];if(i.length&&e.length!==i.length)return[new $t(f,e,`array length ${i.length} expected, length ${e.length} found`)];if(i["min-length"]&&e.length<i["min-length"])return[new $t(f,e,`array length at least ${i["min-length"]} expected, length ${e.length} found`)];let x={type:i.value,values:i.values,minimum:i.minimum,maximum:i.maximum,function:void 0};u.$version<7&&(x.function=i.function),Xi(i.value)==="object"&&(x=i.value);let b=[];for(let I=0;I<e.length;I++)b=b.concat(g({array:e,arrayIndex:I,value:e[I],valueSpec:x,style:a,styleSpec:u,key:`${f}[${I}]`}));return b}function Yf(t){const e=t.key,i=t.value,a=t.valueSpec;let u=Xi(i);if(u==="number"&&i!=i&&(u="NaN"),u!=="number")return[new $t(e,i,`number expected, ${u} found`)];if("minimum"in a){let f=a.minimum;if(Xi(a.minimum)==="array"&&(f=a.minimum[t.arrayIndex]),i<f)return[new $t(e,i,`${i} is less than the minimum value ${f}`)]}if("maximum"in a){let f=a.maximum;if(Xi(a.maximum)==="array"&&(f=a.maximum[t.arrayIndex]),i>f)return[new $t(e,i,`${i} is greater than the maximum value ${f}`)]}return[]}function $f(t){const e=t.valueSpec,i=Vn(t.value.type);let a,u,f,g={};const x=i!=="categorical"&&t.value.property===void 0,b=!x,I=Xi(t.value.stops)==="array"&&Xi(t.value.stops[0])==="array"&&Xi(t.value.stops[0][0])==="object",N=Lr({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(B){if(i==="identity")return[new $t(B.key,B.value,'identity function may not have a "stops" property')];let F=[];const Z=B.value;return F=F.concat(Ea({key:B.key,value:Z,valueSpec:B.valueSpec,style:B.style,styleSpec:B.styleSpec,arrayElementValidator:j})),Xi(Z)==="array"&&Z.length===0&&F.push(new $t(B.key,Z,"array must have at least one stop")),F},default:function(B){return cr({key:B.key,value:B.value,valueSpec:e,style:B.style,styleSpec:B.styleSpec})}}});return i==="identity"&&x&&N.push(new $t(t.key,t.value,'missing required property "property"')),i==="identity"||t.value.stops||N.push(new $t(t.key,t.value,'missing required property "stops"')),i==="exponential"&&t.valueSpec.expression&&!fu(t.valueSpec)&&N.push(new $t(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(b&&!rs(t.valueSpec)?N.push(new $t(t.key,t.value,"property functions not supported")):x&&!os(t.valueSpec)&&N.push(new $t(t.key,t.value,"zoom functions not supported"))),i!=="categorical"&&!I||t.value.property!==void 0||N.push(new $t(t.key,t.value,'"property" property is required')),N;function j(B){let F=[];const Z=B.value,ne=B.key;if(Xi(Z)!=="array")return[new $t(ne,Z,`array expected, ${Xi(Z)} found`)];if(Z.length!==2)return[new $t(ne,Z,`array length 2 expected, length ${Z.length} found`)];if(I){if(Xi(Z[0])!=="object")return[new $t(ne,Z,`object expected, ${Xi(Z[0])} found`)];if(Z[0].zoom===void 0)return[new $t(ne,Z,"object stop key must have zoom")];if(Z[0].value===void 0)return[new $t(ne,Z,"object stop key must have value")];const Me=Vn(Z[0].zoom);if(typeof Me!="number")return[new $t(ne,Z[0].zoom,"stop zoom values must be numbers")];if(f&&f>Me)return[new $t(ne,Z[0].zoom,"stop zoom values must appear in ascending order")];Me!==f&&(f=Me,u=void 0,g={}),F=F.concat(Lr({key:`${ne}[0]`,value:Z[0],valueSpec:{zoom:{}},style:B.style,styleSpec:B.styleSpec,objectElementValidators:{zoom:Yf,value:O}}))}else F=F.concat(O({key:`${ne}[0]`,value:Z[0],valueSpec:{},style:B.style,styleSpec:B.styleSpec},Z));return Aa(ho(Z[1]))?F.concat([new $t(`${ne}[1]`,Z[1],"expressions are not allowed in function stops.")]):F.concat(cr({key:`${ne}[1]`,value:Z[1],valueSpec:e,style:B.style,styleSpec:B.styleSpec}))}function O(B,F){const Z=Xi(B.value),ne=Vn(B.value),Me=B.value!==null?B.value:F;if(a){if(Z!==a)return[new $t(B.key,Me,`${Z} stop domain type must match previous stop domain type ${a}`)]}else a=Z;if(Z!=="number"&&Z!=="string"&&Z!=="boolean"&&typeof ne!="number"&&typeof ne!="string"&&typeof ne!="boolean")return[new $t(B.key,Me,"stop domain value must be a number, string, or boolean")];if(Z!=="number"&&i!=="categorical"){let ze=`number expected, ${Z} found`;return rs(e)&&i===void 0&&(ze+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new $t(B.key,Me,ze)]}return i!=="categorical"||Z!=="number"||typeof ne=="number"&&isFinite(ne)&&Math.floor(ne)===ne?i!=="categorical"&&Z==="number"&&typeof ne=="number"&&typeof u=="number"&&u!==void 0&&ne<u?[new $t(B.key,Me,"stop domain values must appear in ascending order")]:(u=ne,i==="categorical"&&ne in g?[new $t(B.key,Me,"stop domain values must be unique")]:(g[ne]=!0,[])):[new $t(B.key,Me,`integer expected, found ${String(ne)}`)]}}function Cs(t){const e=(t.expressionContext==="property"?yu:Oo)(ho(t.value),t.valueSpec);if(e.result==="error")return e.value.map(a=>new $t(`${t.key}${a.key}`,t.value,a.message));const i=e.value.expression||e.value._styleExpression.expression;if(t.expressionContext==="property"&&t.propertyKey==="text-font"&&!i.outputDefined())return[new $t(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if(t.expressionContext==="property"&&t.propertyType==="layout"&&!bl(i))return[new $t(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if(t.expressionContext==="filter")return Zf(i,t);if(t.expressionContext&&t.expressionContext.indexOf("cluster")===0){if(!Ma(i,["zoom","feature-state"]))return[new $t(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(t.expressionContext==="cluster-initial"&&!Is(i))return[new $t(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Zf(t,e){const i=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(e.valueSpec&&e.valueSpec.expression)for(const u of e.valueSpec.expression.parameters)i.delete(u);if(i.size===0)return[];const a=[];return t instanceof jo&&i.has(t.name)?[new $t(e.key,e.value,`["${t.name}"] expression is not supported in a filter for a ${e.object.type} layer with id: ${e.object.id}`)]:(t.eachChild(u=>{a.push(...Zf(u,e))}),a)}function Bl(t){const e=t.key,i=t.value,a=t.valueSpec,u=[];return Array.isArray(a.values)?a.values.indexOf(Vn(i))===-1&&u.push(new $t(e,i,`expected one of [${a.values.join(", ")}], ${JSON.stringify(i)} found`)):Object.keys(a.values).indexOf(Vn(i))===-1&&u.push(new $t(e,i,`expected one of [${Object.keys(a.values).join(", ")}], ${JSON.stringify(i)} found`)),u}function Ss(t){if(t===!0||t===!1)return!0;if(!Array.isArray(t)||t.length===0)return!1;switch(t[0]){case"has":return t.length>=2&&t[1]!=="$id"&&t[1]!=="$type";case"in":return t.length>=3&&(typeof t[1]!="string"||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return t.length!==3||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!Ss(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function ss(t,e="fill"){if(t==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Ss(t)||(t=js(t));const i=t;let a=!0;try{a=function(I){if(!zs(I))return I;let N=ho(I);return Ca(N),N=xr(N),N}(i)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
42
42
  This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md
43
43
  and paste the contents of this message in the report.
44
44
  Thank you!
@@ -1336,7 +1336,7 @@ precision highp float;
1336
1336
  translate(${l.x}px,${l.y}px)
1337
1337
  `}_calculateXYTransform(){const n=this._pos,l=this._map,p=this.getPitchAlignment();if(!l||!n||p!=="map")return"";if(!l._showingGlobe()){const E=l.getPitch();return E?`rotateX(${E}deg)`:""}const _=o.radToDeg(o.globeTiltAtLngLat(l.transform,this._lngLat)),M=n.sub(o.globeCenterToScreenPoint(l.transform)),D=Math.abs(M.x)+Math.abs(M.y);if(D===0)return"";const A=_/D;return`rotateX(${-M.y*A}deg) rotateY(${M.x*A}deg)`}_calculateZTransform(){const n=this._pos,l=this._map;if(!l||!n)return"";let p=0;const _=this.getRotationAlignment();if(_==="map")if(l._showingGlobe()){const M=l.project(new o.LngLat(this._lngLat.lng,this._lngLat.lat+.001)),D=l.project(new o.LngLat(this._lngLat.lng,this._lngLat.lat-.001)).sub(M);p=o.radToDeg(Math.atan2(D.y,D.x))-90}else p=-l.getBearing();else if(_==="horizon"){const M=o.smoothstep(4,6,l.getZoom()),D=o.globeCenterToScreenPoint(l.transform);D.y+=M*l.transform.height;const A=n.sub(D),E=o.radToDeg(Math.atan2(A.y,A.x));p=(E>90?E-270:E+90)*(1-M)}return p+=this._rotation,p?`rotateZ(${p}deg)`:""}_update(n){o.window.cancelAnimationFrame(this._updateFrameId);const l=this._map;l&&(l.transform.renderWorldCopies&&(this._lngLat=Au(this._lngLat,this._pos,l.transform)),this._pos=l.project(this._lngLat),n===!0?this._updateFrameId=o.window.requestAnimationFrame(()=>{this._element&&this._pos&&this._anchor&&(this._pos=this._pos.round(),this._updateDOM())}):this._pos=this._pos.round(),l._requestDomTask(()=>{this._map&&(this._element&&this._pos&&this._anchor&&this._updateDOM(),(l._showingGlobe()||l.getTerrain()||l.getFog())&&!this._fadeTimer&&(this._fadeTimer=setTimeout(this._evaluateOpacity.bind(this),60)))}))}getOffset(){return this._offset}setOffset(n){return this._offset=o.pointGeometry.convert(n),this._update(),this}_onMove(n){const l=this._map;if(!l)return;const p=this._pointerdownPos,_=this._positionDelta;if(p&&_){if(!this._isDragging){const M=this._clickTolerance||l._clickTolerance;if(n.point.dist(p)<M)return;this._isDragging=!0}this._pos=n.point.sub(_),this._lngLat=l.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new o.Event("dragstart"))),this.fire(new o.Event("drag"))}}_onUp(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1;const n=this._map;n&&(n.off("mousemove",this._onMove),n.off("touchmove",this._onMove)),this._state==="active"&&this.fire(new o.Event("dragend")),this._state="inactive"}_addDragHandler(n){const l=this._map,p=this._pos;l&&p&&this._element.contains(n.originalEvent.target)&&(n.preventDefault(),this._positionDelta=n.point.sub(p),this._pointerdownPos=n.point,this._state="pending",l.on("mousemove",this._onMove),l.on("touchmove",this._onMove),l.once("mouseup",this._onUp),l.once("touchend",this._onUp))}setDraggable(n){this._draggable=!!n;const l=this._map;return l&&(n?(l.on("mousedown",this._addDragHandler),l.on("touchstart",this._addDragHandler)):(l.off("mousedown",this._addDragHandler),l.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(n){return this._rotation=n||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(n){return this._rotationAlignment=n||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment==="auto"||this._rotationAlignment==="horizon"&&this._map&&!this._map._showingGlobe()?"viewport":this._rotationAlignment}setPitchAlignment(n){return this._pitchAlignment=n||"auto",this._update(),this}getPitchAlignment(){return this._pitchAlignment==="auto"?this.getRotationAlignment():this._pitchAlignment}setOccludedOpacity(n){return this._occludedOpacity=n||.2,this._update(),this}getOccludedOpacity(){return this._occludedOpacity}}const Zl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},sp=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Nu(h=new o.pointGeometry(0,0),n="bottom"){if(typeof h=="number"){const l=Math.round(Math.sqrt(.5*Math.pow(h,2)));switch(n){case"top":return new o.pointGeometry(0,h);case"top-left":return new o.pointGeometry(l,l);case"top-right":return new o.pointGeometry(-l,l);case"bottom":return new o.pointGeometry(0,-h);case"bottom-left":return new o.pointGeometry(l,-l);case"bottom-right":return new o.pointGeometry(-l,-l);case"left":return new o.pointGeometry(h,0);case"right":return new o.pointGeometry(-h,0)}return new o.pointGeometry(0,0)}return h instanceof o.pointGeometry||Array.isArray(h)?o.pointGeometry.convert(h):o.pointGeometry.convert(h[n]||[0,0])}class ap{constructor(n){this.jumpTo(n)}getValue(n){if(n<=this._startTime)return this._start;if(n>=this._endTime)return this._end;const l=o.easeCubicInOut((n-this._startTime)/(this._endTime-this._startTime));return this._start*(1-l)+this._end*l}isEasing(n){return n>=this._startTime&&n<=this._endTime}jumpTo(n){this._startTime=-1/0,this._endTime=-1/0,this._start=n,this._end=n}easeTo(n,l,p){this._start=this.getValue(l),this._end=n,this._startTime=l,this._endTime=l+p}}const lp={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","Map.Title":"Map","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScrollZoomBlocker.CtrlMessage":"Use ctrl + scroll to zoom the map","ScrollZoomBlocker.CmdMessage":"Use ⌘ + scroll to zoom the map","TouchPanBlocker.Message":"Use two fingers to move the map"},cp={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:85,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,performanceMetricsCollection:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,optimizeForTerrain:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,minTileCacheSize:null,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",localFontFamily:null,transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},up={showCompass:!0,showZoom:!0,visualizePitch:!1};class hp{constructor(n,l,p=!1){this._clickTolerance=10,this.element=l,this.mouseRotate=new xu({clickTolerance:n.dragRotate._mouseRotate._clickTolerance}),this.map=n,p&&(this.mousePitch=new vu({clickTolerance:n.dragRotate._mousePitch._clickTolerance})),o.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),l.addEventListener("mousedown",this.mousedown),l.addEventListener("touchstart",this.touchstart,{passive:!1}),l.addEventListener("touchmove",this.touchmove),l.addEventListener("touchend",this.touchend),l.addEventListener("touchcancel",this.reset)}down(n,l){this.mouseRotate.mousedown(n,l),this.mousePitch&&this.mousePitch.mousedown(n,l),ye()}move(n,l){const p=this.map,_=this.mouseRotate.mousemoveWindow(n,l),M=_&&_.bearingDelta;if(M&&p.setBearing(p.getBearing()+M),this.mousePitch){const D=this.mousePitch.mousemoveWindow(n,l),A=D&&D.pitchDelta;A&&p.setPitch(p.getPitch()+A)}}off(){const n=this.element;n.removeEventListener("mousedown",this.mousedown),n.removeEventListener("touchstart",this.touchstart,{passive:!1}),n.removeEventListener("touchmove",this.touchmove),n.removeEventListener("touchend",this.touchend),n.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){le(),o.window.removeEventListener("mousemove",this.mousemove),o.window.removeEventListener("mouseup",this.mouseup)}mousedown(n){this.down(o.extend({},n,{ctrlKey:!0,preventDefault:()=>n.preventDefault()}),X(this.element,n)),o.window.addEventListener("mousemove",this.mousemove),o.window.addEventListener("mouseup",this.mouseup)}mousemove(n){this.move(n,X(this.element,n))}mouseup(n){this.mouseRotate.mouseupWindow(n),this.mousePitch&&this.mousePitch.mouseupWindow(n),this.offTemp()}touchstart(n){n.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=Ee(this.element,n.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>n.preventDefault()},this._startPos))}touchmove(n){n.targetTouches.length!==1?this.reset():(this._lastPos=Ee(this.element,n.targetTouches)[0],this.move({preventDefault:()=>n.preventDefault()},this._lastPos))}touchend(n){n.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()}reset(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()}}const Eu={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0,showUserHeading:!1},dp={maxWidth:100,unit:"metric"};function fp(h,n,l){const p=Cu(n),_=p/n,M={kilometer:"km",meter:"m",mile:"mi",foot:"ft","nautical-mile":"nm"}[l];this._map._requestDomTask(()=>{this._container.style.width=h*_+"px",this._container.innerHTML=`${p}&nbsp;${M}`})}function Cu(h){const n=Math.pow(10,`${Math.floor(h)}`.length-1);let l=h/n;return l=l>=10?10:l>=5?5:l>=3?3:l>=2?2:l>=1?1:function(p){const _=Math.pow(10,Math.ceil(-Math.log(p)/Math.LN10));return Math.round(p*_)/_}(l),n*l}const Oa={version:o.version,supported:T,setRTLTextPlugin:o.setRTLTextPlugin,getRTLTextPluginStatus:o.getRTLTextPluginStatus,Map:class extends op{constructor(h){if(o.LivePerformanceUtils.mark(o.PerformanceMarkers.create),(h=o.extend({},cp,h)).minZoom!=null&&h.maxZoom!=null&&h.minZoom>h.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(h.minPitch!=null&&h.maxPitch!=null&&h.minPitch>h.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(h.minPitch!=null&&h.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(h.maxPitch!=null&&h.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(h.antialias&&o.isSafariWithAntialiasingBug(o.window)&&(h.antialias=!1,o.warnOnce("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new Es(h.minZoom,h.maxZoom,h.minPitch,h.maxPitch,h.renderWorldCopies),h),this._interactive=h.interactive,this._minTileCacheSize=h.minTileCacheSize,this._maxTileCacheSize=h.maxTileCacheSize,this._failIfMajorPerformanceCaveat=h.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=h.preserveDrawingBuffer,this._antialias=h.antialias,this._trackResize=h.trackResize,this._bearingSnap=h.bearingSnap,this._refreshExpiredTiles=h.refreshExpiredTiles,this._fadeDuration=h.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=h.crossSourceCollisions,this._collectResourceTiming=h.collectResourceTiming,this._optimizeForTerrain=h.optimizeForTerrain,this._language=this._parseLanguage(h.language),this._worldview=h.worldview,this._renderTaskQueue=new Tu,this._domRenderTaskQueue=new Tu,this._controls=[],this._markers=[],this._popups=[],this._mapId=o.uniqueId(),this._locale=o.extend({},lp,h.locale),this._clickTolerance=h.clickTolerance,this._cooperativeGestures=h.cooperativeGestures,this._performanceMetricsCollection=h.performanceMetricsCollection,this._containerWidth=0,this._containerHeight=0,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new ap(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._requestManager=new o.RequestManager(h.transformRequest,h.accessToken,h.testMode),this._silenceAuthErrors=!!h.testMode,typeof h.container=="string"){if(this._container=o.window.document.getElementById(h.container),!this._container)throw new Error(`Container '${h.container}' not found.`)}else{if(!(h.container instanceof o.window.HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=h.container}if(this._container.childNodes.length>0&&o.warnOnce("The map container element should be empty, otherwise the map's interactivity will be negatively impacted. If you want to display a message when WebGL is not supported, use the Mapbox GL Supported plugin instead."),h.maxBounds&&this.setMaxBounds(h.maxBounds),o.bindAll(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),o.window!==void 0&&(o.window.addEventListener("online",this._onWindowOnline,!1),o.window.addEventListener("resize",this._onWindowResize,!1),o.window.addEventListener("orientationchange",this._onWindowResize,!1),o.window.addEventListener("webkitfullscreenchange",this._onWindowResize,!1),o.window.addEventListener("visibilitychange",this._onVisibilityChange,!1)),this.handlers=new za(this,h),this._localFontFamily=h.localFontFamily,this._localIdeographFontFamily=h.localIdeographFontFamily,h.style&&this.setStyle(h.style,{localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),h.projection&&this.setProjection(h.projection),this._hash=h.hash&&new $t(typeof h.hash=="string"&&h.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:h.center,zoom:h.zoom,bearing:h.bearing,pitch:h.pitch}),h.bounds&&(this.resize(),this.fitBounds(h.bounds,o.extend({},h.fitBoundsOptions,{duration:0})))),this.resize(),h.attributionControl&&this.addControl(new Iu({customAttribution:h.customAttribution})),this._logoControl=new Du,this.addControl(this._logoControl,h.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",n=>{this._update(n.dataType==="style"),this.fire(new o.Event(`${n.dataType}data`,n))}),this.on("dataloading",n=>{this.fire(new o.Event(`${n.dataType}dataloading`,n))})}_getMapId(){return this._mapId}addControl(h,n){if(n===void 0&&(n=h.getDefaultPosition?h.getDefaultPosition():"top-right"),!h||!h.onAdd)return this.fire(new o.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const l=h.onAdd(this);this._controls.push(h);const p=this._controlPositions[n];return n.indexOf("bottom")!==-1?p.insertBefore(l,p.firstChild):p.appendChild(l),this}removeControl(h){if(!h||!h.onRemove)return this.fire(new o.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const n=this._controls.indexOf(h);return n>-1&&this._controls.splice(n,1),h.onRemove(this),this}hasControl(h){return this._controls.indexOf(h)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(h){if(this._updateContainerDimensions(),this._containerWidth===this.transform.width&&this._containerHeight===this.transform.height)return this;this._resizeCanvas(this._containerWidth,this._containerHeight),this.transform.resize(this._containerWidth,this._containerHeight),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight));const n=!this._moving;return n&&this.fire(new o.Event("movestart",h)).fire(new o.Event("move",h)),this.fire(new o.Event("resize",h)),n&&this.fire(new o.Event("moveend",h)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(h){return this.transform.setMaxBounds(o.LngLatBounds.convert(h)),this._update()}setMinZoom(h){if((h=h??-2)>=-2&&h<=this.transform.maxZoom)return this.transform.minZoom=h,this._update(),this.getZoom()<h?this.setZoom(h):this.fire(new o.Event("zoomstart")).fire(new o.Event("zoom")).fire(new o.Event("zoomend")),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(h){if((h=h??22)>=this.transform.minZoom)return this.transform.maxZoom=h,this._update(),this.getZoom()>h?this.setZoom(h):this.fire(new o.Event("zoomstart")).fire(new o.Event("zoom")).fire(new o.Event("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(h){if((h=h??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(h>=0&&h<=this.transform.maxPitch)return this.transform.minPitch=h,this._update(),this.getPitch()<h?this.setPitch(h):this.fire(new o.Event("pitchstart")).fire(new o.Event("pitch")).fire(new o.Event("pitchend")),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(h){if((h=h??85)>85)throw new Error("maxPitch must be less than or equal to 85");if(h>=this.transform.minPitch)return this.transform.maxPitch=h,this._update(),this.getPitch()>h?this.setPitch(h):this.fire(new o.Event("pitchstart")).fire(new o.Event("pitch")).fire(new o.Event("pitchend")),this;throw new Error("maxPitch must be greater than or equal to minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(h){return this.transform.renderWorldCopies=h,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(h){return h==="auto"?o.window.navigator.language:Array.isArray(h)?h.length===0?void 0:h.map(n=>n==="auto"?o.window.navigator.language:n):h}setLanguage(h){const n=this._parseLanguage(h);if(!this.style||n===this._language)return this;this._language=n,this.style._reloadSources();for(const l of this._controls)l._setLanguage&&l._setLanguage(this._language);return this}getWorldview(){return this._worldview}setWorldview(h){return this.style&&h!==this._worldview?(this._worldview=h,this.style._reloadSources(),this):this}getProjection(){return this.transform.mercatorFromTransition?{name:"globe",center:[0,0]}:this.transform.getProjection()}_showingGlobe(){return this.transform.projection.name==="globe"}setProjection(h){return this._lazyInitEmptyStyle(),h?typeof h=="string"&&(h={name:h}):h=null,this._useExplicitProjection=!!h,this._prioritizeAndUpdateProjection(h,this.style.stylesheet?this.style.stylesheet.projection:null)}_updateProjectionTransition(){if(this.getProjection().name!=="globe")return;const h=this.transform,n=h.projection.name;let l;n==="globe"&&h.zoom>=o.GLOBE_ZOOM_THRESHOLD_MAX?(h.setMercatorFromTransition(),l=!0):n==="mercator"&&h.zoom<o.GLOBE_ZOOM_THRESHOLD_MAX&&(h.setProjection({name:"globe"}),l=!0),l&&(this.style.applyProjectionUpdate(),this.style._forceSymbolLayerUpdate())}_prioritizeAndUpdateProjection(h,n){return this._updateProjection(h||n||{name:"mercator"})}_updateProjection(h){let n;if(n=h.name==="globe"&&this.transform.zoom>=o.GLOBE_ZOOM_THRESHOLD_MAX?this.transform.setMercatorFromTransition():this.transform.setProjection(h),this.style.applyProjectionUpdate(),n){this.painter.clearBackgroundTiles();for(const l in this.style._sourceCaches)this.style._sourceCaches[l].clearTiles();this._update(!0),this._forceMarkerAndPopupUpdate(!0)}return this}project(h){return this.transform.locationPoint3D(o.LngLat.convert(h))}unproject(h){return this.transform.pointLocation3D(o.pointGeometry.convert(h))}isMoving(){return this._moving||this.handlers&&this.handlers.isMoving()||!1}isZooming(){return this._zooming||this.handlers&&this.handlers.isZooming()||!1}isRotating(){return this._rotating||this.handlers&&this.handlers.isRotating()||!1}_isDragging(){return this.handlers&&this.handlers._isDragging()||!1}_createDelegatedListener(h,n,l){if(h==="mouseenter"||h==="mouseover"){let p=!1;const _=D=>{const A=n.filter(k=>this.getLayer(k)),E=A.length?this.queryRenderedFeatures(D.point,{layers:A}):[];E.length?p||(p=!0,l.call(this,new xr(h,this,D.originalEvent,{features:E}))):p=!1},M=()=>{p=!1};return{layers:new Set(n),listener:l,delegates:{mousemove:_,mouseout:M}}}if(h==="mouseleave"||h==="mouseout"){let p=!1;const _=D=>{const A=n.filter(E=>this.getLayer(E));(A.length?this.queryRenderedFeatures(D.point,{layers:A}):[]).length?p=!0:p&&(p=!1,l.call(this,new xr(h,this,D.originalEvent)))},M=D=>{p&&(p=!1,l.call(this,new xr(h,this,D.originalEvent)))};return{layers:new Set(n),listener:l,delegates:{mousemove:_,mouseout:M}}}{const p=_=>{const M=n.filter(A=>this.getLayer(A)),D=M.length?this.queryRenderedFeatures(_.point,{layers:M}):[];D.length&&(_.features=D,l.call(this,_),delete _.features)};return{layers:new Set(n),listener:l,delegates:{[h]:p}}}}on(h,n,l){if(l===void 0)return super.on(h,n);Array.isArray(n)||(n=[n]);const p=this._createDelegatedListener(h,n,l);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[h]=this._delegatedListeners[h]||[],this._delegatedListeners[h].push(p);for(const _ in p.delegates)this.on(_,p.delegates[_]);return this}once(h,n,l){if(l===void 0)return super.once(h,n);Array.isArray(n)||(n=[n]);const p=this._createDelegatedListener(h,n,l);for(const _ in p.delegates)this.once(_,p.delegates[_]);return this}off(h,n,l){if(l===void 0)return super.off(h,n);n=new Set(Array.isArray(n)?n:[n]);const p=(M,D)=>{if(M.size!==D.size)return!1;for(const A of M)if(!D.has(A))return!1;return!0},_=this._delegatedListeners?this._delegatedListeners[h]:void 0;return _&&(M=>{for(let D=0;D<M.length;D++){const A=M[D];if(A.listener===l&&p(A.layers,n)){for(const E in A.delegates)this.off(E,A.delegates[E]);return M.splice(D,1),this}}})(_),this}queryRenderedFeatures(h,n){return this.style?(n!==void 0||h===void 0||h instanceof o.pointGeometry||Array.isArray(h)||(n=h,h=void 0),this.style.queryRenderedFeatures(h=h||[[0,0],[this.transform.width,this.transform.height]],n=n||{},this.transform)):[]}querySourceFeatures(h,n){return this.style.querySourceFeatures(h,n)}setStyle(h,n){return(n=o.extend({},{localIdeographFontFamily:this._localIdeographFontFamily,localFontFamily:this._localFontFamily},n)).diff!==!1&&n.localIdeographFontFamily===this._localIdeographFontFamily&&n.localFontFamily===this._localFontFamily&&this.style&&h?(this._diffStyle(h,n),this):(this._localIdeographFontFamily=n.localIdeographFontFamily,this._localFontFamily=n.localFontFamily,this._updateStyle(h,n))}_getUIString(h){const n=this._locale[h];if(n==null)throw new Error(`Missing UI string '${h}'`);return n}_updateStyle(h,n){return this.style&&(this.style.setEventedParent(null),this.style._remove(),this.style=void 0),h&&(this.style=new tr(this,n||{}),this.style.setEventedParent(this,{style:this.style}),typeof h=="string"?this.style.loadURL(h):this.style.loadJSON(h)),this._updateTerrain(),this}_lazyInitEmptyStyle(){this.style||(this.style=new tr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(h,n){if(typeof h=="string"){const l=this._requestManager.normalizeStyleURL(h),p=this._requestManager.transformRequest(l,o.ResourceType.Style);o.getJSON(p,(_,M)=>{_?this.fire(new o.ErrorEvent(_)):M&&this._updateDiff(M,n)})}else typeof h=="object"&&this._updateDiff(h,n)}_updateDiff(h,n){try{this.style.setState(h)&&this._update(!0)}catch(l){o.warnOnce(`Unable to perform style diff: ${l.message||l.error||l}. Rebuilding the style from scratch.`),this._updateStyle(h,n)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():(o.warnOnce("There is no style added to the map."),!1)}addSource(h,n){return this._lazyInitEmptyStyle(),this.style.addSource(h,n),this._update(!0)}isSourceLoaded(h){return!!this.style&&this.style._isSourceCacheLoaded(h)}areTilesLoaded(){const h=this.style&&this.style._sourceCaches;for(const n in h){const l=h[n]._tiles;for(const p in l){const _=l[p];if(_.state!=="loaded"&&_.state!=="errored")return!1}}return!0}addSourceType(h,n,l){this._lazyInitEmptyStyle(),this.style.addSourceType(h,n,l)}removeSource(h){return this.style.removeSource(h),this._updateTerrain(),this._update(!0)}getSource(h){return this.style.getSource(h)}addImage(h,n,{pixelRatio:l=1,sdf:p=!1,stretchX:_,stretchY:M,content:D}={}){if(this._lazyInitEmptyStyle(),n instanceof o.window.HTMLImageElement||o.window.ImageBitmap&&n instanceof o.window.ImageBitmap){const{width:A,height:E,data:k}=o.exported.getImageData(n);this.style.addImage(h,{data:new o.RGBAImage({width:A,height:E},k),pixelRatio:l,stretchX:_,stretchY:M,content:D,sdf:p,version:0})}else if(n.width===void 0||n.height===void 0)this.fire(new o.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));else{const{width:A,height:E}=n,k=n;this.style.addImage(h,{data:new o.RGBAImage({width:A,height:E},new Uint8Array(k.data)),pixelRatio:l,stretchX:_,stretchY:M,content:D,sdf:p,version:0,userImage:k}),k.onAdd&&k.onAdd(this,h)}}updateImage(h,n){const l=this.style.getImage(h);if(!l)return void this.fire(new o.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const p=n instanceof o.window.HTMLImageElement||o.window.ImageBitmap&&n instanceof o.window.ImageBitmap?o.exported.getImageData(n):n,{width:_,height:M}=p;_!==void 0&&M!==void 0?_===l.data.width&&M===l.data.height?(l.data.replace(p.data,!(n instanceof o.window.HTMLImageElement||o.window.ImageBitmap&&n instanceof o.window.ImageBitmap)),this.style.updateImage(h,l)):this.fire(new o.ErrorEvent(new Error(`The width and height of the updated image (${_}, ${M})
1338
1338
  must be that same as the previous version of the image
1339
- (${l.data.width}, ${l.data.height})`))):this.fire(new o.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")))}hasImage(h){return h?!!this.style.getImage(h):(this.fire(new o.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(h){this.style.removeImage(h)}loadImage(h,n){o.getImage(this._requestManager.transformRequest(h,o.ResourceType.Image),(l,p)=>{n(l,p instanceof o.window.HTMLImageElement?o.exported.getImageData(p):p)})}listImages(){return this.style.listImages()}addLayer(h,n){return this._lazyInitEmptyStyle(),this.style.addLayer(h,n),this._update(!0)}moveLayer(h,n){return this.style.moveLayer(h,n),this._update(!0)}removeLayer(h){return this.style.removeLayer(h),this._update(!0)}getLayer(h){return this.style.getLayer(h)}setLayerZoomRange(h,n,l){return this.style.setLayerZoomRange(h,n,l),this._update(!0)}setFilter(h,n,l={}){return this.style.setFilter(h,n,l),this._update(!0)}getFilter(h){return this.style.getFilter(h)}setPaintProperty(h,n,l,p={}){return this.style.setPaintProperty(h,n,l,p),this._update(!0)}getPaintProperty(h,n){return this.style.getPaintProperty(h,n)}setLayoutProperty(h,n,l,p={}){return this.style.setLayoutProperty(h,n,l,p),this._update(!0)}getLayoutProperty(h,n){return this.style.getLayoutProperty(h,n)}setLight(h,n={}){return this._lazyInitEmptyStyle(),this.style.setLight(h,n),this._update(!0)}getLight(){return this.style.getLight()}setTerrain(h){return this._lazyInitEmptyStyle(),!h&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(h),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(h){return this._lazyInitEmptyStyle(),this.style.setFog(h),this._update(!0)}getFog(){return this.style?this.style.getFog():null}_queryFogOpacity(h){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(o.LngLat.convert(h),this.transform):0}setFeatureState(h,n){return this.style.setFeatureState(h,n),this._update()}removeFeatureState(h,n){return this.style.removeFeatureState(h,n),this._update()}getFeatureState(h){return this.style.getFeatureState(h)}_updateContainerDimensions(){if(!this._container)return;const h=this._container.getBoundingClientRect().width||400,n=this._container.getBoundingClientRect().height||300;let l,p,_,M=this._container;for(;M&&(!p||!_);){const D=o.window.getComputedStyle(M).transform;D&&D!=="none"&&(l=D.match(/matrix.*\((.+)\)/)[1].split(", "),l[0]&&l[0]!=="0"&&l[0]!=="1"&&(p=l[0]),l[3]&&l[3]!=="0"&&l[3]!=="1"&&(_=l[3])),M=M.parentElement}this._containerWidth=p?Math.abs(h/p):h,this._containerHeight=_?Math.abs(n/_):n}_detectMissingCSS(){o.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&o.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const h=this._container;h.classList.add("mapboxgl-map"),(this._missingCSSCanary=S("div","mapboxgl-canary",h)).style.visibility="hidden",this._detectMissingCSS();const n=this._canvasContainer=S("div","mapboxgl-canvas-container",h);this._interactive&&n.classList.add("mapboxgl-interactive"),this._canvas=S("canvas","mapboxgl-canvas",n),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const l=this._controlContainer=S("div","mapboxgl-control-container",h),p=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(_=>{p[_]=S("div",`mapboxgl-ctrl-${_}`,l)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(h,n){const l=o.exported.devicePixelRatio||1;this._canvas.width=l*Math.ceil(h),this._canvas.height=l*Math.ceil(n),this._canvas.style.width=`${h}px`,this._canvas.style.height=`${n}px`}_addMarker(h){this._markers.push(h)}_removeMarker(h){const n=this._markers.indexOf(h);n!==-1&&this._markers.splice(n,1)}_addPopup(h){this._popups.push(h)}_removePopup(h){const n=this._popups.indexOf(h);n!==-1&&this._popups.splice(n,1)}_setupPainter(){const h=o.extend({},T.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),n=this._canvas.getContext("webgl",h)||this._canvas.getContext("experimental-webgl",h);n?(o.storeAuthState(n,!0),this.painter=new X0(n,this.transform),this.on("data",l=>{l.dataType==="source"&&this.painter.setTileLoadedFlag(!0)}),o.exported$1.testSupport(n)):this.fire(new o.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(h){h.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new o.Event("webglcontextlost",{originalEvent:h}))}_contextRestored(h){this._setupPainter(),this.resize(),this._update(),this.fire(new o.Event("webglcontextrestored",{originalEvent:h}))}_onMapScroll(h){if(h.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(h){return this.style?(this._styleDirty=this._styleDirty||h,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(h){return this._update(),this._renderTaskQueue.add(h)}_cancelRenderFrame(h){this._renderTaskQueue.remove(h)}_requestDomTask(h){!this.loaded()||this.loaded()&&!this.isMoving()?h():this._domRenderTaskQueue.add(h)}_render(h){let n;const l=this.painter.context.extTimerQuery,p=o.exported.now();if(this.listens("gpu-timing-frame")&&(n=l.createQueryEXT(),l.beginQueryEXT(l.TIME_ELAPSED_EXT,n)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],o.window.performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],o.window.performance.now())),this._renderTaskQueue.run(h),this._domRenderTaskQueue.run(h),this._removed)return;this._updateProjectionTransition();const _=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const A=this.transform.zoom,E=this.transform.pitch,k=o.exported.now(),L=new o.EvaluationParameters(A,{now:k,fadeDuration:_,pitch:E,transition:this.style.getTransition()});this.style.update(L)}this.style&&this.style.fog&&this.style.fog.hasTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let M=!1;if(this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),M=this._updateAverageElevation(p),this.style._updateSources(this.transform),this._forceMarkerAndPopupUpdate()):M=this._updateAverageElevation(p),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,_,this._crossSourceCollisions),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showTerrainWireframe:this.showTerrainWireframe,showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:_,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new o.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new o.Event("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),n){const A=o.exported.now()-p;l.endQueryEXT(l.TIME_ELAPSED_EXT,n),setTimeout(()=>{const E=l.getQueryObjectEXT(n,l.QUERY_RESULT_EXT)/1e6;l.deleteQueryEXT(n),this.fire(new o.Event("gpu-timing-frame",{cpuTime:A,gpuTime:E})),o.window.performance.mark("frame-gpu",{startTime:p,detail:{gpuTime:E}})},50)}if(this.listens("gpu-timing-layer")){const A=this.painter.collectGpuTimers();setTimeout(()=>{const E=this.painter.queryGpuTimers(A);this.fire(new o.Event("gpu-timing-layer",{layerTimes:E}))},50)}if(this.listens("gpu-timing-deferred-render")){const A=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{const E=this.painter.queryGpuTimeDeferredRender(A);this.fire(new o.Event("gpu-timing-deferred-render",{gpuTime:E}))},50)}const D=this._sourcesDirty||this._styleDirty||this._placementDirty||M;if(D||this._repaint)this.triggerRepaint();else{const A=!this.isMoving()&&this.loaded();if(A&&(M=this._updateAverageElevation(p,!0)),M)this.triggerRepaint();else if(this._triggerFrame(!1),A&&(this.fire(new o.Event("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const E=this._calculateSpeedIndex();this.fire(new o.Event("speedindexcompleted",{speedIndex:E})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||D||(this._fullyLoaded=!0,o.LivePerformanceUtils.mark(o.PerformanceMarkers.fullLoad),this._performanceMetricsCollection&&o.postPerformanceEvent(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(h){for(const n of this._markers)h&&!this.getRenderWorldCopies()&&(n._lngLat=n._lngLat.wrap()),n._update();for(const n of this._popups)!h||this.getRenderWorldCopies()||n._trackPointer||(n._lngLat=n._lngLat.wrap()),n._update()}_updateAverageElevation(h,n=!1){const l=p=>(this.transform.averageElevation=p,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return this.transform.averageElevation!==0&&l(0);if((n||h-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(h)){const p=this.transform.averageElevation;let _=this.transform.sampleAverageElevation(),M=!1;this.transform.elevation&&(M=this.transform.elevation.exaggeration()!==this._averageElevationExaggeration,this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(_)?_=0:this._averageElevationLastSampledAt=h;const D=Math.abs(p-_);if(D>1){if(this._isInitialLoad||M)return this._averageElevation.jumpTo(_),l(_);this._averageElevation.easeTo(_,h,300)}else if(D>1e-4)return this._averageElevation.jumpTo(_),l(_)}return!!this._averageElevation.isEasing(h)&&l(this._averageElevation.getValue(h))}_authenticate(){o.getMapSessionAPI(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,h=>{if(h&&(h.message===o.AUTH_ERR_MSG||h.status===401)){const n=this.painter.context.gl;o.storeAuthState(n,!1),this._logoControl instanceof Du&&this._logoControl._updateLogo(),n&&n.clear(n.DEPTH_BUFFER_BIT|n.COLOR_BUFFER_BIT|n.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new o.ErrorEvent(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),o.postMapLoadEvent(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_updateTerrain(){const h=this._isDragging();this.painter.updateTerrain(this.style,h)}_calculateSpeedIndex(){const h=this.painter.canvasCopy(),n=this.painter.getCanvasCopiesAndTimestamps();n.timeStamps.push(performance.now());const l=this.painter.context.gl,p=l.createFramebuffer();function _(M){l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,M,0);const D=new Uint8Array(l.drawingBufferWidth*l.drawingBufferHeight*4);return l.readPixels(0,0,l.drawingBufferWidth,l.drawingBufferHeight,l.RGBA,l.UNSIGNED_BYTE,D),D}return l.bindFramebuffer(l.FRAMEBUFFER,p),this._canvasPixelComparison(_(h),n.canvasCopies.map(_),n.timeStamps)}_canvasPixelComparison(h,n,l){let p=l[1]-l[0];const _=h.length/4;for(let M=0;M<n.length;M++){const D=n[M];let A=0;for(let E=0;E<D.length;E+=4)D[E]===h[E]&&D[E+1]===h[E+1]&&D[E+2]===h[E+2]&&D[E+3]===h[E+3]&&(A+=1);p+=(l[M+2]-l[M+1])*(1-A/_)}return p}remove(){this._hash&&this._hash.remove();for(const n of this._controls)n.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this._domRenderTaskQueue.clear(),this.style&&this.style.destroy(),this.painter.destroy(),this.handlers&&this.handlers.destroy(),this.handlers=void 0,this.setStyle(null),o.window!==void 0&&(o.window.removeEventListener("resize",this._onWindowResize,!1),o.window.removeEventListener("orientationchange",this._onWindowResize,!1),o.window.removeEventListener("webkitfullscreenchange",this._onWindowResize,!1),o.window.removeEventListener("online",this._onWindowOnline,!1),o.window.removeEventListener("visibilitychange",this._onVisibilityChange,!1));const h=this.painter.context.gl.getExtension("WEBGL_lose_context");h&&h.loseContext(),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._missingCSSCanary.remove(),this._canvas=void 0,this._canvasContainer=void 0,this._controlContainer=void 0,this._missingCSSCanary=void 0,this._container.classList.remove("mapboxgl-map"),this._container.removeEventListener("scroll",this._onMapScroll,!1),o.removeAuthState(this.painter.context.gl),this._removed=!0,this.fire(new o.Event("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(h){this._renderNextFrame=this._renderNextFrame||h,this.style&&!this._frame&&(this._frame=o.exported.frame(n=>{const l=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,l&&this._render(n)}))}_preloadTiles(h){const n=this.style?Object.values(this.style._sourceCaches):[];return o.asyncAll(n,(l,p)=>l._preloadTiles(h,p),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(h){this._trackResize&&this.resize({originalEvent:h})._update()}_onVisibilityChange(){o.window.document.visibilityState==="hidden"&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(h){this._showTileBoundaries!==h&&(this._showTileBoundaries=h,this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(h){this._showTerrainWireframe!==h&&(this._showTerrainWireframe=h,this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(h){this._speedIndexTiming!==h&&(this._speedIndexTiming=h,this._update())}get showPadding(){return!!this._showPadding}set showPadding(h){this._showPadding!==h&&(this._showPadding=h,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(h){this._showCollisionBoxes!==h&&(this._showCollisionBoxes=h,h?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(h){this._showOverdrawInspector!==h&&(this._showOverdrawInspector=h,this._update())}get repaint(){return!!this._repaint}set repaint(h){this._repaint!==h&&(this._repaint=h,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(h){this._vertices=h,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(h){this._showTileAABBs!==h&&(this._showTileAABBs=h,h&&this._update())}_setCacheLimits(h,n){o.setCacheLimits(h,n)}get version(){return o.version}},NavigationControl:class{constructor(h){this.options=o.extend({},up,h),this._container=S("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",n=>n.preventDefault()),this.options.showZoom&&(o.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",n=>{this._map&&this._map.zoomIn({},{originalEvent:n})}),S("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",n=>{this._map&&this._map.zoomOut({},{originalEvent:n})}),S("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(o.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",n=>{const l=this._map;l&&(this.options.visualizePitch?l.resetNorthPitch({},{originalEvent:n}):l.resetNorth({},{originalEvent:n}))}),this._compassIcon=S("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const h=this._map;if(!h)return;const n=h.getZoom(),l=n===h.getMaxZoom(),p=n===h.getMinZoom();this._zoomInButton.disabled=l,this._zoomOutButton.disabled=p,this._zoomInButton.setAttribute("aria-disabled",l.toString()),this._zoomOutButton.setAttribute("aria-disabled",p.toString())}_rotateCompassArrow(){const h=this._map;if(!h)return;const n=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(h.transform.pitch*(Math.PI/180)),.5)}) rotateX(${h.transform.pitch}deg) rotateZ(${h.transform.angle*(180/Math.PI)}deg)`:`rotate(${h.transform.angle*(180/Math.PI)}deg)`;h._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=n)})}onAdd(h){return this._map=h,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),h.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&h.on("pitch",this._rotateCompassArrow),h.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new hp(h,this._compass,this.options.visualizePitch)),this._container}onRemove(){const h=this._map;h&&(this._container.remove(),this.options.showZoom&&h.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&h.off("pitch",this._rotateCompassArrow),h.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(h,n){const l=S("button",h,this._container);return l.type="button",l.addEventListener("click",n),l}_setButtonTitle(h,n){if(!this._map)return;const l=this._map._getUIString(`NavigationControl.${n}`);h.setAttribute("aria-label",l),h.firstElementChild&&h.firstElementChild.setAttribute("title",l)}},GeolocateControl:class extends o.Evented{constructor(h){super(),this.options=o.extend({geolocation:o.window.navigator.geolocation},Eu,h),o.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=Na(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(h){return this._map=h,this._container=S("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){this._geolocationWatchID!==void 0&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(h){const n=(l=!!this.options.geolocation)=>{this._supportsGeolocation=l,h(l)};this._supportsGeolocation!==void 0?h(this._supportsGeolocation):o.window.navigator.permissions!==void 0?o.window.navigator.permissions.query({name:"geolocation"}).then(l=>n(l.state!=="denied")).catch(()=>n()):n()}_isOutOfMapMaxBounds(h){const n=this._map.getMaxBounds(),l=h.coords;return!!n&&(l.longitude<n.getWest()||l.longitude>n.getEast()||l.latitude<n.getSouth()||l.latitude>n.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(h){if(this._map){if(this._isOutOfMapMaxBounds(h))return this._setErrorState(),this.fire(new o.Event("outofmaxbounds",h)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=h,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(h),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(h),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new o.Event("geolocate",h)),this._finish()}}_updateCamera(h){const n=new o.LngLat(h.coords.longitude,h.coords.latitude),l=h.coords.accuracy,p=this._map.getBearing(),_=o.extend({bearing:p},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(l),_,{geolocateSource:!0})}_updateMarker(h){if(h){const n=new o.LngLat(h.coords.longitude,h.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=h.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const h=this._map.transform,n=o.mercatorZfromAltitude(1,h._center.lat)*h.worldSize,l=Math.ceil(2*this._accuracy*n);this._circleElement.style.width=`${l}px`,this._circleElement.style.height=`${l}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&typeof this._heading=="number"?(this._userLocationDotMarker.setRotation(this._heading),this._dotElement.classList.add("mapboxgl-user-location-show-heading")):(this._dotElement.classList.remove("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(h){if(this._map){if(this.options.trackUserLocation)if(h.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",n),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",n),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(h.code===3&&this._noTimeout)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new o.Event("error",h)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(h){if(this._map!==void 0){if(this._container.addEventListener("contextmenu",n=>n.preventDefault()),this._geolocateButton=S("button","mapboxgl-ctrl-geolocate",this._container),S("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",h===!1){o.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",n),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",n)}else{const n=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",n),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",n)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=S("div","mapboxgl-user-location"),this._dotElement.appendChild(S("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(S("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new ja({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=S("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ja({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",n=>{n.geolocateSource||this._watchState!=="ACTIVE_LOCK"||n.originalEvent&&n.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new o.Event("trackuserlocationend")))})}}_onDeviceOrientation(h){this._userLocationDotMarker&&(h.webkitCompassHeading?this._heading=h.webkitCompassHeading:h.absolute===!0&&(this._heading=-1*h.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return o.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new o.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new o.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new o.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let h;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(h={maximumAge:6e5,timeout:0},this._noTimeout=!0):(h=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,h),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const h=()=>{o.window.addEventListener("ondeviceorientationabsolute"in o.window?"deviceorientationabsolute":"deviceorientation",this._onDeviceOrientation)};o.window.DeviceMotionEvent!==void 0&&typeof o.window.DeviceMotionEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(n=>{n==="granted"&&h()}).catch(console.error):h()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),o.window.removeEventListener("deviceorientation",this._onDeviceOrientation),o.window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Iu,ScaleControl:class{constructor(h){this.options=o.extend({},dp,h),function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"narrow",unit:"meter"}),!0}catch{return!1}}()||(this._setScale=fp.bind(this)),o.bindAll(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const h=this.options.maxWidth||100,n=this._map,l=n._containerHeight/2,p=n._containerWidth/2-h/2,_=n.unproject([p,l]),M=n.unproject([p+h,l]),D=_.distanceTo(M);if(this.options.unit==="imperial"){const A=3.2808*D;A>5280?this._setScale(h,A/5280,"mile"):this._setScale(h,A,"foot")}else this.options.unit==="nautical"?this._setScale(h,D/1852,"nautical-mile"):D>=1e3?this._setScale(h,D/1e3,"kilometer"):this._setScale(h,D,"meter")}_setScale(h,n,l){const p=Cu(n),_=p/n;this._map._requestDomTask(()=>{this._container.style.width=h*_+"px",this._container.innerHTML=l!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"narrow",unit:l}).format(p):`${p}&nbsp;nm`})}onAdd(h){return this._map=h,this._language=h.getLanguage(),this._container=S("div","mapboxgl-ctrl mapboxgl-ctrl-scale",h.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(h){this._language=h,this._update()}setUnit(h){this.options.unit=h,this._update()}},FullscreenControl:class{constructor(h){this._fullscreen=!1,h&&h.container&&(h.container instanceof o.window.HTMLElement?this._container=h.container:o.warnOnce("Full screen control 'container' must be a DOM element.")),o.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in o.window.document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in o.window.document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(h){return this._map=h,this._container||(this._container=this._map.getContainer()),this._controlContainer=S("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",o.warnOnce("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,o.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!o.window.document.fullscreenEnabled&&!o.window.document.webkitFullscreenEnabled)}_setupUI(){const h=this._fullscreenButton=S("button","mapboxgl-ctrl-fullscreen",this._controlContainer);S("span","mapboxgl-ctrl-icon",h).setAttribute("aria-hidden","true"),h.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),o.window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const h=this._getTitle();this._fullscreenButton.setAttribute("aria-label",h),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",h)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(o.window.document.fullscreenElement||o.window.document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?o.window.document.exitFullscreen?o.window.document.exitFullscreen():o.window.document.webkitCancelFullScreen&&o.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},Popup:class extends o.Evented{constructor(h){super(),this.options=o.extend(Object.create(Zl),h),o.bindAll(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(h&&h.className?h.className.trim().split(/\s+/):[])}addTo(h){return this._map&&this.remove(),this._map=h,this.options.closeOnClick&&h.on("preclick",this._onClose),this.options.closeOnMove&&h.on("move",this._onClose),h.on("remove",this.remove),this._update(),h._addPopup(this),this._focusFirstElement(),this._trackPointer?(h.on("mousemove",this._onMouseEvent),h.on("mouseup",this._onMouseEvent),h._canvasContainer.classList.add("mapboxgl-track-pointer")):h.on("move",this._update),this.fire(new o.Event("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const h=this._map;return h&&(h.off("move",this._update),h.off("move",this._onClose),h.off("preclick",this._onClose),h.off("click",this._onClose),h.off("remove",this.remove),h.off("mousemove",this._onMouseEvent),h.off("mouseup",this._onMouseEvent),h.off("drag",this._onMouseEvent),h._canvasContainer&&h._canvasContainer.classList.remove("mapboxgl-track-pointer"),h._removePopup(this),this._map=void 0),this.fire(new o.Event("close")),this}getLngLat(){return this._lngLat}setLngLat(h){this._lngLat=o.LngLat.convert(h),this._pos=null,this._trackPointer=!1,this._update();const n=this._map;return n&&(n.on("move",this._update),n.off("mousemove",this._onMouseEvent),n._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const h=this._map;return h&&(h.off("move",this._update),h.on("mousemove",this._onMouseEvent),h.on("drag",this._onMouseEvent),h._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(h){return this.setDOMContent(o.window.document.createTextNode(h))}setHTML(h){const n=o.window.document.createDocumentFragment(),l=o.window.document.createElement("body");let p;for(l.innerHTML=h;p=l.firstChild,p;)n.appendChild(p);return this.setDOMContent(n)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(h){return this.options.maxWidth=h,this._update(),this}setDOMContent(h){let n=this._content;if(n)for(;n.hasChildNodes();)n.firstChild&&n.removeChild(n.firstChild);else n=this._content=S("div","mapboxgl-popup-content",this._container||void 0);if(n.appendChild(h),this.options.closeButton){const l=this._closeButton=S("button","mapboxgl-popup-close-button",n);l.type="button",l.setAttribute("aria-label","Close popup"),l.setAttribute("aria-hidden","true"),l.innerHTML="&#215;",l.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(h){return this._classList.add(h),this._updateClassList(),this}removeClassName(h){return this._classList.delete(h),this._updateClassList(),this}setOffset(h){return this.options.offset=h,this._update(),this}toggleClassName(h){let n;return this._classList.delete(h)?n=!1:(this._classList.add(h),n=!0),this._updateClassList(),n}_onMouseEvent(h){this._update(h.point)}_getAnchor(h){if(this.options.anchor)return this.options.anchor;const n=this._map,l=this._container,p=this._pos;if(!n||!l||!p)return"bottom";const _=l.offsetWidth,M=l.offsetHeight,D=p.x<_/2,A=p.x>n.transform.width-_/2;if(p.y+h<M)return D?"top-left":A?"top-right":"top";if(p.y>n.transform.height-M){if(D)return"bottom-left";if(A)return"bottom-right"}return D?"left":A?"right":"bottom"}_updateClassList(){const h=this._container;if(!h)return;const n=[...this._classList];n.push("mapboxgl-popup"),this._anchor&&n.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&n.push("mapboxgl-popup-track-pointer"),h.className=n.join(" ")}_update(h){const n=this._map,l=this._content;if(!n||!this._lngLat&&!this._trackPointer||!l)return;let p=this._container;if(p||(p=this._container=S("div","mapboxgl-popup",n.getContainer()),this._tip=S("div","mapboxgl-popup-tip",p),p.appendChild(l)),this.options.maxWidth&&p.style.maxWidth!==this.options.maxWidth&&(p.style.maxWidth=this.options.maxWidth),n.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Au(this._lngLat,this._pos,n.transform)),!this._trackPointer||h){const _=this._pos=this._trackPointer&&h?h:n.project(this._lngLat),M=Nu(this.options.offset),D=this._anchor=this._getAnchor(M.y),A=Nu(this.options.offset,D),E=_.add(A).round();n._requestDomTask(()=>{this._container&&D&&(this._container.style.transform=`${Ls[D]} translate(${E.x}px,${E.y}px)`)})}if(!this._marker&&n._showingGlobe()){const _=o.isLngLatBehindGlobe(n.transform,this._lngLat)?0:1;this._setOpacity(_)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const h=this._container.querySelector(sp);h&&h.focus()}_onClose(){this.remove()}_setOpacity(h){this._container&&(this._container.style.opacity=`${h}`),this._content&&(this._content.style.pointerEvents=h?"auto":"none")}},Marker:ja,Style:tr,LngLat:o.LngLat,LngLatBounds:o.LngLatBounds,Point:o.pointGeometry,MercatorCoordinate:o.MercatorCoordinate,FreeCameraOptions:gu,Evented:o.Evented,config:o.config,prewarm:function(){Wt().acquire(Bt)},clearPrewarmedResources:function(){const h=Zt;h&&(h.isPreloaded()&&h.numActive()===1?(h.release(Bt),Zt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return o.config.ACCESS_TOKEN},set accessToken(h){o.config.ACCESS_TOKEN=h},get baseApiUrl(){return o.config.API_URL},set baseApiUrl(h){o.config.API_URL=h},get workerCount(){return Rt.workerCount},set workerCount(h){Rt.workerCount=h},get maxParallelImageRequests(){return o.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(h){o.config.MAX_PARALLEL_IMAGE_REQUESTS=h},clearStorage(h){o.clearTileCache(h)},workerUrl:"",workerClass:null,setNow:o.exported.setNow,restoreNow:o.exported.restoreNow};return Oa});var v=m;return v})})(Ix);var VN=Ix.exports;const QN=a1(VN),O9="",Qg=Un({key:"mapboxAccessToken",default:null});function YN({onMapView:r,onPositionControl:s}){const c=Ui(Qg),[d,m]=lt.useState(),[w,v]=lt.useState(!1),[o,y]=lt.useState(!1),T=Ui(qo),z=Ui(ia);return lt.useEffect(()=>{window.mapboxgl=QN;const C={accessToken:c,element:document.getElementById("map")},S=new window.mapsindoors.mapView.MapboxView(C);m(S);const U=new window.mapsindoors.directions.MapboxProvider(c);r(S,U)},[]),lt.useEffect(()=>{if(T&&d&&!o){const C=document.createElement("mi-my-position");C.mapsindoors=T,d.getMap().addControl({onAdd:()=>C,onRemove:function(){}},"top-right"),y(!0),s(C)}if(T&&d&&!w){const C=document.createElement("mi-floor-selector");C.mapsindoors=T,C.primaryColor=z,d.getMap().addControl({onAdd:()=>C,onRemove:function(){C.parentNode.removeChild(C)}},"top-right"),v(!0)}},[T,d,w,o]),$e.jsx("div",{className:"map-container",id:"map"})}const Yg=Un({key:"userPosition",default:null}),Dx=Un({key:"directionsService",default:null}),Tx=Un({key:"mapType",default:void 0}),Hh=Un({key:"currentVenueName",default:null}),Ax=Un({key:"apiKey",default:null}),$g=Un({key:"filteredLocations",default:void 0}),Wh=Un({key:"filteredLocationsByExternalID",default:void 0}),Nx=Un({key:"tileStyle",default:null}),Ex=Un({key:"startZoomLevel",default:null}),Cx=Un({key:"positionControl",default:null,dangerouslyAllowMutability:!0}),Sx=Un({key:"locationId",default:void 0});function zx(r){return window.mapsindoors.services.SolutionsService.getSolution().then(s=>{const c=Object.values(s.modules).find(d=>d==="z22");r==null||r.setZoom(c?22:21)})}const Zg="MI-MAP-TEMPLATE-LAST-VENUE";let Gg;function $N({onLocationClick:r,onVenueChangedOnMap:s}){const c=Ui(Ax),d=Ui(Vg),m=Ui(Qg),[w,v]=vn(Tx),[o,y]=vn(qo),[,T]=vn(Yg),[,z]=vn(Dx),C=Ui(Fg),S=Ui(Hh),U=Ui($g),R=Ui(Wh),V=Ui(Nx),W=Ui(Ex),[,ye]=vn(Cx),le=Ui(Sx);RN(c),lt.useEffect(()=>{d===null&&m===null||v(m?vs.Mapbox:vs.Google)},[d,m]),lt.useEffect(()=>{if(o){window.localStorage.clear(Zg);const Ne=jx(S,C);Ne&&!le?he(Ne,o).then(()=>{s(Ne)}):Ne&&s(Ne)}},[S,C,W]),lt.useEffect(()=>{o&&(U?o.filter(U.map(Ne=>Ne.id)):R&&o.filter(R.map(Ne=>Ne.id)))},[U,R,o]);const he=(Ne,Ze)=>(window.localStorage.setItem(Zg,Ne.name),Ze.fitVenue(Ne).then(()=>{W&&Ze.setZoom(W)})),xe=Ne=>{Ee(Ne),X(Ne)},X=Ne=>{le&&Ne&&window.mapsindoors.services.LocationsService.getLocation(le).then(Ze=>{if(Ze){const tt=Ze.properties.floor;Ne.setFloor(tt);const nt=Ze.geometry.type==="Point"?Ze.geometry.coordinates:Ze.properties.anchor.coordinates;Ne.getMapView().setCenter({lat:nt[1],lng:nt[0]}),W?Ne==null||Ne.setZoom(W):zx(Ne)}})},Ee=Ne=>{if(Ne&&Gg){let Ze=Ne.getTileURL();if(Ze){Ze=Ne.getTileURL().replace("default",Gg);const tt=Ze==null?void 0:Ze.replace("{floor}",Ne.getFloor());Ne.getMapView().setMapsIndoorsTileURL(tt)}}},Pe=async(Ne,Ze)=>{const tt=new window.mapsindoors.MapsIndoors({mapView:Ne});tt.setDisplayRule(["MI_BUILDING_OUTLINE","MI_BUILDING","MI_VENUE"],{visible:!1}),tt.on("click",gt=>r(gt)),tt.once("building_changed",()=>xe(tt)),tt.on("floor_changed",()=>Ee(tt)),y(tt);const nt=new window.mapsindoors.services.DirectionsService(Ze);z(nt);const at=jx(S,C);at&&!le&&he(at,tt)},Ve=Ne=>{Ne.nodeName==="MI-MY-POSITION"?Ne.addEventListener("position_received",Ze=>{Ze.accurate===!0&&T(Ze.position)}):Ne.on("position_received",Ze=>{Ze.accurate===!0&&T(Ze.position)}),ye(Ne)};return lt.useEffect(()=>{Gg=V||"default",Ee(o)},[V]),$e.jsxs($e.Fragment,{children:[w===vs.Google&&$e.jsx(FN,{onMapView:Pe,onPositionControl:Ve}),w===vs.Mapbox&&$e.jsx(YN,{onMapView:Pe,onPositionControl:Ve})]})}function jx(r,s){if(s.length===0)return;if(s.length===1)return s[0];const c=window.localStorage.getItem(Zg);if(c){const d=s.find(m=>m.name===c);if(d)return d}if(r){const d=s.find(m=>m.name===r);if(d)return d}return[...s].sort(function(d,m){return d.name>m.name?1:m.name>d.name?-1:0})[0]}const ZN="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTM0IiBoZWlnaHQ9IjE4MyIgdmlld0JveD0iMCAwIDEzNCAxODMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMTkuMjYgOTguNzU1OUMxMjQuMzY1IDg5LjcwMjIgMTI2LjkxNyA3OS4zMDAxIDEyNi45MTcgNjcuNTQ5NUMxMjYuOTE3IDU1Ljc5OSAxMjQuMzY1IDQ1LjMzMjcgMTE5LjI2IDM2LjI3OUMxMTQuMTU1IDI3LjIyNTMgMTA3LjEzNiAyMC4xNjIyIDk4LjEzOSAxNS4wMjUzQzg5LjE0MTkgOS44ODg0OSA3OC43NDA5IDcuMzIwMDcgNjYuODcyNCA3LjMyMDA3QzU1LjMyMjkgNy4zMjAwNyA0NC45ODU3IDkuODg4NDkgMzUuOTI0OCAxNS4wMjUzQzI2Ljg2MzggMjAuMTYyMiAxOS43ODA5IDI3LjIyNTMgMTQuNjc2MiAzNi4yNzlDOS41NzE0MiA0NS4zMzI3IDcuMDE5MDQgNTUuNzM0OCA3LjAxOTA0IDY3LjU0OTVDNy4wMTkwNCA3OS4zNjQzIDkuNjM1MjMgODkuNzY2NCAxNC44MDM4IDk4Ljc1NTlDMTkuOTcyNCAxMDcuODEgMjcuMTE5IDExNC44NzMgMzYuMTE2MiAxMjAuMDFDNDUuMTc3MSAxMjUuMTQ2IDU1LjU3ODEgMTI3LjcxNSA2Ny4yNTUyIDEyNy43MTVDNzguOTk2MiAxMjcuNzE1IDg5LjI2OTUgMTI1LjE0NiA5OC4yMDI4IDEyMC4wMUMxMDcuMiAxMTQuODczIDExNC4xNTUgMTA3LjgxIDExOS4yNiA5OC43NTU5Wk04Ni44NDQ4IDc5LjMwMDFDODQuOTMwNSA4Mi43MDMyIDgyLjMxNDMgODUuNDAwMSA3OC45OTYyIDg3LjMyNjRDNzUuNjE0MyA4OS4yNTI3IDcxLjcyMTkgOTAuMjE1OSA2Ny4zMTkgOTAuMjE1OUM2Mi45MTYyIDkwLjIxNTkgNTguOTYgODkuMjUyNyA1NS40NTA1IDg3LjMyNjRDNTEuOTQwOSA4NS40MDAxIDQ5LjI2MDkgODIuNzAzMiA0Ny40MTA1IDc5LjMwMDFDNDUuNDk2MiA3NS44OTY5IDQ0LjUzOSA3MS45ODAxIDQ0LjUzOSA2Ny40ODUzQzQ0LjUzOSA2My4wNTQ4IDQ1LjQ5NjIgNTkuMTM4IDQ3LjQxMDUgNTUuNjcwNkM0OS4zMjQ4IDUyLjI2NzQgNTEuOTQwOSA0OS41NzA2IDU1LjM4NjcgNDcuNjQ0M0M1OC44MzI0IDQ1LjcxOCA2Mi42NjA5IDQ0Ljc1NDggNjYuOTM2MiA0NC43NTQ4QzcxLjMzOSA0NC43NTQ4IDc1LjI5NTIgNDUuNzE4IDc4Ljc0MDkgNDcuNjQ0M0M4Mi4xODY3IDQ5LjU3MDYgODQuODY2NyA1Mi4yNjc0IDg2Ljc4MDkgNTUuNjcwNkM4OC43NTkgNTkuMDczOCA4OS43MTYyIDYyLjk5MDYgODkuNzE2MiA2Ny40ODUzQzg5LjcxNjIgNzEuOTgwMSA4OC43NTkgNzUuODk2OSA4Ni44NDQ4IDc5LjMwMDFaTTg5LjQ2MDkgMTM4LjI0NUM4Mi4zMTQzIDE0MC4zNjQgNzQuNzg0OCAxNDEuNTIgNjcgMTQxLjUyQzU5LjIxNTIgMTQxLjUyIDUxLjYyMTkgMTQwLjM2NCA0NC41MzkgMTM4LjI0NUw2NyAxNzUuNjE2TDg5LjQ2MDkgMTM4LjI0NVoiIGZpbGw9IiMwMDU2NTUiLz4KPC9zdmc+Cg==",L9="",GN=ZN;function HN({logo:r=GN}){const s=Ui(ia);return $e.jsx("div",{className:"splash-screen",children:$e.jsxs("div",{className:"splash-screen__container",children:[$e.jsx("img",{className:"splash-screen__logo",src:r,alt:"logo"}),$e.jsx("div",{className:"splash-screen__loader",style:{border:`8px solid ${s}33`,borderLeft:`8px solid ${s}`}})]})})}function qh(){return qh=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var c=arguments[s];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(r[d]=c[d])}return r},qh.apply(this,arguments)}function Ox(r,s){if(r==null)return{};var c={},d=Object.keys(r),m,w;for(w=0;w<d.length;w++)m=d[w],!(s.indexOf(m)>=0)&&(c[m]=r[m]);return c}function Hg(r,s){return Hg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d},Hg(r,s)}function Lx(r,s){r.prototype=Object.create(s.prototype),r.prototype.constructor=r,Hg(r,s)}var Wg={exports:{}},Xh={exports:{}},gn={};/** @license React v16.13.1
1339
+ (${l.data.width}, ${l.data.height})`))):this.fire(new o.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")))}hasImage(h){return h?!!this.style.getImage(h):(this.fire(new o.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(h){this.style.removeImage(h)}loadImage(h,n){o.getImage(this._requestManager.transformRequest(h,o.ResourceType.Image),(l,p)=>{n(l,p instanceof o.window.HTMLImageElement?o.exported.getImageData(p):p)})}listImages(){return this.style.listImages()}addLayer(h,n){return this._lazyInitEmptyStyle(),this.style.addLayer(h,n),this._update(!0)}moveLayer(h,n){return this.style.moveLayer(h,n),this._update(!0)}removeLayer(h){return this.style.removeLayer(h),this._update(!0)}getLayer(h){return this.style.getLayer(h)}setLayerZoomRange(h,n,l){return this.style.setLayerZoomRange(h,n,l),this._update(!0)}setFilter(h,n,l={}){return this.style.setFilter(h,n,l),this._update(!0)}getFilter(h){return this.style.getFilter(h)}setPaintProperty(h,n,l,p={}){return this.style.setPaintProperty(h,n,l,p),this._update(!0)}getPaintProperty(h,n){return this.style.getPaintProperty(h,n)}setLayoutProperty(h,n,l,p={}){return this.style.setLayoutProperty(h,n,l,p),this._update(!0)}getLayoutProperty(h,n){return this.style.getLayoutProperty(h,n)}setLight(h,n={}){return this._lazyInitEmptyStyle(),this.style.setLight(h,n),this._update(!0)}getLight(){return this.style.getLight()}setTerrain(h){return this._lazyInitEmptyStyle(),!h&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(h),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(h){return this._lazyInitEmptyStyle(),this.style.setFog(h),this._update(!0)}getFog(){return this.style?this.style.getFog():null}_queryFogOpacity(h){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(o.LngLat.convert(h),this.transform):0}setFeatureState(h,n){return this.style.setFeatureState(h,n),this._update()}removeFeatureState(h,n){return this.style.removeFeatureState(h,n),this._update()}getFeatureState(h){return this.style.getFeatureState(h)}_updateContainerDimensions(){if(!this._container)return;const h=this._container.getBoundingClientRect().width||400,n=this._container.getBoundingClientRect().height||300;let l,p,_,M=this._container;for(;M&&(!p||!_);){const D=o.window.getComputedStyle(M).transform;D&&D!=="none"&&(l=D.match(/matrix.*\((.+)\)/)[1].split(", "),l[0]&&l[0]!=="0"&&l[0]!=="1"&&(p=l[0]),l[3]&&l[3]!=="0"&&l[3]!=="1"&&(_=l[3])),M=M.parentElement}this._containerWidth=p?Math.abs(h/p):h,this._containerHeight=_?Math.abs(n/_):n}_detectMissingCSS(){o.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&o.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const h=this._container;h.classList.add("mapboxgl-map"),(this._missingCSSCanary=S("div","mapboxgl-canary",h)).style.visibility="hidden",this._detectMissingCSS();const n=this._canvasContainer=S("div","mapboxgl-canvas-container",h);this._interactive&&n.classList.add("mapboxgl-interactive"),this._canvas=S("canvas","mapboxgl-canvas",n),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const l=this._controlContainer=S("div","mapboxgl-control-container",h),p=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(_=>{p[_]=S("div",`mapboxgl-ctrl-${_}`,l)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(h,n){const l=o.exported.devicePixelRatio||1;this._canvas.width=l*Math.ceil(h),this._canvas.height=l*Math.ceil(n),this._canvas.style.width=`${h}px`,this._canvas.style.height=`${n}px`}_addMarker(h){this._markers.push(h)}_removeMarker(h){const n=this._markers.indexOf(h);n!==-1&&this._markers.splice(n,1)}_addPopup(h){this._popups.push(h)}_removePopup(h){const n=this._popups.indexOf(h);n!==-1&&this._popups.splice(n,1)}_setupPainter(){const h=o.extend({},T.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),n=this._canvas.getContext("webgl",h)||this._canvas.getContext("experimental-webgl",h);n?(o.storeAuthState(n,!0),this.painter=new X0(n,this.transform),this.on("data",l=>{l.dataType==="source"&&this.painter.setTileLoadedFlag(!0)}),o.exported$1.testSupport(n)):this.fire(new o.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(h){h.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new o.Event("webglcontextlost",{originalEvent:h}))}_contextRestored(h){this._setupPainter(),this.resize(),this._update(),this.fire(new o.Event("webglcontextrestored",{originalEvent:h}))}_onMapScroll(h){if(h.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(h){return this.style?(this._styleDirty=this._styleDirty||h,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(h){return this._update(),this._renderTaskQueue.add(h)}_cancelRenderFrame(h){this._renderTaskQueue.remove(h)}_requestDomTask(h){!this.loaded()||this.loaded()&&!this.isMoving()?h():this._domRenderTaskQueue.add(h)}_render(h){let n;const l=this.painter.context.extTimerQuery,p=o.exported.now();if(this.listens("gpu-timing-frame")&&(n=l.createQueryEXT(),l.beginQueryEXT(l.TIME_ELAPSED_EXT,n)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],o.window.performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],o.window.performance.now())),this._renderTaskQueue.run(h),this._domRenderTaskQueue.run(h),this._removed)return;this._updateProjectionTransition();const _=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const A=this.transform.zoom,E=this.transform.pitch,k=o.exported.now(),L=new o.EvaluationParameters(A,{now:k,fadeDuration:_,pitch:E,transition:this.style.getTransition()});this.style.update(L)}this.style&&this.style.fog&&this.style.fog.hasTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let M=!1;if(this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),M=this._updateAverageElevation(p),this.style._updateSources(this.transform),this._forceMarkerAndPopupUpdate()):M=this._updateAverageElevation(p),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,_,this._crossSourceCollisions),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showTerrainWireframe:this.showTerrainWireframe,showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:_,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new o.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new o.Event("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),n){const A=o.exported.now()-p;l.endQueryEXT(l.TIME_ELAPSED_EXT,n),setTimeout(()=>{const E=l.getQueryObjectEXT(n,l.QUERY_RESULT_EXT)/1e6;l.deleteQueryEXT(n),this.fire(new o.Event("gpu-timing-frame",{cpuTime:A,gpuTime:E})),o.window.performance.mark("frame-gpu",{startTime:p,detail:{gpuTime:E}})},50)}if(this.listens("gpu-timing-layer")){const A=this.painter.collectGpuTimers();setTimeout(()=>{const E=this.painter.queryGpuTimers(A);this.fire(new o.Event("gpu-timing-layer",{layerTimes:E}))},50)}if(this.listens("gpu-timing-deferred-render")){const A=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{const E=this.painter.queryGpuTimeDeferredRender(A);this.fire(new o.Event("gpu-timing-deferred-render",{gpuTime:E}))},50)}const D=this._sourcesDirty||this._styleDirty||this._placementDirty||M;if(D||this._repaint)this.triggerRepaint();else{const A=!this.isMoving()&&this.loaded();if(A&&(M=this._updateAverageElevation(p,!0)),M)this.triggerRepaint();else if(this._triggerFrame(!1),A&&(this.fire(new o.Event("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const E=this._calculateSpeedIndex();this.fire(new o.Event("speedindexcompleted",{speedIndex:E})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||D||(this._fullyLoaded=!0,o.LivePerformanceUtils.mark(o.PerformanceMarkers.fullLoad),this._performanceMetricsCollection&&o.postPerformanceEvent(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(h){for(const n of this._markers)h&&!this.getRenderWorldCopies()&&(n._lngLat=n._lngLat.wrap()),n._update();for(const n of this._popups)!h||this.getRenderWorldCopies()||n._trackPointer||(n._lngLat=n._lngLat.wrap()),n._update()}_updateAverageElevation(h,n=!1){const l=p=>(this.transform.averageElevation=p,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return this.transform.averageElevation!==0&&l(0);if((n||h-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(h)){const p=this.transform.averageElevation;let _=this.transform.sampleAverageElevation(),M=!1;this.transform.elevation&&(M=this.transform.elevation.exaggeration()!==this._averageElevationExaggeration,this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(_)?_=0:this._averageElevationLastSampledAt=h;const D=Math.abs(p-_);if(D>1){if(this._isInitialLoad||M)return this._averageElevation.jumpTo(_),l(_);this._averageElevation.easeTo(_,h,300)}else if(D>1e-4)return this._averageElevation.jumpTo(_),l(_)}return!!this._averageElevation.isEasing(h)&&l(this._averageElevation.getValue(h))}_authenticate(){o.getMapSessionAPI(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,h=>{if(h&&(h.message===o.AUTH_ERR_MSG||h.status===401)){const n=this.painter.context.gl;o.storeAuthState(n,!1),this._logoControl instanceof Du&&this._logoControl._updateLogo(),n&&n.clear(n.DEPTH_BUFFER_BIT|n.COLOR_BUFFER_BIT|n.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new o.ErrorEvent(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),o.postMapLoadEvent(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_updateTerrain(){const h=this._isDragging();this.painter.updateTerrain(this.style,h)}_calculateSpeedIndex(){const h=this.painter.canvasCopy(),n=this.painter.getCanvasCopiesAndTimestamps();n.timeStamps.push(performance.now());const l=this.painter.context.gl,p=l.createFramebuffer();function _(M){l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,M,0);const D=new Uint8Array(l.drawingBufferWidth*l.drawingBufferHeight*4);return l.readPixels(0,0,l.drawingBufferWidth,l.drawingBufferHeight,l.RGBA,l.UNSIGNED_BYTE,D),D}return l.bindFramebuffer(l.FRAMEBUFFER,p),this._canvasPixelComparison(_(h),n.canvasCopies.map(_),n.timeStamps)}_canvasPixelComparison(h,n,l){let p=l[1]-l[0];const _=h.length/4;for(let M=0;M<n.length;M++){const D=n[M];let A=0;for(let E=0;E<D.length;E+=4)D[E]===h[E]&&D[E+1]===h[E+1]&&D[E+2]===h[E+2]&&D[E+3]===h[E+3]&&(A+=1);p+=(l[M+2]-l[M+1])*(1-A/_)}return p}remove(){this._hash&&this._hash.remove();for(const n of this._controls)n.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this._domRenderTaskQueue.clear(),this.style&&this.style.destroy(),this.painter.destroy(),this.handlers&&this.handlers.destroy(),this.handlers=void 0,this.setStyle(null),o.window!==void 0&&(o.window.removeEventListener("resize",this._onWindowResize,!1),o.window.removeEventListener("orientationchange",this._onWindowResize,!1),o.window.removeEventListener("webkitfullscreenchange",this._onWindowResize,!1),o.window.removeEventListener("online",this._onWindowOnline,!1),o.window.removeEventListener("visibilitychange",this._onVisibilityChange,!1));const h=this.painter.context.gl.getExtension("WEBGL_lose_context");h&&h.loseContext(),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._missingCSSCanary.remove(),this._canvas=void 0,this._canvasContainer=void 0,this._controlContainer=void 0,this._missingCSSCanary=void 0,this._container.classList.remove("mapboxgl-map"),this._container.removeEventListener("scroll",this._onMapScroll,!1),o.removeAuthState(this.painter.context.gl),this._removed=!0,this.fire(new o.Event("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(h){this._renderNextFrame=this._renderNextFrame||h,this.style&&!this._frame&&(this._frame=o.exported.frame(n=>{const l=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,l&&this._render(n)}))}_preloadTiles(h){const n=this.style?Object.values(this.style._sourceCaches):[];return o.asyncAll(n,(l,p)=>l._preloadTiles(h,p),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(h){this._trackResize&&this.resize({originalEvent:h})._update()}_onVisibilityChange(){o.window.document.visibilityState==="hidden"&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(h){this._showTileBoundaries!==h&&(this._showTileBoundaries=h,this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(h){this._showTerrainWireframe!==h&&(this._showTerrainWireframe=h,this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(h){this._speedIndexTiming!==h&&(this._speedIndexTiming=h,this._update())}get showPadding(){return!!this._showPadding}set showPadding(h){this._showPadding!==h&&(this._showPadding=h,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(h){this._showCollisionBoxes!==h&&(this._showCollisionBoxes=h,h?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(h){this._showOverdrawInspector!==h&&(this._showOverdrawInspector=h,this._update())}get repaint(){return!!this._repaint}set repaint(h){this._repaint!==h&&(this._repaint=h,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(h){this._vertices=h,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(h){this._showTileAABBs!==h&&(this._showTileAABBs=h,h&&this._update())}_setCacheLimits(h,n){o.setCacheLimits(h,n)}get version(){return o.version}},NavigationControl:class{constructor(h){this.options=o.extend({},up,h),this._container=S("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",n=>n.preventDefault()),this.options.showZoom&&(o.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",n=>{this._map&&this._map.zoomIn({},{originalEvent:n})}),S("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",n=>{this._map&&this._map.zoomOut({},{originalEvent:n})}),S("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(o.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",n=>{const l=this._map;l&&(this.options.visualizePitch?l.resetNorthPitch({},{originalEvent:n}):l.resetNorth({},{originalEvent:n}))}),this._compassIcon=S("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const h=this._map;if(!h)return;const n=h.getZoom(),l=n===h.getMaxZoom(),p=n===h.getMinZoom();this._zoomInButton.disabled=l,this._zoomOutButton.disabled=p,this._zoomInButton.setAttribute("aria-disabled",l.toString()),this._zoomOutButton.setAttribute("aria-disabled",p.toString())}_rotateCompassArrow(){const h=this._map;if(!h)return;const n=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(h.transform.pitch*(Math.PI/180)),.5)}) rotateX(${h.transform.pitch}deg) rotateZ(${h.transform.angle*(180/Math.PI)}deg)`:`rotate(${h.transform.angle*(180/Math.PI)}deg)`;h._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=n)})}onAdd(h){return this._map=h,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),h.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&h.on("pitch",this._rotateCompassArrow),h.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new hp(h,this._compass,this.options.visualizePitch)),this._container}onRemove(){const h=this._map;h&&(this._container.remove(),this.options.showZoom&&h.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&h.off("pitch",this._rotateCompassArrow),h.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(h,n){const l=S("button",h,this._container);return l.type="button",l.addEventListener("click",n),l}_setButtonTitle(h,n){if(!this._map)return;const l=this._map._getUIString(`NavigationControl.${n}`);h.setAttribute("aria-label",l),h.firstElementChild&&h.firstElementChild.setAttribute("title",l)}},GeolocateControl:class extends o.Evented{constructor(h){super(),this.options=o.extend({geolocation:o.window.navigator.geolocation},Eu,h),o.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=Na(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(h){return this._map=h,this._container=S("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){this._geolocationWatchID!==void 0&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(h){const n=(l=!!this.options.geolocation)=>{this._supportsGeolocation=l,h(l)};this._supportsGeolocation!==void 0?h(this._supportsGeolocation):o.window.navigator.permissions!==void 0?o.window.navigator.permissions.query({name:"geolocation"}).then(l=>n(l.state!=="denied")).catch(()=>n()):n()}_isOutOfMapMaxBounds(h){const n=this._map.getMaxBounds(),l=h.coords;return!!n&&(l.longitude<n.getWest()||l.longitude>n.getEast()||l.latitude<n.getSouth()||l.latitude>n.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(h){if(this._map){if(this._isOutOfMapMaxBounds(h))return this._setErrorState(),this.fire(new o.Event("outofmaxbounds",h)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=h,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(h),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(h),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new o.Event("geolocate",h)),this._finish()}}_updateCamera(h){const n=new o.LngLat(h.coords.longitude,h.coords.latitude),l=h.coords.accuracy,p=this._map.getBearing(),_=o.extend({bearing:p},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(l),_,{geolocateSource:!0})}_updateMarker(h){if(h){const n=new o.LngLat(h.coords.longitude,h.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=h.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const h=this._map.transform,n=o.mercatorZfromAltitude(1,h._center.lat)*h.worldSize,l=Math.ceil(2*this._accuracy*n);this._circleElement.style.width=`${l}px`,this._circleElement.style.height=`${l}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&typeof this._heading=="number"?(this._userLocationDotMarker.setRotation(this._heading),this._dotElement.classList.add("mapboxgl-user-location-show-heading")):(this._dotElement.classList.remove("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(h){if(this._map){if(this.options.trackUserLocation)if(h.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",n),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",n),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(h.code===3&&this._noTimeout)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new o.Event("error",h)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(h){if(this._map!==void 0){if(this._container.addEventListener("contextmenu",n=>n.preventDefault()),this._geolocateButton=S("button","mapboxgl-ctrl-geolocate",this._container),S("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",h===!1){o.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",n),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",n)}else{const n=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",n),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",n)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=S("div","mapboxgl-user-location"),this._dotElement.appendChild(S("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(S("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new ja({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=S("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ja({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",n=>{n.geolocateSource||this._watchState!=="ACTIVE_LOCK"||n.originalEvent&&n.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new o.Event("trackuserlocationend")))})}}_onDeviceOrientation(h){this._userLocationDotMarker&&(h.webkitCompassHeading?this._heading=h.webkitCompassHeading:h.absolute===!0&&(this._heading=-1*h.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return o.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new o.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new o.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new o.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let h;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(h={maximumAge:6e5,timeout:0},this._noTimeout=!0):(h=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,h),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const h=()=>{o.window.addEventListener("ondeviceorientationabsolute"in o.window?"deviceorientationabsolute":"deviceorientation",this._onDeviceOrientation)};o.window.DeviceMotionEvent!==void 0&&typeof o.window.DeviceMotionEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(n=>{n==="granted"&&h()}).catch(console.error):h()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),o.window.removeEventListener("deviceorientation",this._onDeviceOrientation),o.window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Iu,ScaleControl:class{constructor(h){this.options=o.extend({},dp,h),function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"narrow",unit:"meter"}),!0}catch{return!1}}()||(this._setScale=fp.bind(this)),o.bindAll(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const h=this.options.maxWidth||100,n=this._map,l=n._containerHeight/2,p=n._containerWidth/2-h/2,_=n.unproject([p,l]),M=n.unproject([p+h,l]),D=_.distanceTo(M);if(this.options.unit==="imperial"){const A=3.2808*D;A>5280?this._setScale(h,A/5280,"mile"):this._setScale(h,A,"foot")}else this.options.unit==="nautical"?this._setScale(h,D/1852,"nautical-mile"):D>=1e3?this._setScale(h,D/1e3,"kilometer"):this._setScale(h,D,"meter")}_setScale(h,n,l){const p=Cu(n),_=p/n;this._map._requestDomTask(()=>{this._container.style.width=h*_+"px",this._container.innerHTML=l!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"narrow",unit:l}).format(p):`${p}&nbsp;nm`})}onAdd(h){return this._map=h,this._language=h.getLanguage(),this._container=S("div","mapboxgl-ctrl mapboxgl-ctrl-scale",h.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(h){this._language=h,this._update()}setUnit(h){this.options.unit=h,this._update()}},FullscreenControl:class{constructor(h){this._fullscreen=!1,h&&h.container&&(h.container instanceof o.window.HTMLElement?this._container=h.container:o.warnOnce("Full screen control 'container' must be a DOM element.")),o.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in o.window.document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in o.window.document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(h){return this._map=h,this._container||(this._container=this._map.getContainer()),this._controlContainer=S("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",o.warnOnce("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,o.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!o.window.document.fullscreenEnabled&&!o.window.document.webkitFullscreenEnabled)}_setupUI(){const h=this._fullscreenButton=S("button","mapboxgl-ctrl-fullscreen",this._controlContainer);S("span","mapboxgl-ctrl-icon",h).setAttribute("aria-hidden","true"),h.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),o.window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const h=this._getTitle();this._fullscreenButton.setAttribute("aria-label",h),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",h)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(o.window.document.fullscreenElement||o.window.document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?o.window.document.exitFullscreen?o.window.document.exitFullscreen():o.window.document.webkitCancelFullScreen&&o.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},Popup:class extends o.Evented{constructor(h){super(),this.options=o.extend(Object.create(Zl),h),o.bindAll(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(h&&h.className?h.className.trim().split(/\s+/):[])}addTo(h){return this._map&&this.remove(),this._map=h,this.options.closeOnClick&&h.on("preclick",this._onClose),this.options.closeOnMove&&h.on("move",this._onClose),h.on("remove",this.remove),this._update(),h._addPopup(this),this._focusFirstElement(),this._trackPointer?(h.on("mousemove",this._onMouseEvent),h.on("mouseup",this._onMouseEvent),h._canvasContainer.classList.add("mapboxgl-track-pointer")):h.on("move",this._update),this.fire(new o.Event("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const h=this._map;return h&&(h.off("move",this._update),h.off("move",this._onClose),h.off("preclick",this._onClose),h.off("click",this._onClose),h.off("remove",this.remove),h.off("mousemove",this._onMouseEvent),h.off("mouseup",this._onMouseEvent),h.off("drag",this._onMouseEvent),h._canvasContainer&&h._canvasContainer.classList.remove("mapboxgl-track-pointer"),h._removePopup(this),this._map=void 0),this.fire(new o.Event("close")),this}getLngLat(){return this._lngLat}setLngLat(h){this._lngLat=o.LngLat.convert(h),this._pos=null,this._trackPointer=!1,this._update();const n=this._map;return n&&(n.on("move",this._update),n.off("mousemove",this._onMouseEvent),n._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const h=this._map;return h&&(h.off("move",this._update),h.on("mousemove",this._onMouseEvent),h.on("drag",this._onMouseEvent),h._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(h){return this.setDOMContent(o.window.document.createTextNode(h))}setHTML(h){const n=o.window.document.createDocumentFragment(),l=o.window.document.createElement("body");let p;for(l.innerHTML=h;p=l.firstChild,p;)n.appendChild(p);return this.setDOMContent(n)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(h){return this.options.maxWidth=h,this._update(),this}setDOMContent(h){let n=this._content;if(n)for(;n.hasChildNodes();)n.firstChild&&n.removeChild(n.firstChild);else n=this._content=S("div","mapboxgl-popup-content",this._container||void 0);if(n.appendChild(h),this.options.closeButton){const l=this._closeButton=S("button","mapboxgl-popup-close-button",n);l.type="button",l.setAttribute("aria-label","Close popup"),l.setAttribute("aria-hidden","true"),l.innerHTML="&#215;",l.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(h){return this._classList.add(h),this._updateClassList(),this}removeClassName(h){return this._classList.delete(h),this._updateClassList(),this}setOffset(h){return this.options.offset=h,this._update(),this}toggleClassName(h){let n;return this._classList.delete(h)?n=!1:(this._classList.add(h),n=!0),this._updateClassList(),n}_onMouseEvent(h){this._update(h.point)}_getAnchor(h){if(this.options.anchor)return this.options.anchor;const n=this._map,l=this._container,p=this._pos;if(!n||!l||!p)return"bottom";const _=l.offsetWidth,M=l.offsetHeight,D=p.x<_/2,A=p.x>n.transform.width-_/2;if(p.y+h<M)return D?"top-left":A?"top-right":"top";if(p.y>n.transform.height-M){if(D)return"bottom-left";if(A)return"bottom-right"}return D?"left":A?"right":"bottom"}_updateClassList(){const h=this._container;if(!h)return;const n=[...this._classList];n.push("mapboxgl-popup"),this._anchor&&n.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&n.push("mapboxgl-popup-track-pointer"),h.className=n.join(" ")}_update(h){const n=this._map,l=this._content;if(!n||!this._lngLat&&!this._trackPointer||!l)return;let p=this._container;if(p||(p=this._container=S("div","mapboxgl-popup",n.getContainer()),this._tip=S("div","mapboxgl-popup-tip",p),p.appendChild(l)),this.options.maxWidth&&p.style.maxWidth!==this.options.maxWidth&&(p.style.maxWidth=this.options.maxWidth),n.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Au(this._lngLat,this._pos,n.transform)),!this._trackPointer||h){const _=this._pos=this._trackPointer&&h?h:n.project(this._lngLat),M=Nu(this.options.offset),D=this._anchor=this._getAnchor(M.y),A=Nu(this.options.offset,D),E=_.add(A).round();n._requestDomTask(()=>{this._container&&D&&(this._container.style.transform=`${Ls[D]} translate(${E.x}px,${E.y}px)`)})}if(!this._marker&&n._showingGlobe()){const _=o.isLngLatBehindGlobe(n.transform,this._lngLat)?0:1;this._setOpacity(_)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const h=this._container.querySelector(sp);h&&h.focus()}_onClose(){this.remove()}_setOpacity(h){this._container&&(this._container.style.opacity=`${h}`),this._content&&(this._content.style.pointerEvents=h?"auto":"none")}},Marker:ja,Style:tr,LngLat:o.LngLat,LngLatBounds:o.LngLatBounds,Point:o.pointGeometry,MercatorCoordinate:o.MercatorCoordinate,FreeCameraOptions:gu,Evented:o.Evented,config:o.config,prewarm:function(){Wt().acquire(Bt)},clearPrewarmedResources:function(){const h=Zt;h&&(h.isPreloaded()&&h.numActive()===1?(h.release(Bt),Zt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return o.config.ACCESS_TOKEN},set accessToken(h){o.config.ACCESS_TOKEN=h},get baseApiUrl(){return o.config.API_URL},set baseApiUrl(h){o.config.API_URL=h},get workerCount(){return Rt.workerCount},set workerCount(h){Rt.workerCount=h},get maxParallelImageRequests(){return o.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(h){o.config.MAX_PARALLEL_IMAGE_REQUESTS=h},clearStorage(h){o.clearTileCache(h)},workerUrl:"",workerClass:null,setNow:o.exported.setNow,restoreNow:o.exported.restoreNow};return Oa});var v=m;return v})})(Ix);var VN=Ix.exports;const QN=a1(VN),O9="",Qg=Un({key:"mapboxAccessToken",default:null});function YN({onMapView:r,onPositionControl:s}){const c=Ui(Qg),[d,m]=lt.useState(),[w,v]=lt.useState(!1),[o,y]=lt.useState(!1),T=Ui(qo),z=Ui(ia);return lt.useEffect(()=>{window.mapboxgl=QN;const C={accessToken:c,element:document.getElementById("map")},S=new window.mapsindoors.mapView.MapboxView(C);m(S);const U=new window.mapsindoors.directions.MapboxProvider(c);r(S,U)},[]),lt.useEffect(()=>{if(T&&d&&!o){const C=document.createElement("mi-my-position");C.mapsindoors=T,d.getMap().addControl({onAdd:()=>C,onRemove:function(){}},"top-right"),y(!0),s(C)}if(T&&d&&!w){const C=document.createElement("mi-floor-selector");C.mapsindoors=T,C.primaryColor=z,d.getMap().addControl({onAdd:()=>C,onRemove:function(){C.parentNode.removeChild(C)}},"top-right"),v(!0)}},[T,d,w,o]),$e.jsx("div",{className:"map-container",id:"map"})}const Yg=Un({key:"userPosition",default:null}),Dx=Un({key:"directionsService",default:null}),Tx=Un({key:"mapType",default:void 0}),Hh=Un({key:"currentVenueName",default:null}),Ax=Un({key:"apiKey",default:null}),$g=Un({key:"filteredLocations",default:void 0}),Wh=Un({key:"filteredLocationsByExternalID",default:void 0}),Nx=Un({key:"tileStyle",default:null}),Ex=Un({key:"startZoomLevel",default:null}),Cx=Un({key:"positionControl",default:null,dangerouslyAllowMutability:!0}),Sx=Un({key:"locationId",default:void 0});function zx(r){return window.mapsindoors.services.SolutionsService.getSolution().then(s=>{const c=Object.values(s.modules).find(d=>d==="z22");r==null||r.setZoom(c?22:21)})}const Zg="MI-MAP-TEMPLATE-LAST-VENUE";let Gg;function $N({onLocationClick:r,onVenueChangedOnMap:s}){const c=Ui(Ax),d=Ui(Vg),m=Ui(Qg),[w,v]=vn(Tx),[o,y]=vn(qo),[,T]=vn(Yg),[,z]=vn(Dx),C=Ui(Fg),S=Ui(Hh),U=Ui($g),R=Ui(Wh),V=Ui(Nx),W=Ui(Ex),[,ye]=vn(Cx),le=Ui(Sx);RN(c),lt.useEffect(()=>{d===null&&m===null||v(m?vs.Mapbox:vs.Google)},[d,m]),lt.useEffect(()=>{if(o){window.localStorage.clear(Zg);const Ne=jx(S,C);Ne&&!le?he(Ne,o).then(()=>{s(Ne)}):Ne&&s(Ne)}},[S,C,W]),lt.useEffect(()=>{o&&(U?o.filter(U.map(Ne=>Ne.id)):R&&o.filter(R.map(Ne=>Ne.id)))},[U,R,o]);const he=(Ne,Ze)=>(window.localStorage.setItem(Zg,Ne.name),Ze.fitVenue(Ne).then(()=>{W&&Ze.setZoom(W)})),xe=Ne=>{Ee(Ne),X(Ne)},X=Ne=>{le&&Ne&&window.mapsindoors.services.LocationsService.getLocation(le).then(Ze=>{if(Ze){const tt=Ze.properties.floor;Ne.setFloor(tt);const nt=Ze.geometry.type==="Point"?Ze.geometry.coordinates:Ze.properties.anchor.coordinates;Ne.getMapView().setCenter({lat:nt[1],lng:nt[0]}),W?Ne==null||Ne.setZoom(W):zx(Ne)}})},Ee=Ne=>{if(Ne&&Gg){let Ze=Ne.getTileURL();if(Ze){Ze=Ne.getTileURL().replace("default",Gg);const tt=Ze==null?void 0:Ze.replace("{floor}",Ne.getFloor());Ne.getMapView().setMapsIndoorsTileURL(tt)}}},Pe=async(Ne,Ze)=>{const tt=new window.mapsindoors.MapsIndoors({mapView:Ne});tt.setDisplayRule(["MI_BUILDING_OUTLINE","MI_BUILDING","MI_VENUE"],{visible:!1}),tt.on("click",gt=>r(gt)),tt.once("building_changed",()=>xe(tt)),tt.on("floor_changed",()=>Ee(tt)),y(tt);const nt=new window.mapsindoors.services.DirectionsService(Ze);z(nt);const at=jx(S,C);at&&!le&&he(at,tt)},Ve=Ne=>{Ne.nodeName==="MI-MY-POSITION"?Ne.addEventListener("position_received",Ze=>{Ze.detail.accurate===!0&&T(Ze.detail.position)}):Ne.on("position_received",Ze=>{Ze.accurate===!0&&T(Ze.position)}),ye(Ne)};return lt.useEffect(()=>{Gg=V||"default",Ee(o)},[V]),$e.jsxs($e.Fragment,{children:[w===vs.Google&&$e.jsx(FN,{onMapView:Pe,onPositionControl:Ve}),w===vs.Mapbox&&$e.jsx(YN,{onMapView:Pe,onPositionControl:Ve})]})}function jx(r,s){if(s.length===0)return;if(s.length===1)return s[0];const c=window.localStorage.getItem(Zg);if(c){const d=s.find(m=>m.name===c);if(d)return d}if(r){const d=s.find(m=>m.name===r);if(d)return d}return[...s].sort(function(d,m){return d.name>m.name?1:m.name>d.name?-1:0})[0]}const ZN="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTM0IiBoZWlnaHQ9IjE4MyIgdmlld0JveD0iMCAwIDEzNCAxODMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMTkuMjYgOTguNzU1OUMxMjQuMzY1IDg5LjcwMjIgMTI2LjkxNyA3OS4zMDAxIDEyNi45MTcgNjcuNTQ5NUMxMjYuOTE3IDU1Ljc5OSAxMjQuMzY1IDQ1LjMzMjcgMTE5LjI2IDM2LjI3OUMxMTQuMTU1IDI3LjIyNTMgMTA3LjEzNiAyMC4xNjIyIDk4LjEzOSAxNS4wMjUzQzg5LjE0MTkgOS44ODg0OSA3OC43NDA5IDcuMzIwMDcgNjYuODcyNCA3LjMyMDA3QzU1LjMyMjkgNy4zMjAwNyA0NC45ODU3IDkuODg4NDkgMzUuOTI0OCAxNS4wMjUzQzI2Ljg2MzggMjAuMTYyMiAxOS43ODA5IDI3LjIyNTMgMTQuNjc2MiAzNi4yNzlDOS41NzE0MiA0NS4zMzI3IDcuMDE5MDQgNTUuNzM0OCA3LjAxOTA0IDY3LjU0OTVDNy4wMTkwNCA3OS4zNjQzIDkuNjM1MjMgODkuNzY2NCAxNC44MDM4IDk4Ljc1NTlDMTkuOTcyNCAxMDcuODEgMjcuMTE5IDExNC44NzMgMzYuMTE2MiAxMjAuMDFDNDUuMTc3MSAxMjUuMTQ2IDU1LjU3ODEgMTI3LjcxNSA2Ny4yNTUyIDEyNy43MTVDNzguOTk2MiAxMjcuNzE1IDg5LjI2OTUgMTI1LjE0NiA5OC4yMDI4IDEyMC4wMUMxMDcuMiAxMTQuODczIDExNC4xNTUgMTA3LjgxIDExOS4yNiA5OC43NTU5Wk04Ni44NDQ4IDc5LjMwMDFDODQuOTMwNSA4Mi43MDMyIDgyLjMxNDMgODUuNDAwMSA3OC45OTYyIDg3LjMyNjRDNzUuNjE0MyA4OS4yNTI3IDcxLjcyMTkgOTAuMjE1OSA2Ny4zMTkgOTAuMjE1OUM2Mi45MTYyIDkwLjIxNTkgNTguOTYgODkuMjUyNyA1NS40NTA1IDg3LjMyNjRDNTEuOTQwOSA4NS40MDAxIDQ5LjI2MDkgODIuNzAzMiA0Ny40MTA1IDc5LjMwMDFDNDUuNDk2MiA3NS44OTY5IDQ0LjUzOSA3MS45ODAxIDQ0LjUzOSA2Ny40ODUzQzQ0LjUzOSA2My4wNTQ4IDQ1LjQ5NjIgNTkuMTM4IDQ3LjQxMDUgNTUuNjcwNkM0OS4zMjQ4IDUyLjI2NzQgNTEuOTQwOSA0OS41NzA2IDU1LjM4NjcgNDcuNjQ0M0M1OC44MzI0IDQ1LjcxOCA2Mi42NjA5IDQ0Ljc1NDggNjYuOTM2MiA0NC43NTQ4QzcxLjMzOSA0NC43NTQ4IDc1LjI5NTIgNDUuNzE4IDc4Ljc0MDkgNDcuNjQ0M0M4Mi4xODY3IDQ5LjU3MDYgODQuODY2NyA1Mi4yNjc0IDg2Ljc4MDkgNTUuNjcwNkM4OC43NTkgNTkuMDczOCA4OS43MTYyIDYyLjk5MDYgODkuNzE2MiA2Ny40ODUzQzg5LjcxNjIgNzEuOTgwMSA4OC43NTkgNzUuODk2OSA4Ni44NDQ4IDc5LjMwMDFaTTg5LjQ2MDkgMTM4LjI0NUM4Mi4zMTQzIDE0MC4zNjQgNzQuNzg0OCAxNDEuNTIgNjcgMTQxLjUyQzU5LjIxNTIgMTQxLjUyIDUxLjYyMTkgMTQwLjM2NCA0NC41MzkgMTM4LjI0NUw2NyAxNzUuNjE2TDg5LjQ2MDkgMTM4LjI0NVoiIGZpbGw9IiMwMDU2NTUiLz4KPC9zdmc+Cg==",L9="",GN=ZN;function HN({logo:r=GN}){const s=Ui(ia);return $e.jsx("div",{className:"splash-screen",children:$e.jsxs("div",{className:"splash-screen__container",children:[$e.jsx("img",{className:"splash-screen__logo",src:r,alt:"logo"}),$e.jsx("div",{className:"splash-screen__loader",style:{border:`8px solid ${s}33`,borderLeft:`8px solid ${s}`}})]})})}function qh(){return qh=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var c=arguments[s];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(r[d]=c[d])}return r},qh.apply(this,arguments)}function Ox(r,s){if(r==null)return{};var c={},d=Object.keys(r),m,w;for(w=0;w<d.length;w++)m=d[w],!(s.indexOf(m)>=0)&&(c[m]=r[m]);return c}function Hg(r,s){return Hg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,m){return d.__proto__=m,d},Hg(r,s)}function Lx(r,s){r.prototype=Object.create(s.prototype),r.prototype.constructor=r,Hg(r,s)}var Wg={exports:{}},Xh={exports:{}},gn={};/** @license React v16.13.1
1340
1340
  * react-is.production.min.js
1341
1341
  *
1342
1342
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1383,7 +1383,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1383
1383
  * LICENSE file in the root directory of this source tree.
1384
1384
  *
1385
1385
  */.hg-theme-default{background-color:#ececec;border-radius:5px;box-sizing:border-box;font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;overflow:hidden;padding:5px;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.hg-theme-default .hg-button span{pointer-events:none}.hg-theme-default button.hg-button{border-width:0;font-size:inherit;outline:0}.hg-theme-default .hg-button{display:inline-block;flex-grow:1}.hg-theme-default .hg-row{display:flex}.hg-theme-default .hg-row:not(:last-child){margin-bottom:5px}.hg-theme-default .hg-row .hg-button-container,.hg-theme-default .hg-row .hg-button:not(:last-child){margin-right:5px}.hg-theme-default .hg-row>div:last-child{margin-right:0}.hg-theme-default .hg-row .hg-button-container{display:flex}.hg-theme-default .hg-button{-webkit-tap-highlight-color:rgba(0,0,0,0);align-items:center;background:#fff;border-bottom:1px solid #b5b5b5;border-radius:5px;box-shadow:0 0 3px -1px rgba(0,0,0,.3);box-sizing:border-box;cursor:pointer;display:flex;height:40px;justify-content:center;padding:5px}.hg-theme-default .hg-button.hg-standardBtn{width:20px}.hg-theme-default .hg-button.hg-activeButton{background:#efefef}.hg-theme-default.hg-layout-numeric .hg-button{align-items:center;display:flex;height:60px;justify-content:center;width:33.3%}.hg-theme-default .hg-button.hg-button-numpadadd,.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.hg-theme-default .hg-button.hg-button-com{max-width:85px}.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.hg-theme-default .hg-button.hg-selectedButton{background:rgba(5,25,70,.53);color:#fff}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"]{max-width:82px}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"]{max-width:60px}.hg-candidate-box{background:#ececec;border-bottom:2px solid #b5b5b5;border-radius:5px;display:inline-flex;margin-top:-10px;max-width:272px;position:absolute;transform:translateY(-100%);-webkit-user-select:none;-moz-user-select:none;user-select:none}ul.hg-candidate-box-list{display:flex;flex:1;list-style:none;margin:0;padding:0}li.hg-candidate-box-list-item{align-items:center;display:flex;height:40px;justify-content:center;width:40px}li.hg-candidate-box-list-item:hover{background:rgba(0,0,0,.03);cursor:pointer}li.hg-candidate-box-list-item:active{background:rgba(0,0,0,.1)}.hg-candidate-box-prev:before{content:"◄"}.hg-candidate-box-next:before{content:"►"}.hg-candidate-box-next,.hg-candidate-box-prev{align-items:center;background:#d0d0d0;color:#969696;cursor:pointer;display:flex;padding:0 10px}.hg-candidate-box-next{border-bottom-right-radius:5px;border-top-right-radius:5px}.hg-candidate-box-prev{border-bottom-left-radius:5px;border-top-left-radius:5px}.hg-candidate-box-btn-active{color:#444}mi-keyboard{display:block}mi-keyboard .hg-theme-default{background-color:transparent}`,Av=class{constructor(r){Hi(this,r),this.inputElements=new Set,this.inputElement=void 0,this.layout=Bc.Alphabetic}inputElementChange(){if(!this.inputElement.hasAttribute("id")){console.warn("MI-KEYBOARD: Invalid id attribute");return}this.simpleKeyboard&&(this.simpleKeyboard.setOptions({inputName:this.inputElement.id}),this.simpleKeyboard.setInput(this.inputElement.value,this.inputElement.id)),this.inputElements.has(this.inputElement)||(this.inputElements.add(this.inputElement),["input","focus","blur","inputCleared"].forEach(s=>{this.inputElement.addEventListener(s,()=>{this.simpleKeyboard.setInput(this.inputElement.value,this.inputElement.id)})}))}layoutChange(){this.simpleKeyboard&&this.simpleKeyboard.setOptions({layout:this.getKeyboardLayout(this.layout)})}componentDidLoad(){this.simpleKeyboard=new gC({onChange:r=>{this.inputElement&&(this.inputElement.value=r,this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})))},layout:this.getKeyboardLayout(this.layout),display:{"{bksp}":"&#9003;","{enter}":"return","{space}":"space"},theme:"hg-theme-default hg-layout-numeric numeric-theme"})}isValidLayout(r){return r?!!Object.values(Bc).find(s=>s===r):!1}getKeyboardLayout(r){if(!this.isValidLayout(r))return console.warn("MI-KEYBOARD: Invalid layout attribute"),vm;if(r===Bc.Numeric)return xC;const s=window.navigator.language;if(!s)return vm;const d=[{layout:Tv,languages:["en","en-us"]},{layout:mC,languages:["da","da-dk"]},{layout:_C,languages:["fr","fr-fr"]},{layout:yC,languages:["de","de-de"]}].find(m=>!!m.languages.find(w=>w===s.toLowerCase()));return d?d.layout:vm}render(){return be("div",{class:"simple-keyboard"})}static get watchers(){return{inputElement:["inputElementChange"],layout:["layoutChange"]}}};Av.style=vC;const MC=Object.freeze(Object.defineProperty({__proto__:null,mi_keyboard:Av},Symbol.toStringTag,{value:"Module"})),Mm={icon:{size:{small:{value:"16px"},medium:{value:"24px"},large:{value:"32px"},xLarge:{value:"48px"},xxLarge:{value:"64px"}}}},bC="html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}:host{color:#1c1917;transition:300ms ease;display:flex;align-items:center;cursor:pointer}:host img{-o-object-fit:cover;object-fit:cover}:host([orientation=horizontal]){width:100%;height:100%;float:left;flex-direction:column;justify-content:center}:host([orientation=horizontal]) img{width:48px;height:48px}:host([orientation=horizontal]) p{height:16px;overflow:visible;font-size:0.875rem;line-height:1rem;text-align:center}:host([orientation=vertical]){padding:16px;flex-direction:row;font-size:1rem;font-weight:500;line-height:1.25rem}:host([orientation=vertical]) img{width:24px;height:24px}:host([orientation=vertical]) p{margin:0;padding-left:16px}:host(:hover){background-color:#fcfcfc}",Nv=class{constructor(r){Hi(this,r),this.categoryClicked=Tn(this,"categoryClicked",7),this.listItemDidRender=Tn(this,"listItemDidRender",7),this.category=void 0,this.orientation="vertical"}componentDidRender(){this.listItemDidRender.emit(),"objectFit"in document.documentElement.style||this.objectFitImage(this.image)}categoryClickedHandler(r){this.categoryClicked.emit(r)}objectFitImage(r){r.setAttribute("style",`background: no-repeat center center url("${this.category.iconUrl}"); background-size: cover;`),r.src=`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${r.width}' height='${r.height}'%3E%3C/svg%3E`}render(){const r=this.orientation.toUpperCase()==="VERTICAL"?parseInt(Mm.icon.size.medium.value):parseInt(Mm.icon.size["xx-large"].value),s=xm(this.category.iconUrl,r);return be(qn,{onClick:()=>this.categoryClickedHandler(this.category)},be("img",{ref:c=>this.image=c,src:s}),be("p",null,this.category.name))}};Nv.style=bC;const wC=Object.freeze(Object.defineProperty({__proto__:null,mi_list_item_category:Nv},Symbol.toStringTag,{value:"Module"})),IC='html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}:host{padding:16px;font-size:1rem;font-weight:500;line-height:1rem;transition:300ms ease;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";border-radius:8px;background-color:#f9fafb;display:flex;flex-direction:row;align-items:center;cursor:pointer;gap:16px;border:1px solid #e5e7eb}:host(:hover){background-color:var(--tailwind-colors-gray-100)}.img-container{width:32px;height:32px;display:flex;justify-content:center;align-items:center}img{border-radius:8px;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.details{padding-right:16px;flex:1;display:grid;gap:4px}.details-title{margin:0;padding:0}.distance{font-weight:400}mi-location-info{color:#6b7280}',Ev=class{constructor(r){Hi(this,r),this.locationClicked=Tn(this,"locationClicked",7),this.listItemDidRender=Tn(this,"listItemDidRender",7),this.iconDisplaySize=parseInt(Mm.icon.size.medium.value),this.location=void 0,this.showExternalId=!0,this.unit=void 0,this.icon=void 0,this.iconBadge=void 0,this.iconBadgeValue=void 0,this.iconURLToRender=void 0}iconChanged(){var r;this.iconURLToRender=this.icon?this.icon:(r=this.location)===null||r===void 0?void 0:r.properties.imageURL,this.updateBadge()}iconBadgeChanged(){this.updateBadge()}iconBadgeValueChanged(){this.updateBadge()}locationClickedHandler(r){this.locationClicked.emit(r)}componentWillLoad(){var r;this.iconURLToRender=this.icon?this.icon:(r=this.location)===null||r===void 0?void 0:r.properties.imageURL,this.updateBadge()}componentDidRender(){this.location&&(this.infoElement.location=this.location,this.listItemDidRender.emit(),this.imageElement&&!("objectFit"in document.documentElement.style)&&this.objectFitImage(this.imageElement))}updateBadge(){this.iconBadge&&this.iconBadgeValue&&this.iconURLToRender&&this.applyBadgeToIcon()}objectFitImage(r){r.setAttribute("style",`background: no-repeat center center url("${this.iconURLToRender}"); background-size: cover;`),r.src=`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${r.width}' height='${r.height}'%3E%3C/svg%3E`}applyBadgeToIcon(){let r;this.iconURLToRender=this.icon?this.icon:this.location.properties.imageURL;const s=xm(this.iconURLToRender,this.iconDisplaySize);this.getImageFromUrl(s).then(c=>{switch(r=c.width/24,this.iconBadge.toLowerCase()){case"availability":if(this.iconBadgeValue==="true")return mapsindoors.BadgeRenderer.AvailableBadge.overlay(c);if(this.iconBadgeValue==="false")return mapsindoors.BadgeRenderer.UnavailableBadge.overlay(c);break;case"occupancy":return mapsindoors.BadgeRenderer.TextBadge.overlay(c,{text:this.iconBadgeValue.toString()})}}).then(c=>{if(c){this.iconURLToRender=c.src;const d=(c.width-24)/-2;this.iconAttributes={style:{transform:"translateX("+d+"px)",width:c.width/r+"px",height:c.height/r+"px"}}}})}async getImageFromUrl(r){return fetch(r).then(s=>s.blob()).then(s=>URL.createObjectURL(s)).then(s=>new Promise(c=>{const d=new Image;d.width=this.iconDisplaySize,d.height=this.iconDisplaySize,d.onload=()=>c(d),d.onerror=()=>c(null),d.src=s}))}render(){return this.location&&be(qn,{role:"listitem",onClick:()=>this.locationClickedHandler(this.location)},this.iconURLToRender?this.renderIcon():null,be("div",{class:"details"},be("p",{class:"details-title"},this.location.properties.name),be("mi-location-info",{ref:r=>this.infoElement=r,showExternalId:this.showExternalId})),this.location.properties.geodesicDistance&&this.renderDistance())}renderIcon(){const r=xm(this.iconURLToRender,this.iconDisplaySize);return be("div",{class:"img-container"},be("img",Object.assign({},this.iconAttributes,{ref:s=>this.imageElement=s,src:r})))}renderDistance(){return be("div",{class:"distance"},be("mi-distance",{meters:this.location.properties.geodesicDistance,unit:this.unit}))}static get watchers(){return{icon:["iconChanged"],iconBadge:["iconBadgeChanged"],iconBadgeValue:["iconBadgeValueChanged"]}}};Ev.style=IC;const DC=Object.freeze(Object.defineProperty({__proto__:null,mi_list_item_location:Ev},Symbol.toStringTag,{value:"Module"})),TC="html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}:host{display:block;height:100%;width:100%}.container{height:100%;display:flex}.container .scroll-container{width:100%;overflow-y:auto}",Cv=class{constructor(r){Hi(this,r),this.scrollButtonsEnabled=!1,this.scrollLength=100}componentDidLoad(){this.addIntersectionObserver(),this.scrollButtonsEnabled&&this.setScrollContainerElementRef()}updateScrollButtonsState(){this.scrollButtonsEnabled&&this.miScrollButtonsElement.scrollContainerElementRef&&this.miScrollButtonsElement.updateScrollButtonsState()}setScrollContainerElementRef(){this.miScrollButtonsElement.scrollContainerElementRef=this.scrollContainerElement}addIntersectionObserver(){this.intersectionObserver=new IntersectionObserver(r=>{r[0].intersectionRatio<=0||(this.scrollContainerElement.scrollHeight-this.scrollContainerElement.scrollTop===this.scrollContainerElement.clientHeight&&this.updateScrollButtonsState(),this.intersectionObserver.disconnect())}),this.intersectionObserver.observe(this.scrollContainerElement)}render(){return be("div",{class:"container"},be("div",{role:"list",class:"scroll-container",ref:r=>this.scrollContainerElement=r},be("slot",null)),this.scrollButtonsEnabled?be("mi-scroll-buttons",{scrollLength:this.scrollLength,ref:r=>this.miScrollButtonsElement=r}):null)}};Cv.style=TC;const AC=Object.freeze(Object.defineProperty({__proto__:null,mi_list:Cv},Symbol.toStringTag,{value:"Module"}));function zr(r){if(r===null||r===!0||r===!1)return NaN;var s=Number(r);return isNaN(s)?s:s<0?Math.ceil(s):Math.floor(s)}function Kn(r,s){if(s.length<r)throw new TypeError(r+" argument"+(r>1?"s":"")+" required, but only "+s.length+" present")}function td(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?td=function(c){return typeof c}:td=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},td(r)}function lr(r){Kn(1,arguments);var s=Object.prototype.toString.call(r);return r instanceof Date||td(r)==="object"&&s==="[object Date]"?new Date(r.getTime()):typeof r=="number"||s==="[object Number]"?new Date(r):((typeof r=="string"||s==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Sv(r,s){Kn(2,arguments);var c=lr(r).getTime(),d=zr(s);return new Date(c+d)}var NC=6e4;function zv(r,s){Kn(2,arguments);var c=zr(s);return Sv(r,c*NC)}function jv(r,s){Kn(2,arguments);var c=lr(r),d=zr(s);return isNaN(d)?new Date(NaN):(d&&c.setDate(c.getDate()+d),c)}var EC={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},CC=function(s,c,d){var m,w=EC[s];return typeof w=="string"?m=w:c===1?m=w.one:m=w.other.replace("{{count}}",c.toString()),d!=null&&d.addSuffix?d.comparison&&d.comparison>0?"in "+m:m+" ago":m};function bm(r){return function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=s.width?String(s.width):r.defaultWidth,d=r.formats[c]||r.formats[r.defaultWidth];return d}}var SC={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zC={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jC={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},OC={date:bm({formats:SC,defaultWidth:"full"}),time:bm({formats:zC,defaultWidth:"full"}),dateTime:bm({formats:jC,defaultWidth:"full"})},LC={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},kC=function(s,c,d,m){return LC[s]};function Fc(r){return function(s,c){var d=c!=null&&c.context?String(c.context):"standalone",m;if(d==="formatting"&&r.formattingValues){var w=r.defaultFormattingWidth||r.defaultWidth,v=c!=null&&c.width?String(c.width):w;m=r.formattingValues[v]||r.formattingValues[w]}else{var o=r.defaultWidth,y=c!=null&&c.width?String(c.width):r.defaultWidth;m=r.values[y]||r.values[o]}var T=r.argumentCallback?r.argumentCallback(s):s;return m[T]}}var PC={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},RC={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},UC={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},BC={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},FC={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},VC={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},QC=function(s,c){var d=Number(s),m=d%100;if(m>20||m<10)switch(m%10){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd"}return d+"th"},YC={ordinalNumber:QC,era:Fc({values:PC,defaultWidth:"wide"}),quarter:Fc({values:RC,defaultWidth:"wide",argumentCallback:function(s){return s-1}}),month:Fc({values:UC,defaultWidth:"wide"}),day:Fc({values:BC,defaultWidth:"wide"}),dayPeriod:Fc({values:FC,defaultWidth:"wide",formattingValues:VC,defaultFormattingWidth:"wide"})};function Vc(r){return function(s){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=c.width,m=d&&r.matchPatterns[d]||r.matchPatterns[r.defaultMatchWidth],w=s.match(m);if(!w)return null;var v=w[0],o=d&&r.parsePatterns[d]||r.parsePatterns[r.defaultParseWidth],y=Array.isArray(o)?ZC(o,function(C){return C.test(v)}):$C(o,function(C){return C.test(v)}),T;T=r.valueCallback?r.valueCallback(y):y,T=c.valueCallback?c.valueCallback(T):T;var z=s.slice(v.length);return{value:T,rest:z}}}function $C(r,s){for(var c in r)if(r.hasOwnProperty(c)&&s(r[c]))return c}function ZC(r,s){for(var c=0;c<r.length;c++)if(s(r[c]))return c}function GC(r){return function(s){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=s.match(r.matchPattern);if(!d)return null;var m=d[0],w=s.match(r.parsePattern);if(!w)return null;var v=r.valueCallback?r.valueCallback(w[0]):w[0];v=c.valueCallback?c.valueCallback(v):v;var o=s.slice(m.length);return{value:v,rest:o}}}var HC=/^(\d+)(th|st|nd|rd)?/i,WC=/\d+/i,qC={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},XC={any:[/^b/i,/^(a|c)/i]},KC={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},JC={any:[/1/i,/2/i,/3/i,/4/i]},eS={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},tS={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},iS={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},nS={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},rS={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},oS={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},sS={ordinalNumber:GC({matchPattern:HC,parsePattern:WC,valueCallback:function(s){return parseInt(s,10)}}),era:Vc({matchPatterns:qC,defaultMatchWidth:"wide",parsePatterns:XC,defaultParseWidth:"any"}),quarter:Vc({matchPatterns:KC,defaultMatchWidth:"wide",parsePatterns:JC,defaultParseWidth:"any",valueCallback:function(s){return s+1}}),month:Vc({matchPatterns:eS,defaultMatchWidth:"wide",parsePatterns:tS,defaultParseWidth:"any"}),day:Vc({matchPatterns:iS,defaultMatchWidth:"wide",parsePatterns:nS,defaultParseWidth:"any"}),dayPeriod:Vc({matchPatterns:rS,defaultMatchWidth:"any",parsePatterns:oS,defaultParseWidth:"any"})},aS={code:"en-US",formatDistance:CC,formatLong:OC,formatRelative:kC,localize:YC,match:sS,options:{weekStartsOn:0,firstWeekContainsDate:1}};function lS(r,s){Kn(2,arguments);var c=zr(s);return Sv(r,-c)}function cS(r,s){if(r==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(r[c]=s[c]);return r}var Ov=function(s,c){switch(s){case"P":return c.date({width:"short"});case"PP":return c.date({width:"medium"});case"PPP":return c.date({width:"long"});case"PPPP":default:return c.date({width:"full"})}},Lv=function(s,c){switch(s){case"p":return c.time({width:"short"});case"pp":return c.time({width:"medium"});case"ppp":return c.time({width:"long"});case"pppp":default:return c.time({width:"full"})}},uS=function(s,c){var d=s.match(/(P+)(p+)?/)||[],m=d[1],w=d[2];if(!w)return Ov(s,c);var v;switch(m){case"P":v=c.dateTime({width:"short"});break;case"PP":v=c.dateTime({width:"medium"});break;case"PPP":v=c.dateTime({width:"long"});break;case"PPPP":default:v=c.dateTime({width:"full"});break}return v.replace("{{date}}",Ov(m,c)).replace("{{time}}",Lv(w,c))},kv={p:Lv,P:uS};function hS(r){var s=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return s.setUTCFullYear(r.getFullYear()),r.getTime()-s.getTime()}var dS=["D","DD"],fS=["YY","YYYY"];function pS(r){return dS.indexOf(r)!==-1}function gS(r){return fS.indexOf(r)!==-1}function Pv(r,s,c){if(r==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(s,"`) for formatting years to the input `").concat(c,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(r==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(s,"`) for formatting years to the input `").concat(c,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(r==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(s,"`) for formatting days of the month to the input `").concat(c,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(r==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(s,"`) for formatting days of the month to the input `").concat(c,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}function id(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?id=function(c){return typeof c}:id=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},id(r)}function Rv(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&wm(r,s)}function wm(r,s){return wm=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},wm(r,s)}function Uv(r){var s=yS();return function(){var d=nd(r),m;if(s){var w=nd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return mS(this,m)}}function mS(r,s){return s&&(id(s)==="object"||typeof s=="function")?s:Im(r)}function Im(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function yS(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nd(r){return nd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},nd(r)}function Dm(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function Bv(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function Tm(r,s,c){return s&&Bv(r.prototype,s),c&&Bv(r,c),r}function Am(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var _S=10,Fv=function(){function r(){Dm(this,r),Am(this,"subPriority",0)}return Tm(r,[{key:"validate",value:function(c,d){return!0}}]),r}(),xS=function(r){Rv(c,r);var s=Uv(c);function c(d,m,w,v,o){var y;return Dm(this,c),y=s.call(this),y.value=d,y.validateValue=m,y.setValue=w,y.priority=v,o&&(y.subPriority=o),y}return Tm(c,[{key:"validate",value:function(m,w){return this.validateValue(m,this.value,w)}},{key:"set",value:function(m,w,v){return this.setValue(m,w,this.value,v)}}]),c}(Fv),vS=function(r){Rv(c,r);var s=Uv(c);function c(){var d;Dm(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),Am(Im(d),"priority",_S),Am(Im(d),"subPriority",-1),d}return Tm(c,[{key:"set",value:function(m,w){if(w.timestampIsSet)return m;var v=new Date(0);return v.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),v.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),v}}]),c}(Fv);function MS(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function Vv(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function bS(r,s,c){return s&&Vv(r.prototype,s),c&&Vv(r,c),r}var hn=function(){function r(){MS(this,r)}return bS(r,[{key:"run",value:function(c,d,m,w){var v=this.parse(c,d,m,w);return v?{setter:new xS(v.value,this.validate,this.set,this.priority,this.subPriority),rest:v.rest}:null}},{key:"validate",value:function(c,d,m){return!0}}]),r}();function rd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rd=function(c){return typeof c}:rd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},rd(r)}function wS(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function Qv(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function IS(r,s,c){return s&&Qv(r.prototype,s),c&&Qv(r,c),r}function DS(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&Nm(r,s)}function Nm(r,s){return Nm=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},Nm(r,s)}function TS(r){var s=NS();return function(){var d=od(r),m;if(s){var w=od(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return AS(this,m)}}function AS(r,s){return s&&(rd(s)==="object"||typeof s=="function")?s:Em(r)}function Em(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function NS(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function od(r){return od=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},od(r)}function Yv(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var ES=function(r){DS(c,r);var s=TS(c);function c(){var d;wS(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),Yv(Em(d),"priority",140),Yv(Em(d),"incompatibleTokens",["R","u","t","T"]),d}return IS(c,[{key:"parse",value:function(m,w,v){switch(w){case"G":case"GG":case"GGG":return v.era(m,{width:"abbreviated"})||v.era(m,{width:"narrow"});case"GGGGG":return v.era(m,{width:"narrow"});case"GGGG":default:return v.era(m,{width:"wide"})||v.era(m,{width:"abbreviated"})||v.era(m,{width:"narrow"})}}},{key:"set",value:function(m,w,v){return w.era=v,m.setUTCFullYear(v,0,1),m.setUTCHours(0,0,0,0),m}}]),c}(hn),CS=6e4,SS=36e5,zS=1e3,Zn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},No={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Gn(r,s){return r&&{value:s(r.value),rest:r.rest}}function kn(r,s){var c=s.match(r);return c?{value:parseInt(c[0],10),rest:s.slice(c[0].length)}:null}function Eo(r,s){var c=s.match(r);if(!c)return null;if(c[0]==="Z")return{value:0,rest:s.slice(1)};var d=c[1]==="+"?1:-1,m=c[2]?parseInt(c[2],10):0,w=c[3]?parseInt(c[3],10):0,v=c[5]?parseInt(c[5],10):0;return{value:d*(m*SS+w*CS+v*zS),rest:s.slice(c[0].length)}}function $v(r){return kn(Zn.anyDigitsSigned,r)}function Bn(r,s){switch(r){case 1:return kn(Zn.singleDigit,s);case 2:return kn(Zn.twoDigits,s);case 3:return kn(Zn.threeDigits,s);case 4:return kn(Zn.fourDigits,s);default:return kn(new RegExp("^\\d{1,"+r+"}"),s)}}function sd(r,s){switch(r){case 1:return kn(Zn.singleDigitSigned,s);case 2:return kn(Zn.twoDigitsSigned,s);case 3:return kn(Zn.threeDigitsSigned,s);case 4:return kn(Zn.fourDigitsSigned,s);default:return kn(new RegExp("^-?\\d{1,"+r+"}"),s)}}function Cm(r){switch(r){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Zv(r,s){var c=s>0,d=c?s:1-s,m;if(d<=50)m=r||100;else{var w=d+50,v=Math.floor(w/100)*100,o=r>=w%100;m=r+v-(o?100:0)}return c?m:1-m}function Gv(r){return r%400===0||r%4===0&&r%100!==0}function ad(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ad=function(c){return typeof c}:ad=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},ad(r)}function jS(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function Hv(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function OS(r,s,c){return s&&Hv(r.prototype,s),c&&Hv(r,c),r}function LS(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&Sm(r,s)}function Sm(r,s){return Sm=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},Sm(r,s)}function kS(r){var s=RS();return function(){var d=ld(r),m;if(s){var w=ld(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return PS(this,m)}}function PS(r,s){return s&&(ad(s)==="object"||typeof s=="function")?s:zm(r)}function zm(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function RS(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ld(r){return ld=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},ld(r)}function Wv(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var US=function(r){LS(c,r);var s=kS(c);function c(){var d;jS(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),Wv(zm(d),"priority",130),Wv(zm(d),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),d}return OS(c,[{key:"parse",value:function(m,w,v){var o=function(T){return{year:T,isTwoDigitYear:w==="yy"}};switch(w){case"y":return Gn(Bn(4,m),o);case"yo":return Gn(v.ordinalNumber(m,{unit:"year"}),o);default:return Gn(Bn(w.length,m),o)}}},{key:"validate",value:function(m,w){return w.isTwoDigitYear||w.year>0}},{key:"set",value:function(m,w,v){var o=m.getUTCFullYear();if(v.isTwoDigitYear){var y=Zv(v.year,o);return m.setUTCFullYear(y,0,1),m.setUTCHours(0,0,0,0),m}var T=!("era"in w)||w.era===1?v.year:1-v.year;return m.setUTCFullYear(T,0,1),m.setUTCHours(0,0,0,0),m}}]),c}(hn),BS={};function Qc(){return BS}function oa(r,s){var c,d,m,w,v,o,y,T;Kn(1,arguments);var z=Qc(),C=zr((c=(d=(m=(w=s==null?void 0:s.weekStartsOn)!==null&&w!==void 0?w:s==null||(v=s.locale)===null||v===void 0||(o=v.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&m!==void 0?m:z.weekStartsOn)!==null&&d!==void 0?d:(y=z.locale)===null||y===void 0||(T=y.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&c!==void 0?c:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var S=lr(r),U=S.getUTCDay(),R=(U<C?7:0)+U-C;return S.setUTCDate(S.getUTCDate()-R),S.setUTCHours(0,0,0,0),S}function qv(r,s){var c,d,m,w,v,o,y,T;Kn(1,arguments);var z=lr(r),C=z.getUTCFullYear(),S=Qc(),U=zr((c=(d=(m=(w=s==null?void 0:s.firstWeekContainsDate)!==null&&w!==void 0?w:s==null||(v=s.locale)===null||v===void 0||(o=v.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&m!==void 0?m:S.firstWeekContainsDate)!==null&&d!==void 0?d:(y=S.locale)===null||y===void 0||(T=y.options)===null||T===void 0?void 0:T.firstWeekContainsDate)!==null&&c!==void 0?c:1);if(!(U>=1&&U<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var R=new Date(0);R.setUTCFullYear(C+1,0,U),R.setUTCHours(0,0,0,0);var V=oa(R,s),W=new Date(0);W.setUTCFullYear(C,0,U),W.setUTCHours(0,0,0,0);var ye=oa(W,s);return z.getTime()>=V.getTime()?C+1:z.getTime()>=ye.getTime()?C:C-1}function cd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cd=function(c){return typeof c}:cd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},cd(r)}function FS(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function Xv(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function VS(r,s,c){return s&&Xv(r.prototype,s),c&&Xv(r,c),r}function QS(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&jm(r,s)}function jm(r,s){return jm=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},jm(r,s)}function YS(r){var s=ZS();return function(){var d=ud(r),m;if(s){var w=ud(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return $S(this,m)}}function $S(r,s){return s&&(cd(s)==="object"||typeof s=="function")?s:Om(r)}function Om(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function ZS(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ud(r){return ud=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},ud(r)}function Kv(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var GS=function(r){QS(c,r);var s=YS(c);function c(){var d;FS(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),Kv(Om(d),"priority",130),Kv(Om(d),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),d}return VS(c,[{key:"parse",value:function(m,w,v){var o=function(T){return{year:T,isTwoDigitYear:w==="YY"}};switch(w){case"Y":return Gn(Bn(4,m),o);case"Yo":return Gn(v.ordinalNumber(m,{unit:"year"}),o);default:return Gn(Bn(w.length,m),o)}}},{key:"validate",value:function(m,w){return w.isTwoDigitYear||w.year>0}},{key:"set",value:function(m,w,v,o){var y=qv(m,o);if(v.isTwoDigitYear){var T=Zv(v.year,y);return m.setUTCFullYear(T,0,o.firstWeekContainsDate),m.setUTCHours(0,0,0,0),oa(m,o)}var z=!("era"in w)||w.era===1?v.year:1-v.year;return m.setUTCFullYear(z,0,o.firstWeekContainsDate),m.setUTCHours(0,0,0,0),oa(m,o)}}]),c}(hn);function cl(r){Kn(1,arguments);var s=1,c=lr(r),d=c.getUTCDay(),m=(d<s?7:0)+d-s;return c.setUTCDate(c.getUTCDate()-m),c.setUTCHours(0,0,0,0),c}function hd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hd=function(c){return typeof c}:hd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},hd(r)}function HS(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function Jv(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function WS(r,s,c){return s&&Jv(r.prototype,s),c&&Jv(r,c),r}function qS(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&Lm(r,s)}function Lm(r,s){return Lm=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},Lm(r,s)}function XS(r){var s=JS();return function(){var d=dd(r),m;if(s){var w=dd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return KS(this,m)}}function KS(r,s){return s&&(hd(s)==="object"||typeof s=="function")?s:km(r)}function km(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function JS(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dd(r){return dd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},dd(r)}function eM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var e6=function(r){qS(c,r);var s=XS(c);function c(){var d;HS(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),eM(km(d),"priority",130),eM(km(d),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),d}return WS(c,[{key:"parse",value:function(m,w){return sd(w==="R"?4:w.length,m)}},{key:"set",value:function(m,w,v){var o=new Date(0);return o.setUTCFullYear(v,0,4),o.setUTCHours(0,0,0,0),cl(o)}}]),c}(hn);function fd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fd=function(c){return typeof c}:fd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},fd(r)}function t6(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function tM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function i6(r,s,c){return s&&tM(r.prototype,s),c&&tM(r,c),r}function n6(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&Pm(r,s)}function Pm(r,s){return Pm=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},Pm(r,s)}function r6(r){var s=s6();return function(){var d=pd(r),m;if(s){var w=pd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return o6(this,m)}}function o6(r,s){return s&&(fd(s)==="object"||typeof s=="function")?s:Rm(r)}function Rm(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function s6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pd(r){return pd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},pd(r)}function iM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var a6=function(r){n6(c,r);var s=r6(c);function c(){var d;t6(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),iM(Rm(d),"priority",130),iM(Rm(d),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),d}return i6(c,[{key:"parse",value:function(m,w){return sd(w==="u"?4:w.length,m)}},{key:"set",value:function(m,w,v){return m.setUTCFullYear(v,0,1),m.setUTCHours(0,0,0,0),m}}]),c}(hn);function gd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gd=function(c){return typeof c}:gd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},gd(r)}function l6(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function nM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function c6(r,s,c){return s&&nM(r.prototype,s),c&&nM(r,c),r}function u6(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&Um(r,s)}function Um(r,s){return Um=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},Um(r,s)}function h6(r){var s=f6();return function(){var d=md(r),m;if(s){var w=md(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return d6(this,m)}}function d6(r,s){return s&&(gd(s)==="object"||typeof s=="function")?s:Bm(r)}function Bm(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function f6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function md(r){return md=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},md(r)}function rM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var p6=function(r){u6(c,r);var s=h6(c);function c(){var d;l6(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),rM(Bm(d),"priority",120),rM(Bm(d),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),d}return c6(c,[{key:"parse",value:function(m,w,v){switch(w){case"Q":case"QQ":return Bn(w.length,m);case"Qo":return v.ordinalNumber(m,{unit:"quarter"});case"QQQ":return v.quarter(m,{width:"abbreviated",context:"formatting"})||v.quarter(m,{width:"narrow",context:"formatting"});case"QQQQQ":return v.quarter(m,{width:"narrow",context:"formatting"});case"QQQQ":default:return v.quarter(m,{width:"wide",context:"formatting"})||v.quarter(m,{width:"abbreviated",context:"formatting"})||v.quarter(m,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(m,w){return w>=1&&w<=4}},{key:"set",value:function(m,w,v){return m.setUTCMonth((v-1)*3,1),m.setUTCHours(0,0,0,0),m}}]),c}(hn);function yd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?yd=function(c){return typeof c}:yd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},yd(r)}function g6(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function oM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function m6(r,s,c){return s&&oM(r.prototype,s),c&&oM(r,c),r}function y6(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&Fm(r,s)}function Fm(r,s){return Fm=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},Fm(r,s)}function _6(r){var s=v6();return function(){var d=_d(r),m;if(s){var w=_d(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return x6(this,m)}}function x6(r,s){return s&&(yd(s)==="object"||typeof s=="function")?s:Vm(r)}function Vm(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function v6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _d(r){return _d=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},_d(r)}function sM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var M6=function(r){y6(c,r);var s=_6(c);function c(){var d;g6(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),sM(Vm(d),"priority",120),sM(Vm(d),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),d}return m6(c,[{key:"parse",value:function(m,w,v){switch(w){case"q":case"qq":return Bn(w.length,m);case"qo":return v.ordinalNumber(m,{unit:"quarter"});case"qqq":return v.quarter(m,{width:"abbreviated",context:"standalone"})||v.quarter(m,{width:"narrow",context:"standalone"});case"qqqqq":return v.quarter(m,{width:"narrow",context:"standalone"});case"qqqq":default:return v.quarter(m,{width:"wide",context:"standalone"})||v.quarter(m,{width:"abbreviated",context:"standalone"})||v.quarter(m,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(m,w){return w>=1&&w<=4}},{key:"set",value:function(m,w,v){return m.setUTCMonth((v-1)*3,1),m.setUTCHours(0,0,0,0),m}}]),c}(hn);function xd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xd=function(c){return typeof c}:xd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},xd(r)}function b6(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function aM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function w6(r,s,c){return s&&aM(r.prototype,s),c&&aM(r,c),r}function I6(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&Qm(r,s)}function Qm(r,s){return Qm=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},Qm(r,s)}function D6(r){var s=A6();return function(){var d=vd(r),m;if(s){var w=vd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return T6(this,m)}}function T6(r,s){return s&&(xd(s)==="object"||typeof s=="function")?s:Ym(r)}function Ym(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function A6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vd(r){return vd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},vd(r)}function lM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var N6=function(r){I6(c,r);var s=D6(c);function c(){var d;b6(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),lM(Ym(d),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),lM(Ym(d),"priority",110),d}return w6(c,[{key:"parse",value:function(m,w,v){var o=function(T){return T-1};switch(w){case"M":return Gn(kn(Zn.month,m),o);case"MM":return Gn(Bn(2,m),o);case"Mo":return Gn(v.ordinalNumber(m,{unit:"month"}),o);case"MMM":return v.month(m,{width:"abbreviated",context:"formatting"})||v.month(m,{width:"narrow",context:"formatting"});case"MMMMM":return v.month(m,{width:"narrow",context:"formatting"});case"MMMM":default:return v.month(m,{width:"wide",context:"formatting"})||v.month(m,{width:"abbreviated",context:"formatting"})||v.month(m,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(m,w){return w>=0&&w<=11}},{key:"set",value:function(m,w,v){return m.setUTCMonth(v,1),m.setUTCHours(0,0,0,0),m}}]),c}(hn);function Md(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Md=function(c){return typeof c}:Md=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Md(r)}function E6(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function cM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function C6(r,s,c){return s&&cM(r.prototype,s),c&&cM(r,c),r}function S6(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&$m(r,s)}function $m(r,s){return $m=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},$m(r,s)}function z6(r){var s=O6();return function(){var d=bd(r),m;if(s){var w=bd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return j6(this,m)}}function j6(r,s){return s&&(Md(s)==="object"||typeof s=="function")?s:Zm(r)}function Zm(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function O6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bd(r){return bd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},bd(r)}function uM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var L6=function(r){S6(c,r);var s=z6(c);function c(){var d;E6(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),uM(Zm(d),"priority",110),uM(Zm(d),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),d}return C6(c,[{key:"parse",value:function(m,w,v){var o=function(T){return T-1};switch(w){case"L":return Gn(kn(Zn.month,m),o);case"LL":return Gn(Bn(2,m),o);case"Lo":return Gn(v.ordinalNumber(m,{unit:"month"}),o);case"LLL":return v.month(m,{width:"abbreviated",context:"standalone"})||v.month(m,{width:"narrow",context:"standalone"});case"LLLLL":return v.month(m,{width:"narrow",context:"standalone"});case"LLLL":default:return v.month(m,{width:"wide",context:"standalone"})||v.month(m,{width:"abbreviated",context:"standalone"})||v.month(m,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(m,w){return w>=0&&w<=11}},{key:"set",value:function(m,w,v){return m.setUTCMonth(v,1),m.setUTCHours(0,0,0,0),m}}]),c}(hn);function k6(r,s){var c,d,m,w,v,o,y,T;Kn(1,arguments);var z=Qc(),C=zr((c=(d=(m=(w=s==null?void 0:s.firstWeekContainsDate)!==null&&w!==void 0?w:s==null||(v=s.locale)===null||v===void 0||(o=v.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&m!==void 0?m:z.firstWeekContainsDate)!==null&&d!==void 0?d:(y=z.locale)===null||y===void 0||(T=y.options)===null||T===void 0?void 0:T.firstWeekContainsDate)!==null&&c!==void 0?c:1),S=qv(r,s),U=new Date(0);U.setUTCFullYear(S,0,C),U.setUTCHours(0,0,0,0);var R=oa(U,s);return R}var P6=6048e5;function R6(r,s){Kn(1,arguments);var c=lr(r),d=oa(c,s).getTime()-k6(c,s).getTime();return Math.round(d/P6)+1}function U6(r,s,c){Kn(2,arguments);var d=lr(r),m=zr(s),w=R6(d,c)-m;return d.setUTCDate(d.getUTCDate()-w*7),d}function wd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wd=function(c){return typeof c}:wd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},wd(r)}function B6(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function hM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function F6(r,s,c){return s&&hM(r.prototype,s),c&&hM(r,c),r}function V6(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&Gm(r,s)}function Gm(r,s){return Gm=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},Gm(r,s)}function Q6(r){var s=$6();return function(){var d=Id(r),m;if(s){var w=Id(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return Y6(this,m)}}function Y6(r,s){return s&&(wd(s)==="object"||typeof s=="function")?s:Hm(r)}function Hm(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function $6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Id(r){return Id=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},Id(r)}function dM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var Z6=function(r){V6(c,r);var s=Q6(c);function c(){var d;B6(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),dM(Hm(d),"priority",100),dM(Hm(d),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),d}return F6(c,[{key:"parse",value:function(m,w,v){switch(w){case"w":return kn(Zn.week,m);case"wo":return v.ordinalNumber(m,{unit:"week"});default:return Bn(w.length,m)}}},{key:"validate",value:function(m,w){return w>=1&&w<=53}},{key:"set",value:function(m,w,v,o){return oa(U6(m,v,o),o)}}]),c}(hn);function G6(r){Kn(1,arguments);var s=lr(r),c=s.getUTCFullYear(),d=new Date(0);d.setUTCFullYear(c+1,0,4),d.setUTCHours(0,0,0,0);var m=cl(d),w=new Date(0);w.setUTCFullYear(c,0,4),w.setUTCHours(0,0,0,0);var v=cl(w);return s.getTime()>=m.getTime()?c+1:s.getTime()>=v.getTime()?c:c-1}function H6(r){Kn(1,arguments);var s=G6(r),c=new Date(0);c.setUTCFullYear(s,0,4),c.setUTCHours(0,0,0,0);var d=cl(c);return d}var W6=6048e5;function q6(r){Kn(1,arguments);var s=lr(r),c=cl(s).getTime()-H6(s).getTime();return Math.round(c/W6)+1}function X6(r,s){Kn(2,arguments);var c=lr(r),d=zr(s),m=q6(c)-d;return c.setUTCDate(c.getUTCDate()-m*7),c}function Dd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Dd=function(c){return typeof c}:Dd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Dd(r)}function K6(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function fM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function J6(r,s,c){return s&&fM(r.prototype,s),c&&fM(r,c),r}function ez(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&Wm(r,s)}function Wm(r,s){return Wm=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},Wm(r,s)}function tz(r){var s=nz();return function(){var d=Td(r),m;if(s){var w=Td(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return iz(this,m)}}function iz(r,s){return s&&(Dd(s)==="object"||typeof s=="function")?s:qm(r)}function qm(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function nz(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Td(r){return Td=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},Td(r)}function pM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var rz=function(r){ez(c,r);var s=tz(c);function c(){var d;K6(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),pM(qm(d),"priority",100),pM(qm(d),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),d}return J6(c,[{key:"parse",value:function(m,w,v){switch(w){case"I":return kn(Zn.week,m);case"Io":return v.ordinalNumber(m,{unit:"week"});default:return Bn(w.length,m)}}},{key:"validate",value:function(m,w){return w>=1&&w<=53}},{key:"set",value:function(m,w,v){return cl(X6(m,v))}}]),c}(hn);function Ad(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ad=function(c){return typeof c}:Ad=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Ad(r)}function oz(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function gM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function sz(r,s,c){return s&&gM(r.prototype,s),c&&gM(r,c),r}function az(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&Xm(r,s)}function Xm(r,s){return Xm=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},Xm(r,s)}function lz(r){var s=uz();return function(){var d=Ed(r),m;if(s){var w=Ed(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return cz(this,m)}}function cz(r,s){return s&&(Ad(s)==="object"||typeof s=="function")?s:Nd(r)}function Nd(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function uz(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ed(r){return Ed=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},Ed(r)}function Km(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var hz=[31,28,31,30,31,30,31,31,30,31,30,31],dz=[31,29,31,30,31,30,31,31,30,31,30,31],fz=function(r){az(c,r);var s=lz(c);function c(){var d;oz(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),Km(Nd(d),"priority",90),Km(Nd(d),"subPriority",1),Km(Nd(d),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),d}return sz(c,[{key:"parse",value:function(m,w,v){switch(w){case"d":return kn(Zn.date,m);case"do":return v.ordinalNumber(m,{unit:"date"});default:return Bn(w.length,m)}}},{key:"validate",value:function(m,w){var v=m.getUTCFullYear(),o=Gv(v),y=m.getUTCMonth();return o?w>=1&&w<=dz[y]:w>=1&&w<=hz[y]}},{key:"set",value:function(m,w,v){return m.setUTCDate(v),m.setUTCHours(0,0,0,0),m}}]),c}(hn);function Cd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cd=function(c){return typeof c}:Cd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Cd(r)}function pz(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function mM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function gz(r,s,c){return s&&mM(r.prototype,s),c&&mM(r,c),r}function mz(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&Jm(r,s)}function Jm(r,s){return Jm=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},Jm(r,s)}function yz(r){var s=xz();return function(){var d=zd(r),m;if(s){var w=zd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return _z(this,m)}}function _z(r,s){return s&&(Cd(s)==="object"||typeof s=="function")?s:Sd(r)}function Sd(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function xz(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zd(r){return zd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},zd(r)}function e0(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var vz=function(r){mz(c,r);var s=yz(c);function c(){var d;pz(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),e0(Sd(d),"priority",90),e0(Sd(d),"subpriority",1),e0(Sd(d),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),d}return gz(c,[{key:"parse",value:function(m,w,v){switch(w){case"D":case"DD":return kn(Zn.dayOfYear,m);case"Do":return v.ordinalNumber(m,{unit:"date"});default:return Bn(w.length,m)}}},{key:"validate",value:function(m,w){var v=m.getUTCFullYear(),o=Gv(v);return o?w>=1&&w<=366:w>=1&&w<=365}},{key:"set",value:function(m,w,v){return m.setUTCMonth(0,v),m.setUTCHours(0,0,0,0),m}}]),c}(hn);function t0(r,s,c){var d,m,w,v,o,y,T,z;Kn(2,arguments);var C=Qc(),S=zr((d=(m=(w=(v=c==null?void 0:c.weekStartsOn)!==null&&v!==void 0?v:c==null||(o=c.locale)===null||o===void 0||(y=o.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&w!==void 0?w:C.weekStartsOn)!==null&&m!==void 0?m:(T=C.locale)===null||T===void 0||(z=T.options)===null||z===void 0?void 0:z.weekStartsOn)!==null&&d!==void 0?d:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var U=lr(r),R=zr(s),V=U.getUTCDay(),W=R%7,ye=(W+7)%7,le=(ye<S?7:0)+R-V;return U.setUTCDate(U.getUTCDate()+le),U}function jd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?jd=function(c){return typeof c}:jd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},jd(r)}function Mz(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function yM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function bz(r,s,c){return s&&yM(r.prototype,s),c&&yM(r,c),r}function wz(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&i0(r,s)}function i0(r,s){return i0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},i0(r,s)}function Iz(r){var s=Tz();return function(){var d=Od(r),m;if(s){var w=Od(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return Dz(this,m)}}function Dz(r,s){return s&&(jd(s)==="object"||typeof s=="function")?s:n0(r)}function n0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Tz(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Od(r){return Od=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},Od(r)}function _M(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var Az=function(r){wz(c,r);var s=Iz(c);function c(){var d;Mz(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),_M(n0(d),"priority",90),_M(n0(d),"incompatibleTokens",["D","i","e","c","t","T"]),d}return bz(c,[{key:"parse",value:function(m,w,v){switch(w){case"E":case"EE":case"EEE":return v.day(m,{width:"abbreviated",context:"formatting"})||v.day(m,{width:"short",context:"formatting"})||v.day(m,{width:"narrow",context:"formatting"});case"EEEEE":return v.day(m,{width:"narrow",context:"formatting"});case"EEEEEE":return v.day(m,{width:"short",context:"formatting"})||v.day(m,{width:"narrow",context:"formatting"});case"EEEE":default:return v.day(m,{width:"wide",context:"formatting"})||v.day(m,{width:"abbreviated",context:"formatting"})||v.day(m,{width:"short",context:"formatting"})||v.day(m,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(m,w){return w>=0&&w<=6}},{key:"set",value:function(m,w,v,o){return m=t0(m,v,o),m.setUTCHours(0,0,0,0),m}}]),c}(hn);function Ld(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ld=function(c){return typeof c}:Ld=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Ld(r)}function Nz(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function xM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function Ez(r,s,c){return s&&xM(r.prototype,s),c&&xM(r,c),r}function Cz(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&r0(r,s)}function r0(r,s){return r0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},r0(r,s)}function Sz(r){var s=jz();return function(){var d=kd(r),m;if(s){var w=kd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return zz(this,m)}}function zz(r,s){return s&&(Ld(s)==="object"||typeof s=="function")?s:o0(r)}function o0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function jz(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kd(r){return kd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},kd(r)}function vM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var Oz=function(r){Cz(c,r);var s=Sz(c);function c(){var d;Nz(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),vM(o0(d),"priority",90),vM(o0(d),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),d}return Ez(c,[{key:"parse",value:function(m,w,v,o){var y=function(z){var C=Math.floor((z-1)/7)*7;return(z+o.weekStartsOn+6)%7+C};switch(w){case"e":case"ee":return Gn(Bn(w.length,m),y);case"eo":return Gn(v.ordinalNumber(m,{unit:"day"}),y);case"eee":return v.day(m,{width:"abbreviated",context:"formatting"})||v.day(m,{width:"short",context:"formatting"})||v.day(m,{width:"narrow",context:"formatting"});case"eeeee":return v.day(m,{width:"narrow",context:"formatting"});case"eeeeee":return v.day(m,{width:"short",context:"formatting"})||v.day(m,{width:"narrow",context:"formatting"});case"eeee":default:return v.day(m,{width:"wide",context:"formatting"})||v.day(m,{width:"abbreviated",context:"formatting"})||v.day(m,{width:"short",context:"formatting"})||v.day(m,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(m,w){return w>=0&&w<=6}},{key:"set",value:function(m,w,v,o){return m=t0(m,v,o),m.setUTCHours(0,0,0,0),m}}]),c}(hn);function Pd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pd=function(c){return typeof c}:Pd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Pd(r)}function Lz(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function MM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function kz(r,s,c){return s&&MM(r.prototype,s),c&&MM(r,c),r}function Pz(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&s0(r,s)}function s0(r,s){return s0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},s0(r,s)}function Rz(r){var s=Bz();return function(){var d=Rd(r),m;if(s){var w=Rd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return Uz(this,m)}}function Uz(r,s){return s&&(Pd(s)==="object"||typeof s=="function")?s:a0(r)}function a0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Bz(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Rd(r){return Rd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},Rd(r)}function bM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var Fz=function(r){Pz(c,r);var s=Rz(c);function c(){var d;Lz(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),bM(a0(d),"priority",90),bM(a0(d),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),d}return kz(c,[{key:"parse",value:function(m,w,v,o){var y=function(z){var C=Math.floor((z-1)/7)*7;return(z+o.weekStartsOn+6)%7+C};switch(w){case"c":case"cc":return Gn(Bn(w.length,m),y);case"co":return Gn(v.ordinalNumber(m,{unit:"day"}),y);case"ccc":return v.day(m,{width:"abbreviated",context:"standalone"})||v.day(m,{width:"short",context:"standalone"})||v.day(m,{width:"narrow",context:"standalone"});case"ccccc":return v.day(m,{width:"narrow",context:"standalone"});case"cccccc":return v.day(m,{width:"short",context:"standalone"})||v.day(m,{width:"narrow",context:"standalone"});case"cccc":default:return v.day(m,{width:"wide",context:"standalone"})||v.day(m,{width:"abbreviated",context:"standalone"})||v.day(m,{width:"short",context:"standalone"})||v.day(m,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(m,w){return w>=0&&w<=6}},{key:"set",value:function(m,w,v,o){return m=t0(m,v,o),m.setUTCHours(0,0,0,0),m}}]),c}(hn);function Vz(r,s){Kn(2,arguments);var c=zr(s);c%7===0&&(c=c-7);var d=1,m=lr(r),w=m.getUTCDay(),v=c%7,o=(v+7)%7,y=(o<d?7:0)+c-w;return m.setUTCDate(m.getUTCDate()+y),m}function Ud(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ud=function(c){return typeof c}:Ud=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Ud(r)}function Qz(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function wM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function Yz(r,s,c){return s&&wM(r.prototype,s),c&&wM(r,c),r}function $z(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&l0(r,s)}function l0(r,s){return l0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},l0(r,s)}function Zz(r){var s=Hz();return function(){var d=Bd(r),m;if(s){var w=Bd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return Gz(this,m)}}function Gz(r,s){return s&&(Ud(s)==="object"||typeof s=="function")?s:c0(r)}function c0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Hz(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bd(r){return Bd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},Bd(r)}function IM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var Wz=function(r){$z(c,r);var s=Zz(c);function c(){var d;Qz(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),IM(c0(d),"priority",90),IM(c0(d),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),d}return Yz(c,[{key:"parse",value:function(m,w,v){var o=function(T){return T===0?7:T};switch(w){case"i":case"ii":return Bn(w.length,m);case"io":return v.ordinalNumber(m,{unit:"day"});case"iii":return Gn(v.day(m,{width:"abbreviated",context:"formatting"})||v.day(m,{width:"short",context:"formatting"})||v.day(m,{width:"narrow",context:"formatting"}),o);case"iiiii":return Gn(v.day(m,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Gn(v.day(m,{width:"short",context:"formatting"})||v.day(m,{width:"narrow",context:"formatting"}),o);case"iiii":default:return Gn(v.day(m,{width:"wide",context:"formatting"})||v.day(m,{width:"abbreviated",context:"formatting"})||v.day(m,{width:"short",context:"formatting"})||v.day(m,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(m,w){return w>=1&&w<=7}},{key:"set",value:function(m,w,v){return m=Vz(m,v),m.setUTCHours(0,0,0,0),m}}]),c}(hn);function Fd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fd=function(c){return typeof c}:Fd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Fd(r)}function qz(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function DM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function Xz(r,s,c){return s&&DM(r.prototype,s),c&&DM(r,c),r}function Kz(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&u0(r,s)}function u0(r,s){return u0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},u0(r,s)}function Jz(r){var s=tj();return function(){var d=Vd(r),m;if(s){var w=Vd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return ej(this,m)}}function ej(r,s){return s&&(Fd(s)==="object"||typeof s=="function")?s:h0(r)}function h0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function tj(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vd(r){return Vd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},Vd(r)}function TM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var ij=function(r){Kz(c,r);var s=Jz(c);function c(){var d;qz(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),TM(h0(d),"priority",80),TM(h0(d),"incompatibleTokens",["b","B","H","k","t","T"]),d}return Xz(c,[{key:"parse",value:function(m,w,v){switch(w){case"a":case"aa":case"aaa":return v.dayPeriod(m,{width:"abbreviated",context:"formatting"})||v.dayPeriod(m,{width:"narrow",context:"formatting"});case"aaaaa":return v.dayPeriod(m,{width:"narrow",context:"formatting"});case"aaaa":default:return v.dayPeriod(m,{width:"wide",context:"formatting"})||v.dayPeriod(m,{width:"abbreviated",context:"formatting"})||v.dayPeriod(m,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(m,w,v){return m.setUTCHours(Cm(v),0,0,0),m}}]),c}(hn);function Qd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qd=function(c){return typeof c}:Qd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Qd(r)}function nj(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function AM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function rj(r,s,c){return s&&AM(r.prototype,s),c&&AM(r,c),r}function oj(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&d0(r,s)}function d0(r,s){return d0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},d0(r,s)}function sj(r){var s=lj();return function(){var d=Yd(r),m;if(s){var w=Yd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return aj(this,m)}}function aj(r,s){return s&&(Qd(s)==="object"||typeof s=="function")?s:f0(r)}function f0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function lj(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yd(r){return Yd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},Yd(r)}function NM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var cj=function(r){oj(c,r);var s=sj(c);function c(){var d;nj(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),NM(f0(d),"priority",80),NM(f0(d),"incompatibleTokens",["a","B","H","k","t","T"]),d}return rj(c,[{key:"parse",value:function(m,w,v){switch(w){case"b":case"bb":case"bbb":return v.dayPeriod(m,{width:"abbreviated",context:"formatting"})||v.dayPeriod(m,{width:"narrow",context:"formatting"});case"bbbbb":return v.dayPeriod(m,{width:"narrow",context:"formatting"});case"bbbb":default:return v.dayPeriod(m,{width:"wide",context:"formatting"})||v.dayPeriod(m,{width:"abbreviated",context:"formatting"})||v.dayPeriod(m,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(m,w,v){return m.setUTCHours(Cm(v),0,0,0),m}}]),c}(hn);function $d(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$d=function(c){return typeof c}:$d=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},$d(r)}function uj(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function EM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function hj(r,s,c){return s&&EM(r.prototype,s),c&&EM(r,c),r}function dj(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&p0(r,s)}function p0(r,s){return p0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},p0(r,s)}function fj(r){var s=gj();return function(){var d=Zd(r),m;if(s){var w=Zd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return pj(this,m)}}function pj(r,s){return s&&($d(s)==="object"||typeof s=="function")?s:g0(r)}function g0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function gj(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zd(r){return Zd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},Zd(r)}function CM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var mj=function(r){dj(c,r);var s=fj(c);function c(){var d;uj(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),CM(g0(d),"priority",80),CM(g0(d),"incompatibleTokens",["a","b","t","T"]),d}return hj(c,[{key:"parse",value:function(m,w,v){switch(w){case"B":case"BB":case"BBB":return v.dayPeriod(m,{width:"abbreviated",context:"formatting"})||v.dayPeriod(m,{width:"narrow",context:"formatting"});case"BBBBB":return v.dayPeriod(m,{width:"narrow",context:"formatting"});case"BBBB":default:return v.dayPeriod(m,{width:"wide",context:"formatting"})||v.dayPeriod(m,{width:"abbreviated",context:"formatting"})||v.dayPeriod(m,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(m,w,v){return m.setUTCHours(Cm(v),0,0,0),m}}]),c}(hn);function Gd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Gd=function(c){return typeof c}:Gd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Gd(r)}function yj(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function SM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function _j(r,s,c){return s&&SM(r.prototype,s),c&&SM(r,c),r}function xj(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&m0(r,s)}function m0(r,s){return m0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},m0(r,s)}function vj(r){var s=bj();return function(){var d=Hd(r),m;if(s){var w=Hd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return Mj(this,m)}}function Mj(r,s){return s&&(Gd(s)==="object"||typeof s=="function")?s:y0(r)}function y0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function bj(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hd(r){return Hd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},Hd(r)}function zM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var wj=function(r){xj(c,r);var s=vj(c);function c(){var d;yj(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),zM(y0(d),"priority",70),zM(y0(d),"incompatibleTokens",["H","K","k","t","T"]),d}return _j(c,[{key:"parse",value:function(m,w,v){switch(w){case"h":return kn(Zn.hour12h,m);case"ho":return v.ordinalNumber(m,{unit:"hour"});default:return Bn(w.length,m)}}},{key:"validate",value:function(m,w){return w>=1&&w<=12}},{key:"set",value:function(m,w,v){var o=m.getUTCHours()>=12;return o&&v<12?m.setUTCHours(v+12,0,0,0):!o&&v===12?m.setUTCHours(0,0,0,0):m.setUTCHours(v,0,0,0),m}}]),c}(hn);function Wd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wd=function(c){return typeof c}:Wd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Wd(r)}function Ij(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function jM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function Dj(r,s,c){return s&&jM(r.prototype,s),c&&jM(r,c),r}function Tj(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&_0(r,s)}function _0(r,s){return _0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},_0(r,s)}function Aj(r){var s=Ej();return function(){var d=qd(r),m;if(s){var w=qd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return Nj(this,m)}}function Nj(r,s){return s&&(Wd(s)==="object"||typeof s=="function")?s:x0(r)}function x0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Ej(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qd(r){return qd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},qd(r)}function OM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var Cj=function(r){Tj(c,r);var s=Aj(c);function c(){var d;Ij(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),OM(x0(d),"priority",70),OM(x0(d),"incompatibleTokens",["a","b","h","K","k","t","T"]),d}return Dj(c,[{key:"parse",value:function(m,w,v){switch(w){case"H":return kn(Zn.hour23h,m);case"Ho":return v.ordinalNumber(m,{unit:"hour"});default:return Bn(w.length,m)}}},{key:"validate",value:function(m,w){return w>=0&&w<=23}},{key:"set",value:function(m,w,v){return m.setUTCHours(v,0,0,0),m}}]),c}(hn);function Xd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Xd=function(c){return typeof c}:Xd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Xd(r)}function Sj(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function LM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function zj(r,s,c){return s&&LM(r.prototype,s),c&&LM(r,c),r}function jj(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&v0(r,s)}function v0(r,s){return v0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},v0(r,s)}function Oj(r){var s=kj();return function(){var d=Kd(r),m;if(s){var w=Kd(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return Lj(this,m)}}function Lj(r,s){return s&&(Xd(s)==="object"||typeof s=="function")?s:M0(r)}function M0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function kj(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kd(r){return Kd=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},Kd(r)}function kM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var Pj=function(r){jj(c,r);var s=Oj(c);function c(){var d;Sj(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),kM(M0(d),"priority",70),kM(M0(d),"incompatibleTokens",["h","H","k","t","T"]),d}return zj(c,[{key:"parse",value:function(m,w,v){switch(w){case"K":return kn(Zn.hour11h,m);case"Ko":return v.ordinalNumber(m,{unit:"hour"});default:return Bn(w.length,m)}}},{key:"validate",value:function(m,w){return w>=0&&w<=11}},{key:"set",value:function(m,w,v){var o=m.getUTCHours()>=12;return o&&v<12?m.setUTCHours(v+12,0,0,0):m.setUTCHours(v,0,0,0),m}}]),c}(hn);function Jd(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Jd=function(c){return typeof c}:Jd=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Jd(r)}function Rj(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function PM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function Uj(r,s,c){return s&&PM(r.prototype,s),c&&PM(r,c),r}function Bj(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&b0(r,s)}function b0(r,s){return b0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},b0(r,s)}function Fj(r){var s=Qj();return function(){var d=ef(r),m;if(s){var w=ef(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return Vj(this,m)}}function Vj(r,s){return s&&(Jd(s)==="object"||typeof s=="function")?s:w0(r)}function w0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Qj(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ef(r){return ef=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},ef(r)}function RM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var Yj=function(r){Bj(c,r);var s=Fj(c);function c(){var d;Rj(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),RM(w0(d),"priority",70),RM(w0(d),"incompatibleTokens",["a","b","h","H","K","t","T"]),d}return Uj(c,[{key:"parse",value:function(m,w,v){switch(w){case"k":return kn(Zn.hour24h,m);case"ko":return v.ordinalNumber(m,{unit:"hour"});default:return Bn(w.length,m)}}},{key:"validate",value:function(m,w){return w>=1&&w<=24}},{key:"set",value:function(m,w,v){var o=v<=24?v%24:v;return m.setUTCHours(o,0,0,0),m}}]),c}(hn);function tf(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?tf=function(c){return typeof c}:tf=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},tf(r)}function $j(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function UM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function Zj(r,s,c){return s&&UM(r.prototype,s),c&&UM(r,c),r}function Gj(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&I0(r,s)}function I0(r,s){return I0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},I0(r,s)}function Hj(r){var s=qj();return function(){var d=nf(r),m;if(s){var w=nf(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return Wj(this,m)}}function Wj(r,s){return s&&(tf(s)==="object"||typeof s=="function")?s:D0(r)}function D0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function qj(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nf(r){return nf=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},nf(r)}function BM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var Xj=function(r){Gj(c,r);var s=Hj(c);function c(){var d;$j(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),BM(D0(d),"priority",60),BM(D0(d),"incompatibleTokens",["t","T"]),d}return Zj(c,[{key:"parse",value:function(m,w,v){switch(w){case"m":return kn(Zn.minute,m);case"mo":return v.ordinalNumber(m,{unit:"minute"});default:return Bn(w.length,m)}}},{key:"validate",value:function(m,w){return w>=0&&w<=59}},{key:"set",value:function(m,w,v){return m.setUTCMinutes(v,0,0),m}}]),c}(hn);function rf(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rf=function(c){return typeof c}:rf=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},rf(r)}function Kj(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function FM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function Jj(r,s,c){return s&&FM(r.prototype,s),c&&FM(r,c),r}function eO(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&T0(r,s)}function T0(r,s){return T0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},T0(r,s)}function tO(r){var s=nO();return function(){var d=of(r),m;if(s){var w=of(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return iO(this,m)}}function iO(r,s){return s&&(rf(s)==="object"||typeof s=="function")?s:A0(r)}function A0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function nO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function of(r){return of=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},of(r)}function VM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var rO=function(r){eO(c,r);var s=tO(c);function c(){var d;Kj(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),VM(A0(d),"priority",50),VM(A0(d),"incompatibleTokens",["t","T"]),d}return Jj(c,[{key:"parse",value:function(m,w,v){switch(w){case"s":return kn(Zn.second,m);case"so":return v.ordinalNumber(m,{unit:"second"});default:return Bn(w.length,m)}}},{key:"validate",value:function(m,w){return w>=0&&w<=59}},{key:"set",value:function(m,w,v){return m.setUTCSeconds(v,0),m}}]),c}(hn);function sf(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?sf=function(c){return typeof c}:sf=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},sf(r)}function oO(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function QM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function sO(r,s,c){return s&&QM(r.prototype,s),c&&QM(r,c),r}function aO(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&N0(r,s)}function N0(r,s){return N0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},N0(r,s)}function lO(r){var s=uO();return function(){var d=af(r),m;if(s){var w=af(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return cO(this,m)}}function cO(r,s){return s&&(sf(s)==="object"||typeof s=="function")?s:E0(r)}function E0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function uO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function af(r){return af=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},af(r)}function YM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var hO=function(r){aO(c,r);var s=lO(c);function c(){var d;oO(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),YM(E0(d),"priority",30),YM(E0(d),"incompatibleTokens",["t","T"]),d}return sO(c,[{key:"parse",value:function(m,w){var v=function(y){return Math.floor(y*Math.pow(10,-w.length+3))};return Gn(Bn(w.length,m),v)}},{key:"set",value:function(m,w,v){return m.setUTCMilliseconds(v),m}}]),c}(hn);function lf(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?lf=function(c){return typeof c}:lf=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},lf(r)}function dO(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function $M(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function fO(r,s,c){return s&&$M(r.prototype,s),c&&$M(r,c),r}function pO(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&C0(r,s)}function C0(r,s){return C0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},C0(r,s)}function gO(r){var s=yO();return function(){var d=cf(r),m;if(s){var w=cf(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return mO(this,m)}}function mO(r,s){return s&&(lf(s)==="object"||typeof s=="function")?s:S0(r)}function S0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function yO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cf(r){return cf=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},cf(r)}function ZM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var _O=function(r){pO(c,r);var s=gO(c);function c(){var d;dO(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),ZM(S0(d),"priority",10),ZM(S0(d),"incompatibleTokens",["t","T","x"]),d}return fO(c,[{key:"parse",value:function(m,w){switch(w){case"X":return Eo(No.basicOptionalMinutes,m);case"XX":return Eo(No.basic,m);case"XXXX":return Eo(No.basicOptionalSeconds,m);case"XXXXX":return Eo(No.extendedOptionalSeconds,m);case"XXX":default:return Eo(No.extended,m)}}},{key:"set",value:function(m,w,v){return w.timestampIsSet?m:new Date(m.getTime()-v)}}]),c}(hn);function uf(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?uf=function(c){return typeof c}:uf=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},uf(r)}function xO(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function GM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function vO(r,s,c){return s&&GM(r.prototype,s),c&&GM(r,c),r}function MO(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&z0(r,s)}function z0(r,s){return z0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},z0(r,s)}function bO(r){var s=IO();return function(){var d=hf(r),m;if(s){var w=hf(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return wO(this,m)}}function wO(r,s){return s&&(uf(s)==="object"||typeof s=="function")?s:j0(r)}function j0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function IO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hf(r){return hf=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},hf(r)}function HM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var DO=function(r){MO(c,r);var s=bO(c);function c(){var d;xO(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),HM(j0(d),"priority",10),HM(j0(d),"incompatibleTokens",["t","T","X"]),d}return vO(c,[{key:"parse",value:function(m,w){switch(w){case"x":return Eo(No.basicOptionalMinutes,m);case"xx":return Eo(No.basic,m);case"xxxx":return Eo(No.basicOptionalSeconds,m);case"xxxxx":return Eo(No.extendedOptionalSeconds,m);case"xxx":default:return Eo(No.extended,m)}}},{key:"set",value:function(m,w,v){return w.timestampIsSet?m:new Date(m.getTime()-v)}}]),c}(hn);function df(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?df=function(c){return typeof c}:df=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},df(r)}function TO(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function WM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function AO(r,s,c){return s&&WM(r.prototype,s),c&&WM(r,c),r}function NO(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&O0(r,s)}function O0(r,s){return O0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},O0(r,s)}function EO(r){var s=SO();return function(){var d=ff(r),m;if(s){var w=ff(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return CO(this,m)}}function CO(r,s){return s&&(df(s)==="object"||typeof s=="function")?s:L0(r)}function L0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function SO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ff(r){return ff=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},ff(r)}function qM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var zO=function(r){NO(c,r);var s=EO(c);function c(){var d;TO(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),qM(L0(d),"priority",40),qM(L0(d),"incompatibleTokens","*"),d}return AO(c,[{key:"parse",value:function(m){return $v(m)}},{key:"set",value:function(m,w,v){return[new Date(v*1e3),{timestampIsSet:!0}]}}]),c}(hn);function pf(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pf=function(c){return typeof c}:pf=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},pf(r)}function jO(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function XM(r,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}function OO(r,s,c){return s&&XM(r.prototype,s),c&&XM(r,c),r}function LO(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),s&&k0(r,s)}function k0(r,s){return k0=Object.setPrototypeOf||function(d,m){return d.__proto__=m,d},k0(r,s)}function kO(r){var s=RO();return function(){var d=gf(r),m;if(s){var w=gf(this).constructor;m=Reflect.construct(d,arguments,w)}else m=d.apply(this,arguments);return PO(this,m)}}function PO(r,s){return s&&(pf(s)==="object"||typeof s=="function")?s:P0(r)}function P0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function RO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gf(r){return gf=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},gf(r)}function KM(r,s,c){return s in r?Object.defineProperty(r,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[s]=c,r}var UO=function(r){LO(c,r);var s=kO(c);function c(){var d;jO(this,c);for(var m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];return d=s.call.apply(s,[this].concat(w)),KM(P0(d),"priority",20),KM(P0(d),"incompatibleTokens","*"),d}return OO(c,[{key:"parse",value:function(m){return $v(m)}},{key:"set",value:function(m,w,v){return[new Date(v),{timestampIsSet:!0}]}}]),c}(hn),BO={G:new ES,y:new US,Y:new GS,R:new e6,u:new a6,Q:new p6,q:new M6,M:new N6,L:new L6,w:new Z6,I:new rz,d:new fz,D:new vz,E:new Az,e:new Oz,c:new Fz,i:new Wz,a:new ij,b:new cj,B:new mj,h:new wj,H:new Cj,K:new Pj,k:new Yj,m:new Xj,s:new rO,S:new hO,X:new _O,x:new DO,t:new zO,T:new UO};function mf(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mf=function(c){return typeof c}:mf=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},mf(r)}function JM(r,s){var c;if(typeof Symbol>"u"||r[Symbol.iterator]==null){if(Array.isArray(r)||(c=FO(r))||s&&r&&typeof r.length=="number"){c&&(r=c);var d=0,m=function(){};return{s:m,n:function(){return d>=r.length?{done:!0}:{done:!1,value:r[d++]}},e:function(T){throw T},f:m}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1386
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var w=!0,v=!1,o;return{s:function(){c=r[Symbol.iterator]()},n:function(){var T=c.next();return w=T.done,T},e:function(T){v=!0,o=T},f:function(){try{!w&&c.return!=null&&c.return()}finally{if(v)throw o}}}}function FO(r,s){if(r){if(typeof r=="string")return eb(r,s);var c=Object.prototype.toString.call(r).slice(8,-1);if(c==="Object"&&r.constructor&&(c=r.constructor.name),c==="Map"||c==="Set")return Array.from(r);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return eb(r,s)}}function eb(r,s){(s==null||s>r.length)&&(s=r.length);for(var c=0,d=new Array(s);c<s;c++)d[c]=r[c];return d}var VO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,QO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YO=/^'([^]*?)'?$/,$O=/''/g,ZO=/\S/,GO=/[a-zA-Z]/;function HO(r,s,c,d){var m,w,v,o,y,T,z,C,S,U,R,V,W,ye,le,he,xe,X;Kn(3,arguments);var Ee=String(r),Pe=String(s),Ve=Qc(),Ne=(m=(w=d==null?void 0:d.locale)!==null&&w!==void 0?w:Ve.locale)!==null&&m!==void 0?m:aS;if(!Ne.match)throw new RangeError("locale must contain match property");var Ze=zr((v=(o=(y=(T=d==null?void 0:d.firstWeekContainsDate)!==null&&T!==void 0?T:d==null||(z=d.locale)===null||z===void 0||(C=z.options)===null||C===void 0?void 0:C.firstWeekContainsDate)!==null&&y!==void 0?y:Ve.firstWeekContainsDate)!==null&&o!==void 0?o:(S=Ve.locale)===null||S===void 0||(U=S.options)===null||U===void 0?void 0:U.firstWeekContainsDate)!==null&&v!==void 0?v:1);if(!(Ze>=1&&Ze<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var tt=zr((R=(V=(W=(ye=d==null?void 0:d.weekStartsOn)!==null&&ye!==void 0?ye:d==null||(le=d.locale)===null||le===void 0||(he=le.options)===null||he===void 0?void 0:he.weekStartsOn)!==null&&W!==void 0?W:Ve.weekStartsOn)!==null&&V!==void 0?V:(xe=Ve.locale)===null||xe===void 0||(X=xe.options)===null||X===void 0?void 0:X.weekStartsOn)!==null&&R!==void 0?R:0);if(!(tt>=0&&tt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(Pe==="")return Ee===""?lr(c):new Date(NaN);var nt={firstWeekContainsDate:Ze,weekStartsOn:tt,locale:Ne},at=[new vS],gt=Pe.match(QO).map(function(Te){var de=Te[0];if(de in kv){var Oe=kv[de];return Oe(Te,Ne.formatLong)}return Te}).join("").match(VO),Ae=[],Qe=JM(gt),Ke;try{var _t=function(){var de=Ke.value;!(d!=null&&d.useAdditionalWeekYearTokens)&&gS(de)&&Pv(de,Pe,r),!(d!=null&&d.useAdditionalDayOfYearTokens)&&pS(de)&&Pv(de,Pe,r);var Oe=de[0],qe=BO[Oe];if(qe){var Ce=qe.incompatibleTokens;if(Array.isArray(Ce)){var Be=Ae.find(function(Dt){return Ce.includes(Dt.token)||Dt.token===Oe});if(Be)throw new RangeError("The format string mustn't contain `".concat(Be.fullToken,"` and `").concat(de,"` at the same time"))}else if(qe.incompatibleTokens==="*"&&Ae.length>0)throw new RangeError("The format string mustn't contain `".concat(de,"` and any other token at the same time"));Ae.push({token:Oe,fullToken:de});var et=qe.run(Ee,de,Ne.match,nt);if(!et)return{v:new Date(NaN)};at.push(et.setter),Ee=et.rest}else{if(Oe.match(GO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Oe+"`");if(de==="''"?de="'":Oe==="'"&&(de=WO(de)),Ee.indexOf(de)===0)Ee=Ee.slice(de.length);else return{v:new Date(NaN)}}};for(Qe.s();!(Ke=Qe.n()).done;){var ut=_t();if(mf(ut)==="object")return ut.v}}catch(Te){Qe.e(Te)}finally{Qe.f()}if(Ee.length>0&&ZO.test(Ee))return new Date(NaN);var ee=at.map(function(Te){return Te.priority}).sort(function(Te,de){return de-Te}).filter(function(Te,de,Oe){return Oe.indexOf(Te)===de}).map(function(Te){return at.filter(function(de){return de.priority===Te}).sort(function(de,Oe){return Oe.subPriority-de.subPriority})}).map(function(Te){return Te[0]}),ie=lr(c);if(isNaN(ie.getTime()))return new Date(NaN);var G=lS(ie,hS(ie)),P={},Q=JM(ee),J;try{for(Q.s();!(J=Q.n()).done;){var K=J.value;if(!K.validate(G,nt))return new Date(NaN);var me=K.set(G,P,nt);Array.isArray(me)?(G=me[0],cS(P,me[1])):G=me}}catch(Te){Q.e(Te)}finally{Q.f()}return G}function WO(r){return r.match(YO)[1].replace($O,"'")}function qO(r,s,c){Kn(2,arguments);var d=lr(r==null?void 0:r.start).getTime(),m=lr(r==null?void 0:r.end).getTime(),w=lr(s==null?void 0:s.start).getTime(),v=lr(s==null?void 0:s.end).getTime();if(!(d<=m&&w<=v))throw new RangeError("Invalid interval");return c!=null&&c.inclusive?d<=v&&w<=m:d<v&&w<m}var R0;(function(r){r[r.min30=30]="min30",r[r.min60=60]="min60"})(R0||(R0={}));const XO='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}:host{display:block;box-sizing:border-box}ul{list-style:none;padding-left:0}li{font-size:1.25rem;margin-top:12px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center}.booking-icon{width:16px;height:16px;margin-right:4px;background-color:white}.booking-icon--blocked{background-color:rgba(0, 0, 0, 0.247);}',tb=class{constructor(r){Hi(this,r),this.bookingCompleted=Tn(this,"bookingCompleted",7),this.bookingFailed=Tn(this,"bookingFailed",7),this.cancelCompleted=Tn(this,"cancelCompleted",7),this.cancelFailed=Tn(this,"cancelFailed",7),this.isInternetExplorer=ed(),this.location=void 0,this.duration=R0.min30,this.translations={book:"Book",cancel:"Cancel",booked:"Booked"},this.show=4,this.startHour=8,this.stopHour=18,this.bookingTitle="Booked",this.timeSlots=[]}locationChanged(){this.updateBookings()}updateDuration(){this.location&&this.updateBookings()}updateBookings(){this.getBookingsToday().then(r=>{const s=new Date().getHours()>=this.stopHour?1:0,c=this.getTimeSlots(s);for(let d of c)d=this.assignBookingInfoToTimeslot(d,r);this.timeSlots=c}).catch(r=>{this.timeSlots=[],console.warn(r)})}getTimeSlots(r=0){const s=jv(new Date,r);r>0&&s.setHours(0,0,0,0);const c=Math.max(s.getHours(),this.startHour);let d;this.duration===60||s.getHours()<this.startHour?d=0:d=s.getMinutes()<30?0:30;const m=[];if(c<this.stopHour){const w=HO(`${c}:${d}`,"HH:mm",jv(new Date,r)),v=zv(w,this.duration);for(m.push({start:w,end:v});m[m.length-1].start.getHours()<this.stopHour;){const o=m[m.length-1],y=o.end,T=zv(y,this.duration);if(m.push({start:y,end:T,isRequesting:!1}),o.start.getHours()===23&&o.end.getHours()===0)break}}return m.pop(),m}getBookingsToday(){if(!this.location||this.location.properties.bookable!==!0)return Promise.reject("NOT BOOKABLE");const r=new Date;r.setHours(r.getHours(),0,0,0);const s=new Date;return s.setHours(23,59,59,999),mapsindoors.services.BookingService.getBookingsUsingQuery({location:this.location,startTime:r.toUTCString(),endTime:s.toUTCString()})}assignBookingInfoToTimeslot(r,s){r.available=!0;for(const c of s){const d={start:new Date(c.startTime),end:new Date(c.endTime)};qO(r,d)&&(r.available=!1,r.cancellable=c.managed,r.cancellable&&(r.bookingId=c.bookingId))}return r}formatTime(r){return r.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}).toLowerCase()}updateTimeslot(r,s){const c=[...this.timeSlots],d=this.timeSlots[r],m=Object.assign(Object.assign({},d),s);c[r]=m,this.timeSlots=c}performBooking(r,s){this.updateTimeslot(s,{isRequesting:!0});const c=new mapsindoors.services.BookingService.MPBooking({ownerId:void 0,locationId:this.location.id,title:this.bookingTitle,description:null,participants:[],startTime:r.start,endTime:r.end});mapsindoors.services.BookingService.performBooking(c).then(d=>{this.updateTimeslot(s,{available:!1,bookingId:d.bookingId,cancellable:!0}),this.bookingCompleted.emit(d)}).catch(d=>{this.bookingFailed.emit(d)}).finally(()=>this.updateTimeslot(s,{isRequesting:!1}))}cancelBooking(r,s){this.updateTimeslot(s,{isRequesting:!0});const c=new mapsindoors.services.BookingService.MPBooking({id:r.bookingId});mapsindoors.services.BookingService.cancelBooking(c).then(()=>{this.updateTimeslot(s,{available:!0,bookingId:null,cancellable:!1}),this.cancelCompleted.emit()}).catch(d=>{this.cancelFailed.emit(d)}).finally(()=>this.updateTimeslot(s,{isRequesting:!1}))}renderButton(r,s){return r.cancellable?be("button",{disabled:r.isRequesting,type:"button",onClick:()=>this.cancelBooking(r,s),class:"mi-button mi-button--small mi-button--delete"},!this.isInternetExplorer&&be("mi-icon",{class:"booking-icon booking-icon--cancel","icon-name":"circled-minus"}),this.translations.cancel):r.available?be("button",{disabled:r.isRequesting,type:"button",onClick:()=>this.performBooking(r,s),class:"mi-button mi-button--primary mi-button--small"},!this.isInternetExplorer&&be("mi-icon",{class:"booking-icon","icon-name":"circled-plus"}),this.translations.book):be("button",{disabled:!0,type:"button",class:"mi-button mi-button--small"},!this.isInternetExplorer&&be("mi-icon",{class:"booking-icon booking-icon--blocked","icon-name":"circled-blocked"}),this.translations.booked)}componentWillLoad(){this.updateBookings()}render(){return be(qn,null,be("ul",null,this.timeSlots.map((r,s)=>s>=this.show?null:be("li",null,this.formatTime(r.start)," - ",this.formatTime(r.end),this.renderButton(r,s)))))}static get watchers(){return{location:["locationChanged"],duration:["updateDuration"]}}};tb.style=XO;const KO=Object.freeze(Object.defineProperty({__proto__:null,mi_location_booking:tb},Symbol.toStringTag,{value:"Module"})),JO=":host{display:block;color:#1f2937;font-weight:400}",ib=class{constructor(r){Hi(this,r),this.location=void 0,this.showExternalId=!0}getInfoString(){const r=[];return this.location.properties.externalId&&this.showExternalId&&r.push(this.location.properties.externalId),this.location.properties.floorName&&r.push(`Level ${this.location.properties.floorName}`),this.location.properties.building&&(this.location.properties.venue?this.location.properties.venue.toLowerCase()!==this.location.properties.building.toLowerCase()&&r.push(this.location.properties.building):r.push(this.location.properties.building)),this.location.properties.venue&&r.push(this.location.properties.venue),this.location.properties.subtitle&&r.push(this.location.properties.subtitle),r.join(" · ")}render(){var r;return!((r=this.location)===null||r===void 0)&&r.properties?this.getInfoString():null}};ib.style=JO;const eL=Object.freeze(Object.defineProperty({__proto__:null,mi_location_info:ib},Symbol.toStringTag,{value:"Module"})),nb={miSDKUrl:"https://app.mapsindoors.com/mapsindoors/js/sdk/3.12.0/mapsindoors-3.12.0.js.gz",miSDKUrlV4:"https://app.mapsindoors.com/mapsindoors/js/sdk/4.13.0/mapsindoors-4.13.0.js.gz"};var tL=function r(s,c){if(s===c)return!0;if(s&&c&&typeof s=="object"&&typeof c=="object"){if(s.constructor!==c.constructor)return!1;var d,m,w;if(Array.isArray(s)){if(d=s.length,d!=c.length)return!1;for(m=d;m--!==0;)if(!r(s[m],c[m]))return!1;return!0}if(s.constructor===RegExp)return s.source===c.source&&s.flags===c.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===c.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===c.toString();if(w=Object.keys(s),d=w.length,d!==Object.keys(c).length)return!1;for(m=d;m--!==0;)if(!Object.prototype.hasOwnProperty.call(c,w[m]))return!1;for(m=d;m--!==0;){var v=w[m];if(!r(s[v],c[v]))return!1}return!0}return s!==s&&c!==c};const rb="__googleMapsScriptId";var ul;(function(r){r[r.INITIALIZED=0]="INITIALIZED",r[r.LOADING=1]="LOADING",r[r.SUCCESS=2]="SUCCESS",r[r.FAILURE=3]="FAILURE"})(ul||(ul={}));class sa{constructor({apiKey:s,authReferrerPolicy:c,channel:d,client:m,id:w=rb,language:v,libraries:o=[],mapIds:y,nonce:T,region:z,retries:C=3,url:S="https://maps.googleapis.com/maps/api/js",version:U}){if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=s,this.authReferrerPolicy=c,this.channel=d,this.client=m,this.id=w||rb,this.language=v,this.libraries=o,this.mapIds=y,this.nonce=T,this.region=z,this.retries=C,this.url=S,this.version=U,sa.instance){if(!tL(this.options,sa.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(sa.instance.options)}`);return sa.instance}sa.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?ul.FAILURE:this.done?ul.SUCCESS:this.loading?ul.LOADING:ul.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let s=this.url;return s+=`?callback=${this.CALLBACK}`,this.apiKey&&(s+=`&key=${this.apiKey}`),this.channel&&(s+=`&channel=${this.channel}`),this.client&&(s+=`&client=${this.client}`),this.libraries.length>0&&(s+=`&libraries=${this.libraries.join(",")}`),this.language&&(s+=`&language=${this.language}`),this.region&&(s+=`&region=${this.region}`),this.version&&(s+=`&v=${this.version}`),this.mapIds&&(s+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(s+=`&auth_referrer_policy=${this.authReferrerPolicy}`),s}deleteScript(){const s=document.getElementById(this.id);s&&s.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((s,c)=>{this.loadCallback(d=>{d?c(d.error):s(window.google)})})}loadCallback(s){this.callbacks.push(s),this.execute()}setScript(){if(document.getElementById(this.id)){this.callback();return}const s=this.createUrl(),c=document.createElement("script");c.id=this.id,c.type="text/javascript",c.src=s,c.onerror=this.loadErrorCallback.bind(this),c.defer=!0,c.async=!0,this.nonce&&(c.nonce=this.nonce),document.head.appendChild(c)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(s){if(this.errors.push(s),this.errors.length<=this.retries){const c=this.errors.length*Math.pow(2,this.errors.length);console.log(`Failed to load Google Maps script, retrying in ${c} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},c)}else this.onerrorEvent=s,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(s=>{s(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}}const iL=':host{display:block}:host>div{height:100%}.mapsindoors.floor-selector{margin:10px;position:absolute;border-radius:2px;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.3);width:40px;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";-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:18px}.mapsindoors.floor-selector a{position:relative;display:block;float:none;margin-top:-1px;text-align:center;cursor:pointer;border-radius:2px;background:#fff;z-index:0;height:40px;line-height:40px}.mapsindoors.floor-selector a:hover{background:#ddd;border-color:#999;z-index:2}.mapsindoors.floor-selector a.active{background:#ddd;border-color:#00b1ff;z-index:2}.mapsindoors.floor-selector a:not(:first-child):not(:last-child){border-radius:0}.mapsindoors.floor-selector a:first-child:not(:last-child){border-top-right-radius:2px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mapsindoors.floor-selector a:last-child:not(:first-child){border-top-right-radius:0;border-bottom-left-radius:2px;border-top-left-radius:0}.mapsindoors.position-control{margin:10px;position:absolute}.mapsindoors.position-control__button{border:none;margin:0;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;width:40px;height:40px;background-color:transparent;background-size:cover;outline:none;box-shadow:0px 4px 4px rgba(0, 0, 0, 0.16), 0px 2px 2px rgba(0, 0, 0, 0.18), 0px 1px 1px rgba(0, 0, 0, 0.2);border-radius:50%}.mapsindoors.position-control__button--unknown{background-image:url(data:image/png;base64,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)}.mapsindoors.position-control__button--requesting{background-image:url(data:image/png;base64,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)}.mapsindoors.position-control__button--known{background-image:url(data:image/png;base64,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)}.mapsindoors.position-control__button--centered{background-image:url(data:image/png;base64,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)}',ob=class{constructor(r){Hi(this,r),this.mapsIndoorsReady=Tn(this,"mapsIndoorsReady",7),this.directionsRendererInstance=null,this.gmApiKey="",this.miApiKey="",this.gmOptions={zoom:17,maxZoom:21,center:{lat:0,lng:0},mapTypeControl:!1,streetViewControl:!1},this.disableExternalLinks=!1,this.floorSelectorControlPosition=void 0,this.floorIndex=void 0,this.myPositionControlPosition=void 0,this.polygonHighlightOptions={strokeColor:"#EF6CCE",strokeOpacity:1,strokeWeight:2,fillColor:"#EF6CCE",fillOpacity:.2},this.language="en",this.polylineOptions={color:"#3071d9",opacity:1,weight:4}}apiKeyChange(r){mapsindoors.MapsIndoors.setMapsIndoorsApiKey(r)}gmOptionsChange(r){this.googleMapsInstance.setOptions(r)}setExternalLinkBehavior(r){r===!0?this.mapElement.addEventListener("click",this.preventExternalLink):this.mapElement.removeEventListener("click",this.preventExternalLink)}floorSelectorControlPositionChange(r,s){this.floorSelectorInstance&&this.setFloorSelectorControl(r,s)}floorIndexChange(r,s){r===null&&(r="0"),r!==s&&r!==this.mapsIndoorsInstance.getFloor()&&this.mapsIndoorsInstance.setFloor(r)}myPositionControlPositionChange(r,s){this.setMyPositionControl(r,s)}polylineOptionsChange(r){this.directionsRendererInstance&&this.directionsRendererInstance.setOptions({strokeColor:r.color?r.color:"#3071d9",strokeOpacity:r.opacity?r.opacity:1,strokeWeight:r.weight?r.weight:4})}async getMapInstance(){return Promise.resolve(this.googleMapsInstance)}async getMapsIndoorsInstance(){return Promise.resolve(this.mapsIndoorsInstance)}async getDirectionsServiceInstance(){return Promise.resolve(this.directionsServiceInstance)}async getDirectionsRendererInstance(){return Promise.resolve(this.directionsRendererInstance)}async highlightLocation(r){this.polygonHighlightOptions&&(this.highlightedLocationId&&this.highlightedLocationId===r.id||(this.highlightedLocationId&&this.mapsIndoorsInstance.setDisplayRule(this.highlightedLocationId,null),this.mapsIndoorsInstance.setDisplayRule(r.id,{polygonVisible:!0,polygonZoomFrom:"0",polygonZoomTo:"22",zIndex:1e3,polygonFillColor:this.polygonHighlightOptions.fillColor,polygonFillOpacity:this.polygonHighlightOptions.fillOpacity,polygonStrokeColor:this.polygonHighlightOptions.strokeColor,polygonStrokeOpacity:this.polygonHighlightOptions.strokeOpacity,polygonStrokeWeight:this.polygonHighlightOptions.strokeWeight}),this.highlightedLocationId=r.id))}async clearHighlightLocation(){this.highlightedLocationId&&(this.mapsIndoorsInstance.setDisplayRule(this.highlightedLocationId,null),this.highlightedLocationId=null)}async componentDidLoad(){await this.loadGoogleMapsApi(),await this.initializeMapsIndoorsSDK(),await this.setupMap(),this.setExternalLinkBehavior(this.disableExternalLinks),this.addEventListeners(),this.floorSelectorControlPosition&&this.showFloorSelector(),this.myPositionControlPosition&&this.setMyPositionControl(this.myPositionControlPosition)}disconnectedCallback(){this.mapsIndoorsInstance.deallocate(),this.mapElement.remove(),this.mapElement=null}loadGoogleMapsApi(){if(typeof google>"u")return new sa({apiKey:this.gmApiKey,version:"quarterly",libraries:["geometry","places"]}).load()}initializeMapsIndoorsSDK(){return new Promise(r=>{if(typeof mapsindoors<"u")return mapsindoors.MapsIndoors.setMapsIndoorsApiKey(this.miApiKey),mapsindoors.MapsIndoors.setLanguage(this.language),r();const s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src",`${nb.miSDKUrlV4}?apikey=${this.miApiKey}`),document.body.appendChild(s),s.onload=()=>r()})}setupMap(){return new Promise(r=>{const s=Object.assign({element:this.mapElement},this.gmOptions),c=new mapsindoors.mapView.GoogleMapsView(s);this.googleMapsInstance=c.getMap(),this.mapsIndoorsInstance=new mapsindoors.MapsIndoors({mapView:c}),this.mapsIndoorsInstance.on("ready",async()=>{this.floorIndex!==void 0?this.mapsIndoorsInstance.setFloor(this.floorIndex):this.floorIndex=this.mapsIndoorsInstance.getFloor(),this.initializeDirectionsService(),this.initializeDirectionsRenderer(),this.mapsIndoorsReady.emit(),r()})})}initializeDirectionsService(){const r=new mapsindoors.directions.GoogleMapsProvider;this.directionsServiceInstance=new mapsindoors.services.DirectionsService(r)}initializeDirectionsRenderer(){this.directionsRendererInstance=new mapsindoors.directions.DirectionsRenderer({mapsIndoors:this.mapsIndoorsInstance,fitBounds:!0,strokeColor:this.polylineOptions.color,strokeOpacity:this.polylineOptions.opacity,strokeWeight:this.polylineOptions.weight,visible:!0})}addEventListeners(){this.mapsIndoorsInstance.on("click",r=>{this.highlightLocation(r)}),this.mapsIndoorsInstance.on("floor_changed",r=>{this.floorIndex=r})}preventExternalLink(r){r.target.closest('a[target="_blank"]')&&r.preventDefault()}showFloorSelector(){this.setFloorSelectorControl(this.floorSelectorControlPosition)}removeGoogleMapControl(r,s){const d=this.googleMapsInstance.controls[google.maps.ControlPosition[r]].getArray().findIndex(m=>m.classList.contains(s));this.googleMapsInstance.controls[google.maps.ControlPosition[r]].removeAt(d)}setFloorSelectorControl(r,s=void 0){r===null?(this.removeGoogleMapControl(s,"floor-selector"),this.floorSelectorElement=null,this.floorSelectorInstance=null):this.floorSelectorInstance?(this.removeGoogleMapControl(s,"floor-selector"),this.googleMapsInstance.controls[google.maps.ControlPosition[r]].push(this.floorSelectorElement)):(this.floorSelectorElement=document.createElement("div"),this.floorSelectorInstance=new mapsindoors.FloorSelector(this.floorSelectorElement,this.mapsIndoorsInstance),this.googleMapsInstance.controls[google.maps.ControlPosition[r]].push(this.floorSelectorElement))}setMyPositionControl(r,s=void 0){r===null?(this.removeGoogleMapControl(google.maps.ControlPosition[s],"position-control"),this.positionControlElement=null,this.positionControlInstance=null):this.positionControlInstance?(this.removeGoogleMapControl(s,"position-control"),this.googleMapsInstance.controls[google.maps.ControlPosition[r]].push(this.positionControlElement)):(this.positionControlElement=document.createElement("div"),this.positionControlInstance=new mapsindoors.PositionControl(this.positionControlElement,{mapsIndoors:this.mapsIndoorsInstance,positionOptions:{enableHighAccuracy:!1,maximumAge:3e5,timeout:1e4}}),this.googleMapsInstance.controls[google.maps.ControlPosition[r]].push(this.positionControlElement))}render(){return be("div",{ref:r=>this.mapElement=r})}static get watchers(){return{miApiKey:["apiKeyChange"],gmOptions:["gmOptionsChange"],disableExternalLinks:["setExternalLinkBehavior"],floorSelectorControlPosition:["floorSelectorControlPositionChange"],floorIndex:["floorIndexChange"],myPositionControlPosition:["myPositionControlPositionChange"],polylineOptions:["polylineOptionsChange"]}}};ob.style=iL;const nL=Object.freeze(Object.defineProperty({__proto__:null,mi_map_googlemaps:ob},Symbol.toStringTag,{value:"Module"}));class rL{constructor(s,c){this.map=s,this.floorSelectorElement=document.createElement("div"),this.floorSelectorInstance=new mapsindoors.FloorSelector(this.floorSelectorElement,c)}onAdd(){return this.floorSelectorElement.classList.add("mapboxgl-ctrl"),this.floorSelectorElement}onRemove(){this.floorSelectorElement.parentNode.removeChild(this.floorSelectorElement),this.map=void 0}}class oL{constructor(s,c){this.map=s,this.myPositionControlElement=document.createElement("div"),this.myPositionControlInstance=new mapsindoors.PositionControl(this.myPositionControlElement,{mapsIndoors:c,positionOptions:{enableHighAccuracy:!1,maximumAge:3e5,timeout:1e4}})}onAdd(){return this.myPositionControlElement.classList.add("mapboxgl-ctrl"),this.myPositionControlElement}onRemove(){this.myPositionControlElement.parentNode.removeChild(this.myPositionControlElement),this.map=void 0}}const sL=':host{display:block}:host>div{height:100%}.mapsindoors.floor-selector{border-radius:2px;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.3);width:40px;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";-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:18px}.mapsindoors.floor-selector a{position:relative;display:block;float:none;margin-top:-1px;text-align:center;cursor:pointer;border-radius:2px;background:#fff;z-index:0;height:40px;line-height:40px}.mapsindoors.floor-selector a:hover{background:#ddd;border-color:#999;z-index:2}.mapsindoors.floor-selector a.active{background:#ddd;border-color:#00b1ff;z-index:2}.mapsindoors.floor-selector a:not(:first-child):not(:last-child){border-radius:0}.mapsindoors.floor-selector a:first-child:not(:last-child){border-top-right-radius:2px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mapsindoors.floor-selector a:last-child:not(:first-child){border-top-right-radius:0;border-bottom-left-radius:2px;border-top-left-radius:0}.mapsindoors.position-control__button{border:none;margin:0;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;width:40px;height:40px;background-color:transparent;background-size:cover;outline:none;box-shadow:0px 4px 4px rgba(0, 0, 0, 0.16), 0px 2px 2px rgba(0, 0, 0, 0.18), 0px 1px 1px rgba(0, 0, 0, 0.2);border-radius:50%}.mapsindoors.position-control__button--unknown{background-image:url(data:image/png;base64,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)}.mapsindoors.position-control__button--requesting{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABEZVhJZk1NACoAAAAIAAIBEgADAAAAAQAGAACHaQAEAAAAAQAAACYAAAAAAAKgAgAEAAAAAQAAAFCgAwAEAAAAAQAAAFAAAAAA4foYGgAAB7RJREFUeAHtnd9rFFcUx09CbaBqTFp3wag4YrSQYP3ZgulDJw+SUqg/aOtDQYhQ6GNt/wH1H6j6WCgoCH2wLTEIRfEh60MN1PqjtQk0RvaKMYXENNHWgvXher/zY529e2d2ZzJ3Zja7H7jZnc3sj/nuueeec+6d2RZKEc55h7gxRTNE2+bcGs6/DWn3BdGY5/a+aAXRbre0tCxQSrRQgngEe0+0A1QpUlQY2WIO4zZNQbUghDNFGxJtnifDGdEOUD0DaxPtWIKiqSiKNiiaQfUCz4ZwMkXRjlHW4fa3XeTZpSjaIGUN8aEM0UZ4/QB/bFAWEB/kC56t7lor+MyDlBbc9nUnef1zkhZBpDiQ2+Y/JNp2WhrcFu2giB8ZhSS0gI54IxRfEJwVmGj9YUUMJeASFs+FUUgRaxawAcRzYRRCxJoEbCDxXBjVKGKtAt6ipTNg1AoGlv5qhYlWqoIzzDeaeADHXDX9C7RAbgeaZ6ix+VJY4Sm/f/oK6Pg9dN0OamzQhXf4+cMgAREop1ZT+/qb78u2v/r8E0oRFGn7Vf9Q+kCn69Z3QTJeTO6TN/sNItmvnSXPMW5PSZRRISC3C48GNZExRDsqP1jmA9MMmJ/88x9NsimaffSYZuYWaHauPPzKvdFB7Stfo25jLa3vylv3UwAfaqM3NpQFHKSEw5axPxmNTTCamp4N9bz1XTnq2WJQ75sGJcwJIeBxd0MWsEgJWR8Eu1S4LizvKS2G9pXLac+uniSFXBACdrobJQG5PQ04RJp59uw5jd4Yo5t37lKc7HhrM/Xt7KW2tmWUAEjxCrjjFRBdd5A0Amsbvnytwr+5rFuTo+6NXbaPW7G8JAZEx3Nm5uZpsjhNU3+puzus8dCHZhL+8YIQ8CDuWAI6w/M8aQTinb94Vdlld27dItrmmg8crzH667jlO2USErE0mLgCau2+sKBzP16pEA8Hu3+gzxpho+D3peD1IKLm7owpgAtuHLifNAKfJx8knP7hj/ZGFg/gCzj88V4R2nSVPY7ufu3mGGnGxJ9W74YOEKbIAwYOeMB8OxYLaXt1Ge0beJd6pFH41u93fX1lTFhG1+r4P4M0MXpjvGwbVjNgvkNx09+33XptL5dGrpNGsJig4xXSWCyF9cldt5pvQnw4yR6KNl16Lrp5bnUH9e3q9R0cYInwp+d+uFJ6DM/HZ9AYI5oQ0CRN4MN76RWZg58AQfHhrJPajYvXC4r3IDRG9Jt3JkqPjU9oFdCADzRIA/j2ZR+0Z3evcl+Id/5ioabgGr4N++I5KnZu7S7bfiAsGnm2JrZBwA2kgQdSbovc1c/6YHl+wbWKoFEWfhABuRcUKTRhWaCWkj38mJdNUqjhAkuNktYFjbLIZrygwqMJnV24vNvkV3cq97smjdJhmCw+VD6+fk2+bHvmb31LpjGIxGKB8hyGTO519dvMPop+cBipzb7KIKK9fXnFe2iaYzGqzgvHhV/oEsb3yfiVwhDSJEViAi5VEhPQL+yQs4cwILhWvtf/zykp4AMZxTCQyD4FGYG3ez759ynl2ioPGHlx1OJqvka/CqFRuNDAgjYLzEtVlgfTM8r9MEkUFb/AHIVXL6tWaKsNMgjISAO51avKtu+JEVPFOhFgI/0KC57jF5ijau1l0yK+pCpYFnifNCBbVlBKtWd3T6i6IPbFRJIKVQqJKQJNWBZ4mzSgSqlu/DGh3Bdhx6F9Zk2WiH2CKjpyYB6UQsbAfXcQ0QKqIF5rQPqFikxeYW0Q0ezbZhUDMN/hnVzHl9G9oUukaGutLu8HrG9cqgBh7lgjhRbdE0rffvdTWcBrleHFiBj3fIVq3gXv9dmnH5BGOludZQqMNPG+KN17wQGOjMbvNS5d/aUiM/HzkzHBoJ0bxgyTJlSjLLrZ8OWffYPrMOA1Lheu0z1p5MV7al6tUMCfVu+GLlSjLMIau8tFL3bCR+I15Mq3u9xDM5bReSfWsS5G23LeoIl1zKgFzXeoXgvZiyqDSXB1QmdpYh0ksaQ3SESAkAOFV9QOUf7yLu1AKohsBiUsv5VcsPL9YoozAfHOCvGO4I5XQJPstYFaQaKPMMU78RMH8HnotgktLrJWJeCOvLwN4Uwiq/LhtzBnHMfyNoz0QfFhzGD03ehuyAIep4TXR1sLLEULu4oAWQ5G2RQWWB4RAp51N2QBtQ8mfsASkS/fE5NRj8XIrFrim7cm2FeJPHtdWkt8GUnn0FWcJ5KGFarI2HkiLmXLe4GqHniKNGYmdQyTxQMVAjqp3QlqIqPURFmRdpxkgZq4XPAOHF6aJxtWJ/BkQ985EecJza5sn+7K/P4ZOKnknCd7mhqX035d16XqKf9ObIgUT9tCzIyCCzvuqLZT1WlNZ1TGORGMGgdG9jFXpXnZk0oYxX3ZE5fmhXcqaV766SWMIlz6KfTSDucNcP0ALfPJKeFeI4ZRSCKtjcEbOSPUUghxcAyRxIsFbl/2s14vwHiUsgC3LwE6xOuHEZ7FK/vy5kVo40F8yOM8W0Kiu+Iz1U9hhNvdOm2LrD/hVIgDOCDaWZ4MEA3+2KQEiHQR2qjwlz9GgAl8/CCBQfHAyPkhAkr4xwgSFVDGERRVHpPsc/YMsgu47q0X5rlF+825TfXXG14AyVY46NplONUAAAAASUVORK5CYII=)}.mapsindoors.position-control__button--known{background-image:url(data:image/png;base64,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)}.mapsindoors.position-control__button--centered{background-image:url(data:image/png;base64,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)}',sb=class{constructor(r){Hi(this,r),this.mapsIndoorsReady=Tn(this,"mapsIndoorsReady",7),this.directionsRendererInstance=null,this.accessToken=void 0,this.miApiKey="",this.disableExternalLinks=!1,this.floorSelectorControlPosition=void 0,this.floorIndex=void 0,this.myPositionControlPosition=void 0,this.polygonHighlightOptions={strokeColor:"#EF6CCE",strokeOpacity:1,strokeWeight:2,fillColor:"#EF6CCE",fillOpacity:.2},this.polylineOptions={color:"#3071d9",opacity:1,weight:4},this.zoom="17",this.maxPitch=60,this.maxZoom=void 0,this.bearing="0",this.pitch="0",this.language="en"}apiKeyChange(r){mapsindoors.MapsIndoors.setMapsIndoorsApiKey(r)}setExternalLinkBehavior(r){r===!0?this.mapElement.addEventListener("click",this.preventExternalLink):this.mapElement.removeEventListener("click",this.preventExternalLink)}floorSelectorControlPositionChange(r){this.floorSelectorControl&&this.setFloorSelectorControl(r)}floorIndexChange(r,s){r===null&&(r="0"),r!==s&&r!==this.mapsIndoorsInstance.getFloor()&&this.mapsIndoorsInstance.setFloor(r)}myPositionControlPositionChange(r){this.setMyPositionControl(r)}polylineOptionsChange(r){this.directionsRendererInstance&&this.directionsRendererInstance.setOptions({strokeColor:r.color?r.color:"#3071d9",strokeOpacity:r.opacity?r.opacity:1,strokeWeight:r.weight?r.weight:4})}zoomChange(r,s){r!==s&&r!==this.mapboxInstance.getZoom()&&(r===null&&(r=0),this.mapboxInstance.setZoom(r))}maxPitchChange(r,s){r!==s&&r!==this.mapboxInstance.getMaxPitch()&&(r===null&&(r=0),this.mapboxInstance.setMaxPitch(r))}maxZoomChange(r,s){r!==s&&r!==this.mapboxInstance.getMaxZoom()&&(r===null&&(r=0),this.mapboxInstance.setMaxZoom(r))}bearingChange(r,s){r!==s&&r!==this.mapboxInstance.getBearing()&&(r===null&&(r=0),this.mapboxInstance.setBearing(r))}pitchChange(r,s){r!==s&&r!==this.mapboxInstance.getPitch()&&(r===null&&(r=0),this.mapboxInstance.setPitch(r))}async getMapInstance(){return Promise.resolve(this.mapboxInstance)}async getMapsIndoorsInstance(){return Promise.resolve(this.mapsIndoorsInstance)}async getDirectionsServiceInstance(){return Promise.resolve(this.directionsServiceInstance)}async getDirectionsRendererInstance(){return Promise.resolve(this.directionsRendererInstance)}async highlightLocation(r){this.polygonHighlightOptions&&(this.highlightedLocationId&&this.highlightedLocationId===r.id||(this.highlightedLocationId&&this.mapsIndoorsInstance.setDisplayRule(this.highlightedLocationId,null),this.mapsIndoorsInstance.setDisplayRule(r.id,{polygonVisible:!0,polygonZoomFrom:"0",polygonZoomTo:"22",zIndex:1e3,polygonFillColor:this.polygonHighlightOptions.fillColor,polygonFillOpacity:this.polygonHighlightOptions.fillOpacity,polygonStrokeColor:this.polygonHighlightOptions.strokeColor,polygonStrokeOpacity:this.polygonHighlightOptions.strokeOpacity,polygonStrokeWeight:this.polygonHighlightOptions.strokeWeight}),this.highlightedLocationId=r.id))}async clearHighlightLocation(){this.highlightedLocationId&&(this.mapsIndoorsInstance.setDisplayRule(this.highlightedLocationId,null),this.highlightedLocationId=null)}async componentDidLoad(){await this.insertMapBoxScript(),await this.initializeMapsIndoorsSDK(),await this.setupMap(),this.setExternalLinkBehavior(this.disableExternalLinks),this.addEventListeners(),this.floorSelectorControlPosition&&this.showFloorSelector(),this.myPositionControlPosition&&this.setMyPositionControl(this.myPositionControlPosition)}disconnectedCallback(){this.mapsIndoorsInstance.deallocate(),this.mapElement.remove(),this.mapElement=null}insertMapBoxScript(){if(typeof mapboxgl>"u")return new Promise(r=>{const s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src","https://api.mapbox.com/mapbox-gl-js/v2.3.0/mapbox-gl.js"),document.body.appendChild(s),s.onload=()=>r()})}initializeMapsIndoorsSDK(){return new Promise(r=>{if(typeof mapsindoors<"u")return mapsindoors.MapsIndoors.setMapsIndoorsApiKey(this.miApiKey),mapsindoors.MapsIndoors.setLanguage(this.language),r();const s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src",`${nb.miSDKUrlV4}?apikey=${this.miApiKey}`),document.body.appendChild(s),s.onload=()=>r()})}setupMap(){return new Promise(r=>{const s={accessToken:this.accessToken,element:this.mapElement,zoom:this.zoom,maxZoom:this.maxZoom,maxPitch:this.maxPitch,bearing:this.bearing,pitch:this.pitch},c=new mapsindoors.mapView.MapboxView(s);this.mapboxInstance=c.getMap(),this.mapsIndoorsInstance=new mapsindoors.MapsIndoors({mapView:c,labelOptions:{pixelOffset:{width:0,height:14},style:{fontSize:"11px"}}});const d=new mapboxgl.NavigationControl;this.mapboxInstance.addControl(d,"top-left"),this.mapsIndoorsInstance.on("ready",async()=>{this.floorIndex!==void 0?this.mapsIndoorsInstance.setFloor(this.floorIndex):this.floorIndex=this.mapsIndoorsInstance.getFloor(),this.initializeDirectionsService(),this.initializeDirectionsRenderer(),this.mapsIndoorsReady.emit(),r()})})}initializeDirectionsService(){const r=new mapsindoors.directions.MapboxProvider(this.accessToken);this.directionsServiceInstance=new mapsindoors.services.DirectionsService(r)}initializeDirectionsRenderer(){this.directionsRendererInstance=new mapsindoors.directions.DirectionsRenderer({mapsIndoors:this.mapsIndoorsInstance,fitBounds:!0,strokeColor:this.polylineOptions.color,strokeOpacity:this.polylineOptions.opacity,strokeWeight:this.polylineOptions.weight,visible:!0})}addEventListeners(){this.mapsIndoorsInstance.on("click",r=>{this.highlightLocation(r)}),this.mapsIndoorsInstance.on("floor_changed",r=>{this.floorIndex=r}),this.mapboxInstance.on("zoomend",()=>{this.zoom=this.mapboxInstance.getZoom().toString()}),this.mapboxInstance.on("pitchend",()=>{this.pitch=this.mapboxInstance.getPitch().toString()}),this.mapboxInstance.on("rotateend",()=>{this.bearing=this.mapboxInstance.getBearing().toString()})}preventExternalLink(r){r.target.closest('a[target="_blank"]')&&r.preventDefault()}showFloorSelector(){this.setFloorSelectorControl(this.floorSelectorControlPosition)}setFloorSelectorControl(r){r===null?(this.mapboxInstance.removeControl(this.floorSelectorControl),this.floorSelectorControl=null):this.floorSelectorControl?(this.mapboxInstance.removeControl(this.floorSelectorControl),this.mapboxInstance.addControl(this.floorSelectorControl,this.floorSelectorControlPosition)):(this.floorSelectorControl=new rL(this.mapboxInstance,this.mapsIndoorsInstance),this.mapboxInstance.addControl(this.floorSelectorControl,this.floorSelectorControlPosition))}setMyPositionControl(r){r===null?(this.mapboxInstance.removeControl(this.myPositionControl),this.myPositionControl=null):this.myPositionControl?(this.mapboxInstance.removeControl(this.myPositionControl),this.mapboxInstance.addControl(this.myPositionControl,this.myPositionControlPosition)):(this.myPositionControl=new oL(this.mapboxInstance,this.mapsIndoorsInstance),this.mapboxInstance.addControl(this.myPositionControl,this.myPositionControlPosition))}render(){return be(qn,null,be("link",{href:"https://api.mapbox.com/mapbox-gl-js/v2.3.0/mapbox-gl.css",rel:"stylesheet"}),be("div",{ref:r=>this.mapElement=r}))}static get watchers(){return{miApiKey:["apiKeyChange"],disableExternalLinks:["setExternalLinkBehavior"],floorSelectorControlPosition:["floorSelectorControlPositionChange"],floorIndex:["floorIndexChange"],myPositionControlPosition:["myPositionControlPositionChange"],polylineOptions:["polylineOptionsChange"],zoom:["zoomChange"],maxPitch:["maxPitchChange"],maxZoom:["maxZoomChange"],bearing:["bearingChange"],pitch:["pitchChange"]}}};sb.style=sL;const aL=Object.freeze(Object.defineProperty({__proto__:null,mi_map_mapbox:sb},Symbol.toStringTag,{value:"Module"})),lL=':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 mi-card{position:relative;overflow:hidden;min-width:312px}:host mi-card .content h1{display:inline-flex;cursor:default;align-items:center;text-transform:uppercase;white-space:nowrap;margin:0;font-size:1rem;font-weight:600;color:#6b7280;margin-bottom:8px}:host mi-card .content h1 svg{fill:#9ca3af;width:16px;height:16px;margin-left:8px}:host mi-card .content section{position:relative}:host mi-card .content section p{margin:0;font-size:3rem;line-height:3rem;font-weight:500;color:#1c1917}:host mi-card .content section p.error{font-size:1rem;font-weight:500;color:#6b7280}:host mi-card .content section p.hidden{visibility:hidden}:host mi-card .content section p.tool-tip{box-sizing:border-box;visibility:hidden;overflow:hidden;position:absolute;top:0px;right:0px;bottom:0px;left:0px;opacity:0;transition:all 100ms;z-index:700;background-color:#ffffff;font-size:0.875rem;font-weight:400;line-height:1rem;margin:0}:host mi-card .content section p.tool-tip.visible{opacity:1;visibility:visible}:host mi-card .content section mi-spinner{display:inline-block;vertical-align:middle;width:100%}',ab=class{constructor(r){Hi(this,r),this.showToolTip=!1,this.label="",this.value="",this.tip=void 0,this.spinner=!1,this.error=void 0}render(){return be(qn,null,be("mi-card",null,this.renderContent()))}renderToolTip(){if(this.tip>"")return be("p",{class:{"tool-tip":!0,visible:this.tip&&this.showToolTip}},this.tip)}getInfoIcon(){if(this.tip>"")return be("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24"},be("path",{d:"M0 0h24v24H0V0z",fill:"none"}),be("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92c-.5.51-.86.97-1.04 1.69-.08.32-.13.68-.13 1.14h-2v-.5c0-.46.08-.9.22-1.31.2-.58.53-1.1.95-1.52l1.24-1.26c.46-.44.68-1.1.55-1.8-.13-.72-.69-1.33-1.39-1.53-1.11-.31-2.14.32-2.47 1.27-.12.37-.43.65-.82.65h-.3C8.4 9 8 8.44 8.16 7.88c.43-1.47 1.68-2.59 3.23-2.83 1.52-.24 2.97.55 3.87 1.8 1.18 1.63.83 3.38-.19 4.4z"}))}renderContent(){let r;return this.value?r=Mv(this.value)?KE(this.value):this.value:this.error?r=this.error:this.spinner?r=be("mi-spinner",null):r=" ",be("div",{class:"content"},be("h1",{onMouseOver:()=>this.showToolTip=!0,onMouseOut:()=>this.showToolTip=!1},this.label," ",this.getInfoIcon()),be("section",null,this.renderToolTip(),be("p",{class:{error:!!this.error,hidden:this.tip&&this.showToolTip}},r)))}};ab.style=lL;const cL=Object.freeze(Object.defineProperty({__proto__:null,mi_metric_card:ab},Symbol.toStringTag,{value:"Module"}));var uL=Uc(function(r,s){(function(c,d){var m="1.0.35",w="",v="?",o="function",y="undefined",T="object",z="string",C="major",S="model",U="name",R="type",V="vendor",W="version",ye="architecture",le="console",he="mobile",xe="tablet",X="smarttv",Ee="wearable",Pe="embedded",Ve=350,Ne="Amazon",Ze="Apple",tt="ASUS",nt="BlackBerry",at="Browser",gt="Chrome",Ae="Edge",Qe="Firefox",Ke="Google",_t="Huawei",ut="LG",ee="Microsoft",ie="Motorola",G="Opera",P="Samsung",Q="Sharp",J="Sony",K="Xiaomi",me="Zebra",Te="Facebook",de="Chromium OS",Oe="Mac OS",qe=function(hi,di){var Pt={};for(var Ii in hi)di[Ii]&&di[Ii].length%2===0?Pt[Ii]=di[Ii].concat(hi[Ii]):Pt[Ii]=hi[Ii];return Pt},Ce=function(hi){for(var di={},Pt=0;Pt<hi.length;Pt++)di[hi[Pt].toUpperCase()]=hi[Pt];return di},Be=function(hi,di){return typeof hi===z?et(di).indexOf(et(hi))!==-1:!1},et=function(hi){return hi.toLowerCase()},Dt=function(hi){return typeof hi===z?hi.replace(/[^\d\.]/g,w).split(".")[0]:d},He=function(hi,di){if(typeof hi===z)return hi=hi.replace(/^\s\s*/,w),typeof di===y?hi:hi.substring(0,Ve)},Tt=function(hi,di){for(var Pt=0,Ii,Vi,zi,_i,si,ln;Pt<di.length&&!si;){var An=di[Pt],Ye=di[Pt+1];for(Ii=Vi=0;Ii<An.length&&!si&&An[Ii];)if(si=An[Ii++].exec(hi),si)for(zi=0;zi<Ye.length;zi++)ln=si[++Vi],_i=Ye[zi],typeof _i===T&&_i.length>0?_i.length===2?typeof _i[1]==o?this[_i[0]]=_i[1].call(this,ln):this[_i[0]]=_i[1]:_i.length===3?typeof _i[1]===o&&!(_i[1].exec&&_i[1].test)?this[_i[0]]=ln?_i[1].call(this,ln,_i[2]):d:this[_i[0]]=ln?ln.replace(_i[1],_i[2]):d:_i.length===4&&(this[_i[0]]=ln?_i[3].call(this,ln.replace(_i[1],_i[2])):d):this[_i]=ln||d;Pt+=2}},ti=function(hi,di){for(var Pt in di)if(typeof di[Pt]===T&&di[Pt].length>0){for(var Ii=0;Ii<di[Pt].length;Ii++)if(Be(di[Pt][Ii],hi))return Pt===v?d:Pt}else if(Be(di[Pt],hi))return Pt===v?d:Pt;return hi},ni={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},vi={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ji={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[W,[U,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[W,[U,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[U,W],[/opios[\/ ]+([\w\.]+)/i],[W,[U,G+" Mini"]],[/\bopr\/([\w\.]+)/i],[W,[U,G]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[U,W],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[W,[U,"UC"+at]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[W,[U,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[W,[U,"WeChat"]],[/konqueror\/([\w\.]+)/i],[W,[U,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[W,[U,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[W,[U,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[U,/(.+)/,"$1 Secure "+at],W],[/\bfocus\/([\w\.]+)/i],[W,[U,Qe+" Focus"]],[/\bopt\/([\w\.]+)/i],[W,[U,G+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[W,[U,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[W,[U,"Dolphin"]],[/coast\/([\w\.]+)/i],[W,[U,G+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[W,[U,"MIUI "+at]],[/fxios\/([-\w\.]+)/i],[W,[U,Qe]],[/\bqihu|(qi?ho?o?|360)browser/i],[[U,"360 "+at]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[U,/(.+)/,"$1 "+at],W],[/(comodo_dragon)\/([\w\.]+)/i],[[U,/_/g," "],W],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[U,W],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[U],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[U,Te],W],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[U,W],[/\bgsa\/([\w\.]+) .*safari\//i],[W,[U,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[W,[U,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[W,[U,gt+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[U,gt+" WebView"],W],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[W,[U,"Android "+at]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[U,W],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[W,[U,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[W,U],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[U,[W,ti,ni]],[/(webkit|khtml)\/([\w\.]+)/i],[U,W],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[U,"Netscape"],W],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[W,[U,Qe+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[U,W],[/(cobalt)\/([\w\.]+)/i],[U,[W,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[ye,"amd64"]],[/(ia32(?=;))/i],[[ye,et]],[/((?:i[346]|x)86)[;\)]/i],[[ye,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[ye,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[ye,"armhf"]],[/windows (ce|mobile); ppc;/i],[[ye,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[ye,/ower/,w,et]],[/(sun4\w)[;\)]/i],[[ye,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[ye,et]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[S,[V,P],[R,xe]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[S,[V,P],[R,he]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[S,[V,Ze],[R,he]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[S,[V,Ze],[R,xe]],[/(macintosh);/i],[S,[V,Ze]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[S,[V,Q],[R,he]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[S,[V,_t],[R,xe]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[S,[V,_t],[R,he]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[S,/_/g," "],[V,K],[R,he]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[S,/_/g," "],[V,K],[R,xe]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[S,[V,"OPPO"],[R,he]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[S,[V,"Vivo"],[R,he]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[S,[V,"Realme"],[R,he]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[S,[V,ie],[R,he]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[S,[V,ie],[R,xe]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[S,[V,ut],[R,xe]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[S,[V,ut],[R,he]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[S,[V,"Lenovo"],[R,xe]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[S,/_/g," "],[V,"Nokia"],[R,he]],[/(pixel c)\b/i],[S,[V,Ke],[R,xe]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[S,[V,Ke],[R,he]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[S,[V,J],[R,he]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[S,"Xperia Tablet"],[V,J],[R,xe]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[S,[V,"OnePlus"],[R,he]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[S,[V,Ne],[R,xe]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[S,/(.+)/g,"Fire Phone $1"],[V,Ne],[R,he]],[/(playbook);[-\w\),; ]+(rim)/i],[S,V,[R,xe]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[S,[V,nt],[R,he]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[S,[V,tt],[R,xe]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[S,[V,tt],[R,he]],[/(nexus 9)/i],[S,[V,"HTC"],[R,xe]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[V,[S,/_/g," "],[R,he]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[S,[V,"Acer"],[R,xe]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[S,[V,"Meizu"],[R,he]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[V,S,[R,he]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[V,S,[R,xe]],[/(surface duo)/i],[S,[V,ee],[R,xe]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[S,[V,"Fairphone"],[R,he]],[/(u304aa)/i],[S,[V,"AT&T"],[R,he]],[/\bsie-(\w*)/i],[S,[V,"Siemens"],[R,he]],[/\b(rct\w+) b/i],[S,[V,"RCA"],[R,xe]],[/\b(venue[\d ]{2,7}) b/i],[S,[V,"Dell"],[R,xe]],[/\b(q(?:mv|ta)\w+) b/i],[S,[V,"Verizon"],[R,xe]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[S,[V,"Barnes & Noble"],[R,xe]],[/\b(tm\d{3}\w+) b/i],[S,[V,"NuVision"],[R,xe]],[/\b(k88) b/i],[S,[V,"ZTE"],[R,xe]],[/\b(nx\d{3}j) b/i],[S,[V,"ZTE"],[R,he]],[/\b(gen\d{3}) b.+49h/i],[S,[V,"Swiss"],[R,he]],[/\b(zur\d{3}) b/i],[S,[V,"Swiss"],[R,xe]],[/\b((zeki)?tb.*\b) b/i],[S,[V,"Zeki"],[R,xe]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[V,"Dragon Touch"],S,[R,xe]],[/\b(ns-?\w{0,9}) b/i],[S,[V,"Insignia"],[R,xe]],[/\b((nxa|next)-?\w{0,9}) b/i],[S,[V,"NextBook"],[R,xe]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[V,"Voice"],S,[R,he]],[/\b(lvtel\-)?(v1[12]) b/i],[[V,"LvTel"],S,[R,he]],[/\b(ph-1) /i],[S,[V,"Essential"],[R,he]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[S,[V,"Envizen"],[R,xe]],[/\b(trio[-\w\. ]+) b/i],[S,[V,"MachSpeed"],[R,xe]],[/\btu_(1491) b/i],[S,[V,"Rotor"],[R,xe]],[/(shield[\w ]+) b/i],[S,[V,"Nvidia"],[R,xe]],[/(sprint) (\w+)/i],[V,S,[R,he]],[/(kin\.[onetw]{3})/i],[[S,/\./g," "],[V,ee],[R,he]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[S,[V,me],[R,xe]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[S,[V,me],[R,he]],[/smart-tv.+(samsung)/i],[V,[R,X]],[/hbbtv.+maple;(\d+)/i],[[S,/^/,"SmartTV"],[V,P],[R,X]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[V,ut],[R,X]],[/(apple) ?tv/i],[V,[S,Ze+" TV"],[R,X]],[/crkey/i],[[S,gt+"cast"],[V,Ke],[R,X]],[/droid.+aft(\w)( bui|\))/i],[S,[V,Ne],[R,X]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[S,[V,Q],[R,X]],[/(bravia[\w ]+)( bui|\))/i],[S,[V,J],[R,X]],[/(mitv-\w{5}) bui/i],[S,[V,K],[R,X]],[/Hbbtv.*(technisat) (.*);/i],[V,S,[R,X]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[V,He],[S,He],[R,X]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[R,X]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[V,S,[R,le]],[/droid.+; (shield) bui/i],[S,[V,"Nvidia"],[R,le]],[/(playstation [345portablevi]+)/i],[S,[V,J],[R,le]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[S,[V,ee],[R,le]],[/((pebble))app/i],[V,S,[R,Ee]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[S,[V,Ze],[R,Ee]],[/droid.+; (glass) \d/i],[S,[V,Ke],[R,Ee]],[/droid.+; (wt63?0{2,3})\)/i],[S,[V,me],[R,Ee]],[/(quest( 2| pro)?)/i],[S,[V,Te],[R,Ee]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[V,[R,Pe]],[/(aeobc)\b/i],[S,[V,Ne],[R,Pe]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[S,[R,he]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[S,[R,xe]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[R,xe]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[R,he]],[/(android[-\w\. ]{0,9});.+buil/i],[S,[V,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[W,[U,Ae+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[W,[U,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[U,W],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[W,U]],os:[[/microsoft (windows) (vista|xp)/i],[U,W],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[U,[W,ti,vi]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[U,"Windows"],[W,ti,vi]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[W,/_/g,"."],[U,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[U,Oe],[W,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[W,U],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[U,W],[/\(bb(10);/i],[W,[U,nt]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[W,[U,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[W,[U,Qe+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[W,[U,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[W,[U,"watchOS"]],[/crkey\/([\d\.]+)/i],[W,[U,gt+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[U,de],W],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[U,W],[/(sunos) ?([\w\.\d]*)/i],[[U,"Solaris"],W],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[U,W]]},yi=function(hi,di){if(typeof hi===T&&(di=hi,hi=d),!(this instanceof yi))return new yi(hi,di).getResult();var Pt=typeof c!==y&&c.navigator?c.navigator:d,Ii=hi||(Pt&&Pt.userAgent?Pt.userAgent:w),Vi=Pt&&Pt.userAgentData?Pt.userAgentData:d,zi=di?qe(Ji,di):Ji,_i=Pt&&Pt.userAgent==Ii;return this.getBrowser=function(){var si={};return si[U]=d,si[W]=d,Tt.call(si,Ii,zi.browser),si[C]=Dt(si[W]),_i&&Pt&&Pt.brave&&typeof Pt.brave.isBrave==o&&(si[U]="Brave"),si},this.getCPU=function(){var si={};return si[ye]=d,Tt.call(si,Ii,zi.cpu),si},this.getDevice=function(){var si={};return si[V]=d,si[S]=d,si[R]=d,Tt.call(si,Ii,zi.device),_i&&!si[R]&&Vi&&Vi.mobile&&(si[R]=he),_i&&si[S]=="Macintosh"&&Pt&&typeof Pt.standalone!==y&&Pt.maxTouchPoints&&Pt.maxTouchPoints>2&&(si[S]="iPad",si[R]=xe),si},this.getEngine=function(){var si={};return si[U]=d,si[W]=d,Tt.call(si,Ii,zi.engine),si},this.getOS=function(){var si={};return si[U]=d,si[W]=d,Tt.call(si,Ii,zi.os),_i&&!si[U]&&Vi&&Vi.platform!="Unknown"&&(si[U]=Vi.platform.replace(/chrome os/i,de).replace(/macos/i,Oe)),si},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ii},this.setUA=function(si){return Ii=typeof si===z&&si.length>Ve?He(si,Ve):si,this},this.setUA(Ii),this};yi.VERSION=m,yi.BROWSER=Ce([U,W,C]),yi.CPU=Ce([ye]),yi.DEVICE=Ce([S,V,R,le,he,X,xe,Ee,Pe]),yi.ENGINE=yi.OS=Ce([U,W]),r.exports&&(s=r.exports=yi),s.UAParser=yi;var Bi=typeof c!==y&&(c.jQuery||c.Zepto);if(Bi&&!Bi.ua){var wi=new yi;Bi.ua=wi.getResult(),Bi.ua.get=function(){return wi.getUA()},Bi.ua.set=function(hi){wi.setUA(hi);var di=wi.getResult();for(var Pt in di)Bi.ua[Pt]=di[Pt]}}})(typeof window=="object"?window:_m)}),hL=function(s){return dL(s)&&!fL(s)};function dL(r){return!!r&&typeof r=="object"}function fL(r){var s=Object.prototype.toString.call(r);return s==="[object RegExp]"||s==="[object Date]"||mL(r)}var pL=typeof Symbol=="function"&&Symbol.for,gL=pL?Symbol.for("react.element"):60103;function mL(r){return r.$$typeof===gL}function yL(r){return Array.isArray(r)?[]:{}}function Yc(r,s){return s.clone!==!1&&s.isMergeableObject(r)?hl(yL(r),r,s):r}function _L(r,s,c){return r.concat(s).map(function(d){return Yc(d,c)})}function xL(r,s){if(!s.customMerge)return hl;var c=s.customMerge(r);return typeof c=="function"?c:hl}function vL(r){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r).filter(function(s){return Object.propertyIsEnumerable.call(r,s)}):[]}function lb(r){return Object.keys(r).concat(vL(r))}function cb(r,s){try{return s in r}catch{return!1}}function ML(r,s){return cb(r,s)&&!(Object.hasOwnProperty.call(r,s)&&Object.propertyIsEnumerable.call(r,s))}function bL(r,s,c){var d={};return c.isMergeableObject(r)&&lb(r).forEach(function(m){d[m]=Yc(r[m],c)}),lb(s).forEach(function(m){ML(r,m)||(cb(r,m)&&c.isMergeableObject(s[m])?d[m]=xL(m,c)(r[m],s[m],c):d[m]=Yc(s[m],c))}),d}function hl(r,s,c){c=c||{},c.arrayMerge=c.arrayMerge||_L,c.isMergeableObject=c.isMergeableObject||hL,c.cloneUnlessOtherwiseSpecified=Yc;var d=Array.isArray(s),m=Array.isArray(r),w=d===m;return w?d?c.arrayMerge(r,s,c):bL(r,s,c):Yc(s,c)}hl.all=function(s,c){if(!Array.isArray(s))throw new Error("first argument should be an array");return s.reduce(function(d,m){return hl(d,m,c)},{})};var wL=hl,IL=wL;const DL=".mi-my-position{margin:10px;display:flex;flex-direction:column;pointer-events:auto;gap:16px;right:0}.mi-my-position__position-button,.mi-my-position__compass-button{margin:0;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:48px;height:48px;background-repeat:no-repeat;background-position:center;outline:none;border-color:#e5e7eb;border-style:solid;background-color:#fcfcfc}.mi-my-position__position-button{background-size:23px;border-radius:8px}.mi-my-position__position-button--unknown{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY1NTIzIDEuMjIzNTZDMy4yNjQ3IDAuODMzMDMzIDIuNjMxNTQgMC44MzMwMzMgMi4yNDEwMSAxLjIyMzU2QzEuODUwNDkgMS42MTQwOCAxLjg1MDQ5IDIuMjQ3MjUgMi4yNDEwMSAyLjYzNzc3TDIyLjI2NiAyMi42NjI4QzIyLjY1NjUgMjMuMDUzMyAyMy4yODk3IDIzLjA1MzMgMjMuNjgwMiAyMi42NjI4QzI0LjA3MDcgMjIuMjcyMiAyNC4wNzA3IDIxLjYzOTEgMjMuNjgwMiAyMS4yNDg1TDE3LjcxNTcgMTUuMjg0MUwyMC43NzQ4IDcuMzYzMjVDMjEuNTYyOSA1LjMyMzE1IDE5LjU1NjIgMy4zMTY2NiAxNy41MTYyIDQuMTA0NTVMOS41OTUzNSA3LjE2MzY4TDMuNjU1MjMgMS4yMjM1NlpNMTEuMTQyIDguNzEwMzJMMTYuMTY5MSAxMy43Mzc0TDE4LjkwOTIgNi42NDI2MUMxOS4wNzE4IDYuMjIxNzIgMTguNjU3OCA1LjgwNzY0IDE4LjIzNjggNS45NzAyNEwxMS4xNDIgOC43MTAzMloiIGZpbGw9IiM3MzczNzMiLz4KPHBhdGggZD0iTTEzLjI1MTggMjEuMjkxMkwxNC45OTIxIDE2Ljc4NDlMMTYuNTM4OCAxOC4zMzE1TDE1LjExNzQgMjIuMDExOEMxNC4wNjc3IDI0LjcyOTYgMTAuMTUwOCAyNC41MDY5IDkuNDE1OTMgMjEuNjg3Nkw4LjEyOTA1IDE2Ljc1MDVMMy4xOTE4IDE1LjQ2MzZDMC4zNzI1MSAxNC43Mjg3IDAuMTQ5ODEyIDEwLjgxMTcgMi44Njc2NCA5Ljc2Mkw2LjY0NTEyIDguMzAzMDlMOC4xOTE3NyA5Ljg0OTc0TDMuNTg4MTkgMTEuNjI3N0MyLjY4MjI0IDExLjk3NzYgMi43NTY0OCAxMy4yODMzIDMuNjk2MjUgMTMuNTI4Mkw4LjYzMzUgMTQuODE1MUM5LjMzNDQzIDE0Ljk5NzggOS44ODE3OCAxNS41NDUyIDEwLjA2NDQgMTYuMjQ2TDExLjM1MTMgMjEuMTgzMkMxMS41OTYyIDIyLjEyMjkgMTIuOTAxOSAyMi4xOTcyIDEzLjI1MTggMjEuMjkxMloiIGZpbGw9IiM3MzczNzMiLz4KPC9zdmc+Cg==)}.mi-my-position__position-button--requesting{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxOSAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuODkzNDEgMTEuMjgzTDEuOTU2MTYgOS45OTYxMUMwLjA3NjYyOTIgOS41MDYyIC0wLjA3MTg0MTEgNi44OTQ4NSAxLjc0MDA1IDYuMTk1MDdMMTYuMzg4NiAwLjUzNzYxN0MxNy42MTkxIDAuMDYyMzc2NiAxOC44Mjk0IDEuMjcyNjYgMTguMzU0MSAyLjUwMzE2TDEyLjY5NjcgMTcuMTUxN0MxMS45OTY5IDE4Ljk2MzYgOS4zODU2NCAxOC44MTUxIDguODk1NzQgMTYuOTM1Nkw3LjYwODg0IDExLjk5ODRDNy41MTc1NCAxMS42NDggNy4yNDM4NiAxMS4zNzQzIDYuODkzNDEgMTEuMjgzWiIgZmlsbD0iIzczNzM3MyIvPgo8L3N2Zz4K)}.mi-my-position__position-button--known{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxOSAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuODkzNDEgMTEuMjgzTDEuOTU2MTYgOS45OTYxMUMwLjA3NjYyOTIgOS41MDYyIC0wLjA3MTg0MTEgNi44OTQ4NSAxLjc0MDA1IDYuMTk1MDdMMTYuMzg4NiAwLjUzNzYxN0MxNy42MTkxIDAuMDYyMzc2NiAxOC44Mjk0IDEuMjcyNjYgMTguMzU0MSAyLjUwMzE2TDEyLjY5NjcgMTcuMTUxN0MxMS45OTY5IDE4Ljk2MzYgOS4zODU2NCAxOC44MTUxIDguODk1NzQgMTYuOTM1Nkw3LjYwODg0IDExLjk5ODRDNy41MTc1NCAxMS42NDggNy4yNDM4NiAxMS4zNzQzIDYuODkzNDEgMTEuMjgzWiIgZmlsbD0iIzczNzM3MyIvPgo8L3N2Zz4K)}.mi-my-position__position-button--centered{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxOSAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuODkzNDEgMTEuMjgzTDEuOTU2MTYgOS45OTYxMUMwLjA3NjYyOTIgOS41MDYyIC0wLjA3MTg0MTEgNi44OTQ4NSAxLjc0MDA1IDYuMTk1MDdMMTYuMzg4NiAwLjUzNzYxN0MxNy42MTkxIDAuMDYyMzc2NiAxOC44Mjk0IDEuMjcyNjYgMTguMzU0MSAyLjUwMzE2TDEyLjY5NjcgMTcuMTUxN0MxMS45OTY5IDE4Ljk2MzYgOS4zODU2NCAxOC44MTUxIDguODk1NzQgMTYuOTM1Nkw3LjYwODg0IDExLjk5ODRDNy41MTc1NCAxMS42NDggNy4yNDM4NiAxMS4zNzQzIDYuODkzNDEgMTEuMjgzWiIgZmlsbD0iIzI1NjNFQiIvPgo8L3N2Zz4K)}.mi-my-position__position-button--tracked{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNSAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjQ2MDQgMTMuNDMwOUMxMy4wMTI3IDEzLjQzMDkgMTMuNDYwNCAxMi45ODMyIDEzLjQ2MDQgMTIuNDMwOUMxMy40NjA0IDExLjg3ODYgMTMuMDEyNyAxMS40MzA5IDEyLjQ2MDQgMTEuNDMwOUMxMS45MDgxIDExLjQzMDkgMTEuNDYwNCAxMS44Nzg2IDExLjQ2MDQgMTIuNDMwOUMxMS40NjA0IDEyLjk4MzIgMTEuOTA4MSAxMy40MzA5IDEyLjQ2MDQgMTMuNDMwOVoiIGZpbGw9IiMyNTYzRUIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMi40NjA0IDEyLjQzMDlDMjIuNDYwNCAxNy45NTM3IDE3Ljk4MzIgMjIuNDMwOSAxMi40NjA0IDIyLjQzMDlDNi45Mzc2IDIyLjQzMDkgMi40NjA0NSAxNy45NTM3IDIuNDYwNDUgMTIuNDMwOUMyLjQ2MDQ1IDYuOTA4MDYgNi45Mzc2IDIuNDMwOTEgMTIuNDYwNCAyLjQzMDkxQzE3Ljk4MzIgMi40MzA5MSAyMi40NjA0IDYuOTA4MDYgMjIuNDYwNCAxMi40MzA5Wk0xNS44Mzc5IDguNDQ2MTJMMTAuNTM4OSA5Ljc4NDc4QzEwLjE4MjYgOS44NzQ4IDkuOTA0MzYgMTAuMTUzIDkuODE0MzQgMTAuNTA5NEw4LjQ3NTcyIDE1LjgwODRDOC4zODMgMTYuMTc1NSA4LjcxNTk0IDE2LjUwODQgOS4wODI5NSAxNi40MTU3TDE0LjM4MTkgMTUuMDc3QzE0LjczODMgMTQuOTg3IDE1LjAxNjUgMTQuNzA4OCAxNS4xMDY2IDE0LjM1MjRMMTYuNDQ1MiA5LjA1MzM1QzE2LjUzNzkgOC42ODYzMyAxNi4yMDUgOC4zNTM0IDE1LjgzNzkgOC40NDYxMloiIGZpbGw9IiMyNTYzRUIiLz4KPC9zdmc+Cg==)}.mi-my-position__position-button--untracked{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNSAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjQ2MDQgMTMuNDMwOUMxMy4wMTI3IDEzLjQzMDkgMTMuNDYwNCAxMi45ODMyIDEzLjQ2MDQgMTIuNDMwOUMxMy40NjA0IDExLjg3ODYgMTMuMDEyNyAxMS40MzA5IDEyLjQ2MDQgMTEuNDMwOUMxMS45MDgxIDExLjQzMDkgMTEuNDYwNCAxMS44Nzg2IDExLjQ2MDQgMTIuNDMwOUMxMS40NjA0IDEyLjk4MzIgMTEuOTA4MSAxMy40MzA5IDEyLjQ2MDQgMTMuNDMwOVoiIGZpbGw9IiMwMDAwMDAiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMi40NjA0IDEyLjQzMDlDMjIuNDYwNCAxNy45NTM3IDE3Ljk4MzIgMjIuNDMwOSAxMi40NjA0IDIyLjQzMDlDNi45Mzc2IDIyLjQzMDkgMi40NjA0NSAxNy45NTM3IDIuNDYwNDUgMTIuNDMwOUMyLjQ2MDQ1IDYuOTA4MDYgNi45Mzc2IDIuNDMwOTEgMTIuNDYwNCAyLjQzMDkxQzE3Ljk4MzIgMi40MzA5MSAyMi40NjA0IDYuOTA4MDYgMjIuNDYwNCAxMi40MzA5Wk0xNS44Mzc5IDguNDQ2MTJMMTAuNTM4OSA5Ljc4NDc4QzEwLjE4MjYgOS44NzQ4IDkuOTA0MzYgMTAuMTUzIDkuODE0MzQgMTAuNTA5NEw4LjQ3NTcyIDE1LjgwODRDOC4zODMgMTYuMTc1NSA4LjcxNTk0IDE2LjUwODQgOS4wODI5NSAxNi40MTU3TDE0LjM4MTkgMTUuMDc3QzE0LjczODMgMTQuOTg3IDE1LjAxNjUgMTQuNzA4OCAxNS4xMDY2IDE0LjM1MjRMMTYuNDQ1MiA5LjA1MzM1QzE2LjUzNzkgOC42ODYzMyAxNi4yMDUgOC4zNTM0IDE1LjgzNzkgOC40NDYxMloiIGZpbGw9IiMwMDAwMDAiLz4KPC9zdmc+Cg==)}.mi-my-position__compass-button{background-size:12px;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMzAiIHZpZXdCb3g9IjAgMCAxMyAzMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNTQ4MTMgMi45NjI0MUM1LjkwMTU5IDIuMTc1MjcgNy4wMTkxNSAyLjE3NTI3IDcuMzcyNjIgMi45NjI0MUwxMS41OTI5IDEyLjM2MDZDMTEuOTQ5MSAxMy4xNTM4IDExLjE5MzEgMTMuOTkyMyAxMC4zNjczIDEzLjcxOTlMNi43NzM2NyAxMi41MzQzQzYuNTcwMiAxMi40NjcxIDYuMzUwNTQgMTIuNDY3MSA2LjE0NzA3IDEyLjUzNDNMMi41NTM0MyAxMy43MTk5QzEuNzI3NjggMTMuOTkyMyAwLjk3MTY4MyAxMy4xNTM4IDEuMzI3ODggMTIuMzYwNkw1LjU0ODEzIDIuOTYyNDFaIiBmaWxsPSIjREMyNjI2Ii8+CjxwYXRoIGQ9Ik03LjM3MjUzIDI3Ljg5OTRDNy4wMTkwNiAyOC42ODY1IDUuOTAxNSAyOC42ODY1IDUuNTQ4MDQgMjcuODk5NEwxLjMyNzc5IDE4LjUwMTJDMC45NzE1OTcgMTcuNzA4IDEuNzI3NTkgMTYuODY5NSAyLjU1MzM0IDE3LjE0Mkw2LjE0Njk4IDE4LjMyNzVDNi4zNTA0NiAxOC4zOTQ3IDYuNTcwMTEgMTguMzk0NyA2Ljc3MzU5IDE4LjMyNzVMMTAuMzY3MiAxNy4xNDJDMTEuMTkzIDE2Ljg2OTUgMTEuOTQ5IDE3LjcwOCAxMS41OTI4IDE4LjUwMTJMNy4zNzI1MyAyNy44OTk0WiIgZmlsbD0iIzlDQTNBRiIvPgo8L3N2Zz4K);border-radius:50%}";var ki;(function(r){r.POSITION_UNKNOWN="POSITION_UNKNOWN",r.POSITION_REQUESTING="POSITION_REQUESTING",r.POSITION_INACCURATE="POSITION_INACCURATE",r.POSITION_KNOWN="POSITION_KNOWN",r.POSITION_CENTERED="POSITION_CENTERED",r.POSITION_TRACKED="POSITION_TRACKED",r.POSITION_UNTRACKED="POSITION_UNTRACKED"})(ki||(ki={}));var yf;(function(r){r.Phone="mobile",r.Tablet="tablet"})(yf||(yf={}));const ub=class{constructor(r){Hi(this,r),this.position_error=Tn(this,"position_error",7),this.position_received=Tn(this,"position_received",7),this.parser=new uL.UAParser,this.handleDeviceOrientationReference=this.handleDeviceOrientation.bind(this),this.defaultOptions={maxAccuracy:200,positionOptions:{timeout:3e4,enableHighAccuracy:!0,maximumAge:0},positionMarkerStyles:{radius:"12px",strokeWeight:"2px",strokeColor:"white",fillColor:"#4169E1",fillOpacity:1},accuracyCircleStyles:{fillColor:"#4169E1",fillOpacity:.16}},this.mapsindoors=void 0,this.myPositionOptions=void 0,this.positionState=void 0}resetPositionState(){window.removeEventListener("deviceorientation",this.handleDeviceOrientationReference),this.positionState===ki.POSITION_TRACKED?this.setPositionState(ki.POSITION_UNTRACKED):this.positionState===ki.POSITION_CENTERED&&(this.setPositionState(ki.POSITION_KNOWN),this.mapView.tilt(0))}hasValidPosition(){return[ki.POSITION_KNOWN,ki.POSITION_CENTERED,ki.POSITION_INACCURATE,ki.POSITION_TRACKED,ki.POSITION_UNTRACKED].includes(this.positionState)}setPositionUnknown(r){this.setPositionState(ki.POSITION_UNKNOWN),this.position_error.emit(r)}setPositionProviderOnMapView(){this.mapView.isReady?this.mapView.setPositionProvider(this):this.mapView.once("ready",()=>{this.mapView.setPositionProvider(this)})}panToCurrentPosition(){this.hasValidPosition()&&(this.mapView.once("idle",()=>{this.mapView.on("user_interaction",()=>this.resetPositionState())}),this.mapView.panTo({lat:this.currentPosition.coords.latitude,lng:this.currentPosition.coords.longitude}),this.positionState!==ki.POSITION_TRACKED&&this.setPositionState(ki.POSITION_CENTERED),this.canBeTracked&&(DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission().then(r=>{r==="granted"&&this.positionState===ki.POSITION_TRACKED?window.addEventListener("deviceorientation",this.handleDeviceOrientationReference):window.removeEventListener("deviceorientation",this.handleDeviceOrientationReference)}):this.positionState===ki.POSITION_TRACKED?window.addEventListener("deviceorientation",this.handleDeviceOrientationReference):window.removeEventListener("deviceorientation",this.handleDeviceOrientationReference)))}handleDeviceOrientation(r){(!this.orientation||this.orientation-(360-r.alpha)>1||this.orientation-(360-r.alpha)<-1)&&(this.orientation=360-r.alpha,this.mapView.easeTo({center:[this.currentPosition.coords.longitude,this.currentPosition.coords.latitude],rotation:this.orientation,tilt:60,easing:s=>s*(2-s)}))}setCompassStyle(r){this.compassButton.style.transform=`rotate(${r}deg)`}watchPosition(r=!1){if(!navigator.geolocation)return;this.setPositionState(ki.POSITION_REQUESTING),this.setPositionProviderOnMapView();const s=Date.now();navigator.geolocation.watchPosition(c=>{this.currentPosition&&c.coords.accuracy===this.currentPosition.coords.accuracy&&c.coords.latitude===this.currentPosition.coords.latitude&&c.coords.longitude===this.currentPosition.coords.longitude||(this.currentPosition=c,this.positionIsAccurate=this.currentPosition.coords.accuracy<=this.options.maxAccuracy,this.positionIsAccurate?(this.positionState===ki.POSITION_TRACKED?this.setPositionState(ki.POSITION_UNTRACKED):this.positionState!==ki.POSITION_UNTRACKED&&(this.setPositionState(ki.POSITION_KNOWN),this.mapView.tilt(0)),window.removeEventListener("deviceorientation",this.handleDeviceOrientationReference)):(this.setPositionState(ki.POSITION_INACCURATE),this.position_error.emit({code:11,message:"Inaccurate position: "+c.coords.accuracy})),this.position_received.emit({position:this.currentPosition,selfInvoked:r,accurate:this.positionIsAccurate}))},c=>{(c.code!==3||!this.currentPosition||this.currentPosition.timestamp<=s)&&this.setPositionUnknown(c)},this.options.positionOptions)}setPositionState(r){this.positionState=r}onCompassButtonClicked(){this.setCompassStyle(0),this.mapView.rotate(0),this.mapView.tilt(0),window.removeEventListener("deviceorientation",this.handleDeviceOrientationReference),this.positionState===ki.POSITION_TRACKED?this.setPositionState(ki.POSITION_CENTERED):this.positionState===ki.POSITION_UNTRACKED&&this.setPositionState(ki.POSITION_KNOWN)}onPositionButtonClicked(r){switch(r.stopPropagation(),this.positionState){case ki.POSITION_UNKNOWN:this.mapView.tilt(0),this.watchPosition(!0);break;case ki.POSITION_KNOWN:this.mapView.tilt(0),this.panToCurrentPosition();break;case ki.POSITION_CENTERED:this.canBeTracked&&this.setPositionState(ki.POSITION_TRACKED),this.panToCurrentPosition();break;case ki.POSITION_TRACKED:this.mapView.tilt(0),this.mapView.rotate(0),this.setCompassStyle(0),this.setPositionState(ki.POSITION_CENTERED),this.panToCurrentPosition();break;case ki.POSITION_UNTRACKED:this.setPositionState(ki.POSITION_TRACKED),this.panToCurrentPosition();break}}connectedCallback(){var r;if(this.mapView=this.mapsindoors.getMapView(),this.options=IL(this.defaultOptions,(r=this.myPositionOptions)!==null&&r!==void 0?r:{}),!navigator.geolocation){this.position_error.emit({code:10,message:"Geolocation not available"});return}const s=this.parser.getDevice().type;this.canBeTracked=!!(typeof window.DeviceOrientationEvent=="function"&&(s===yf.Phone||s===yf.Tablet)&&this.mapView.rotatable&&this.mapView.tiltable),!("permissions"in navigator)||!("query"in navigator.permissions)?this.setPositionState(ki.POSITION_UNKNOWN):navigator.permissions.query({name:"geolocation"}).then(c=>{c.state==="granted"?this.watchPosition():this.setPositionState(ki.POSITION_UNKNOWN)}),this.mapView.on("rotateend",()=>{this.setCompassStyle(this.mapView.getBearing())})}render(){return be(qn,null,be("div",{class:"mi-my-position"},be("button",{class:`mi-my-position__position-button
1386
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var w=!0,v=!1,o;return{s:function(){c=r[Symbol.iterator]()},n:function(){var T=c.next();return w=T.done,T},e:function(T){v=!0,o=T},f:function(){try{!w&&c.return!=null&&c.return()}finally{if(v)throw o}}}}function FO(r,s){if(r){if(typeof r=="string")return eb(r,s);var c=Object.prototype.toString.call(r).slice(8,-1);if(c==="Object"&&r.constructor&&(c=r.constructor.name),c==="Map"||c==="Set")return Array.from(r);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return eb(r,s)}}function eb(r,s){(s==null||s>r.length)&&(s=r.length);for(var c=0,d=new Array(s);c<s;c++)d[c]=r[c];return d}var VO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,QO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YO=/^'([^]*?)'?$/,$O=/''/g,ZO=/\S/,GO=/[a-zA-Z]/;function HO(r,s,c,d){var m,w,v,o,y,T,z,C,S,U,R,V,W,ye,le,he,xe,X;Kn(3,arguments);var Ee=String(r),Pe=String(s),Ve=Qc(),Ne=(m=(w=d==null?void 0:d.locale)!==null&&w!==void 0?w:Ve.locale)!==null&&m!==void 0?m:aS;if(!Ne.match)throw new RangeError("locale must contain match property");var Ze=zr((v=(o=(y=(T=d==null?void 0:d.firstWeekContainsDate)!==null&&T!==void 0?T:d==null||(z=d.locale)===null||z===void 0||(C=z.options)===null||C===void 0?void 0:C.firstWeekContainsDate)!==null&&y!==void 0?y:Ve.firstWeekContainsDate)!==null&&o!==void 0?o:(S=Ve.locale)===null||S===void 0||(U=S.options)===null||U===void 0?void 0:U.firstWeekContainsDate)!==null&&v!==void 0?v:1);if(!(Ze>=1&&Ze<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var tt=zr((R=(V=(W=(ye=d==null?void 0:d.weekStartsOn)!==null&&ye!==void 0?ye:d==null||(le=d.locale)===null||le===void 0||(he=le.options)===null||he===void 0?void 0:he.weekStartsOn)!==null&&W!==void 0?W:Ve.weekStartsOn)!==null&&V!==void 0?V:(xe=Ve.locale)===null||xe===void 0||(X=xe.options)===null||X===void 0?void 0:X.weekStartsOn)!==null&&R!==void 0?R:0);if(!(tt>=0&&tt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(Pe==="")return Ee===""?lr(c):new Date(NaN);var nt={firstWeekContainsDate:Ze,weekStartsOn:tt,locale:Ne},at=[new vS],gt=Pe.match(QO).map(function(Te){var de=Te[0];if(de in kv){var Oe=kv[de];return Oe(Te,Ne.formatLong)}return Te}).join("").match(VO),Ae=[],Qe=JM(gt),Ke;try{var _t=function(){var de=Ke.value;!(d!=null&&d.useAdditionalWeekYearTokens)&&gS(de)&&Pv(de,Pe,r),!(d!=null&&d.useAdditionalDayOfYearTokens)&&pS(de)&&Pv(de,Pe,r);var Oe=de[0],qe=BO[Oe];if(qe){var Ce=qe.incompatibleTokens;if(Array.isArray(Ce)){var Be=Ae.find(function(Dt){return Ce.includes(Dt.token)||Dt.token===Oe});if(Be)throw new RangeError("The format string mustn't contain `".concat(Be.fullToken,"` and `").concat(de,"` at the same time"))}else if(qe.incompatibleTokens==="*"&&Ae.length>0)throw new RangeError("The format string mustn't contain `".concat(de,"` and any other token at the same time"));Ae.push({token:Oe,fullToken:de});var et=qe.run(Ee,de,Ne.match,nt);if(!et)return{v:new Date(NaN)};at.push(et.setter),Ee=et.rest}else{if(Oe.match(GO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Oe+"`");if(de==="''"?de="'":Oe==="'"&&(de=WO(de)),Ee.indexOf(de)===0)Ee=Ee.slice(de.length);else return{v:new Date(NaN)}}};for(Qe.s();!(Ke=Qe.n()).done;){var ut=_t();if(mf(ut)==="object")return ut.v}}catch(Te){Qe.e(Te)}finally{Qe.f()}if(Ee.length>0&&ZO.test(Ee))return new Date(NaN);var ee=at.map(function(Te){return Te.priority}).sort(function(Te,de){return de-Te}).filter(function(Te,de,Oe){return Oe.indexOf(Te)===de}).map(function(Te){return at.filter(function(de){return de.priority===Te}).sort(function(de,Oe){return Oe.subPriority-de.subPriority})}).map(function(Te){return Te[0]}),ie=lr(c);if(isNaN(ie.getTime()))return new Date(NaN);var G=lS(ie,hS(ie)),P={},Q=JM(ee),J;try{for(Q.s();!(J=Q.n()).done;){var K=J.value;if(!K.validate(G,nt))return new Date(NaN);var me=K.set(G,P,nt);Array.isArray(me)?(G=me[0],cS(P,me[1])):G=me}}catch(Te){Q.e(Te)}finally{Q.f()}return G}function WO(r){return r.match(YO)[1].replace($O,"'")}function qO(r,s,c){Kn(2,arguments);var d=lr(r==null?void 0:r.start).getTime(),m=lr(r==null?void 0:r.end).getTime(),w=lr(s==null?void 0:s.start).getTime(),v=lr(s==null?void 0:s.end).getTime();if(!(d<=m&&w<=v))throw new RangeError("Invalid interval");return c!=null&&c.inclusive?d<=v&&w<=m:d<v&&w<m}var R0;(function(r){r[r.min30=30]="min30",r[r.min60=60]="min60"})(R0||(R0={}));const XO='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}:host{display:block;box-sizing:border-box}ul{list-style:none;padding-left:0}li{font-size:1.25rem;margin-top:12px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center}.booking-icon{width:16px;height:16px;margin-right:4px;background-color:white}.booking-icon--blocked{background-color:rgba(0, 0, 0, 0.247);}',tb=class{constructor(r){Hi(this,r),this.bookingCompleted=Tn(this,"bookingCompleted",7),this.bookingFailed=Tn(this,"bookingFailed",7),this.cancelCompleted=Tn(this,"cancelCompleted",7),this.cancelFailed=Tn(this,"cancelFailed",7),this.isInternetExplorer=ed(),this.location=void 0,this.duration=R0.min30,this.translations={book:"Book",cancel:"Cancel",booked:"Booked"},this.show=4,this.startHour=8,this.stopHour=18,this.bookingTitle="Booked",this.timeSlots=[]}locationChanged(){this.updateBookings()}updateDuration(){this.location&&this.updateBookings()}updateBookings(){this.getBookingsToday().then(r=>{const s=new Date().getHours()>=this.stopHour?1:0,c=this.getTimeSlots(s);for(let d of c)d=this.assignBookingInfoToTimeslot(d,r);this.timeSlots=c}).catch(r=>{this.timeSlots=[],console.warn(r)})}getTimeSlots(r=0){const s=jv(new Date,r);r>0&&s.setHours(0,0,0,0);const c=Math.max(s.getHours(),this.startHour);let d;this.duration===60||s.getHours()<this.startHour?d=0:d=s.getMinutes()<30?0:30;const m=[];if(c<this.stopHour){const w=HO(`${c}:${d}`,"HH:mm",jv(new Date,r)),v=zv(w,this.duration);for(m.push({start:w,end:v});m[m.length-1].start.getHours()<this.stopHour;){const o=m[m.length-1],y=o.end,T=zv(y,this.duration);if(m.push({start:y,end:T,isRequesting:!1}),o.start.getHours()===23&&o.end.getHours()===0)break}}return m.pop(),m}getBookingsToday(){if(!this.location||this.location.properties.bookable!==!0)return Promise.reject("NOT BOOKABLE");const r=new Date;r.setHours(r.getHours(),0,0,0);const s=new Date;return s.setHours(23,59,59,999),mapsindoors.services.BookingService.getBookingsUsingQuery({location:this.location,startTime:r.toUTCString(),endTime:s.toUTCString()})}assignBookingInfoToTimeslot(r,s){r.available=!0;for(const c of s){const d={start:new Date(c.startTime),end:new Date(c.endTime)};qO(r,d)&&(r.available=!1,r.cancellable=c.managed,r.cancellable&&(r.bookingId=c.bookingId))}return r}formatTime(r){return r.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}).toLowerCase()}updateTimeslot(r,s){const c=[...this.timeSlots],d=this.timeSlots[r],m=Object.assign(Object.assign({},d),s);c[r]=m,this.timeSlots=c}performBooking(r,s){this.updateTimeslot(s,{isRequesting:!0});const c=new mapsindoors.services.BookingService.MPBooking({ownerId:void 0,locationId:this.location.id,title:this.bookingTitle,description:null,participants:[],startTime:r.start,endTime:r.end});mapsindoors.services.BookingService.performBooking(c).then(d=>{this.updateTimeslot(s,{available:!1,bookingId:d.bookingId,cancellable:!0}),this.bookingCompleted.emit(d)}).catch(d=>{this.bookingFailed.emit(d)}).finally(()=>this.updateTimeslot(s,{isRequesting:!1}))}cancelBooking(r,s){this.updateTimeslot(s,{isRequesting:!0});const c=new mapsindoors.services.BookingService.MPBooking({id:r.bookingId});mapsindoors.services.BookingService.cancelBooking(c).then(()=>{this.updateTimeslot(s,{available:!0,bookingId:null,cancellable:!1}),this.cancelCompleted.emit()}).catch(d=>{this.cancelFailed.emit(d)}).finally(()=>this.updateTimeslot(s,{isRequesting:!1}))}renderButton(r,s){return r.cancellable?be("button",{disabled:r.isRequesting,type:"button",onClick:()=>this.cancelBooking(r,s),class:"mi-button mi-button--small mi-button--delete"},!this.isInternetExplorer&&be("mi-icon",{class:"booking-icon booking-icon--cancel","icon-name":"circled-minus"}),this.translations.cancel):r.available?be("button",{disabled:r.isRequesting,type:"button",onClick:()=>this.performBooking(r,s),class:"mi-button mi-button--primary mi-button--small"},!this.isInternetExplorer&&be("mi-icon",{class:"booking-icon","icon-name":"circled-plus"}),this.translations.book):be("button",{disabled:!0,type:"button",class:"mi-button mi-button--small"},!this.isInternetExplorer&&be("mi-icon",{class:"booking-icon booking-icon--blocked","icon-name":"circled-blocked"}),this.translations.booked)}componentWillLoad(){this.updateBookings()}render(){return be(qn,null,be("ul",null,this.timeSlots.map((r,s)=>s>=this.show?null:be("li",null,this.formatTime(r.start)," - ",this.formatTime(r.end),this.renderButton(r,s)))))}static get watchers(){return{location:["locationChanged"],duration:["updateDuration"]}}};tb.style=XO;const KO=Object.freeze(Object.defineProperty({__proto__:null,mi_location_booking:tb},Symbol.toStringTag,{value:"Module"})),JO=":host{display:block;color:#1f2937;font-weight:400}",ib=class{constructor(r){Hi(this,r),this.location=void 0,this.level="Level",this.showExternalId=!0}getInfoString(){const r=[];return this.location.properties.externalId&&this.showExternalId&&r.push(this.location.properties.externalId),this.location.properties.floorName&&r.push(`${this.level} ${this.location.properties.floorName}`),this.location.properties.building&&(this.location.properties.venue?this.location.properties.venue.toLowerCase()!==this.location.properties.building.toLowerCase()&&r.push(this.location.properties.building):r.push(this.location.properties.building)),this.location.properties.venue&&r.push(this.location.properties.venue),this.location.properties.subtitle&&r.push(this.location.properties.subtitle),r.join(" · ")}render(){var r;return!((r=this.location)===null||r===void 0)&&r.properties?this.getInfoString():null}};ib.style=JO;const eL=Object.freeze(Object.defineProperty({__proto__:null,mi_location_info:ib},Symbol.toStringTag,{value:"Module"})),nb={miSDKUrl:"https://app.mapsindoors.com/mapsindoors/js/sdk/3.12.0/mapsindoors-3.12.0.js.gz",miSDKUrlV4:"https://app.mapsindoors.com/mapsindoors/js/sdk/4.13.0/mapsindoors-4.13.0.js.gz"};var tL=function r(s,c){if(s===c)return!0;if(s&&c&&typeof s=="object"&&typeof c=="object"){if(s.constructor!==c.constructor)return!1;var d,m,w;if(Array.isArray(s)){if(d=s.length,d!=c.length)return!1;for(m=d;m--!==0;)if(!r(s[m],c[m]))return!1;return!0}if(s.constructor===RegExp)return s.source===c.source&&s.flags===c.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===c.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===c.toString();if(w=Object.keys(s),d=w.length,d!==Object.keys(c).length)return!1;for(m=d;m--!==0;)if(!Object.prototype.hasOwnProperty.call(c,w[m]))return!1;for(m=d;m--!==0;){var v=w[m];if(!r(s[v],c[v]))return!1}return!0}return s!==s&&c!==c};const rb="__googleMapsScriptId";var ul;(function(r){r[r.INITIALIZED=0]="INITIALIZED",r[r.LOADING=1]="LOADING",r[r.SUCCESS=2]="SUCCESS",r[r.FAILURE=3]="FAILURE"})(ul||(ul={}));class sa{constructor({apiKey:s,authReferrerPolicy:c,channel:d,client:m,id:w=rb,language:v,libraries:o=[],mapIds:y,nonce:T,region:z,retries:C=3,url:S="https://maps.googleapis.com/maps/api/js",version:U}){if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=s,this.authReferrerPolicy=c,this.channel=d,this.client=m,this.id=w||rb,this.language=v,this.libraries=o,this.mapIds=y,this.nonce=T,this.region=z,this.retries=C,this.url=S,this.version=U,sa.instance){if(!tL(this.options,sa.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(sa.instance.options)}`);return sa.instance}sa.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?ul.FAILURE:this.done?ul.SUCCESS:this.loading?ul.LOADING:ul.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let s=this.url;return s+=`?callback=${this.CALLBACK}`,this.apiKey&&(s+=`&key=${this.apiKey}`),this.channel&&(s+=`&channel=${this.channel}`),this.client&&(s+=`&client=${this.client}`),this.libraries.length>0&&(s+=`&libraries=${this.libraries.join(",")}`),this.language&&(s+=`&language=${this.language}`),this.region&&(s+=`&region=${this.region}`),this.version&&(s+=`&v=${this.version}`),this.mapIds&&(s+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(s+=`&auth_referrer_policy=${this.authReferrerPolicy}`),s}deleteScript(){const s=document.getElementById(this.id);s&&s.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((s,c)=>{this.loadCallback(d=>{d?c(d.error):s(window.google)})})}loadCallback(s){this.callbacks.push(s),this.execute()}setScript(){if(document.getElementById(this.id)){this.callback();return}const s=this.createUrl(),c=document.createElement("script");c.id=this.id,c.type="text/javascript",c.src=s,c.onerror=this.loadErrorCallback.bind(this),c.defer=!0,c.async=!0,this.nonce&&(c.nonce=this.nonce),document.head.appendChild(c)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(s){if(this.errors.push(s),this.errors.length<=this.retries){const c=this.errors.length*Math.pow(2,this.errors.length);console.log(`Failed to load Google Maps script, retrying in ${c} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},c)}else this.onerrorEvent=s,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(s=>{s(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}}const iL=':host{display:block}:host>div{height:100%}.mapsindoors.floor-selector{margin:10px;position:absolute;border-radius:2px;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.3);width:40px;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";-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:18px}.mapsindoors.floor-selector a{position:relative;display:block;float:none;margin-top:-1px;text-align:center;cursor:pointer;border-radius:2px;background:#fff;z-index:0;height:40px;line-height:40px}.mapsindoors.floor-selector a:hover{background:#ddd;border-color:#999;z-index:2}.mapsindoors.floor-selector a.active{background:#ddd;border-color:#00b1ff;z-index:2}.mapsindoors.floor-selector a:not(:first-child):not(:last-child){border-radius:0}.mapsindoors.floor-selector a:first-child:not(:last-child){border-top-right-radius:2px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mapsindoors.floor-selector a:last-child:not(:first-child){border-top-right-radius:0;border-bottom-left-radius:2px;border-top-left-radius:0}.mapsindoors.position-control{margin:10px;position:absolute}.mapsindoors.position-control__button{border:none;margin:0;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;width:40px;height:40px;background-color:transparent;background-size:cover;outline:none;box-shadow:0px 4px 4px rgba(0, 0, 0, 0.16), 0px 2px 2px rgba(0, 0, 0, 0.18), 0px 1px 1px rgba(0, 0, 0, 0.2);border-radius:50%}.mapsindoors.position-control__button--unknown{background-image:url(data:image/png;base64,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)}.mapsindoors.position-control__button--requesting{background-image:url(data:image/png;base64,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)}.mapsindoors.position-control__button--known{background-image:url(data:image/png;base64,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)}.mapsindoors.position-control__button--centered{background-image:url(data:image/png;base64,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)}',ob=class{constructor(r){Hi(this,r),this.mapsIndoorsReady=Tn(this,"mapsIndoorsReady",7),this.directionsRendererInstance=null,this.gmApiKey="",this.miApiKey="",this.gmOptions={zoom:17,maxZoom:21,center:{lat:0,lng:0},mapTypeControl:!1,streetViewControl:!1},this.disableExternalLinks=!1,this.floorSelectorControlPosition=void 0,this.floorIndex=void 0,this.myPositionControlPosition=void 0,this.polygonHighlightOptions={strokeColor:"#EF6CCE",strokeOpacity:1,strokeWeight:2,fillColor:"#EF6CCE",fillOpacity:.2},this.language="en",this.polylineOptions={color:"#3071d9",opacity:1,weight:4}}apiKeyChange(r){mapsindoors.MapsIndoors.setMapsIndoorsApiKey(r)}gmOptionsChange(r){this.googleMapsInstance.setOptions(r)}setExternalLinkBehavior(r){r===!0?this.mapElement.addEventListener("click",this.preventExternalLink):this.mapElement.removeEventListener("click",this.preventExternalLink)}floorSelectorControlPositionChange(r,s){this.floorSelectorInstance&&this.setFloorSelectorControl(r,s)}floorIndexChange(r,s){r===null&&(r="0"),r!==s&&r!==this.mapsIndoorsInstance.getFloor()&&this.mapsIndoorsInstance.setFloor(r)}myPositionControlPositionChange(r,s){this.setMyPositionControl(r,s)}polylineOptionsChange(r){this.directionsRendererInstance&&this.directionsRendererInstance.setOptions({strokeColor:r.color?r.color:"#3071d9",strokeOpacity:r.opacity?r.opacity:1,strokeWeight:r.weight?r.weight:4})}async getMapInstance(){return Promise.resolve(this.googleMapsInstance)}async getMapsIndoorsInstance(){return Promise.resolve(this.mapsIndoorsInstance)}async getDirectionsServiceInstance(){return Promise.resolve(this.directionsServiceInstance)}async getDirectionsRendererInstance(){return Promise.resolve(this.directionsRendererInstance)}async highlightLocation(r){this.polygonHighlightOptions&&(this.highlightedLocationId&&this.highlightedLocationId===r.id||(this.highlightedLocationId&&this.mapsIndoorsInstance.setDisplayRule(this.highlightedLocationId,null),this.mapsIndoorsInstance.setDisplayRule(r.id,{polygonVisible:!0,polygonZoomFrom:"0",polygonZoomTo:"22",zIndex:1e3,polygonFillColor:this.polygonHighlightOptions.fillColor,polygonFillOpacity:this.polygonHighlightOptions.fillOpacity,polygonStrokeColor:this.polygonHighlightOptions.strokeColor,polygonStrokeOpacity:this.polygonHighlightOptions.strokeOpacity,polygonStrokeWeight:this.polygonHighlightOptions.strokeWeight}),this.highlightedLocationId=r.id))}async clearHighlightLocation(){this.highlightedLocationId&&(this.mapsIndoorsInstance.setDisplayRule(this.highlightedLocationId,null),this.highlightedLocationId=null)}async componentDidLoad(){await this.loadGoogleMapsApi(),await this.initializeMapsIndoorsSDK(),await this.setupMap(),this.setExternalLinkBehavior(this.disableExternalLinks),this.addEventListeners(),this.floorSelectorControlPosition&&this.showFloorSelector(),this.myPositionControlPosition&&this.setMyPositionControl(this.myPositionControlPosition)}disconnectedCallback(){this.mapsIndoorsInstance.deallocate(),this.mapElement.remove(),this.mapElement=null}loadGoogleMapsApi(){if(typeof google>"u")return new sa({apiKey:this.gmApiKey,version:"quarterly",libraries:["geometry","places"]}).load()}initializeMapsIndoorsSDK(){return new Promise(r=>{if(typeof mapsindoors<"u")return mapsindoors.MapsIndoors.setMapsIndoorsApiKey(this.miApiKey),mapsindoors.MapsIndoors.setLanguage(this.language),r();const s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src",`${nb.miSDKUrlV4}?apikey=${this.miApiKey}`),document.body.appendChild(s),s.onload=()=>r()})}setupMap(){return new Promise(r=>{const s=Object.assign({element:this.mapElement},this.gmOptions),c=new mapsindoors.mapView.GoogleMapsView(s);this.googleMapsInstance=c.getMap(),this.mapsIndoorsInstance=new mapsindoors.MapsIndoors({mapView:c}),this.mapsIndoorsInstance.on("ready",async()=>{this.floorIndex!==void 0?this.mapsIndoorsInstance.setFloor(this.floorIndex):this.floorIndex=this.mapsIndoorsInstance.getFloor(),this.initializeDirectionsService(),this.initializeDirectionsRenderer(),this.mapsIndoorsReady.emit(),r()})})}initializeDirectionsService(){const r=new mapsindoors.directions.GoogleMapsProvider;this.directionsServiceInstance=new mapsindoors.services.DirectionsService(r)}initializeDirectionsRenderer(){this.directionsRendererInstance=new mapsindoors.directions.DirectionsRenderer({mapsIndoors:this.mapsIndoorsInstance,fitBounds:!0,strokeColor:this.polylineOptions.color,strokeOpacity:this.polylineOptions.opacity,strokeWeight:this.polylineOptions.weight,visible:!0})}addEventListeners(){this.mapsIndoorsInstance.on("click",r=>{this.highlightLocation(r)}),this.mapsIndoorsInstance.on("floor_changed",r=>{this.floorIndex=r})}preventExternalLink(r){r.target.closest('a[target="_blank"]')&&r.preventDefault()}showFloorSelector(){this.setFloorSelectorControl(this.floorSelectorControlPosition)}removeGoogleMapControl(r,s){const d=this.googleMapsInstance.controls[google.maps.ControlPosition[r]].getArray().findIndex(m=>m.classList.contains(s));this.googleMapsInstance.controls[google.maps.ControlPosition[r]].removeAt(d)}setFloorSelectorControl(r,s=void 0){r===null?(this.removeGoogleMapControl(s,"floor-selector"),this.floorSelectorElement=null,this.floorSelectorInstance=null):this.floorSelectorInstance?(this.removeGoogleMapControl(s,"floor-selector"),this.googleMapsInstance.controls[google.maps.ControlPosition[r]].push(this.floorSelectorElement)):(this.floorSelectorElement=document.createElement("div"),this.floorSelectorInstance=new mapsindoors.FloorSelector(this.floorSelectorElement,this.mapsIndoorsInstance),this.googleMapsInstance.controls[google.maps.ControlPosition[r]].push(this.floorSelectorElement))}setMyPositionControl(r,s=void 0){r===null?(this.removeGoogleMapControl(google.maps.ControlPosition[s],"position-control"),this.positionControlElement=null,this.positionControlInstance=null):this.positionControlInstance?(this.removeGoogleMapControl(s,"position-control"),this.googleMapsInstance.controls[google.maps.ControlPosition[r]].push(this.positionControlElement)):(this.positionControlElement=document.createElement("div"),this.positionControlInstance=new mapsindoors.PositionControl(this.positionControlElement,{mapsIndoors:this.mapsIndoorsInstance,positionOptions:{enableHighAccuracy:!1,maximumAge:3e5,timeout:1e4}}),this.googleMapsInstance.controls[google.maps.ControlPosition[r]].push(this.positionControlElement))}render(){return be("div",{ref:r=>this.mapElement=r})}static get watchers(){return{miApiKey:["apiKeyChange"],gmOptions:["gmOptionsChange"],disableExternalLinks:["setExternalLinkBehavior"],floorSelectorControlPosition:["floorSelectorControlPositionChange"],floorIndex:["floorIndexChange"],myPositionControlPosition:["myPositionControlPositionChange"],polylineOptions:["polylineOptionsChange"]}}};ob.style=iL;const nL=Object.freeze(Object.defineProperty({__proto__:null,mi_map_googlemaps:ob},Symbol.toStringTag,{value:"Module"}));class rL{constructor(s,c){this.map=s,this.floorSelectorElement=document.createElement("div"),this.floorSelectorInstance=new mapsindoors.FloorSelector(this.floorSelectorElement,c)}onAdd(){return this.floorSelectorElement.classList.add("mapboxgl-ctrl"),this.floorSelectorElement}onRemove(){this.floorSelectorElement.parentNode.removeChild(this.floorSelectorElement),this.map=void 0}}class oL{constructor(s,c){this.map=s,this.myPositionControlElement=document.createElement("div"),this.myPositionControlInstance=new mapsindoors.PositionControl(this.myPositionControlElement,{mapsIndoors:c,positionOptions:{enableHighAccuracy:!1,maximumAge:3e5,timeout:1e4}})}onAdd(){return this.myPositionControlElement.classList.add("mapboxgl-ctrl"),this.myPositionControlElement}onRemove(){this.myPositionControlElement.parentNode.removeChild(this.myPositionControlElement),this.map=void 0}}const sL=':host{display:block}:host>div{height:100%}.mapsindoors.floor-selector{border-radius:2px;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.3);width:40px;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";-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:18px}.mapsindoors.floor-selector a{position:relative;display:block;float:none;margin-top:-1px;text-align:center;cursor:pointer;border-radius:2px;background:#fff;z-index:0;height:40px;line-height:40px}.mapsindoors.floor-selector a:hover{background:#ddd;border-color:#999;z-index:2}.mapsindoors.floor-selector a.active{background:#ddd;border-color:#00b1ff;z-index:2}.mapsindoors.floor-selector a:not(:first-child):not(:last-child){border-radius:0}.mapsindoors.floor-selector a:first-child:not(:last-child){border-top-right-radius:2px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mapsindoors.floor-selector a:last-child:not(:first-child){border-top-right-radius:0;border-bottom-left-radius:2px;border-top-left-radius:0}.mapsindoors.position-control__button{border:none;margin:0;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;width:40px;height:40px;background-color:transparent;background-size:cover;outline:none;box-shadow:0px 4px 4px rgba(0, 0, 0, 0.16), 0px 2px 2px rgba(0, 0, 0, 0.18), 0px 1px 1px rgba(0, 0, 0, 0.2);border-radius:50%}.mapsindoors.position-control__button--unknown{background-image:url(data:image/png;base64,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)}.mapsindoors.position-control__button--requesting{background-image:url(data:image/png;base64,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)}.mapsindoors.position-control__button--known{background-image:url(data:image/png;base64,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)}.mapsindoors.position-control__button--centered{background-image:url(data:image/png;base64,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)}',sb=class{constructor(r){Hi(this,r),this.mapsIndoorsReady=Tn(this,"mapsIndoorsReady",7),this.directionsRendererInstance=null,this.accessToken=void 0,this.miApiKey="",this.disableExternalLinks=!1,this.floorSelectorControlPosition=void 0,this.floorIndex=void 0,this.myPositionControlPosition=void 0,this.polygonHighlightOptions={strokeColor:"#EF6CCE",strokeOpacity:1,strokeWeight:2,fillColor:"#EF6CCE",fillOpacity:.2},this.polylineOptions={color:"#3071d9",opacity:1,weight:4},this.zoom="17",this.maxPitch=60,this.maxZoom=void 0,this.bearing="0",this.pitch="0",this.language="en"}apiKeyChange(r){mapsindoors.MapsIndoors.setMapsIndoorsApiKey(r)}setExternalLinkBehavior(r){r===!0?this.mapElement.addEventListener("click",this.preventExternalLink):this.mapElement.removeEventListener("click",this.preventExternalLink)}floorSelectorControlPositionChange(r){this.floorSelectorControl&&this.setFloorSelectorControl(r)}floorIndexChange(r,s){r===null&&(r="0"),r!==s&&r!==this.mapsIndoorsInstance.getFloor()&&this.mapsIndoorsInstance.setFloor(r)}myPositionControlPositionChange(r){this.setMyPositionControl(r)}polylineOptionsChange(r){this.directionsRendererInstance&&this.directionsRendererInstance.setOptions({strokeColor:r.color?r.color:"#3071d9",strokeOpacity:r.opacity?r.opacity:1,strokeWeight:r.weight?r.weight:4})}zoomChange(r,s){r!==s&&r!==this.mapboxInstance.getZoom()&&(r===null&&(r=0),this.mapboxInstance.setZoom(r))}maxPitchChange(r,s){r!==s&&r!==this.mapboxInstance.getMaxPitch()&&(r===null&&(r=0),this.mapboxInstance.setMaxPitch(r))}maxZoomChange(r,s){r!==s&&r!==this.mapboxInstance.getMaxZoom()&&(r===null&&(r=0),this.mapboxInstance.setMaxZoom(r))}bearingChange(r,s){r!==s&&r!==this.mapboxInstance.getBearing()&&(r===null&&(r=0),this.mapboxInstance.setBearing(r))}pitchChange(r,s){r!==s&&r!==this.mapboxInstance.getPitch()&&(r===null&&(r=0),this.mapboxInstance.setPitch(r))}async getMapInstance(){return Promise.resolve(this.mapboxInstance)}async getMapsIndoorsInstance(){return Promise.resolve(this.mapsIndoorsInstance)}async getDirectionsServiceInstance(){return Promise.resolve(this.directionsServiceInstance)}async getDirectionsRendererInstance(){return Promise.resolve(this.directionsRendererInstance)}async highlightLocation(r){this.polygonHighlightOptions&&(this.highlightedLocationId&&this.highlightedLocationId===r.id||(this.highlightedLocationId&&this.mapsIndoorsInstance.setDisplayRule(this.highlightedLocationId,null),this.mapsIndoorsInstance.setDisplayRule(r.id,{polygonVisible:!0,polygonZoomFrom:"0",polygonZoomTo:"22",zIndex:1e3,polygonFillColor:this.polygonHighlightOptions.fillColor,polygonFillOpacity:this.polygonHighlightOptions.fillOpacity,polygonStrokeColor:this.polygonHighlightOptions.strokeColor,polygonStrokeOpacity:this.polygonHighlightOptions.strokeOpacity,polygonStrokeWeight:this.polygonHighlightOptions.strokeWeight}),this.highlightedLocationId=r.id))}async clearHighlightLocation(){this.highlightedLocationId&&(this.mapsIndoorsInstance.setDisplayRule(this.highlightedLocationId,null),this.highlightedLocationId=null)}async componentDidLoad(){await this.insertMapBoxScript(),await this.initializeMapsIndoorsSDK(),await this.setupMap(),this.setExternalLinkBehavior(this.disableExternalLinks),this.addEventListeners(),this.floorSelectorControlPosition&&this.showFloorSelector(),this.myPositionControlPosition&&this.setMyPositionControl(this.myPositionControlPosition)}disconnectedCallback(){this.mapsIndoorsInstance.deallocate(),this.mapElement.remove(),this.mapElement=null}insertMapBoxScript(){if(typeof mapboxgl>"u")return new Promise(r=>{const s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src","https://api.mapbox.com/mapbox-gl-js/v2.3.0/mapbox-gl.js"),document.body.appendChild(s),s.onload=()=>r()})}initializeMapsIndoorsSDK(){return new Promise(r=>{if(typeof mapsindoors<"u")return mapsindoors.MapsIndoors.setMapsIndoorsApiKey(this.miApiKey),mapsindoors.MapsIndoors.setLanguage(this.language),r();const s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src",`${nb.miSDKUrlV4}?apikey=${this.miApiKey}`),document.body.appendChild(s),s.onload=()=>r()})}setupMap(){return new Promise(r=>{const s={accessToken:this.accessToken,element:this.mapElement,zoom:this.zoom,maxZoom:this.maxZoom,maxPitch:this.maxPitch,bearing:this.bearing,pitch:this.pitch},c=new mapsindoors.mapView.MapboxView(s);this.mapboxInstance=c.getMap(),this.mapsIndoorsInstance=new mapsindoors.MapsIndoors({mapView:c,labelOptions:{pixelOffset:{width:0,height:14},style:{fontSize:"11px"}}});const d=new mapboxgl.NavigationControl;this.mapboxInstance.addControl(d,"top-left"),this.mapsIndoorsInstance.on("ready",async()=>{this.floorIndex!==void 0?this.mapsIndoorsInstance.setFloor(this.floorIndex):this.floorIndex=this.mapsIndoorsInstance.getFloor(),this.initializeDirectionsService(),this.initializeDirectionsRenderer(),this.mapsIndoorsReady.emit(),r()})})}initializeDirectionsService(){const r=new mapsindoors.directions.MapboxProvider(this.accessToken);this.directionsServiceInstance=new mapsindoors.services.DirectionsService(r)}initializeDirectionsRenderer(){this.directionsRendererInstance=new mapsindoors.directions.DirectionsRenderer({mapsIndoors:this.mapsIndoorsInstance,fitBounds:!0,strokeColor:this.polylineOptions.color,strokeOpacity:this.polylineOptions.opacity,strokeWeight:this.polylineOptions.weight,visible:!0})}addEventListeners(){this.mapsIndoorsInstance.on("click",r=>{this.highlightLocation(r)}),this.mapsIndoorsInstance.on("floor_changed",r=>{this.floorIndex=r}),this.mapboxInstance.on("zoomend",()=>{this.zoom=this.mapboxInstance.getZoom().toString()}),this.mapboxInstance.on("pitchend",()=>{this.pitch=this.mapboxInstance.getPitch().toString()}),this.mapboxInstance.on("rotateend",()=>{this.bearing=this.mapboxInstance.getBearing().toString()})}preventExternalLink(r){r.target.closest('a[target="_blank"]')&&r.preventDefault()}showFloorSelector(){this.setFloorSelectorControl(this.floorSelectorControlPosition)}setFloorSelectorControl(r){r===null?(this.mapboxInstance.removeControl(this.floorSelectorControl),this.floorSelectorControl=null):this.floorSelectorControl?(this.mapboxInstance.removeControl(this.floorSelectorControl),this.mapboxInstance.addControl(this.floorSelectorControl,this.floorSelectorControlPosition)):(this.floorSelectorControl=new rL(this.mapboxInstance,this.mapsIndoorsInstance),this.mapboxInstance.addControl(this.floorSelectorControl,this.floorSelectorControlPosition))}setMyPositionControl(r){r===null?(this.mapboxInstance.removeControl(this.myPositionControl),this.myPositionControl=null):this.myPositionControl?(this.mapboxInstance.removeControl(this.myPositionControl),this.mapboxInstance.addControl(this.myPositionControl,this.myPositionControlPosition)):(this.myPositionControl=new oL(this.mapboxInstance,this.mapsIndoorsInstance),this.mapboxInstance.addControl(this.myPositionControl,this.myPositionControlPosition))}render(){return be(qn,null,be("link",{href:"https://api.mapbox.com/mapbox-gl-js/v2.3.0/mapbox-gl.css",rel:"stylesheet"}),be("div",{ref:r=>this.mapElement=r}))}static get watchers(){return{miApiKey:["apiKeyChange"],disableExternalLinks:["setExternalLinkBehavior"],floorSelectorControlPosition:["floorSelectorControlPositionChange"],floorIndex:["floorIndexChange"],myPositionControlPosition:["myPositionControlPositionChange"],polylineOptions:["polylineOptionsChange"],zoom:["zoomChange"],maxPitch:["maxPitchChange"],maxZoom:["maxZoomChange"],bearing:["bearingChange"],pitch:["pitchChange"]}}};sb.style=sL;const aL=Object.freeze(Object.defineProperty({__proto__:null,mi_map_mapbox:sb},Symbol.toStringTag,{value:"Module"})),lL=':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 mi-card{position:relative;overflow:hidden;min-width:312px}:host mi-card .content h1{display:inline-flex;cursor:default;align-items:center;text-transform:uppercase;white-space:nowrap;margin:0;font-size:1rem;font-weight:600;color:#6b7280;margin-bottom:8px}:host mi-card .content h1 svg{fill:#9ca3af;width:16px;height:16px;margin-left:8px}:host mi-card .content section{position:relative}:host mi-card .content section p{margin:0;font-size:3rem;line-height:3rem;font-weight:500;color:#1c1917}:host mi-card .content section p.error{font-size:1rem;font-weight:500;color:#6b7280}:host mi-card .content section p.hidden{visibility:hidden}:host mi-card .content section p.tool-tip{box-sizing:border-box;visibility:hidden;overflow:hidden;position:absolute;top:0px;right:0px;bottom:0px;left:0px;opacity:0;transition:all 100ms;z-index:700;background-color:#ffffff;font-size:0.875rem;font-weight:400;line-height:1rem;margin:0}:host mi-card .content section p.tool-tip.visible{opacity:1;visibility:visible}:host mi-card .content section mi-spinner{display:inline-block;vertical-align:middle;width:100%}',ab=class{constructor(r){Hi(this,r),this.showToolTip=!1,this.label="",this.value="",this.tip=void 0,this.spinner=!1,this.error=void 0}render(){return be(qn,null,be("mi-card",null,this.renderContent()))}renderToolTip(){if(this.tip>"")return be("p",{class:{"tool-tip":!0,visible:this.tip&&this.showToolTip}},this.tip)}getInfoIcon(){if(this.tip>"")return be("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24"},be("path",{d:"M0 0h24v24H0V0z",fill:"none"}),be("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92c-.5.51-.86.97-1.04 1.69-.08.32-.13.68-.13 1.14h-2v-.5c0-.46.08-.9.22-1.31.2-.58.53-1.1.95-1.52l1.24-1.26c.46-.44.68-1.1.55-1.8-.13-.72-.69-1.33-1.39-1.53-1.11-.31-2.14.32-2.47 1.27-.12.37-.43.65-.82.65h-.3C8.4 9 8 8.44 8.16 7.88c.43-1.47 1.68-2.59 3.23-2.83 1.52-.24 2.97.55 3.87 1.8 1.18 1.63.83 3.38-.19 4.4z"}))}renderContent(){let r;return this.value?r=Mv(this.value)?KE(this.value):this.value:this.error?r=this.error:this.spinner?r=be("mi-spinner",null):r=" ",be("div",{class:"content"},be("h1",{onMouseOver:()=>this.showToolTip=!0,onMouseOut:()=>this.showToolTip=!1},this.label," ",this.getInfoIcon()),be("section",null,this.renderToolTip(),be("p",{class:{error:!!this.error,hidden:this.tip&&this.showToolTip}},r)))}};ab.style=lL;const cL=Object.freeze(Object.defineProperty({__proto__:null,mi_metric_card:ab},Symbol.toStringTag,{value:"Module"}));var uL=Uc(function(r,s){(function(c,d){var m="1.0.35",w="",v="?",o="function",y="undefined",T="object",z="string",C="major",S="model",U="name",R="type",V="vendor",W="version",ye="architecture",le="console",he="mobile",xe="tablet",X="smarttv",Ee="wearable",Pe="embedded",Ve=350,Ne="Amazon",Ze="Apple",tt="ASUS",nt="BlackBerry",at="Browser",gt="Chrome",Ae="Edge",Qe="Firefox",Ke="Google",_t="Huawei",ut="LG",ee="Microsoft",ie="Motorola",G="Opera",P="Samsung",Q="Sharp",J="Sony",K="Xiaomi",me="Zebra",Te="Facebook",de="Chromium OS",Oe="Mac OS",qe=function(hi,di){var Pt={};for(var Ii in hi)di[Ii]&&di[Ii].length%2===0?Pt[Ii]=di[Ii].concat(hi[Ii]):Pt[Ii]=hi[Ii];return Pt},Ce=function(hi){for(var di={},Pt=0;Pt<hi.length;Pt++)di[hi[Pt].toUpperCase()]=hi[Pt];return di},Be=function(hi,di){return typeof hi===z?et(di).indexOf(et(hi))!==-1:!1},et=function(hi){return hi.toLowerCase()},Dt=function(hi){return typeof hi===z?hi.replace(/[^\d\.]/g,w).split(".")[0]:d},He=function(hi,di){if(typeof hi===z)return hi=hi.replace(/^\s\s*/,w),typeof di===y?hi:hi.substring(0,Ve)},Tt=function(hi,di){for(var Pt=0,Ii,Vi,zi,_i,si,ln;Pt<di.length&&!si;){var An=di[Pt],Ye=di[Pt+1];for(Ii=Vi=0;Ii<An.length&&!si&&An[Ii];)if(si=An[Ii++].exec(hi),si)for(zi=0;zi<Ye.length;zi++)ln=si[++Vi],_i=Ye[zi],typeof _i===T&&_i.length>0?_i.length===2?typeof _i[1]==o?this[_i[0]]=_i[1].call(this,ln):this[_i[0]]=_i[1]:_i.length===3?typeof _i[1]===o&&!(_i[1].exec&&_i[1].test)?this[_i[0]]=ln?_i[1].call(this,ln,_i[2]):d:this[_i[0]]=ln?ln.replace(_i[1],_i[2]):d:_i.length===4&&(this[_i[0]]=ln?_i[3].call(this,ln.replace(_i[1],_i[2])):d):this[_i]=ln||d;Pt+=2}},ti=function(hi,di){for(var Pt in di)if(typeof di[Pt]===T&&di[Pt].length>0){for(var Ii=0;Ii<di[Pt].length;Ii++)if(Be(di[Pt][Ii],hi))return Pt===v?d:Pt}else if(Be(di[Pt],hi))return Pt===v?d:Pt;return hi},ni={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},vi={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ji={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[W,[U,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[W,[U,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[U,W],[/opios[\/ ]+([\w\.]+)/i],[W,[U,G+" Mini"]],[/\bopr\/([\w\.]+)/i],[W,[U,G]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[U,W],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[W,[U,"UC"+at]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[W,[U,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[W,[U,"WeChat"]],[/konqueror\/([\w\.]+)/i],[W,[U,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[W,[U,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[W,[U,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[U,/(.+)/,"$1 Secure "+at],W],[/\bfocus\/([\w\.]+)/i],[W,[U,Qe+" Focus"]],[/\bopt\/([\w\.]+)/i],[W,[U,G+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[W,[U,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[W,[U,"Dolphin"]],[/coast\/([\w\.]+)/i],[W,[U,G+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[W,[U,"MIUI "+at]],[/fxios\/([-\w\.]+)/i],[W,[U,Qe]],[/\bqihu|(qi?ho?o?|360)browser/i],[[U,"360 "+at]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[U,/(.+)/,"$1 "+at],W],[/(comodo_dragon)\/([\w\.]+)/i],[[U,/_/g," "],W],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[U,W],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[U],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[U,Te],W],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[U,W],[/\bgsa\/([\w\.]+) .*safari\//i],[W,[U,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[W,[U,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[W,[U,gt+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[U,gt+" WebView"],W],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[W,[U,"Android "+at]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[U,W],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[W,[U,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[W,U],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[U,[W,ti,ni]],[/(webkit|khtml)\/([\w\.]+)/i],[U,W],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[U,"Netscape"],W],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[W,[U,Qe+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[U,W],[/(cobalt)\/([\w\.]+)/i],[U,[W,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[ye,"amd64"]],[/(ia32(?=;))/i],[[ye,et]],[/((?:i[346]|x)86)[;\)]/i],[[ye,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[ye,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[ye,"armhf"]],[/windows (ce|mobile); ppc;/i],[[ye,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[ye,/ower/,w,et]],[/(sun4\w)[;\)]/i],[[ye,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[ye,et]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[S,[V,P],[R,xe]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[S,[V,P],[R,he]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[S,[V,Ze],[R,he]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[S,[V,Ze],[R,xe]],[/(macintosh);/i],[S,[V,Ze]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[S,[V,Q],[R,he]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[S,[V,_t],[R,xe]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[S,[V,_t],[R,he]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[S,/_/g," "],[V,K],[R,he]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[S,/_/g," "],[V,K],[R,xe]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[S,[V,"OPPO"],[R,he]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[S,[V,"Vivo"],[R,he]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[S,[V,"Realme"],[R,he]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[S,[V,ie],[R,he]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[S,[V,ie],[R,xe]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[S,[V,ut],[R,xe]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[S,[V,ut],[R,he]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[S,[V,"Lenovo"],[R,xe]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[S,/_/g," "],[V,"Nokia"],[R,he]],[/(pixel c)\b/i],[S,[V,Ke],[R,xe]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[S,[V,Ke],[R,he]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[S,[V,J],[R,he]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[S,"Xperia Tablet"],[V,J],[R,xe]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[S,[V,"OnePlus"],[R,he]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[S,[V,Ne],[R,xe]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[S,/(.+)/g,"Fire Phone $1"],[V,Ne],[R,he]],[/(playbook);[-\w\),; ]+(rim)/i],[S,V,[R,xe]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[S,[V,nt],[R,he]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[S,[V,tt],[R,xe]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[S,[V,tt],[R,he]],[/(nexus 9)/i],[S,[V,"HTC"],[R,xe]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[V,[S,/_/g," "],[R,he]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[S,[V,"Acer"],[R,xe]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[S,[V,"Meizu"],[R,he]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[V,S,[R,he]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[V,S,[R,xe]],[/(surface duo)/i],[S,[V,ee],[R,xe]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[S,[V,"Fairphone"],[R,he]],[/(u304aa)/i],[S,[V,"AT&T"],[R,he]],[/\bsie-(\w*)/i],[S,[V,"Siemens"],[R,he]],[/\b(rct\w+) b/i],[S,[V,"RCA"],[R,xe]],[/\b(venue[\d ]{2,7}) b/i],[S,[V,"Dell"],[R,xe]],[/\b(q(?:mv|ta)\w+) b/i],[S,[V,"Verizon"],[R,xe]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[S,[V,"Barnes & Noble"],[R,xe]],[/\b(tm\d{3}\w+) b/i],[S,[V,"NuVision"],[R,xe]],[/\b(k88) b/i],[S,[V,"ZTE"],[R,xe]],[/\b(nx\d{3}j) b/i],[S,[V,"ZTE"],[R,he]],[/\b(gen\d{3}) b.+49h/i],[S,[V,"Swiss"],[R,he]],[/\b(zur\d{3}) b/i],[S,[V,"Swiss"],[R,xe]],[/\b((zeki)?tb.*\b) b/i],[S,[V,"Zeki"],[R,xe]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[V,"Dragon Touch"],S,[R,xe]],[/\b(ns-?\w{0,9}) b/i],[S,[V,"Insignia"],[R,xe]],[/\b((nxa|next)-?\w{0,9}) b/i],[S,[V,"NextBook"],[R,xe]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[V,"Voice"],S,[R,he]],[/\b(lvtel\-)?(v1[12]) b/i],[[V,"LvTel"],S,[R,he]],[/\b(ph-1) /i],[S,[V,"Essential"],[R,he]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[S,[V,"Envizen"],[R,xe]],[/\b(trio[-\w\. ]+) b/i],[S,[V,"MachSpeed"],[R,xe]],[/\btu_(1491) b/i],[S,[V,"Rotor"],[R,xe]],[/(shield[\w ]+) b/i],[S,[V,"Nvidia"],[R,xe]],[/(sprint) (\w+)/i],[V,S,[R,he]],[/(kin\.[onetw]{3})/i],[[S,/\./g," "],[V,ee],[R,he]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[S,[V,me],[R,xe]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[S,[V,me],[R,he]],[/smart-tv.+(samsung)/i],[V,[R,X]],[/hbbtv.+maple;(\d+)/i],[[S,/^/,"SmartTV"],[V,P],[R,X]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[V,ut],[R,X]],[/(apple) ?tv/i],[V,[S,Ze+" TV"],[R,X]],[/crkey/i],[[S,gt+"cast"],[V,Ke],[R,X]],[/droid.+aft(\w)( bui|\))/i],[S,[V,Ne],[R,X]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[S,[V,Q],[R,X]],[/(bravia[\w ]+)( bui|\))/i],[S,[V,J],[R,X]],[/(mitv-\w{5}) bui/i],[S,[V,K],[R,X]],[/Hbbtv.*(technisat) (.*);/i],[V,S,[R,X]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[V,He],[S,He],[R,X]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[R,X]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[V,S,[R,le]],[/droid.+; (shield) bui/i],[S,[V,"Nvidia"],[R,le]],[/(playstation [345portablevi]+)/i],[S,[V,J],[R,le]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[S,[V,ee],[R,le]],[/((pebble))app/i],[V,S,[R,Ee]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[S,[V,Ze],[R,Ee]],[/droid.+; (glass) \d/i],[S,[V,Ke],[R,Ee]],[/droid.+; (wt63?0{2,3})\)/i],[S,[V,me],[R,Ee]],[/(quest( 2| pro)?)/i],[S,[V,Te],[R,Ee]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[V,[R,Pe]],[/(aeobc)\b/i],[S,[V,Ne],[R,Pe]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[S,[R,he]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[S,[R,xe]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[R,xe]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[R,he]],[/(android[-\w\. ]{0,9});.+buil/i],[S,[V,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[W,[U,Ae+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[W,[U,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[U,W],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[W,U]],os:[[/microsoft (windows) (vista|xp)/i],[U,W],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[U,[W,ti,vi]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[U,"Windows"],[W,ti,vi]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[W,/_/g,"."],[U,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[U,Oe],[W,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[W,U],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[U,W],[/\(bb(10);/i],[W,[U,nt]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[W,[U,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[W,[U,Qe+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[W,[U,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[W,[U,"watchOS"]],[/crkey\/([\d\.]+)/i],[W,[U,gt+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[U,de],W],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[U,W],[/(sunos) ?([\w\.\d]*)/i],[[U,"Solaris"],W],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[U,W]]},yi=function(hi,di){if(typeof hi===T&&(di=hi,hi=d),!(this instanceof yi))return new yi(hi,di).getResult();var Pt=typeof c!==y&&c.navigator?c.navigator:d,Ii=hi||(Pt&&Pt.userAgent?Pt.userAgent:w),Vi=Pt&&Pt.userAgentData?Pt.userAgentData:d,zi=di?qe(Ji,di):Ji,_i=Pt&&Pt.userAgent==Ii;return this.getBrowser=function(){var si={};return si[U]=d,si[W]=d,Tt.call(si,Ii,zi.browser),si[C]=Dt(si[W]),_i&&Pt&&Pt.brave&&typeof Pt.brave.isBrave==o&&(si[U]="Brave"),si},this.getCPU=function(){var si={};return si[ye]=d,Tt.call(si,Ii,zi.cpu),si},this.getDevice=function(){var si={};return si[V]=d,si[S]=d,si[R]=d,Tt.call(si,Ii,zi.device),_i&&!si[R]&&Vi&&Vi.mobile&&(si[R]=he),_i&&si[S]=="Macintosh"&&Pt&&typeof Pt.standalone!==y&&Pt.maxTouchPoints&&Pt.maxTouchPoints>2&&(si[S]="iPad",si[R]=xe),si},this.getEngine=function(){var si={};return si[U]=d,si[W]=d,Tt.call(si,Ii,zi.engine),si},this.getOS=function(){var si={};return si[U]=d,si[W]=d,Tt.call(si,Ii,zi.os),_i&&!si[U]&&Vi&&Vi.platform!="Unknown"&&(si[U]=Vi.platform.replace(/chrome os/i,de).replace(/macos/i,Oe)),si},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ii},this.setUA=function(si){return Ii=typeof si===z&&si.length>Ve?He(si,Ve):si,this},this.setUA(Ii),this};yi.VERSION=m,yi.BROWSER=Ce([U,W,C]),yi.CPU=Ce([ye]),yi.DEVICE=Ce([S,V,R,le,he,X,xe,Ee,Pe]),yi.ENGINE=yi.OS=Ce([U,W]),r.exports&&(s=r.exports=yi),s.UAParser=yi;var Bi=typeof c!==y&&(c.jQuery||c.Zepto);if(Bi&&!Bi.ua){var wi=new yi;Bi.ua=wi.getResult(),Bi.ua.get=function(){return wi.getUA()},Bi.ua.set=function(hi){wi.setUA(hi);var di=wi.getResult();for(var Pt in di)Bi.ua[Pt]=di[Pt]}}})(typeof window=="object"?window:_m)}),hL=function(s){return dL(s)&&!fL(s)};function dL(r){return!!r&&typeof r=="object"}function fL(r){var s=Object.prototype.toString.call(r);return s==="[object RegExp]"||s==="[object Date]"||mL(r)}var pL=typeof Symbol=="function"&&Symbol.for,gL=pL?Symbol.for("react.element"):60103;function mL(r){return r.$$typeof===gL}function yL(r){return Array.isArray(r)?[]:{}}function Yc(r,s){return s.clone!==!1&&s.isMergeableObject(r)?hl(yL(r),r,s):r}function _L(r,s,c){return r.concat(s).map(function(d){return Yc(d,c)})}function xL(r,s){if(!s.customMerge)return hl;var c=s.customMerge(r);return typeof c=="function"?c:hl}function vL(r){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r).filter(function(s){return Object.propertyIsEnumerable.call(r,s)}):[]}function lb(r){return Object.keys(r).concat(vL(r))}function cb(r,s){try{return s in r}catch{return!1}}function ML(r,s){return cb(r,s)&&!(Object.hasOwnProperty.call(r,s)&&Object.propertyIsEnumerable.call(r,s))}function bL(r,s,c){var d={};return c.isMergeableObject(r)&&lb(r).forEach(function(m){d[m]=Yc(r[m],c)}),lb(s).forEach(function(m){ML(r,m)||(cb(r,m)&&c.isMergeableObject(s[m])?d[m]=xL(m,c)(r[m],s[m],c):d[m]=Yc(s[m],c))}),d}function hl(r,s,c){c=c||{},c.arrayMerge=c.arrayMerge||_L,c.isMergeableObject=c.isMergeableObject||hL,c.cloneUnlessOtherwiseSpecified=Yc;var d=Array.isArray(s),m=Array.isArray(r),w=d===m;return w?d?c.arrayMerge(r,s,c):bL(r,s,c):Yc(s,c)}hl.all=function(s,c){if(!Array.isArray(s))throw new Error("first argument should be an array");return s.reduce(function(d,m){return hl(d,m,c)},{})};var wL=hl,IL=wL;const DL=".mi-my-position{margin:10px;display:flex;flex-direction:column;pointer-events:auto;gap:16px;right:0}.mi-my-position__position-button,.mi-my-position__compass-button{margin:0;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:48px;height:48px;background-repeat:no-repeat;background-position:center;outline:none;border-color:#e5e7eb;border-style:solid;background-color:#fcfcfc}.mi-my-position__position-button{background-size:23px;border-radius:8px}.mi-my-position__position-button--unknown{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY1NTIzIDEuMjIzNTZDMy4yNjQ3IDAuODMzMDMzIDIuNjMxNTQgMC44MzMwMzMgMi4yNDEwMSAxLjIyMzU2QzEuODUwNDkgMS42MTQwOCAxLjg1MDQ5IDIuMjQ3MjUgMi4yNDEwMSAyLjYzNzc3TDIyLjI2NiAyMi42NjI4QzIyLjY1NjUgMjMuMDUzMyAyMy4yODk3IDIzLjA1MzMgMjMuNjgwMiAyMi42NjI4QzI0LjA3MDcgMjIuMjcyMiAyNC4wNzA3IDIxLjYzOTEgMjMuNjgwMiAyMS4yNDg1TDE3LjcxNTcgMTUuMjg0MUwyMC43NzQ4IDcuMzYzMjVDMjEuNTYyOSA1LjMyMzE1IDE5LjU1NjIgMy4zMTY2NiAxNy41MTYyIDQuMTA0NTVMOS41OTUzNSA3LjE2MzY4TDMuNjU1MjMgMS4yMjM1NlpNMTEuMTQyIDguNzEwMzJMMTYuMTY5MSAxMy43Mzc0TDE4LjkwOTIgNi42NDI2MUMxOS4wNzE4IDYuMjIxNzIgMTguNjU3OCA1LjgwNzY0IDE4LjIzNjggNS45NzAyNEwxMS4xNDIgOC43MTAzMloiIGZpbGw9IiM3MzczNzMiLz4KPHBhdGggZD0iTTEzLjI1MTggMjEuMjkxMkwxNC45OTIxIDE2Ljc4NDlMMTYuNTM4OCAxOC4zMzE1TDE1LjExNzQgMjIuMDExOEMxNC4wNjc3IDI0LjcyOTYgMTAuMTUwOCAyNC41MDY5IDkuNDE1OTMgMjEuNjg3Nkw4LjEyOTA1IDE2Ljc1MDVMMy4xOTE4IDE1LjQ2MzZDMC4zNzI1MSAxNC43Mjg3IDAuMTQ5ODEyIDEwLjgxMTcgMi44Njc2NCA5Ljc2Mkw2LjY0NTEyIDguMzAzMDlMOC4xOTE3NyA5Ljg0OTc0TDMuNTg4MTkgMTEuNjI3N0MyLjY4MjI0IDExLjk3NzYgMi43NTY0OCAxMy4yODMzIDMuNjk2MjUgMTMuNTI4Mkw4LjYzMzUgMTQuODE1MUM5LjMzNDQzIDE0Ljk5NzggOS44ODE3OCAxNS41NDUyIDEwLjA2NDQgMTYuMjQ2TDExLjM1MTMgMjEuMTgzMkMxMS41OTYyIDIyLjEyMjkgMTIuOTAxOSAyMi4xOTcyIDEzLjI1MTggMjEuMjkxMloiIGZpbGw9IiM3MzczNzMiLz4KPC9zdmc+Cg==)}.mi-my-position__position-button--requesting{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxOSAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuODkzNDEgMTEuMjgzTDEuOTU2MTYgOS45OTYxMUMwLjA3NjYyOTIgOS41MDYyIC0wLjA3MTg0MTEgNi44OTQ4NSAxLjc0MDA1IDYuMTk1MDdMMTYuMzg4NiAwLjUzNzYxN0MxNy42MTkxIDAuMDYyMzc2NiAxOC44Mjk0IDEuMjcyNjYgMTguMzU0MSAyLjUwMzE2TDEyLjY5NjcgMTcuMTUxN0MxMS45OTY5IDE4Ljk2MzYgOS4zODU2NCAxOC44MTUxIDguODk1NzQgMTYuOTM1Nkw3LjYwODg0IDExLjk5ODRDNy41MTc1NCAxMS42NDggNy4yNDM4NiAxMS4zNzQzIDYuODkzNDEgMTEuMjgzWiIgZmlsbD0iIzczNzM3MyIvPgo8L3N2Zz4K)}.mi-my-position__position-button--known{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxOSAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuODkzNDEgMTEuMjgzTDEuOTU2MTYgOS45OTYxMUMwLjA3NjYyOTIgOS41MDYyIC0wLjA3MTg0MTEgNi44OTQ4NSAxLjc0MDA1IDYuMTk1MDdMMTYuMzg4NiAwLjUzNzYxN0MxNy42MTkxIDAuMDYyMzc2NiAxOC44Mjk0IDEuMjcyNjYgMTguMzU0MSAyLjUwMzE2TDEyLjY5NjcgMTcuMTUxN0MxMS45OTY5IDE4Ljk2MzYgOS4zODU2NCAxOC44MTUxIDguODk1NzQgMTYuOTM1Nkw3LjYwODg0IDExLjk5ODRDNy41MTc1NCAxMS42NDggNy4yNDM4NiAxMS4zNzQzIDYuODkzNDEgMTEuMjgzWiIgZmlsbD0iIzczNzM3MyIvPgo8L3N2Zz4K)}.mi-my-position__position-button--centered{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxOSAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuODkzNDEgMTEuMjgzTDEuOTU2MTYgOS45OTYxMUMwLjA3NjYyOTIgOS41MDYyIC0wLjA3MTg0MTEgNi44OTQ4NSAxLjc0MDA1IDYuMTk1MDdMMTYuMzg4NiAwLjUzNzYxN0MxNy42MTkxIDAuMDYyMzc2NiAxOC44Mjk0IDEuMjcyNjYgMTguMzU0MSAyLjUwMzE2TDEyLjY5NjcgMTcuMTUxN0MxMS45OTY5IDE4Ljk2MzYgOS4zODU2NCAxOC44MTUxIDguODk1NzQgMTYuOTM1Nkw3LjYwODg0IDExLjk5ODRDNy41MTc1NCAxMS42NDggNy4yNDM4NiAxMS4zNzQzIDYuODkzNDEgMTEuMjgzWiIgZmlsbD0iIzI1NjNFQiIvPgo8L3N2Zz4K)}.mi-my-position__position-button--tracked{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNSAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjQ2MDQgMTMuNDMwOUMxMy4wMTI3IDEzLjQzMDkgMTMuNDYwNCAxMi45ODMyIDEzLjQ2MDQgMTIuNDMwOUMxMy40NjA0IDExLjg3ODYgMTMuMDEyNyAxMS40MzA5IDEyLjQ2MDQgMTEuNDMwOUMxMS45MDgxIDExLjQzMDkgMTEuNDYwNCAxMS44Nzg2IDExLjQ2MDQgMTIuNDMwOUMxMS40NjA0IDEyLjk4MzIgMTEuOTA4MSAxMy40MzA5IDEyLjQ2MDQgMTMuNDMwOVoiIGZpbGw9IiMyNTYzRUIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMi40NjA0IDEyLjQzMDlDMjIuNDYwNCAxNy45NTM3IDE3Ljk4MzIgMjIuNDMwOSAxMi40NjA0IDIyLjQzMDlDNi45Mzc2IDIyLjQzMDkgMi40NjA0NSAxNy45NTM3IDIuNDYwNDUgMTIuNDMwOUMyLjQ2MDQ1IDYuOTA4MDYgNi45Mzc2IDIuNDMwOTEgMTIuNDYwNCAyLjQzMDkxQzE3Ljk4MzIgMi40MzA5MSAyMi40NjA0IDYuOTA4MDYgMjIuNDYwNCAxMi40MzA5Wk0xNS44Mzc5IDguNDQ2MTJMMTAuNTM4OSA5Ljc4NDc4QzEwLjE4MjYgOS44NzQ4IDkuOTA0MzYgMTAuMTUzIDkuODE0MzQgMTAuNTA5NEw4LjQ3NTcyIDE1LjgwODRDOC4zODMgMTYuMTc1NSA4LjcxNTk0IDE2LjUwODQgOS4wODI5NSAxNi40MTU3TDE0LjM4MTkgMTUuMDc3QzE0LjczODMgMTQuOTg3IDE1LjAxNjUgMTQuNzA4OCAxNS4xMDY2IDE0LjM1MjRMMTYuNDQ1MiA5LjA1MzM1QzE2LjUzNzkgOC42ODYzMyAxNi4yMDUgOC4zNTM0IDE1LjgzNzkgOC40NDYxMloiIGZpbGw9IiMyNTYzRUIiLz4KPC9zdmc+Cg==)}.mi-my-position__position-button--untracked{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNSAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjQ2MDQgMTMuNDMwOUMxMy4wMTI3IDEzLjQzMDkgMTMuNDYwNCAxMi45ODMyIDEzLjQ2MDQgMTIuNDMwOUMxMy40NjA0IDExLjg3ODYgMTMuMDEyNyAxMS40MzA5IDEyLjQ2MDQgMTEuNDMwOUMxMS45MDgxIDExLjQzMDkgMTEuNDYwNCAxMS44Nzg2IDExLjQ2MDQgMTIuNDMwOUMxMS40NjA0IDEyLjk4MzIgMTEuOTA4MSAxMy40MzA5IDEyLjQ2MDQgMTMuNDMwOVoiIGZpbGw9IiMwMDAwMDAiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMi40NjA0IDEyLjQzMDlDMjIuNDYwNCAxNy45NTM3IDE3Ljk4MzIgMjIuNDMwOSAxMi40NjA0IDIyLjQzMDlDNi45Mzc2IDIyLjQzMDkgMi40NjA0NSAxNy45NTM3IDIuNDYwNDUgMTIuNDMwOUMyLjQ2MDQ1IDYuOTA4MDYgNi45Mzc2IDIuNDMwOTEgMTIuNDYwNCAyLjQzMDkxQzE3Ljk4MzIgMi40MzA5MSAyMi40NjA0IDYuOTA4MDYgMjIuNDYwNCAxMi40MzA5Wk0xNS44Mzc5IDguNDQ2MTJMMTAuNTM4OSA5Ljc4NDc4QzEwLjE4MjYgOS44NzQ4IDkuOTA0MzYgMTAuMTUzIDkuODE0MzQgMTAuNTA5NEw4LjQ3NTcyIDE1LjgwODRDOC4zODMgMTYuMTc1NSA4LjcxNTk0IDE2LjUwODQgOS4wODI5NSAxNi40MTU3TDE0LjM4MTkgMTUuMDc3QzE0LjczODMgMTQuOTg3IDE1LjAxNjUgMTQuNzA4OCAxNS4xMDY2IDE0LjM1MjRMMTYuNDQ1MiA5LjA1MzM1QzE2LjUzNzkgOC42ODYzMyAxNi4yMDUgOC4zNTM0IDE1LjgzNzkgOC40NDYxMloiIGZpbGw9IiMwMDAwMDAiLz4KPC9zdmc+Cg==)}.mi-my-position__compass-button{background-size:12px;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMzAiIHZpZXdCb3g9IjAgMCAxMyAzMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNTQ4MTMgMi45NjI0MUM1LjkwMTU5IDIuMTc1MjcgNy4wMTkxNSAyLjE3NTI3IDcuMzcyNjIgMi45NjI0MUwxMS41OTI5IDEyLjM2MDZDMTEuOTQ5MSAxMy4xNTM4IDExLjE5MzEgMTMuOTkyMyAxMC4zNjczIDEzLjcxOTlMNi43NzM2NyAxMi41MzQzQzYuNTcwMiAxMi40NjcxIDYuMzUwNTQgMTIuNDY3MSA2LjE0NzA3IDEyLjUzNDNMMi41NTM0MyAxMy43MTk5QzEuNzI3NjggMTMuOTkyMyAwLjk3MTY4MyAxMy4xNTM4IDEuMzI3ODggMTIuMzYwNkw1LjU0ODEzIDIuOTYyNDFaIiBmaWxsPSIjREMyNjI2Ii8+CjxwYXRoIGQ9Ik03LjM3MjUzIDI3Ljg5OTRDNy4wMTkwNiAyOC42ODY1IDUuOTAxNSAyOC42ODY1IDUuNTQ4MDQgMjcuODk5NEwxLjMyNzc5IDE4LjUwMTJDMC45NzE1OTcgMTcuNzA4IDEuNzI3NTkgMTYuODY5NSAyLjU1MzM0IDE3LjE0Mkw2LjE0Njk4IDE4LjMyNzVDNi4zNTA0NiAxOC4zOTQ3IDYuNTcwMTEgMTguMzk0NyA2Ljc3MzU5IDE4LjMyNzVMMTAuMzY3MiAxNy4xNDJDMTEuMTkzIDE2Ljg2OTUgMTEuOTQ5IDE3LjcwOCAxMS41OTI4IDE4LjUwMTJMNy4zNzI1MyAyNy44OTk0WiIgZmlsbD0iIzlDQTNBRiIvPgo8L3N2Zz4K);border-radius:50%}";var ki;(function(r){r.POSITION_UNKNOWN="POSITION_UNKNOWN",r.POSITION_REQUESTING="POSITION_REQUESTING",r.POSITION_INACCURATE="POSITION_INACCURATE",r.POSITION_KNOWN="POSITION_KNOWN",r.POSITION_CENTERED="POSITION_CENTERED",r.POSITION_TRACKED="POSITION_TRACKED",r.POSITION_UNTRACKED="POSITION_UNTRACKED"})(ki||(ki={}));var yf;(function(r){r.Phone="mobile",r.Tablet="tablet"})(yf||(yf={}));const ub=class{constructor(r){Hi(this,r),this.position_error=Tn(this,"position_error",7),this.position_received=Tn(this,"position_received",7),this.parser=new uL.UAParser,this.handleDeviceOrientationReference=this.handleDeviceOrientation.bind(this),this.defaultOptions={maxAccuracy:200,positionOptions:{timeout:3e4,enableHighAccuracy:!0,maximumAge:0},positionMarkerStyles:{radius:"12px",strokeWeight:"2px",strokeColor:"white",fillColor:"#4169E1",fillOpacity:1},accuracyCircleStyles:{fillColor:"#4169E1",fillOpacity:.16}},this.mapsindoors=void 0,this.myPositionOptions=void 0,this.positionState=void 0}resetPositionState(){window.removeEventListener("deviceorientation",this.handleDeviceOrientationReference),this.positionState===ki.POSITION_TRACKED?this.setPositionState(ki.POSITION_UNTRACKED):this.positionState===ki.POSITION_CENTERED&&(this.setPositionState(ki.POSITION_KNOWN),this.mapView.tilt(0))}hasValidPosition(){return[ki.POSITION_KNOWN,ki.POSITION_CENTERED,ki.POSITION_INACCURATE,ki.POSITION_TRACKED,ki.POSITION_UNTRACKED].includes(this.positionState)}setPositionUnknown(r){this.setPositionState(ki.POSITION_UNKNOWN),this.position_error.emit(r)}setPositionProviderOnMapView(){this.mapView.isReady?this.mapView.setPositionProvider(this):this.mapView.once("ready",()=>{this.mapView.setPositionProvider(this)})}panToCurrentPosition(){this.hasValidPosition()&&(this.mapView.once("idle",()=>{this.mapView.on("user_interaction",()=>this.resetPositionState())}),this.mapView.panTo({lat:this.currentPosition.coords.latitude,lng:this.currentPosition.coords.longitude}),this.positionState!==ki.POSITION_TRACKED&&this.setPositionState(ki.POSITION_CENTERED),this.canBeTracked&&(DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission().then(r=>{r==="granted"&&this.positionState===ki.POSITION_TRACKED?window.addEventListener("deviceorientation",this.handleDeviceOrientationReference):window.removeEventListener("deviceorientation",this.handleDeviceOrientationReference)}):this.positionState===ki.POSITION_TRACKED?window.addEventListener("deviceorientation",this.handleDeviceOrientationReference):window.removeEventListener("deviceorientation",this.handleDeviceOrientationReference)))}handleDeviceOrientation(r){(!this.orientation||this.orientation-(360-r.alpha)>1||this.orientation-(360-r.alpha)<-1)&&(this.orientation=360-r.alpha,this.mapView.easeTo({center:[this.currentPosition.coords.longitude,this.currentPosition.coords.latitude],rotation:this.orientation,tilt:60,easing:s=>s*(2-s)}))}setCompassStyle(r){this.compassButton.style.transform=`rotate(${r}deg)`}watchPosition(r=!1){if(!navigator.geolocation)return;this.setPositionState(ki.POSITION_REQUESTING),this.setPositionProviderOnMapView();const s=Date.now();navigator.geolocation.watchPosition(c=>{this.currentPosition&&c.coords.accuracy===this.currentPosition.coords.accuracy&&c.coords.latitude===this.currentPosition.coords.latitude&&c.coords.longitude===this.currentPosition.coords.longitude||(this.currentPosition=c,this.positionIsAccurate=this.currentPosition.coords.accuracy<=this.options.maxAccuracy,this.positionIsAccurate?(this.positionState===ki.POSITION_TRACKED?this.setPositionState(ki.POSITION_UNTRACKED):this.positionState!==ki.POSITION_UNTRACKED&&(this.setPositionState(ki.POSITION_KNOWN),this.mapView.tilt(0)),window.removeEventListener("deviceorientation",this.handleDeviceOrientationReference)):(this.setPositionState(ki.POSITION_INACCURATE),this.position_error.emit({code:11,message:"Inaccurate position: "+c.coords.accuracy})),this.position_received.emit({position:this.currentPosition,selfInvoked:r,accurate:this.positionIsAccurate}))},c=>{(c.code!==3||!this.currentPosition||this.currentPosition.timestamp<=s)&&this.setPositionUnknown(c)},this.options.positionOptions)}setPositionState(r){this.positionState=r}onCompassButtonClicked(){this.setCompassStyle(0),this.mapView.rotate(0),this.mapView.tilt(0),window.removeEventListener("deviceorientation",this.handleDeviceOrientationReference),this.positionState===ki.POSITION_TRACKED?this.setPositionState(ki.POSITION_CENTERED):this.positionState===ki.POSITION_UNTRACKED&&this.setPositionState(ki.POSITION_KNOWN)}onPositionButtonClicked(r){switch(r.stopPropagation(),this.positionState){case ki.POSITION_UNKNOWN:this.mapView.tilt(0),this.watchPosition(!0);break;case ki.POSITION_KNOWN:this.mapView.tilt(0),this.panToCurrentPosition();break;case ki.POSITION_CENTERED:this.canBeTracked&&this.setPositionState(ki.POSITION_TRACKED),this.panToCurrentPosition();break;case ki.POSITION_TRACKED:this.mapView.tilt(0),this.mapView.rotate(0),this.setCompassStyle(0),this.setPositionState(ki.POSITION_CENTERED),this.panToCurrentPosition();break;case ki.POSITION_UNTRACKED:this.setPositionState(ki.POSITION_TRACKED),this.panToCurrentPosition();break}}connectedCallback(){var r;if(this.mapView=this.mapsindoors.getMapView(),this.options=IL(this.defaultOptions,(r=this.myPositionOptions)!==null&&r!==void 0?r:{}),!navigator.geolocation){this.position_error.emit({code:10,message:"Geolocation not available"});return}const s=this.parser.getDevice().type;this.canBeTracked=!!(typeof window.DeviceOrientationEvent=="function"&&(s===yf.Phone||s===yf.Tablet)&&this.mapView.rotatable&&this.mapView.tiltable),!("permissions"in navigator)||!("query"in navigator.permissions)?this.setPositionState(ki.POSITION_UNKNOWN):navigator.permissions.query({name:"geolocation"}).then(c=>{c.state==="granted"?this.watchPosition():this.setPositionState(ki.POSITION_UNKNOWN)}),this.mapView.on("rotateend",()=>{this.setCompassStyle(this.mapView.getBearing())})}render(){return be(qn,null,be("div",{class:"mi-my-position"},be("button",{class:`mi-my-position__position-button
1387
1387
  ${this.positionState===ki.POSITION_UNKNOWN||this.positionState===ki.POSITION_INACCURATE?"mi-my-position__position-button--unknown":""}
1388
1388
  ${this.positionState===ki.POSITION_REQUESTING?"mi-my-position__position-button--requesting":""}
1389
1389
  ${this.positionState===ki.POSITION_KNOWN?"mi-my-position__position-button--known":""}