@mapsindoors/map-template 1.12.0 → 1.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/{combo-box-item.entry-bacd907e.mjs → combo-box-item.entry-4655f8f1.mjs} +1 -1
  2. package/dist/{combo-box-item.entry-77c80135.mjs → combo-box-item.entry-dcac1d11.mjs} +1 -1
  3. package/dist/mapsindoors-react.es.js +1 -1
  4. package/dist/mapsindoors-react.umd.js +1 -1
  5. package/dist/mapsindoors-webcomponent.es.js +1 -1
  6. package/dist/mapsindoors-webcomponent.umd.js +1 -1
  7. package/dist/{mi-card_2.entry-1164b737.mjs → mi-card_2.entry-17d9ff30.mjs} +1 -1
  8. package/dist/{mi-card_2.entry-e0d0d87d.mjs → mi-card_2.entry-5cb85a93.mjs} +1 -1
  9. package/dist/{mi-chip.entry-5f57e71c.mjs → mi-chip.entry-484688ce.mjs} +1 -1
  10. package/dist/{mi-chip.entry-dc71c49d.mjs → mi-chip.entry-4ba142dd.mjs} +1 -1
  11. package/dist/{mi-column.entry-fd0490a6.mjs → mi-column.entry-09ed81f4.mjs} +1 -1
  12. package/dist/{mi-column.entry-fe5212e3.mjs → mi-column.entry-93c03933.mjs} +1 -1
  13. package/dist/{mi-combo-box.entry-3530ed61.mjs → mi-combo-box.entry-7e1046c0.mjs} +1 -1
  14. package/dist/{mi-combo-box.entry-3ee6e418.mjs → mi-combo-box.entry-b0575521.mjs} +1 -1
  15. package/dist/{mi-data-table.entry-06650e96.mjs → mi-data-table.entry-b2d55259.mjs} +1 -1
  16. package/dist/{mi-data-table.entry-0a5cd0ce.mjs → mi-data-table.entry-d4817a92.mjs} +1 -1
  17. package/dist/{mi-distance_2.entry-3fae4169.mjs → mi-distance_2.entry-77b218a1.mjs} +1 -1
  18. package/dist/{mi-distance_2.entry-f83608c7.mjs → mi-distance_2.entry-8ce9be00.mjs} +1 -1
  19. package/dist/{mi-dropdown-item.entry-6ded2ee5.mjs → mi-dropdown-item.entry-88a68a2b.mjs} +1 -1
  20. package/dist/{mi-dropdown-item.entry-8979468f.mjs → mi-dropdown-item.entry-8fa8f062.mjs} +1 -1
  21. package/dist/{mi-dropdown.entry-ff88e9d8.mjs → mi-dropdown.entry-1e4014fb.mjs} +1 -1
  22. package/dist/{mi-dropdown.entry-e1db1b2f.mjs → mi-dropdown.entry-4bea8114.mjs} +1 -1
  23. package/dist/{mi-floor-selector.entry-2e376330.mjs → mi-floor-selector.entry-356fa866.mjs} +1 -1
  24. package/dist/{mi-floor-selector.entry-25915e6f.mjs → mi-floor-selector.entry-9b2fc40d.mjs} +1 -1
  25. package/dist/{mi-keyboard.entry-bc699e75.mjs → mi-keyboard.entry-8a720d68.mjs} +1 -1
  26. package/dist/{mi-keyboard.entry-173450cc.mjs → mi-keyboard.entry-d0d70e33.mjs} +1 -1
  27. package/dist/{mi-list-item-category.entry-dbef7e35.mjs → mi-list-item-category.entry-41cb4553.mjs} +1 -1
  28. package/dist/{mi-list-item-category.entry-e8069e41.mjs → mi-list-item-category.entry-943ce998.mjs} +1 -1
  29. package/dist/{mi-list-item-location.entry-c5cda4ca.mjs → mi-list-item-location.entry-71d1bf05.mjs} +1 -1
  30. package/dist/{mi-list-item-location.entry-19680f21.mjs → mi-list-item-location.entry-ca98fc53.mjs} +1 -1
  31. package/dist/{mi-list.entry-7126271f.mjs → mi-list.entry-420bf0a5.mjs} +1 -1
  32. package/dist/{mi-list.entry-63f68584.mjs → mi-list.entry-bde89f5c.mjs} +1 -1
  33. package/dist/{mi-location-booking.entry-9c5c44ac.mjs → mi-location-booking.entry-002b7462.mjs} +1 -1
  34. package/dist/{mi-location-booking.entry-e497a20e.mjs → mi-location-booking.entry-dfbebd4b.mjs} +1 -1
  35. package/dist/{mi-location-info.entry-5def39bc.mjs → mi-location-info.entry-b99e22bf.mjs} +1 -1
  36. package/dist/{mi-location-info.entry-d60b36c6.mjs → mi-location-info.entry-ca78bc84.mjs} +1 -1
  37. package/dist/{mi-map-googlemaps.entry-f4414f7e.mjs → mi-map-googlemaps.entry-4da59771.mjs} +1 -1
  38. package/dist/{mi-map-googlemaps.entry-88758c5d.mjs → mi-map-googlemaps.entry-c77fe5a0.mjs} +1 -1
  39. package/dist/{mi-map-mapbox.entry-fb13275f.mjs → mi-map-mapbox.entry-507ce95c.mjs} +1 -1
  40. package/dist/{mi-map-mapbox.entry-b5853879.mjs → mi-map-mapbox.entry-a7b4df9b.mjs} +1 -1
  41. package/dist/{mi-metric-card.entry-70517b62.mjs → mi-metric-card.entry-679bf2c7.mjs} +1 -1
  42. package/dist/{mi-metric-card.entry-bb758c43.mjs → mi-metric-card.entry-d31f0a25.mjs} +1 -1
  43. package/dist/{mi-my-position.entry-03c8f712.mjs → mi-my-position.entry-6daf40a2.mjs} +2 -2
  44. package/dist/{mi-my-position.entry-29dea178.mjs → mi-my-position.entry-d84af6a2.mjs} +2 -2
  45. package/dist/{mi-notification.entry-93b18008.mjs → mi-notification.entry-0d7bdbb1.mjs} +1 -1
  46. package/dist/{mi-notification.entry-3399c382.mjs → mi-notification.entry-c9e293bf.mjs} +1 -1
  47. package/dist/{mi-route-instructions-heading.entry-229e8b72.mjs → mi-route-instructions-heading.entry-b86d1b6c.mjs} +1 -1
  48. package/dist/{mi-route-instructions-heading.entry-827e736e.mjs → mi-route-instructions-heading.entry-baf2425e.mjs} +1 -1
  49. package/dist/{mi-route-instructions-maneuver-legacy.entry-87770e56.mjs → mi-route-instructions-maneuver-legacy.entry-4acf60a7.mjs} +1 -1
  50. package/dist/{mi-route-instructions-maneuver-legacy.entry-6e593a3c.mjs → mi-route-instructions-maneuver-legacy.entry-9dd59039.mjs} +1 -1
  51. package/dist/{mi-route-instructions-maneuver.entry-b39f4ad6.mjs → mi-route-instructions-maneuver.entry-21f575cc.mjs} +1 -1
  52. package/dist/{mi-route-instructions-maneuver.entry-4807bc67.mjs → mi-route-instructions-maneuver.entry-6c92a08d.mjs} +1 -1
  53. package/dist/{mi-route-instructions-step-legacy.entry-ea0a5303.mjs → mi-route-instructions-step-legacy.entry-5c911766.mjs} +1 -1
  54. package/dist/{mi-route-instructions-step-legacy.entry-952a5c0b.mjs → mi-route-instructions-step-legacy.entry-be803c68.mjs} +1 -1
  55. package/dist/{mi-route-instructions-step.entry-dff81020.mjs → mi-route-instructions-step.entry-b6f39d0e.mjs} +1 -1
  56. package/dist/{mi-route-instructions-step.entry-40bf0df8.mjs → mi-route-instructions-step.entry-fd14125a.mjs} +1 -1
  57. package/dist/{mi-route-instructions.entry-324ebad1.mjs → mi-route-instructions.entry-211eb42b.mjs} +1 -1
  58. package/dist/{mi-route-instructions.entry-d38585d6.mjs → mi-route-instructions.entry-37265ab3.mjs} +1 -1
  59. package/dist/{mi-scroll-buttons.entry-02b66445.mjs → mi-scroll-buttons.entry-7144a298.mjs} +1 -1
  60. package/dist/{mi-scroll-buttons.entry-fad1b475.mjs → mi-scroll-buttons.entry-f1b4cf38.mjs} +1 -1
  61. package/dist/{mi-search.entry-cc6b2332.mjs → mi-search.entry-9fc2fc23.mjs} +1 -1
  62. package/dist/{mi-search.entry-b0773d99.mjs → mi-search.entry-de77598b.mjs} +1 -1
  63. package/dist/{mi-share-sms.entry-28ee50b1.mjs → mi-share-sms.entry-89b5caca.mjs} +1 -1
  64. package/dist/{mi-share-sms.entry-ab707d58.mjs → mi-share-sms.entry-c761ad8e.mjs} +1 -1
  65. package/dist/{mi-step-switcher.entry-78ed037f.mjs → mi-step-switcher.entry-2fb02910.mjs} +1 -1
  66. package/dist/{mi-step-switcher.entry-3233106c.mjs → mi-step-switcher.entry-3b1caa0d.mjs} +1 -1
  67. package/dist/{mi-tab-panel.entry-eee99299.mjs → mi-tab-panel.entry-6e80af77.mjs} +1 -1
  68. package/dist/{mi-tab-panel.entry-fe762ef5.mjs → mi-tab-panel.entry-f9e97e14.mjs} +1 -1
  69. package/dist/{mi-tab.entry-3268902d.mjs → mi-tab.entry-0dbb3768.mjs} +1 -1
  70. package/dist/{mi-tab.entry-617aef9d.mjs → mi-tab.entry-25defe0e.mjs} +1 -1
  71. package/dist/{mi-tabs.entry-0056816a.mjs → mi-tabs.entry-3a926bed.mjs} +1 -1
  72. package/dist/{mi-tabs.entry-25ce0ba5.mjs → mi-tabs.entry-e75381c1.mjs} +1 -1
  73. package/dist/{mi-time.entry-529935a7.mjs → mi-time.entry-0a1c1532.mjs} +1 -1
  74. package/dist/{mi-time.entry-4b104467.mjs → mi-time.entry-2b06bb79.mjs} +1 -1
  75. package/dist/{reactcomponent-d95a230f.mjs → reactcomponent-ef91671b.mjs} +2 -2
  76. package/dist/{webcomponent-742e8715.mjs → webcomponent-5671058a.mjs} +2 -2
  77. package/package.json +1 -1
@@ -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 Th{constructor(s,c){Ui(this,"_store",void 0),Ui(this,"_refCount",1),Ui(this,"getLoadable",d=>(this.checkRefCount_INTERNAL(),O5(this._store,d))),Ui(this,"getPromise",d=>(this.checkRefCount_INTERNAL(),this.getLoadable(d).toPromise())),Ui(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 Hy(v.dirtyAtoms)}const m=this._store.getState().knownAtoms,w=this._store.getState().knownSelectors;return(d==null?void 0:d.isInitialized)==null?Gy.values():d.isInitialized===!0?Hy($y([m,w])):hg(Gy.values(),({key:v})=>!m.has(v)&&!w.has(v))}),Ui(this,"getInfo_UNSTABLE",({key:d})=>(this.checkRefCount_INTERNAL(),C5(this._store,this._store.getState().currentTree,d))),Ui(this,"map",d=>{this.checkRefCount_INTERNAL();const m=new yg(this,mg);return d(m),m}),Ui(this,"asyncMap",async d=>{this.checkRefCount_INTERNAL();const m=new yg(this,mg);return m.retain(),await d(m),m.autoRelease_INTERNAL(),m}),this._store={storeID:z5(),parentStoreID:c,getState:()=>s,replaceState:d=>{s.currentTree=d(s.currentTree)},getGraph:d=>{const m=s.graphsByVersion;if(m.has(d))return jn(m.get(d));const w=S5();return m.set(d,w),w},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw Ei("Cannot subscribe to Snapshots")}};for(const d of this._store.getState().knownAtoms)N5(this._store,d,"get"),Dh(this._store,d,1);this.autoRelease_INTERNAL()}retain(){if(this._refCount<=0){if(process.env.NODE_ENV!=="production")throw Ei("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(){B5||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(V5)}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 qy(n,s,c=!1){const d=n.getState(),m=c?R5():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,n.getGraph(s.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(_h(d.nodeCleanupFunctions.entries(),([w])=>[w,()=>{}]))}}function Q5(n){const s=new Th(U5());return n!=null?s.map(n):s}const[Xy,Ky]=F5((n,s)=>{var c;const d=n.getState(),m=s==="latest"?(c=d.nextTree)!==null&&c!==void 0?c:d.currentTree:jn(d.previousTree);return new Th(qy(n,m),n.storeID)},(n,s)=>{var c,d;return String(s)+String(n.storeID)+String((c=n.getState().nextTree)===null||c===void 0?void 0:c.version)+String(n.getState().currentTree.version)+String((d=n.getState().previousTree)===null||d===void 0?void 0:d.version)});P5(Ky);function Y5(n,s="latest"){const c=Xy(n,s);return c.isRetained()?c:(Ky(),Xy(n,s))}class yg extends Th{constructor(s,c){super(qy(s.getStore_INTERNAL(),s.getStore_INTERNAL().getState().currentTree,!0),s.getStoreID()),Ui(this,"_batch",void 0),Ui(this,"set",(d,m)=>{this.checkRefCount_INTERNAL();const w=this.getStore_INTERNAL();this._batch(()=>{Dh(w,d.key,1),Wy(this.getStore_INTERNAL(),d,m)})}),Ui(this,"reset",d=>{this.checkRefCount_INTERNAL();const m=this.getStore_INTERNAL();this._batch(()=>{Dh(m,d.key,1),Wy(this.getStore_INTERNAL(),d,j5)})}),Ui(this,"setUnvalidatedAtomValues_DEPRECATED",d=>{this.checkRefCount_INTERNAL();const m=this.getStore_INTERNAL();mg(()=>{for(const[w,v]of d.entries())Dh(m,w,1),k5(m,new L5(w),v)})}),this._batch=c}}var Ah={Snapshot:Th,MutableSnapshot:yg,freshSnapshot:Q5,cloneSnapshot:Y5},$5=Ah.Snapshot,Z5=Ah.MutableSnapshot,G5=Ah.freshSnapshot,H5=Ah.cloneSnapshot,Eh=Object.freeze({__proto__:null,Snapshot:$5,MutableSnapshot:Z5,freshSnapshot:G5,cloneSnapshot:H5});function W5(...n){const s=new Set;for(const c of n)for(const d of c)s.add(d);return s}var q5=W5;const{useRef:X5}=it;function K5(n){const s=X5(n);return s.current===n&&typeof n=="function"&&(s.current=n()),s}var Jy=K5;const{getNextTreeStateVersion:J5,makeEmptyStoreState:e_}=wy,{cleanUpNode:eI,getDownstreamNodes:tI,initializeNode:iI,setNodeValue:nI,setUnvalidatedAtomValue_DEPRECATED:rI}=ms,{graph:oI}=vc,{cloneGraph:sI}=vc,{getNextStoreID:t_}=Mh,{createMutableSource:_g,reactMode:i_}=Xa,{applyAtomValueWrites:aI}=bo,{releaseScheduledRetainablesNow:n_}=Xs,{freshSnapshot:lI}=Eh,{useCallback:cI,useContext:r_,useEffect:xg,useMemo:uI,useRef:hI,useState:dI}=it;function Ic(){throw Ei("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 vg=!1;function s_(n){if(vg)throw Ei("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=n.getState();if(s.nextTree===null){wn("recoil_memory_managament_2020")&&wn("recoil_release_on_cascading_update_killswitch_2021")&&s.commitDepth>0&&n_(n);const c=s.currentTree.version,d=J5();s.nextTree={...s.currentTree,version:d,stateID:d,dirtyAtoms:new Set,transactionMetadata:{}},s.graphsByVersion.set(d,sI(jn(s.graphsByVersion.get(c))))}}const a_=it.createContext({current:o_}),Nh=()=>r_(a_),l_=it.createContext(null);function fI(){const n=r_(l_);return n==null&&yh("Attempted to use a Recoil hook outside of a <RecoilRoot>. <RecoilRoot> must be an ancestor of any component that uses Recoil hooks."),n}function Mg(n,s,c){const d=tI(n,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_(n){const s=n.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(n);for(const[m,w]of s.transactionSubscriptions)w(n);(!i_().early||s.suspendedComponentResolvers.size>0)&&(Mg(n,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 pI(n){const s=n.getState();s.commitDepth++;try{const{nextTree:c}=s;if(c==null)return;s.previousTree=s.currentTree,s.currentTree=c,s.nextTree=null,c_(n),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_(n)}finally{s.commitDepth--}}function gI({setNotifyBatcherOfChange:n}){const s=Nh(),[,c]=dI([]);return n(()=>c({})),xg(()=>(n(()=>c({})),()=>{n(()=>{})}),[n]),xg(()=>{qb.enqueueExecution("Batcher",()=>{pI(s.current)})}),null}process.env.NODE_ENV!=="production"&&typeof window<"u"&&!window.$recoilDebugStates&&(window.$recoilDebugStates=[]);function mI(n,s){const c=e_();return s({set:(d,m)=>{const w=c.currentTree,v=nI(n,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:q5(w.dirtyAtoms,o),atomValues:aI(w.atomValues,v),nonvalidatedAtoms:y}},setUnvalidatedAtomValues:d=>{d.forEach((m,w)=>{c.currentTree=rI(c.currentTree,w,m)})}}),c}function yI(n){const s=lI(n),c=s.getStore_INTERNAL().getState();return s.retain(),c.nodeCleanupFunctions.forEach(d=>d()),c.nodeCleanupFunctions.clear(),c}let u_=0;function _I({initializeState_DEPRECATED:n,initializeState:s,store_INTERNAL:c,children:d}){let m;const w=B=>{const P=m.current.graphsByVersion;if(P.has(B))return jn(P.get(B));const F=oI();return P.set(B,F),F},v=(B,P)=>{if(P==null){const{transactionSubscriptions:F}=S.current.getState(),q=u_++;return F.set(q,B),{release:()=>{F.delete(q)}}}else{const{nodeTransactionSubscriptions:F}=S.current.getState();F.has(P)||F.set(P,new Map);const q=u_++;return jn(F.get(P)).set(q,B),{release:()=>{const me=F.get(P);me&&(me.delete(q),me.size===0&&F.delete(P))}}}},o=B=>{s_(S.current);for(const P of Object.keys(B))jn(S.current.getState().nextTree).transactionMetadata[P]=B[P]},y=B=>{s_(S.current);const P=jn(m.current.nextTree);let F;try{vg=!0,F=B(P)}finally{vg=!1}F!==P&&(process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.$recoilDebugStates.push(F),m.current.nextTree=F,i_().early&&Mg(S.current,m.current,F),jn(T.current)())},T=hI(null),C=cI(B=>{T.current=B},[T]),S=Jy(()=>c??{storeID:t_(),getState:()=>m.current,replaceState:y,getGraph:w,subscribeToTransactions:v,addTransactionMetadata:o});c!=null&&(S.current=c),m=Jy(()=>n!=null?mI(S.current,n):s!=null?yI(s):e_());const z=uI(()=>_g==null?void 0:_g(m,()=>m.current.currentTree.version),[m]);return xg(()=>{const B=S.current;for(const P of new Set(B.getState().knownAtoms))iI(B,P,"get");return()=>{for(const P of B.getState().knownAtoms)eI(B,P)}},[S]),it.createElement(a_.Provider,{value:S},it.createElement(l_.Provider,{value:z},it.createElement(gI,{setNotifyBatcherOfChange:C}),d))}function xI(n){const{override:s,...c}=n,d=Nh();return s===!1&&d.current!==o_?n.children:it.createElement(_I,c)}function vI(){return Nh().current.storeID}var Go={RecoilRoot:xI,useStoreRef:Nh,useRecoilMutableSource:fI,useRecoilStoreID:vI,notifyComponents_FOR_TESTING:Mg,sendEndOfBatchNotifications_FOR_TESTING:c_};function MI(n,s){if(n===s)return!0;if(n.length!==s.length)return!1;for(let c=0,d=n.length;c<d;c++)if(n[c]!==s[c])return!1;return!0}var bI=MI;const{useEffect:wI,useRef:II}=it;function DI(n){const s=II();return wI(()=>{s.current=n}),s.current}var h_=DI;const{useStoreRef:TI}=Go,{SUSPENSE_TIMEOUT_MS:AI}=Xs,{updateRetainCount:Dc}=Xs,{RetentionZone:EI}=bh,{useEffect:NI,useRef:CI}=it,{isSSR:d_}=wc;function SI(n){if(wn("recoil_memory_managament_2020"))return zI(n)}function zI(n){const c=(Array.isArray(n)?n:[n]).map(v=>v instanceof EI?v:v.key),d=TI();NI(()=>{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=CI(),w=h_(c);if(!d_&&(w===void 0||!bI(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)},AI)}}var bg=SI;function jI(){return"<component name not available>"}var Tc=jI;const{batchUpdates:LI}=Ih,{DEFAULT_VALUE:f_}=Cr,{currentRendererSupportsUseSyncExternalStore:OI,reactMode:Ks,useMutableSource:kI,useSyncExternalStore:PI}=Xa,{useRecoilMutableSource:RI,useStoreRef:wo}=Go,{isRecoilValue:UI}=Ws,{AbstractRecoilValue:wg,getRecoilValueAsLoadable:Ac,setRecoilValue:Ch,setUnvalidatedRecoilValue:BI,subscribeToRecoilValue:Ka}=bo,{useCallback:Sr,useEffect:Ja,useMemo:p_,useRef:Ec,useState:Ig}=it,{setByAddingToSet:FI}=Dy,{isSSR:VI}=wc;function Dg(n,s,c){if(n.state==="hasValue")return n.contents;throw n.state==="loading"?new Promise(m=>{const w=c.current.getState().suspendedComponentResolvers;w.add(m),VI&&bn(n.contents)&&n.contents.finally(()=>{w.delete(m)})}):n.state==="hasError"?n.contents:Ei(`Invalid value of loadable atom "${s.key}"`)}function Tr(n,s){if(!UI(n))throw Ei(`Invalid argument to ${s}: expected an atom or selector but got ${String(n)}`)}function QI(){const n=Tc(),s=wo(),[,c]=Ig([]),d=Ec(new Set);d.current=new Set;const m=Ec(new Set),w=Ec(new Map),v=Sr(y=>{const T=w.current.get(y);T&&(T.release(),w.current.delete(y))},[w]),o=Sr((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)){yh(`Double subscription to RecoilValue "${T}"`);return}const C=Ka(y,new wg(T),z=>o(z,T),n);w.current.set(T,C),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 C=Ka(s.current,new wg(T),S=>o(S,T),n);y.set(T,C)}),()=>y.forEach((T,C)=>v(C))},[n,s,v,o]),p_(()=>{function y(P){return process.env.NODE_ENV!=="production"&&Tr(P,"useSetRecoilState"),F=>{Ch(s.current,P,F)}}function T(P){return process.env.NODE_ENV!=="production"&&Tr(P,"useResetRecoilState"),()=>Ch(s.current,P,f_)}function C(P){var F;process.env.NODE_ENV!=="production"&&Tr(P,"useRecoilValueLoadable"),d.current.has(P.key)||(d.current=FI(d.current,P.key));const q=s.current.getState();return Ac(s.current,P,Ks().early&&(F=q.nextTree)!==null&&F!==void 0?F:q.currentTree)}function S(P){process.env.NODE_ENV!=="production"&&Tr(P,"useRecoilValue");const F=C(P);return Dg(F,P,s)}function z(P){return process.env.NODE_ENV!=="production"&&Tr(P,"useRecoilState"),[S(P),y(P)]}function B(P){return process.env.NODE_ENV!=="production"&&Tr(P,"useRecoilStateLoadable"),[C(P),y(P)]}return{getRecoilValue:S,getRecoilValueLoadable:C,getRecoilState:z,getRecoilStateLoadable:B,getSetRecoilState:y,getResetRecoilState:T}},[d,s])}const Nc={current:0};function YI(n){const s=wo(),c=Tc(),d=Sr(()=>{var o;process.env.NODE_ENV!=="production"&&Nc.current++;const y=s.current,T=y.getState(),C=Ks().early&&(o=T.nextTree)!==null&&o!==void 0?o:T.currentTree;return{loadable:Ac(y,n,C),key:n.key}},[s,n]),m=Sr(o=>{let y;return()=>{var T,C;const S=o();return(T=y)!==null&&T!==void 0&&T.loadable.is(S.loadable)&&((C=y)===null||C===void 0?void 0:C.key)===S.key?y:(y=S,S)}},[]),w=p_(()=>m(d),[d,m]),v=Sr(o=>{const y=s.current;return Ka(y,n,o,c).release},[s,n,c]);return PI(v,w,w).loadable}function $I(n){const s=wo(),c=Sr(()=>{var T;const C=s.current,S=C.getState(),z=Ks().early&&(T=S.nextTree)!==null&&T!==void 0?T:S.currentTree;return Ac(C,n,z)},[s,n]),d=Sr(()=>(process.env.NODE_ENV!=="production"&&Nc.current++,c()),[c]),m=Tc(),w=Sr((T,C)=>{const S=s.current;return Ka(S,n,()=>{if(!wn("recoil_suppress_rerender_in_callback"))return C();const B=c();y.current.is(B)||C(),y.current=B},m).release},[s,n,m,c]),v=RI();if(v==null)throw Ei("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const o=kI(v,d,w),y=Ec(o);return Ja(()=>{y.current=o}),o}function Tg(n){const s=wo(),c=Tc(),d=Sr(()=>{var y;process.env.NODE_ENV!=="production"&&Nc.current++;const T=s.current,C=T.getState(),S=Ks().early&&(y=C.nextTree)!==null&&y!==void 0?y:C.currentTree;return Ac(T,n,S)},[s,n]),m=Sr(()=>({loadable:d(),key:n.key}),[d,n.key]),w=Sr(y=>{const T=m();return y.loadable.is(T.loadable)&&y.key===T.key?y:T},[m]);Ja(()=>{const y=Ka(s.current,n,T=>{o(w)},c);return o(w),y.release},[c,n,s,w]);const[v,o]=Ig(m);return v.key!==n.key?m().loadable:v.loadable}function ZI(n){const s=wo(),[,c]=Ig([]),d=Tc(),m=Sr(()=>{var o;process.env.NODE_ENV!=="production"&&Nc.current++;const y=s.current,T=y.getState(),C=Ks().early&&(o=T.nextTree)!==null&&o!==void 0?o:T.currentTree;return Ac(y,n,C)},[s,n]),w=m(),v=Ec(w);return Ja(()=>{v.current=w}),Ja(()=>{const o=s.current,y=o.getState(),T=Ka(o,n,S=>{var z;if(!wn("recoil_suppress_rerender_in_callback"))return c([]);const B=m();(z=v.current)!==null&&z!==void 0&&z.is(B)||c(B),v.current=B},d);if(y.nextTree)o.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{v.current=null,c([])});else{var C;if(!wn("recoil_suppress_rerender_in_callback"))return c([]);const S=m();(C=v.current)!==null&&C!==void 0&&C.is(S)||c(S),v.current=S}return T.release},[d,m,n,s]),w}function Ag(n){return process.env.NODE_ENV!=="production"&&Tr(n,"useRecoilValueLoadable"),wn("recoil_memory_managament_2020")&&bg(n),{TRANSITION_SUPPORT:Tg,SYNC_EXTERNAL_STORE:OI()?YI:Tg,MUTABLE_SOURCE:$I,LEGACY:ZI}[Ks().mode](n)}function g_(n){process.env.NODE_ENV!=="production"&&Tr(n,"useRecoilValue");const s=wo(),c=Ag(n);return Dg(c,n,s)}function Sh(n){process.env.NODE_ENV!=="production"&&Tr(n,"useSetRecoilState");const s=wo();return Sr(c=>{Ch(s.current,n,c)},[s,n])}function GI(n){process.env.NODE_ENV!=="production"&&Tr(n,"useResetRecoilState");const s=wo();return Sr(()=>{Ch(s.current,n,f_)},[s,n])}function HI(n){return process.env.NODE_ENV!=="production"&&Tr(n,"useRecoilState"),[g_(n),Sh(n)]}function WI(n){return process.env.NODE_ENV!=="production"&&Tr(n,"useRecoilStateLoadable"),[Ag(n),Sh(n)]}function qI(){const n=wo();return(s,c={})=>{LI(()=>{n.current.addTransactionMetadata(c),s.forEach((d,m)=>BI(n.current,new wg(m),d))})}}function m_(n){return process.env.NODE_ENV!=="production"&&(Tr(n,"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")&&bg(n),Tg(n)}function y_(n){process.env.NODE_ENV!=="production"&&Tr(n,"useRecoilValue_TRANSITION_SUPPORT_UNSTABLE");const s=wo(),c=m_(n);return Dg(c,n,s)}function XI(n){return process.env.NODE_ENV!=="production"&&Tr(n,"useRecoilState_TRANSITION_SUPPORT_UNSTABLE"),[y_(n),Sh(n)]}var KI={recoilComponentGetRecoilValueCount_FOR_TESTING:Nc,useRecoilInterface:QI,useRecoilState:HI,useRecoilStateLoadable:WI,useRecoilValue:g_,useRecoilValueLoadable:Ag,useResetRecoilState:GI,useSetRecoilState:Sh,useSetUnvalidatedAtomValues:qI,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:m_,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:y_,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:XI};function JI(n,s){const c=new Map;for(const[d,m]of n)s(m,d)&&c.set(d,m);return c}var eD=JI;function tD(n,s){const c=new Set;for(const d of n)s(d)&&c.add(d);return c}var iD=tD;function nD(...n){const s=new Map;for(let c=0;c<n.length;c++){const d=n[c].keys();let m;for(;!(m=d.next()).done;)s.set(m.value,n[c].get(m.value))}return s}var rD=nD;const{batchUpdates:oD}=Ih,{DEFAULT_VALUE:sD,getNode:__,nodes:aD}=Cr,{useStoreRef:Eg}=Go,{AbstractRecoilValue:lD,setRecoilValueLoadable:cD}=bo,{SUSPENSE_TIMEOUT_MS:uD}=Xs,{cloneSnapshot:zh}=Eh,{useCallback:jh,useEffect:x_,useRef:v_,useState:hD}=it,{isSSR:M_}=wc;function Lh(n){const s=Eg();x_(()=>s.current.subscribeToTransactions(n).release,[n,s])}function b_(n){const s=n.atomValues.toMap(),c=vh(eD(s,(d,m)=>{const v=__(m).persistence_UNSTABLE;return v!=null&&v.type!=="none"&&d.state==="hasValue"}),d=>d.contents);return rD(n.nonvalidatedAtoms.toMap(),c)}function dD(n){Lh(jh(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=vh(aD,y=>{var T,C,S,z;return{persistence_UNSTABLE:{type:(T=(C=y.persistence_UNSTABLE)===null||C===void 0?void 0:C.type)!==null&&T!==void 0?T:"none",backButton:(S=(z=y.persistence_UNSTABLE)===null||z===void 0?void 0:z.backButton)!==null&&S!==void 0?S:!1}}}),o=iD(d.dirtyAtoms,y=>m.has(y)||w.has(y));n({atomValues:m,previousAtomValues:w,atomInfo:v,modifiedAtoms:o,transactionMetadata:{...d.transactionMetadata}})},[n]))}function fD(n){Lh(jh(s=>{const c=zh(s,"latest"),d=zh(s,"previous");n({snapshot:c,previousSnapshot:d})},[n]))}function pD(){const n=Eg(),[s,c]=hD(()=>zh(n.current)),d=h_(s),m=v_(),w=v_();if(Lh(jh(o=>c(zh(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},uD)}return s}function w_(n,s){var c;const d=n.getState(),m=(c=d.nextTree)!==null&&c!==void 0?c:d.currentTree,w=s.getStore_INTERNAL().getState().currentTree;oD(()=>{const v=new Set;for(const T of[m.atomValues.keys(),w.atomValues.keys()])for(const C of T){var o,y;((o=m.atomValues.get(C))===null||o===void 0?void 0:o.contents)!==((y=w.atomValues.get(C))===null||y===void 0?void 0:y.contents)&&__(C).shouldRestoreFromSnapshots&&v.add(C)}v.forEach(T=>{cD(n,new lD(T),w.atomValues.has(T)?jn(w.atomValues.get(T)):sD)}),n.replaceState(T=>({...T,stateID:s.getID()}))})}function gD(){const n=Eg();return jh(s=>w_(n.current,s),[n])}var I_={useRecoilSnapshot:pD,gotoSnapshot:w_,useGotoRecoilSnapshot:gD,useRecoilTransactionObserver:fD,useTransactionObservation_DEPRECATED:dD,useTransactionSubscription_DEPRECATED:Lh};const{peekNodeInfo:mD}=ms,{useStoreRef:yD}=Go;function _D(){const n=yD();return({key:s})=>mD(n.current,n.current.getState().currentTree,s)}var xD=_D;const{reactMode:vD}=Xa,{RecoilRoot:MD,useStoreRef:bD}=Go,{useMemo:wD}=it;function ID(){vD().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 n=bD().current;return wD(()=>{function s({children:c}){return it.createElement(MD,{store_INTERNAL:n},c)}return s},[n])}var DD=ID;const{loadableWithValue:TD}=_c,{initializeNode:AD}=ms,{DEFAULT_VALUE:ED,getNode:ND}=Cr,{copyTreeState:CD,getRecoilValueAsLoadable:SD,invalidateDownstreams:zD,writeLoadableToTreeState:jD}=bo;function D_(n){return ND(n.key).nodeType==="atom"}class LD{constructor(s,c){Ui(this,"_store",void 0),Ui(this,"_treeState",void 0),Ui(this,"_changes",void 0),Ui(this,"get",d=>{if(this._changes.has(d.key))return this._changes.get(d.key);if(!D_(d))throw Ei("Reading selectors within atomicUpdate is not supported");const m=SD(this._store,d,this._treeState);if(m.state==="hasValue")return m.contents;throw m.state==="hasError"?m.contents:Ei(`Expected Recoil atom ${d.key} to have a value, but it is in a loading state.`)}),Ui(this,"set",(d,m)=>{if(!D_(d))throw Ei("Setting selectors within atomicUpdate is not supported");if(typeof m=="function"){const w=this.get(d);this._changes.set(d.key,m(w))}else AD(this._store,d.key,"set"),this._changes.set(d.key,m)}),Ui(this,"reset",d=>{this.set(d,ED)}),this._store=s,this._treeState=c,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const s=CD(this._treeState);for(const[c,d]of this._changes)jD(s,c,TD(d));return zD(this._store,s),s}}function OD(n){return s=>{n.replaceState(c=>{const d=new LD(n,c);return s(d),d.newTreeState_INTERNAL()})}}var kD={atomicUpdater:OD},PD=kD.atomicUpdater,T_=Object.freeze({__proto__:null,atomicUpdater:PD});function RD(n,s){if(!n)throw new Error(s)}var UD=RD,Io=UD;const{atomicUpdater:BD}=T_,{batchUpdates:FD}=Ih,{DEFAULT_VALUE:VD}=Cr,{useStoreRef:QD}=Go,{refreshRecoilValue:YD,setRecoilValue:A_}=bo,{cloneSnapshot:$D}=Eh,{gotoSnapshot:ZD}=I_,{useCallback:GD}=it;class E_{}const HD=new E_;function N_(n,s,c,d){let m=HD,w;if(FD(()=>{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 Ei(o);const y=Ty({...d??{},set:(C,S)=>A_(n,C,S),reset:C=>A_(n,C,VD),refresh:C=>YD(n,C),gotoSnapshot:C=>ZD(n,C),transact_UNSTABLE:C=>BD(n)(C)},{snapshot:()=>{const C=$D(n);return w=C.retain(),C}}),T=s(y);if(typeof T!="function")throw Ei(o);m=T(...c)}),m instanceof E_&&(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 WD(n,s){const c=QD();return GD((...d)=>N_(c.current,n,d),s!=null?[...s,c]:void 0)}var C_={recoilCallback:N_,useRecoilCallback:WD};const{useStoreRef:qD}=Go,{refreshRecoilValue:XD}=bo,{useCallback:KD}=it;function JD(n){const s=qD();return KD(()=>{const c=s.current;XD(c,n)},[n,s])}var eT=JD;const{atomicUpdater:tT}=T_,{useStoreRef:iT}=Go,{useMemo:nT}=it;function rT(n,s){const c=iT();return nT(()=>(...d)=>{tT(c.current)(w=>{n(w)(...d)})},s!=null?[...s,c]:void 0)}var oT=rT;class sT{constructor(s){Ui(this,"value",void 0),this.value=s}}var aT={WrappedValue:sT},lT=aT.WrappedValue,S_=Object.freeze({__proto__:null,WrappedValue:lT});const{isFastRefreshEnabled:cT}=Xa;class z_ extends Error{}class uT{constructor(s){var c,d,m;Ui(this,"_name",void 0),Ui(this,"_numLeafs",void 0),Ui(this,"_root",void 0),Ui(this,"_onHit",void 0),Ui(this,"_onSet",void 0),Ui(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,C;for(const[q,me]of s){var S,z,B;const le=this._root;if((le==null?void 0:le.type)==="leaf")throw this.invalidCacheError();const he=T;if(T=he?he.branches.get(C):le,T=(S=T)!==null&&S!==void 0?S:{type:"branch",nodeKey:q,parent:he,branches:new Map,branchKey:C},T.type!=="branch"||T.nodeKey!==q)throw this.invalidCacheError();he==null||he.branches.set(C,T),d==null||(z=d.onNodeVisit)===null||z===void 0||z.call(d,T),C=this._mapNodeValue(me),this._root=(B=this._root)!==null&&B!==void 0?B:T}const P=T?(w=T)===null||w===void 0?void 0:w.branches.get(C):this._root;if(P!=null&&(P.type!=="leaf"||P.branchKey!==C))throw this.invalidCacheError();const F={type:"leaf",value:c,parent:T,branchKey:C};(v=T)===null||v===void 0||v.branches.set(C,F),this._root=(o=this._root)!==null&&o!==void 0?o:F,this._numLeafs++,this._onSet(F),d==null||(y=d.onNodeVisit)===null||y===void 0||y.call(d,F)};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=cT()?"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 hT={TreeCache:uT},dT=hT.TreeCache,j_=Object.freeze({__proto__:null,TreeCache:dT});class fT{constructor(s){var c;Ui(this,"_maxSize",void 0),Ui(this,"_size",void 0),Ui(this,"_head",void 0),Ui(this,"_tail",void 0),Ui(this,"_map",void 0),Ui(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=jn(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 pT={LRUCache:fT},gT=pT.LRUCache,L_=Object.freeze({__proto__:null,LRUCache:gT});const{LRUCache:mT}=L_,{TreeCache:yT}=j_;function _T({name:n,maxSize:s,mapNodeValue:c=d=>d}){const d=new mT({maxSize:s}),m=new yT({name:n,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 O_=_T;const xT=15;function Gr(n,s,c){if(typeof n=="string"&&!n.includes('"')&&!n.includes("\\"))return`"${n}"`;switch(typeof n){case"undefined":return"";case"boolean":return n?"true":"false";case"number":case"symbol":return String(n);case"string":return JSON.stringify(n);case"function":if((s==null?void 0:s.allowFunctions)!==!0)throw Ei("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${n.name})__`}if(n===null)return"null";if(typeof n!="object"){var d;return(d=JSON.stringify(n))!==null&&d!==void 0?d:""}if(bn(n))return"__PROMISE__";if(Array.isArray(n))return`[${n.map((m,w)=>Gr(m,s,w.toString()))}]`;if(typeof n.toJSON=="function")return Gr(n.toJSON(c),s,c);if(n instanceof Map){const m={};for(const[w,v]of n)m[typeof w=="string"?w:Gr(w,s)]=v;return Gr(m,s,c)}return n instanceof Set?Gr(Array.from(n).sort((m,w)=>Gr(m,s).localeCompare(Gr(w,s))),s,c):Symbol!==void 0&&n[Symbol.iterator]!=null&&typeof n[Symbol.iterator]=="function"?Gr(Array.from(n),s,c):`{${Object.keys(n).filter(m=>n[m]!==void 0).sort().map(m=>`${Gr(m,s)}:${Gr(n[m],s,m)}`).join(",")}}`}function vT(n,s={allowFunctions:!1}){if(process.env.NODE_ENV!=="production"&&typeof window<"u"){const c=window.performance?window.performance.now():0,d=Gr(n,s),m=window.performance?window.performance.now():0;return m-c>xT&&(console.groupCollapsed(`Recoil: Spent ${m-c}ms computing a cache key`),console.warn(n,d),console.groupEnd()),d}return Gr(n,s)}var Oh=vT;const{TreeCache:MT}=j_,kh={equality:"reference",eviction:"keep-all",maxSize:1/0};function bT({equality:n=kh.equality,eviction:s=kh.eviction,maxSize:c=kh.maxSize}=kh,d){const m=wT(n);return IT(s,c,m,d)}function wT(n){switch(n){case"reference":return s=>s;case"value":return s=>Oh(s)}throw Ei(`Unrecognized equality policy ${n}`)}function IT(n,s,c,d){switch(n){case"keep-all":return new MT({name:d,mapNodeValue:c});case"lru":return O_({name:d,maxSize:jn(s),mapNodeValue:c});case"most-recent":return O_({name:d,maxSize:1,mapNodeValue:c})}throw Ei(`Unrecognized eviction policy ${n}`)}var DT=bT;function TT(n){var s,c;if(typeof window>"u")return!1;const m=(c=(n!=null?(s=n.ownerDocument)!==null&&s!==void 0?s:n:document).defaultView)!==null&&c!==void 0?c:window;return n!=null&&(typeof m.Node=="function"?n instanceof m.Node:typeof n=="object"&&typeof n.nodeType=="number"&&typeof n.nodeName=="string")}var AT=TT;const{isReactNative:ET,isWindow:NT}=wc;function CT(n){if(n===null||typeof n!="object")return!0;switch(typeof n.$$typeof){case"symbol":return!0;case"number":return!0}return!!(n["@@__IMMUTABLE_ITERABLE__@@"]!=null||n["@@__IMMUTABLE_KEYED__@@"]!=null||n["@@__IMMUTABLE_INDEXED__@@"]!=null||n["@@__IMMUTABLE_ORDERED__@@"]!=null||n["@@__IMMUTABLE_RECORD__@@"]!=null||AT(n)||bn(n)||n instanceof Error||ArrayBuffer.isView(n)||!ET&&NT(n))}function k_(n){if(!(typeof n!="object"||CT(n))){Object.freeze(n);for(const s in n)if(Object.prototype.hasOwnProperty.call(n,s)){const c=n[s];typeof c=="object"&&c!=null&&!Object.isFrozen(c)&&k_(c)}Object.seal(n)}}var Ng=k_;function ST(n){return()=>null}var zT={startPerfBlock:ST};const{isLoadable:jT,loadableWithError:Ph,loadableWithPromise:LT,loadableWithValue:Cg}=_c,{WrappedValue:P_}=S_,{getNodeLoadable:Rh,peekNodeLoadable:OT,setNodeValue:kT}=ms,{saveDepsToStore:PT}=vc,{DEFAULT_VALUE:RT,getConfigDeletionHandler:UT,getNode:BT,registerNode:R_}=Cr,{isRecoilValue:FT}=Ws,{markRecoilValueModified:U_}=bo,{retainedByOptionWithDefault:VT}=Xs,{recoilCallback:QT}=C_,{startPerfBlock:YT}=zT;class B_{}const Cc=new B_,Sc=[],Uh=new Map,$T=(()=>{let n=0;return()=>n++})();function F_(n){let s=null;const{key:c,get:d,cachePolicy_UNSTABLE:m}=n,w=n.set!=null?n.set:void 0;if(process.env.NODE_ENV!=="production"){if(typeof c!="string")throw Ei("A key option with a unique string value must be provided when creating a selector.");if(typeof d!="function")throw Ei("Selectors must specify a get callback option to get the selector value.")}const v=new Set,o=DT(m??{equality:"reference",eviction:"keep-all"},c),y=VT(n.retainedBy_UNSTABLE),T=new Map;let C=0;function S(){return!wn("recoil_memory_managament_2020")||C>0}function z(G){return G.getState().knownSelectors.add(c),C++,()=>{C--}}function B(){return UT(c)!==void 0&&!S()}function P(G,R,Q,J,K){Ve(R,J,K),F(G,Q)}function F(G,R){lt(G,R)&&rt(G),me(R,!0)}function q(G,R){lt(G,R)&&(jn(Ye(G)).stateVersions.clear(),me(R,!1))}function me(G,R){const Q=Uh.get(G);if(Q!=null){for(const J of Q)U_(J,jn(s));R&&Uh.delete(G)}}function le(G,R){let Q=Uh.get(R);Q==null&&Uh.set(R,Q=new Set),Q.add(G)}function he(G,R,Q,J,K,_e){return R.then(Ie=>{if(!S())throw rt(G),Cc;const ye=Cg(Ie);return P(G,Q,K,ye,J),Ie}).catch(Ie=>{if(!S())throw rt(G),Cc;if(bn(Ie))return ge(G,Ie,Q,J,K,_e);const ye=Ph(Ie);throw P(G,Q,K,ye,J),Ie})}function ge(G,R,Q,J,K,_e){return R.then(Ie=>{if(!S())throw rt(G),Cc;_e.loadingDepKey!=null&&_e.loadingDepPromise===R?Q.atomValues.set(_e.loadingDepKey,Cg(Ie)):G.getState().knownSelectors.forEach(Ne=>{Q.atomValues.delete(Ne)});const ye=Re(G,Q);if(ye&&ye.state!=="loading"){if((lt(G,K)||Ye(G)==null)&&F(G,K),ye.state==="hasValue")return ye.contents;throw ye.contents}if(!lt(G,K)){const Ne=Ee(G,Q);if(Ne!=null)return Ne.loadingLoadable.contents}const[ze,He]=Le(G,Q,K);if(ze.state!=="loading"&&P(G,Q,K,ze,He),ze.state==="hasError")throw ze.contents;return ze.contents}).catch(Ie=>{if(Ie instanceof B_)throw Cc;if(!S())throw rt(G),Cc;const ye=Ph(Ie);throw P(G,Q,K,ye,J),Ie})}function W(G,R,Q,J){var K,_e,Ie,ye;if(lt(G,J)||R.version===((K=G.getState())===null||K===void 0||(_e=K.currentTree)===null||_e===void 0?void 0:_e.version)||R.version===((Ie=G.getState())===null||Ie===void 0||(ye=Ie.nextTree)===null||ye===void 0?void 0:ye.version)){var ze,He,Ne;PT(c,Q,G,(ze=(He=G.getState())===null||He===void 0||(Ne=He.nextTree)===null||Ne===void 0?void 0:Ne.version)!==null&&ze!==void 0?ze:G.getState().currentTree.version)}for(const Be of Q)v.add(Be)}function Le(G,R,Q){const J=YT(c);let K=!0,_e=!0;const Ie=()=>{J(),_e=!1};let ye,ze=!1,He;const Ne={loadingDepKey:null,loadingDepPromise:null},Be=new Map;function tt({key:ot}){const jt=Rh(G,R,ot);switch(Be.set(ot,jt),K||(W(G,R,new Set(Be.keys()),Q),q(G,Q)),jt.state){case"hasValue":return jt.contents;case"hasError":throw jt.contents;case"loading":throw Ne.loadingDepKey=ot,Ne.loadingDepPromise=jt.contents,jt.contents}throw Ei("Invalid Loadable state")}const Dt=ot=>(...jt)=>{if(_e)throw Ei("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)),QT(G,ot,jt,{node:s})};try{ye=d({get:tt,getCallback:Dt}),ye=FT(ye)?tt(ye):ye,jT(ye)&&(ye.state==="hasError"&&(ze=!0),ye=ye.contents),bn(ye)?ye=he(G,ye,R,Be,Q,Ne).finally(Ie):Ie(),ye=ye instanceof P_?ye.value:ye}catch(ot){ye=ot,bn(ye)?ye=ge(G,ye,R,Be,Q,Ne).finally(Ie):(ze=!0,Ie())}return ze?He=Ph(ye):bn(ye)?He=LT(ye):He=Cg(ye),K=!1,We(G,Q,Be),W(G,R,new Set(Be.keys()),Q),[He,Be]}function Re(G,R){let Q=R.atomValues.get(c);if(Q!=null)return Q;const J=new Set;try{Q=o.get(_e=>(typeof _e!="string"&&(process.env.NODE_ENV!=="production"?Io(!1,"Cache nodeKey is type string"):Io(!1)),Rh(G,R,_e).contents),{onNodeVisit:_e=>{_e.type==="branch"&&_e.nodeKey!==c&&J.add(_e.nodeKey)}})}catch(_e){throw Ei(`Problem with cache lookup for selector "${c}": ${_e.message}`)}if(Q){var K;R.atomValues.set(c,Q),W(G,R,J,(K=Ye(G))===null||K===void 0?void 0:K.executionID)}return Q}function Ge(G,R){const Q=Re(G,R);if(Q!=null)return rt(G),Q;const J=Ee(G,R);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 _e=$T(),[Ie,ye]=Le(G,R,_e);return Ie.state==="loading"?(Je(G,_e,Ie,ye,R),le(G,_e)):(rt(G),Ve(R,Ie,ye)),Ie}function Ee(G,R){const Q=$y([T.has(G)?[jn(T.get(G))]:[],_h(hg(T,([K])=>K!==G),([,K])=>K)]);function J(K){for(const[_e,Ie]of K)if(!Rh(G,R,_e).is(Ie))return!0;return!1}for(const K of Q){if(K.stateVersions.get(R.version)||!J(K.depValuesDiscoveredSoFarDuringAsyncWork))return K.stateVersions.set(R.version,!0),K;K.stateVersions.set(R.version,!1)}}function Ye(G){return T.get(G)}function Je(G,R,Q,J,K){T.set(G,{depValuesDiscoveredSoFarDuringAsyncWork:J,executionID:R,loadingLoadable:Q,stateVersions:new Map([[K.version,!0]])})}function We(G,R,Q){if(lt(G,R)){const J=Ye(G);J!=null&&(J.depValuesDiscoveredSoFarDuringAsyncWork=Q)}}function rt(G){T.delete(G)}function lt(G,R){var Q;return R===((Q=Ye(G))===null||Q===void 0?void 0:Q.executionID)}function Ae(G){return Array.from(G.entries()).map(([R,Q])=>[R,Q.contents])}function Ve(G,R,Q){process.env.NODE_ENV!=="production"&&R.state!=="loading"&&!n.dangerouslyAllowMutability&&Ng(R.contents),G.atomValues.set(c,R);try{o.set(Ae(Q),R)}catch(J){throw Ei(`Problem with setting cache for selector "${c}": ${J.message}`)}}function Xe(G){if(Sc.includes(c)){const R=`Recoil selector has circular dependencies: ${Sc.slice(Sc.indexOf(c)).join(" → ")}`;return Ph(Ei(R))}Sc.push(c);try{return G()}finally{Sc.pop()}}function _t(G,R){const Q=R.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=OT(G,R,J))===null||K===void 0?void 0:K.contents})}function ht(G,R){return Xe(()=>Ge(G,R))}function ee(G){G.atomValues.delete(c)}function ie(G,R){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=BT(J);(Q=K.clearCache)===null||Q===void 0||Q.call(K,G,R)}v.clear(),ee(R),o.clear(),U_(G,s)}return w!=null?s=R_({key:c,nodeType:"selector",peek:_t,get:ht,set:(R,Q,J)=>{let K=!1;const _e=new Map;function Ie({key:Ne}){if(K)throw Ei("Recoil: Async selector sets are not currently supported.");const Be=Rh(R,Q,Ne);if(Be.state==="hasValue")return Be.contents;if(Be.state==="loading"){const tt=`Getting value of asynchronous atom or selector "${Ne}" in a pending state while setting selector "${c}" is not yet supported.`;throw sr(tt),Ei(tt)}else throw Be.contents}function ye(Ne,Be){if(K){const ot="Recoil: Async selector sets are not currently supported.";throw sr(ot),Ei(ot)}const tt=typeof Be=="function"?Be(Ie(Ne)):Be;kT(R,Q,Ne.key,tt).forEach((ot,jt)=>_e.set(jt,ot))}function ze(Ne){ye(Ne,RT)}const He=w({set:ye,get:Ie,reset:ze},J);if(He!==void 0)throw bn(He)?Ei("Recoil: Async selector sets are not currently supported."):Ei("Recoil: selector set should be a void function.");return K=!0,_e},init:z,invalidate:ee,clearCache:ie,shouldDeleteConfigOnRelease:B,dangerouslyAllowMutability:n.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:y}):s=R_({key:c,nodeType:"selector",peek:_t,get:ht,init:z,invalidate:ee,clearCache:ie,shouldDeleteConfigOnRelease:B,dangerouslyAllowMutability:n.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:y})}F_.value=n=>new P_(n);var el=F_;const{isLoadable:ZT,loadableWithError:Sg,loadableWithPromise:zg,loadableWithValue:tl}=_c,{WrappedValue:V_}=S_,{peekNodeInfo:GT}=ms,{DEFAULT_VALUE:Js,DefaultValue:ys,getConfigDeletionHandler:Q_,registerNode:HT,setConfigDeletionHandler:WT}=Cr,{isRecoilValue:qT}=Ws,{getRecoilValueAsLoadable:XT,markRecoilValueModified:KT,setRecoilValue:Y_,setRecoilValueLoadable:JT}=bo,{retainedByOptionWithDefault:e6}=Xs,zc=n=>n instanceof V_?n.value:n;function t6(n){const{key:s,persistence_UNSTABLE:c}=n,d=e6(n.retainedBy_UNSTABLE);let m=0;function w(le){return zg(le.then(he=>(v=tl(he),he)).catch(he=>{throw v=Sg(he),he}))}let v=bn(n.default)?w(n.default):ZT(n.default)?n.default.state==="loading"?w(n.default.contents):n.default:tl(zc(n.default));T(v.contents);let o;const y=new Map;function T(le){return process.env.NODE_ENV!=="production"&&n.dangerouslyAllowMutability!==!0?bn(le)?le.then(he=>(Ng(he),he)):(Ng(le),le):le}function C(le,he){const ge=he.then(W=>{var Le,Re;return((Re=((Le=le.getState().nextTree)!==null&&Le!==void 0?Le:le.getState().currentTree).atomValues.get(s))===null||Re===void 0?void 0:Re.contents)===ge&&Y_(le,me,W),W}).catch(W=>{var Le,Re;throw((Re=((Le=le.getState().nextTree)!==null&&Le!==void 0?Le:le.getState().currentTree).atomValues.get(s))===null||Re===void 0?void 0:Re.contents)===ge&&JT(le,me,Sg(W)),W});return ge}function S(le,he,ge){var W;m++;const Le=()=>{var Ye;m--,(Ye=y.get(le))===null||Ye===void 0||Ye.forEach(Je=>Je()),y.delete(le)};if(le.getState().knownAtoms.add(s),v.state==="loading"){const Ye=()=>{var Je;((Je=le.getState().nextTree)!==null&&Je!==void 0?Je:le.getState().currentTree).atomValues.has(s)||KT(le,me)};v.contents.finally(Ye)}const Re=(W=n.effects)!==null&&W!==void 0?W:n.effects_UNSTABLE;if(Re!=null){let lt=function(ee){if(Je&&ee.key===s){const ie=Ye;return ie instanceof ys?z(le,he):bn(ie)?zg(ie.then(G=>G instanceof ys?v.toPromise():G)):tl(ie)}return XT(le,ee)},Ae=function(ee){return lt(ee).toPromise()},Ve=function(ee){var ie;const G=GT(le,(ie=le.getState().nextTree)!==null&&ie!==void 0?ie:le.getState().currentTree,ee.key);return Je&&ee.key===s&&!(Ye instanceof ys)?{...G,isSet:!0,loadable:lt(ee)}:G},Ye=Js,Je=!0,We=!1,rt=null;const Xe=ee=>ie=>{if(Je){const G=lt(me),R=G.state==="hasValue"?G.contents:Js;Ye=typeof ie=="function"?ie(R):ie,bn(Ye)&&(Ye=Ye.then(Q=>(rt={effect:ee,value:Q},Q)))}else{if(bn(ie))throw Ei("Setting atoms to async values is not implemented.");typeof ie!="function"&&(rt={effect:ee,value:zc(ie)}),Y_(le,me,typeof ie=="function"?G=>{const R=zc(ie(G));return rt={effect:ee,value:R},R}:zc(ie))}},_t=ee=>()=>Xe(ee)(Js),ht=ee=>ie=>{var G;const{release:R}=le.subscribeToTransactions(Q=>{var J;let{currentTree:K,previousTree:_e}=Q.getState();_e||(sr("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),_e=K);const Ie=(J=K.atomValues.get(s))!==null&&J!==void 0?J:v;if(Ie.state==="hasValue"){var ye,ze,He,Ne;const Be=Ie.contents,tt=(ye=_e.atomValues.get(s))!==null&&ye!==void 0?ye:v,Dt=tt.state==="hasValue"?tt.contents:Js;((ze=rt)===null||ze===void 0?void 0:ze.effect)!==ee||((He=rt)===null||He===void 0?void 0:He.value)!==Be?ie(Be,Dt,!K.atomValues.has(s)):((Ne=rt)===null||Ne===void 0?void 0:Ne.effect)===ee&&(rt=null)}},s);y.set(le,[...(G=y.get(le))!==null&&G!==void 0?G:[],R])};for(const ee of Re)try{const ie=ee({node:me,storeID:le.storeID,parentStoreID_UNSTABLE:le.parentStoreID,trigger:ge,setSelf:Xe(ee),resetSelf:_t(ee),onSet:ht(ee),getPromise:Ae,getLoadable:lt,getInfo_UNSTABLE:Ve});if(ie!=null){var Ge;y.set(le,[...(Ge=y.get(le))!==null&&Ge!==void 0?Ge:[],ie])}}catch(ie){Ye=ie,We=!0}if(Je=!1,!(Ye instanceof ys)){var Ee;const ee=We?Sg(Ye):bn(Ye)?zg(C(le,Ye)):tl(zc(Ye));T(ee.contents),he.atomValues.set(s,ee),(Ee=le.getState().nextTree)===null||Ee===void 0||Ee.atomValues.set(s,ee)}}return Le}function z(le,he){var ge,W;return(ge=(W=he.atomValues.get(s))!==null&&W!==void 0?W:o)!==null&&ge!==void 0?ge:v}function B(le,he){if(he.atomValues.has(s))return jn(he.atomValues.get(s));if(he.nonvalidatedAtoms.has(s)){if(o!=null)return o;if(c==null)return yh(`Tried to restore a persisted value for atom ${s} but it has no persistence settings.`),v;const ge=he.nonvalidatedAtoms.get(s),W=c.validator(ge,Js);return o=W instanceof ys?v:tl(W),o}else return v}function P(){o=void 0}function F(le,he,ge){if(he.atomValues.has(s)){const W=jn(he.atomValues.get(s));if(W.state==="hasValue"&&ge===W.contents)return new Map}else if(!he.nonvalidatedAtoms.has(s)&&ge instanceof ys)return new Map;return T(ge),o=void 0,new Map().set(s,tl(ge))}function q(){return Q_(s)!==void 0&&m<=0}const me=HT({key:s,nodeType:"atom",peek:z,get:B,set:F,init:S,invalidate:P,shouldDeleteConfigOnRelease:q,dangerouslyAllowMutability:n.dangerouslyAllowMutability,persistence_UNSTABLE:n.persistence_UNSTABLE?{type:n.persistence_UNSTABLE.type,backButton:n.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:d});return me}function jg(n){if(process.env.NODE_ENV!=="production"&&typeof n.key!="string")throw Ei("A key option with a unique string value must be provided when creating an atom.");const{...s}=n,c="default"in n?n.default:new Promise(()=>{});return qT(c)?i6({...s,default:c}):t6({...s,default:c})}function i6(n){const s=jg({...n,default:Js,persistence_UNSTABLE:n.persistence_UNSTABLE===void 0?void 0:{...n.persistence_UNSTABLE,validator:d=>d instanceof ys?d:jn(n.persistence_UNSTABLE).validator(d,Js)},effects:n.effects,effects_UNSTABLE:n.effects_UNSTABLE}),c=el({key:`${n.key}__withFallback`,get:({get:d})=>{const m=d(s);return m instanceof ys?n.default:m},set:({set:d},m)=>d(s,m),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:n.dangerouslyAllowMutability});return WT(c.key,Q_(n.key)),c}jg.value=n=>new V_(n);var $_=jg;class n6{constructor(s){var c;Ui(this,"_map",void 0),Ui(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 r6={MapCache:n6},o6=r6.MapCache,s6=Object.freeze({__proto__:null,MapCache:o6});const{LRUCache:Z_}=L_,{MapCache:a6}=s6,Bh={equality:"reference",eviction:"none",maxSize:1/0};function l6({equality:n=Bh.equality,eviction:s=Bh.eviction,maxSize:c=Bh.maxSize}=Bh){const d=c6(n);return u6(s,c,d)}function c6(n){switch(n){case"reference":return s=>s;case"value":return s=>Oh(s)}throw Ei(`Unrecognized equality policy ${n}`)}function u6(n,s,c){switch(n){case"keep-all":return new a6({mapKey:c});case"lru":return new Z_({mapKey:c,maxSize:jn(s)});case"most-recent":return new Z_({mapKey:c,maxSize:1})}throw Ei(`Unrecognized eviction policy ${n}`)}var G_=l6;const{setConfigDeletionHandler:h6}=Cr;function d6(n){var s,c;const d=G_({equality:(s=(c=n.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}=n,C="default"in n?n.default:new Promise(()=>{}),S=$_({...T,key:`${n.key}__${(w=Oh(m))!==null&&w!==void 0?w:"void"}`,default:typeof C=="function"?C(m):C,retainedBy_UNSTABLE:typeof n.retainedBy_UNSTABLE=="function"?n.retainedBy_UNSTABLE(m):n.retainedBy_UNSTABLE,effects:typeof n.effects=="function"?n.effects(m):typeof n.effects_UNSTABLE=="function"?n.effects_UNSTABLE(m):(v=n.effects)!==null&&v!==void 0?v:n.effects_UNSTABLE});return d.set(m,S),h6(S.key,()=>{d.delete(m)}),S}}var f6=d6;const{setConfigDeletionHandler:p6}=Cr;let g6=0;function m6(n){var s,c;const d=G_({equality:(s=(c=n.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(z){throw Ei(`Problem with cache lookup for selector ${n.key}: ${z.message}`)}if(v!=null)return v;const o=`${n.key}__selectorFamily/${(w=Oh(m,{allowFunctions:!0}))!==null&&w!==void 0?w:"void"}/${g6++}`,y=z=>n.get(m)(z),T=n.cachePolicy_UNSTABLE,C=typeof n.retainedBy_UNSTABLE=="function"?n.retainedBy_UNSTABLE(m):n.retainedBy_UNSTABLE;let S;if(n.set!=null){const z=n.set;S=el({key:o,get:y,set:(P,F)=>z(m)(P,F),cachePolicy_UNSTABLE:T,dangerouslyAllowMutability:n.dangerouslyAllowMutability,retainedBy_UNSTABLE:C})}else S=el({key:o,get:y,cachePolicy_UNSTABLE:T,dangerouslyAllowMutability:n.dangerouslyAllowMutability,retainedBy_UNSTABLE:C});return d.set(m,S),p6(S.key,()=>{d.delete(m)}),S}}var _s=m6;const y6=_s({key:"__constant",get:n=>()=>n,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function _6(n){return y6(n)}var x6=_6;const v6=_s({key:"__error",get:n=>()=>{throw Ei(n)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function M6(n){return v6(n)}var b6=M6;function w6(n){return n}var I6=w6;const{loadableWithError:H_,loadableWithPromise:W_,loadableWithValue:q_}=_c;function Fh(n,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]=n(w)}catch(v){d[m]=v}return[c,d]}function D6(n){return n!=null&&!bn(n)}function Vh(n){return Array.isArray(n)?n:Object.getOwnPropertyNames(n).map(s=>n[s])}function Lg(n,s){return Array.isArray(n)?s:Object.getOwnPropertyNames(n).reduce((c,d,m)=>({...c,[d]:s[m]}),{})}function il(n,s,c){const d=c.map((m,w)=>m==null?q_(s[w]):bn(m)?W_(m):H_(m));return Lg(n,d)}function T6(n,s){return s.map((c,d)=>c===void 0?n[d]:c)}const A6=_s({key:"__waitForNone",get:n=>({get:s})=>{const c=Vh(n),[d,m]=Fh(s,c);return il(n,d,m)},dangerouslyAllowMutability:!0}),E6=_s({key:"__waitForAny",get:n=>({get:s})=>{const c=Vh(n),[d,m]=Fh(s,c);return m.some(w=>!bn(w))?il(n,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(n,d,m))}).catch(y=>{m[v]=y,w(il(n,d,m))})})},dangerouslyAllowMutability:!0}),N6=_s({key:"__waitForAll",get:n=>({get:s})=>{const c=Vh(n),[d,m]=Fh(s,c);if(m.every(v=>v==null))return Lg(n,d);const w=m.find(D6);if(w!=null)throw w;return Promise.all(m).then(v=>Lg(n,T6(d,v)))},dangerouslyAllowMutability:!0}),C6=_s({key:"__waitForAllSettled",get:n=>({get:s})=>{const c=Vh(n),[d,m]=Fh(s,c);return m.every(w=>!bn(w))?il(n,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(n,d,m))},dangerouslyAllowMutability:!0}),S6=_s({key:"__noWait",get:n=>({get:s})=>{try{return el.value(q_(s(n)))}catch(c){return el.value(bn(c)?W_(c):H_(c))}},dangerouslyAllowMutability:!0});var z6={waitForNone:A6,waitForAny:E6,waitForAll:N6,waitForAllSettled:C6,noWait:S6};const{RecoilLoadable:j6}=_c,{DefaultValue:L6}=Cr,{RecoilRoot:O6,useRecoilStoreID:k6}=Go,{isRecoilValue:P6}=Ws,{retentionZone:R6}=bh,{freshSnapshot:U6}=Eh,{useRecoilState:B6,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:F6,useRecoilStateLoadable:V6,useRecoilValue:Q6,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Y6,useRecoilValueLoadable:$6,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Z6,useResetRecoilState:G6,useSetRecoilState:H6}=KI,{useGotoRecoilSnapshot:W6,useRecoilSnapshot:q6,useRecoilTransactionObserver:X6}=I_,{useRecoilCallback:K6}=C_,{noWait:J6,waitForAll:eA,waitForAllSettled:tA,waitForAny:iA,waitForNone:nA}=z6;var Qh={DefaultValue:L6,isRecoilValue:P6,RecoilLoadable:j6,RecoilEnv:qa,RecoilRoot:O6,useRecoilStoreID:k6,useRecoilBridgeAcrossReactRoots_UNSTABLE:DD,atom:$_,selector:el,atomFamily:f6,selectorFamily:_s,constSelector:x6,errorSelector:b6,readOnlySelector:I6,noWait:J6,waitForNone:nA,waitForAny:iA,waitForAll:eA,waitForAllSettled:tA,useRecoilValue:Q6,useRecoilValueLoadable:$6,useRecoilState:B6,useRecoilStateLoadable:V6,useSetRecoilState:H6,useResetRecoilState:G6,useGetRecoilValueInfo_UNSTABLE:xD,useRecoilRefresher_UNSTABLE:eT,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Z6,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Y6,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:F6,useRecoilCallback:K6,useRecoilTransaction_UNSTABLE:oT,useGotoRecoilSnapshot:W6,useRecoilSnapshot:q6,useRecoilTransactionObserver_UNSTABLE:X6,snapshot_UNSTABLE:U6,useRetain:bg,retentionZone:R6},rA=Qh.RecoilRoot,An=Qh.atom,Ni=Qh.useRecoilValue,Ji=Qh.useRecoilState;const oA=(n,s)=>{const c=n[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)))})},sA="mi-components";let Yh,X_,Fr=!1,Og=!1;const Ho=(n,s="")=>()=>{},aA=(n,s)=>()=>{},lA="{visibility:hidden}.hydrated{visibility:inherit}",K_="http://www.w3.org/1999/xlink",J_={},cA="http://www.w3.org/2000/svg",uA="http://www.w3.org/1999/xhtml",hA=n=>n!=null,kg=n=>(n=typeof n,n==="object"||n==="function");function e2(n){var s,c,d;return(d=(c=(s=n.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 Me=(n,s,...c)=>{let d=null,m=null,w=!1,v=!1;const o=[],y=C=>{for(let S=0;S<C.length;S++)d=C[S],Array.isArray(d)?y(d):d!=null&&typeof d!="boolean"&&((w=typeof n!="function"&&!kg(d))&&(d=String(d)),w&&v?o[o.length-1].$text$+=d:o.push(w?Pg(null,d):d),v=w)};if(y(c),s){s.key&&(m=s.key);{const C=s.className||s.class;C&&(s.class=typeof C!="object"?C:Object.keys(C).filter(S=>C[S]).join(" "))}}const T=Pg(n,null);return T.$attrs$=s,o.length>0&&(T.$children$=o),T.$key$=m,T},Pg=(n,s)=>{const c={$flags$:0,$tag$:n,$text$:s,$elm$:null,$children$:null};return c.$attrs$=null,c.$key$=null,c},qn={},dA=n=>n&&n.$tag$===qn,fA=(n,s)=>n!=null&&!kg(n)?s&4?n==="false"?!1:n===""||!!n:s&2?parseFloat(n):s&1?String(n):n:n,Wo=n=>xs(n).$hostElement$,In=(n,s,c)=>{const d=Wo(n);return{emit:m=>t2(d,s,{bubbles:!!(c&4),composed:!!(c&2),cancelable:!!(c&1),detail:m})}},t2=(n,s,c)=>{const d=ar.ce(s,c);return n.dispatchEvent(d),d},i2=new WeakMap,pA=(n,s,c)=>{let d=Hh.get(n);OA&&c?(d=d||new CSSStyleSheet,typeof d=="string"?d=s:d.replaceSync(s)):d=s,Hh.set(n,d)},gA=(n,s,c,d)=>{var m;let w=n2(s);const v=Hh.get(w);if(n=n.nodeType===11?n:Do,v)if(typeof v=="string"){n=n.head||n;let o=i2.get(n),y;if(o||i2.set(n,o=new Set),!o.has(w)){{y=Do.createElement("style"),y.innerHTML=v;const T=(m=ar.$nonce$)!==null&&m!==void 0?m:e2(Do);T!=null&&y.setAttribute("nonce",T),n.insertBefore(y,n.querySelector("link"))}o&&o.add(w)}}else n.adoptedStyleSheets.includes(v)||(n.adoptedStyleSheets=[...n.adoptedStyleSheets,v]);return w},mA=n=>{const s=n.$cmpMeta$,c=n.$hostElement$,d=s.$flags$,m=Ho("attachStyles",s.$tagName$),w=gA(c.shadowRoot?c.shadowRoot:c.getRootNode(),s);d&10&&(c["s-sc"]=w,c.classList.add(w+"-h")),m()},n2=(n,s)=>"sc-"+n.$tagName$,r2=(n,s,c,d,m,w)=>{if(c!==d){let v=y2(n,s),o=s.toLowerCase();if(s==="class"){const y=n.classList,T=o2(c),C=o2(d);y.remove(...T.filter(S=>S&&!C.includes(S))),y.add(...C.filter(S=>S&&!T.includes(S)))}else if(s==="style"){for(const y in c)(!d||d[y]==null)&&(y.includes("-")?n.style.removeProperty(y):n.style[y]="");for(const y in d)(!c||d[y]!==c[y])&&(y.includes("-")?n.style.setProperty(y,d[y]):n.style[y]=d[y])}else if(s!=="key")if(s==="ref")d&&d(n);else if(!v&&s[0]==="o"&&s[1]==="n")s[2]==="-"?s=s.slice(3):y2(jc,o)?s=o.slice(2):s=o[2]+s.slice(3),c&&ar.rel(n,s,c,!1),d&&ar.ael(n,s,d,!1);else{const y=kg(d);if((v||y&&d!==null)&&!m)try{if(n.tagName.includes("-"))n[s]=d;else{const C=d??"";s==="list"?v=!1:(c==null||n[s]!=C)&&(n[s]=C)}}catch{}let T=!1;o!==(o=o.replace(/^xlink\:?/,""))&&(s=o,T=!0),d==null||d===!1?(d!==!1||n.getAttribute(s)==="")&&(T?n.removeAttributeNS(K_,s):n.removeAttribute(s)):(!v||w&4||m)&&!y&&(d=d===!0?"":d,T?n.setAttributeNS(K_,s,d):n.setAttribute(s,d))}}},yA=/\s/,o2=n=>n?n.split(yA):[],s2=(n,s,c,d)=>{const m=s.$elm$.nodeType===11&&s.$elm$.host?s.$elm$.host:s.$elm$,w=n&&n.$attrs$||J_,v=s.$attrs$||J_;for(d in w)d in v||r2(m,d,w[d],void 0,c,s.$flags$);for(d in v)r2(m,d,w[d],v[d],c,s.$flags$)},$h=(n,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?cA:uA,m.$tag$),Fr&&m.$tag$==="foreignObject"&&(Fr=!1),s2(null,m,Fr),hA(Yh)&&v["s-si"]!==Yh&&v.classList.add(v["s-si"]=Yh),m.$children$)for(w=0;w<m.$children$.length;++w)o=$h(n,m,w),o&&v.appendChild(o);m.$tag$==="svg"?Fr=!1:v.tagName==="foreignObject"&&(Fr=!0)}return v},a2=(n,s,c,d,m,w)=>{let v=n,o;for(v.shadowRoot&&v.tagName===X_&&(v=v.shadowRoot);m<=w;++m)d[m]&&(o=$h(null,c,m),o&&(d[m].$elm$=o,v.insertBefore(o,s)))},l2=(n,s,c,d,m)=>{for(;s<=c;++s)(d=n[s])&&(m=d.$elm$,c2(d),m.remove())},_A=(n,s,c,d)=>{let m=0,w=0,v=0,o=0,y=s.length-1,T=s[0],C=s[y],S=d.length-1,z=d[0],B=d[S],P,F;for(;m<=y&&w<=S;)if(T==null)T=s[++m];else if(C==null)C=s[--y];else if(z==null)z=d[++w];else if(B==null)B=d[--S];else if(Zh(T,z))nl(T,z),T=s[++m],z=d[++w];else if(Zh(C,B))nl(C,B),C=s[--y],B=d[--S];else if(Zh(T,B))nl(T,B),n.insertBefore(T.$elm$,C.$elm$.nextSibling),T=s[++m],B=d[--S];else if(Zh(C,z))nl(C,z),n.insertBefore(C.$elm$,T.$elm$),C=s[--y],z=d[++w];else{for(v=-1,o=m;o<=y;++o)if(s[o]&&s[o].$key$!==null&&s[o].$key$===z.$key$){v=o;break}v>=0?(F=s[v],F.$tag$!==z.$tag$?P=$h(s&&s[w],c,v):(nl(F,z),s[v]=void 0,P=F.$elm$),z=d[++w]):(P=$h(s&&s[w],c,w),z=d[++w]),P&&T.$elm$.parentNode.insertBefore(P,T.$elm$)}m>y?a2(n,d[S+1]==null?null:d[S+1].$elm$,c,d,w,S):w>S&&l2(s,m,y)},Zh=(n,s)=>n.$tag$===s.$tag$?n.$key$===s.$key$:!1,nl=(n,s)=>{const c=s.$elm$=n.$elm$,d=n.$children$,m=s.$children$,w=s.$tag$,v=s.$text$;v===null?(Fr=w==="svg"?!0:w==="foreignObject"?!1:Fr,w==="slot"||s2(n,s,Fr),d!==null&&m!==null?_A(c,d,s,m):m!==null?(n.$text$!==null&&(c.textContent=""),a2(c,null,s,m,0,m.length-1)):d!==null&&l2(d,0,d.length-1),Fr&&w==="svg"&&(Fr=!1)):n.$text$!==v&&(c.data=v)},c2=n=>{n.$attrs$&&n.$attrs$.ref&&n.$attrs$.ref(null),n.$children$&&n.$children$.map(c2)},xA=(n,s)=>{const c=n.$hostElement$,d=n.$cmpMeta$,m=n.$vnode$||Pg(null,null),w=dA(s)?s:Me(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,n.$vnode$=w,w.$elm$=m.$elm$=c.shadowRoot||c,Yh=c["s-sc"],nl(m,w)},u2=(n,s)=>{s&&!n.$onRenderResolve$&&s["s-p"]&&s["s-p"].push(new Promise(c=>n.$onRenderResolve$=c))},Gh=(n,s)=>{if(n.$flags$|=16,n.$flags$&4){n.$flags$|=512;return}return u2(n,n.$ancestorComponent$),PA(()=>vA(n,s))},vA=(n,s)=>{const c=Ho("scheduleUpdate",n.$cmpMeta$.$tagName$),d=n.$lazyInstance$;let m;return s&&(n.$flags$|=256,n.$queuedListeners$&&(n.$queuedListeners$.map(([w,v])=>ea(d,w,v)),n.$queuedListeners$=null),m=ea(d,"componentWillLoad")),m=d2(m,()=>ea(d,"componentWillRender")),c(),d2(m,()=>MA(n,d,s))},MA=async(n,s,c)=>{const d=n.$hostElement$,m=Ho("update",n.$cmpMeta$.$tagName$),w=d["s-rc"];c&&mA(n);const v=Ho("render",n.$cmpMeta$.$tagName$);bA(n,s),w&&(w.map(o=>o()),d["s-rc"]=void 0),v(),m();{const o=d["s-p"],y=()=>wA(n);o.length===0?y():(Promise.all(o).then(y),n.$flags$|=4,o.length=0)}},bA=(n,s,c)=>{try{s=s.render&&s.render(),n.$flags$&=-17,n.$flags$|=2,xA(n,s)}catch(d){ta(d,n.$hostElement$)}return null},wA=n=>{const s=n.$cmpMeta$.$tagName$,c=n.$hostElement$,d=Ho("postUpdate",s),m=n.$lazyInstance$,w=n.$ancestorComponent$;ea(m,"componentDidRender"),n.$flags$&64?d():(n.$flags$|=64,f2(c),ea(m,"componentDidLoad"),d(),n.$onReadyResolve$(c),w||h2()),n.$onInstanceResolve$(c),n.$onRenderResolve$&&(n.$onRenderResolve$(),n.$onRenderResolve$=void 0),n.$flags$&512&&Fg(()=>Gh(n,!1)),n.$flags$&=-517},Rg=n=>{{const s=xs(n),c=s.$hostElement$.isConnected;return c&&(s.$flags$&18)===2&&Gh(s,!1),c}},h2=n=>{f2(Do.documentElement),Fg(()=>t2(jc,"appload",{detail:{namespace:sA}}))},ea=(n,s,c)=>{if(n&&n[s])try{return n[s](c)}catch(d){ta(d)}},d2=(n,s)=>n&&n.then?n.then(s):s(),f2=n=>n.classList.add("hydrated"),IA=(n,s)=>xs(n).$instanceValues$.get(s),DA=(n,s,c,d)=>{const m=xs(n),w=m.$hostElement$,v=m.$instanceValues$.get(s),o=m.$flags$,y=m.$lazyInstance$;c=fA(c,d.$members$[s][0]);const T=Number.isNaN(v)&&Number.isNaN(c),C=c!==v&&!T;if((!(o&8)||v===void 0)&&C&&(m.$instanceValues$.set(s,c),y)){if(d.$watchers$&&o&128){const S=d.$watchers$[s];S&&S.map(z=>{try{y[z](c,v,s)}catch(B){ta(B,w)}})}(o&18)===2&&Gh(m,!1)}},p2=(n,s,c)=>{if(s.$members$){n.watchers&&(s.$watchers$=n.watchers);const d=Object.entries(s.$members$),m=n.prototype;if(d.map(([w,[v]])=>{v&31||c&2&&v&32?Object.defineProperty(m,w,{get(){return IA(this,w)},set(o){DA(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})},n.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 n},TA=async(n,s,c,d,m)=>{if(!(s.$flags$&32)){{if(s.$flags$|=32,m=LA(c),m.then){const y=aA();m=await m,y()}m.isProxied||(c.$watchers$=m.watchers,p2(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(),g2(s.$lazyInstance$)}if(m.style){let o=m.style;const y=n2(c);if(!Hh.has(y)){const T=Ho("registerStyles",c.$tagName$);pA(y,o,!!(c.$flags$&1)),T()}}}const w=s.$ancestorComponent$,v=()=>Gh(s,!0);w&&w["s-rc"]?w["s-rc"].push(v):v()},g2=n=>{ea(n,"connectedCallback")},AA=n=>{if(!(ar.$flags$&1)){const s=xs(n),c=s.$cmpMeta$,d=Ho("connectedCallback",c.$tagName$);if(s.$flags$&1)m2(n,s,c.$listeners$),g2(s.$lazyInstance$);else{s.$flags$|=1;{let m=n;for(;m=m.parentNode||m.host;)if(m["s-p"]){u2(s,s.$ancestorComponent$=m);break}}c.$members$&&Object.entries(c.$members$).map(([m,[w]])=>{if(w&31&&n.hasOwnProperty(m)){const v=n[m];delete n[m],n[m]=v}}),TA(n,s,c)}d()}},EA=n=>{if(!(ar.$flags$&1)){const s=xs(n),c=s.$lazyInstance$;s.$rmListeners$&&(s.$rmListeners$.map(d=>d()),s.$rmListeners$=void 0),ea(c,"disconnectedCallback")}},NA=(n,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"),C=[];let S,z=!0;Object.assign(ar,s),ar.$resourcesUrl$=new URL(s.resourcesUrl||"./",Do.baseURI).href,n.map(B=>{B[1].map(P=>{const F={$flags$:P[0],$tagName$:P[1],$members$:P[2],$listeners$:P[3]};F.$members$=P[2],F.$listeners$=P[3],F.$attrsToReflect$=[],F.$watchers$={};const q=F.$tagName$,me=class extends HTMLElement{constructor(le){super(le),le=this,jA(le,F),F.$flags$&1&&le.attachShadow({mode:"open"})}connectedCallback(){S&&(clearTimeout(S),S=null),z?C.push(this):ar.jmp(()=>AA(this))}disconnectedCallback(){ar.jmp(()=>EA(this))}componentOnReady(){return xs(this).$onReadyPromise$}};F.$lazyBundleId$=B[0],!w.includes(q)&&!v.get(q)&&(m.push(q),v.define(q,p2(me,F,1)))})});{T.innerHTML=m+lA,T.setAttribute("data-styles","");const B=(c=ar.$nonce$)!==null&&c!==void 0?c:e2(Do);B!=null&&T.setAttribute("nonce",B),o.insertBefore(T,y?y.nextSibling:o.firstChild)}z=!1,C.length?C.map(B=>B.connectedCallback()):ar.jmp(()=>S=setTimeout(h2,30)),d()},m2=(n,s,c,d)=>{c&&c.map(([m,w,v])=>{const o=SA(n,m),y=CA(s,v),T=zA(m);ar.ael(o,w,y,T),(s.$rmListeners$=s.$rmListeners$||[]).push(()=>ar.rel(o,w,y,T))})},CA=(n,s)=>c=>{try{n.$flags$&256?n.$lazyInstance$[s](c):(n.$queuedListeners$=n.$queuedListeners$||[]).push([s,c])}catch(d){ta(d)}},SA=(n,s)=>s&8?jc:n,zA=n=>(n&2)!==0,Ug=new WeakMap,xs=n=>Ug.get(n),Gi=(n,s)=>Ug.set(s.$lazyInstance$=n,s),jA=(n,s)=>{const c={$flags$:0,$hostElement$:n,$cmpMeta$:s,$instanceValues$:new Map};return c.$onInstancePromise$=new Promise(d=>c.$onInstanceResolve$=d),c.$onReadyPromise$=new Promise(d=>c.$onReadyResolve$=d),n["s-p"]=[],n["s-rc"]=[],m2(n,c,s.$listeners$),Ug.set(n,c)},y2=(n,s)=>s in n,ta=(n,s)=>(0,console.error)(n,s),_2=new Map,LA=(n,s,c)=>{const d=n.$tagName$.replace(/-/g,"_"),m=n.$lazyBundleId$,w=_2.get(m);if(w)return w[d];/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return oA(Object.assign({"./combo-box-item.entry.js":()=>Promise.resolve().then(()=>$E),"./mi-card_2.entry.js":()=>Promise.resolve().then(()=>HE),"./mi-chip.entry.js":()=>Promise.resolve().then(()=>qE),"./mi-column.entry.js":()=>Promise.resolve().then(()=>XE),"./mi-combo-box.entry.js":()=>Promise.resolve().then(()=>eN),"./mi-data-table.entry.js":()=>Promise.resolve().then(()=>lN),"./mi-distance_2.entry.js":()=>Promise.resolve().then(()=>hN),"./mi-dropdown-item.entry.js":()=>Promise.resolve().then(()=>dN),"./mi-dropdown.entry.js":()=>Promise.resolve().then(()=>pN),"./mi-floor-selector.entry.js":()=>Promise.resolve().then(()=>mN),"./mi-keyboard.entry.js":()=>Promise.resolve().then(()=>IN),"./mi-list-item-category.entry.js":()=>Promise.resolve().then(()=>TN),"./mi-list-item-location.entry.js":()=>Promise.resolve().then(()=>EN),"./mi-list.entry.js":()=>Promise.resolve().then(()=>CN),"./mi-location-booking.entry.js":()=>Promise.resolve().then(()=>tj),"./mi-location-info.entry.js":()=>Promise.resolve().then(()=>nj),"./mi-map-googlemaps.entry.js":()=>Promise.resolve().then(()=>sj),"./mi-map-mapbox.entry.js":()=>Promise.resolve().then(()=>uj),"./mi-metric-card.entry.js":()=>Promise.resolve().then(()=>dj),"./mi-my-position.entry.js":()=>Promise.resolve().then(()=>Nj),"./mi-notification.entry.js":()=>Promise.resolve().then(()=>Sj),"./mi-route-instructions-heading.entry.js":()=>Promise.resolve().then(()=>jj),"./mi-route-instructions-maneuver-legacy.entry.js":()=>Promise.resolve().then(()=>Oj),"./mi-route-instructions-maneuver.entry.js":()=>Promise.resolve().then(()=>Pj),"./mi-route-instructions-step-legacy.entry.js":()=>Promise.resolve().then(()=>Uj),"./mi-route-instructions-step.entry.js":()=>Promise.resolve().then(()=>Fj),"./mi-route-instructions.entry.js":()=>Promise.resolve().then(()=>Qj),"./mi-scroll-buttons.entry.js":()=>Promise.resolve().then(()=>$j),"./mi-search.entry.js":()=>Promise.resolve().then(()=>qj),"./mi-share-sms.entry.js":()=>Promise.resolve().then(()=>Kj),"./mi-step-switcher.entry.js":()=>Promise.resolve().then(()=>e7),"./mi-tab-panel.entry.js":()=>Promise.resolve().then(()=>i7),"./mi-tab.entry.js":()=>Promise.resolve().then(()=>n7),"./mi-tabs.entry.js":()=>Promise.resolve().then(()=>o7),"./mi-time.entry.js":()=>Promise.resolve().then(()=>s7)}),`./${m}.entry.js`).then(v=>(_2.set(m,v),v[d]),ta)},Hh=new Map,jc=typeof window<"u"?window:{},Do=jc.document||{head:{}},ar={$flags$:0,$resourcesUrl$:"",jmp:n=>n(),raf:n=>requestAnimationFrame(n),ael:(n,s,c,d)=>n.addEventListener(s,c,d),rel:(n,s,c,d)=>n.removeEventListener(s,c,d),ce:(n,s)=>new CustomEvent(n,s)},x2=n=>Promise.resolve(n),OA=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replaceSync=="function"}catch{}return!1})(),v2=[],M2=[],kA=(n,s)=>c=>{n.push(c),Og||(Og=!0,s&&ar.$flags$&4?Fg(Bg):ar.raf(Bg))},b2=n=>{for(let s=0;s<n.length;s++)try{n[s](performance.now())}catch(c){ta(c)}n.length=0},Bg=()=>{b2(v2),b2(M2),(Og=v2.length>0)&&ar.raf(Bg)},Fg=n=>x2().then(n),PA=kA(M2,!0),RA=()=>x2(),UA=(n,s)=>typeof window>"u"?Promise.resolve():RA().then(()=>NA([["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],openSubsteps:[64],closeSubsteps:[64]}]]],["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-distance_2",[[1,"mi-distance",{meters:[2],unit:[1]}],[1,"mi-icon",{iconName:[1,"icon-name"]}]]],["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-route-instructions-maneuver",[[1,"mi-route-instructions-maneuver",{maneuver:[1],translations:[1],unit:[1],maneuverData:[32],translationsData:[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-route-instructions-maneuver-legacy",[[1,"mi-route-instructions-maneuver-legacy",{maneuver:[1],translations:[1],unit:[1],maneuverData:[32],translationsData:[32]}]]],["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-time",[[1,"mi-time",{seconds:[2],translations:[1],translationsData:[32]}]]]],s)),UO="",vs={Google:"google",Mapbox:"mapbox"},qo=An({key:"mapsIndoorsInstance",default:null,dangerouslyAllowMutability:!0}),BA=n=>{const s=Ni(qo),c=it.useRef(),[d,m]=it.useState([]);it.useEffect(()=>{(async()=>{if(s&&n){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)}})()},[n,s])},Vg=An({key:"venues",default:[]});var FA=function n(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(!n(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(!n(s[v],c[v]))return!1}return!0}return s!==s&&c!==c};const w2="__googleMapsScriptId";var rl;(function(n){n[n.INITIALIZED=0]="INITIALIZED",n[n.LOADING=1]="LOADING",n[n.SUCCESS=2]="SUCCESS",n[n.FAILURE=3]="FAILURE"})(rl||(rl={}));let VA=class pc{constructor({apiKey:s,authReferrerPolicy:c,channel:d,client:m,id:w=w2,language:v,libraries:o=[],mapIds:y,nonce:T,region:C,retries:S=3,url:z="https://maps.googleapis.com/maps/api/js",version:B}){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||w2,this.language=v,this.libraries=o,this.mapIds=y,this.nonce=T,this.region=C,this.retries=S,this.url=z,this.version=B,pc.instance){if(!FA(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 Qg=An({key:"gmApiKey",default:null}),ia=An({key:"primaryColor",default:"#005655"}),I2=An({key:"gmMapId",default:null});function QA({onMapView:n,onPositionControl:s}){const c=Ni(Qg),d=Ni(I2),[m,w]=it.useState(),[v,o]=it.useState(),[y,T]=it.useState(!1),[C,S]=it.useState(!1),z=Ni(qo),B=Ni(ia);return it.useEffect(()=>{new VA({apiKey:c,version:"quarterly",libraries:["geometry","places"]}).load().then(F=>{w(F);const q={element:document.getElementById("map"),disableDefaultUI:!0,center:{lat:0,lng:0},zoom:21,mapId:d},me=new window.mapsindoors.mapView.GoogleMapsView(q);o(me);const le=new window.mapsindoors.directions.GoogleMapsProvider;n(me,le)})},[]),it.useEffect(()=>{if(z&&v&&m&&!C){const P=document.createElement("mi-my-position");P.mapsindoors=z,v.getMap().controls[m.maps.ControlPosition.RIGHT_TOP].push(P),S(!0),s(P)}if(z&&v&&m&&!y){const P=document.createElement("mi-floor-selector");P.mapsindoors=z,P.primaryColor=B,v.getMap().controls[m.maps.ControlPosition.RIGHT_TOP].push(P),T(!0)}},[z,v,m,y,C]),$e.jsx("div",{className:"map-container",id:"map"})}var D2={exports:{}};(function(n,s){(function(c,d){n.exports=d()})(rb,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;",C={};c(C),m=y(C),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 C;const S={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(C==null){const t=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{C=process.env.API_URL_REGEX!=null?new RegExp(process.env.API_URL_REGEX):t}catch{C=t}}return C},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},z={supported:!1,testSupport:function(t){!F&&P&&(q?me(t):B=t)}};let B,P,F=!1,q=!1;function me(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,P),t.isContextLost())return;z.supported=!0}catch{}t.deleteTexture(e),F=!0}y.document&&(P=y.document.createElement("img"),P.onload=function(){B&&me(B),B=null,q=!0},P.onerror=function(){F=!0,B=null},P.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const le="01";var he=ge;function ge(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}ge.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 W=Le;function Le(t,e){this.x=t,this.y=e}Le.prototype={clone:function(){return new Le(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}},Le.convert=function(t){return t instanceof Le?t:Array.isArray(t)?new Le(t[0],t[1]):t};const Re=Math.PI/180,Ge=180/Math.PI;function Ee(t){return t*Re}function Ye(t){return t*Ge}const Je=[[0,0],[1,0],[1,1],[0,1]];function We(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 rt(t,e,i,a){const u=new he(t,e,i,a);return function(f){return u.solve(f)}}const lt=rt(.25,.1,.25,1);function Ae(t,e,i){return Math.min(i,Math.max(e,t))}function Ve(t,e,i){return(i=Ae((i-t)/(e-t),0,1))*i*(3-2*i)}function Xe(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 ht(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 R(){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 _e(t,e){return t.indexOf(e,t.length-e.length)!==-1}function Ie(t,e,i){const a={};for(const u in t)a[u]=e.call(i||this,t[u],u,t);return a}function ye(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 ze(t){return Array.isArray(t)?t.map(ze):typeof t=="object"&&t?Ie(t,ze):t}const He={};function Ne(t){He[t]||(typeof console<"u"&&console.warn(t),He[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 tt(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 ot(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 jt=null;function $t(t){if(jt==null){const e=t.navigator?t.navigator.userAgent:null;jt=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return jt}function Xt(t){try{const e=y[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch{return!1}}function yi(t,e){return[t[4*e],t[4*e+1],t[4*e+2],t[4*e+3]]}const en="mapbox-tiles";let xi,ji,vi=500,li=50;function di(){try{return y.caches}catch{}}function Pt(){di()&&!xi&&(xi=y.caches.open(en))}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 Li={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(Li);class _i extends Error{constructor(e,i,a){i===401&&ui(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,cn=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=(E=g.url).indexOf("sku=")>0&&ui(E);var E;a.type==="json"&&g.headers.set("Accept","application/json");const j=(U,V,Z)=>{if(b)return;if(U&&U.message!=="SecurityError"&&Ne(U),V&&Z)return L(V);const ne=Date.now();y.fetch(g).then(be=>{if(be.ok){const Se=I?be.clone():null;return L(be,Se,ne)}return u(new _i(be.statusText,be.status,a.url))}).catch(be=>{be.code!==20&&u(new Error(be.message))})},L=(U,V,Z)=>{(a.type==="arrayBuffer"?U.arrayBuffer():a.type==="json"?U.json():U.text()).then(ne=>{b||(V&&Z&&function(be,Se,ve){if(Pt(),!xi)return;const Te={status:Se.status,statusText:Se.statusText,headers:new y.Headers};Se.headers.forEach((ut,at)=>Te.headers.set(at,ut));const ke=ot(Se.headers.get("Cache-Control")||"");if(ke["no-store"])return;ke["max-age"]&&Te.headers.set("Expires",new Date(ve+1e3*ke["max-age"]).toUTCString());const je=Te.headers.get("Expires");je&&(new Date(je).getTime()-ve<42e4||function(ut,at){if(ji===void 0)try{new Response(new ReadableStream),ji=!0}catch{ji=!1}ji?at(ut.body):ut.blob().then(at)}(Se,ut=>{const at=new y.Response(ut,Te);Pt(),xi&&xi.then(vt=>vt.put(Ii(be.url),at)).catch(vt=>Ne(vt.message))}))}(g,V,Z),x=!0,u(null,ne,U.headers.get("Cache-Control"),U.headers.get("Expires")))}).catch(ne=>{b||u(new Error(ne.message))})};return I?function(U,V){if(Pt(),!xi)return V(null);const Z=Ii(U.url);xi.then(ne=>{ne.match(Z).then(be=>{const Se=function(ve){if(!ve)return!1;const Te=new Date(ve.headers.get("Expires")||0),ke=ot(ve.headers.get("Cache-Control")||"");return Te>Date.now()&&!ke["no-cache"]}(be);ne.delete(Z),Se&&ne.put(Z,be.clone()),V(null,be,Se)}).catch(V)}).catch(V)}(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)},En=function(t,e){return cn(ee(t,{type:"arrayBuffer"}),e)};function Qe(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,St;wt=[],St=0;const Ut=function(t,e){if(z.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),St>=S.MAX_PARALLEL_IMAGE_REQUESTS){const f={requestParameters:t,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return wt.push(f),f}St++;let i=!1;const a=()=>{if(!i)for(i=!0,St--;wt.length&&St<S.MAX_PARALLEL_IMAGE_REQUESTS;){const f=wt.shift(),{requestParameters:g,callback:x,cancelled:b}=f;b||(f.cancel=Ut(g,x).cancel)}},u=En(t,(f,g,x,b)=>{a(),f?e(f):g&&(y.createImageBitmap?function(I,E){const j=new y.Blob([new Uint8Array(I)],{type:"image/png"});y.createImageBitmap(j).then(L=>{E(null,L)}).catch(L=>{E(new Error(`Could not load image because of ${L.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(g,(I,E)=>e(I,E,x,b)):function(I,E){const j=new y.Image,L=y.URL;j.onload=()=>{E(null,j),L.revokeObjectURL(j.src),j.onload=null,y.requestAnimationFrame(()=>{j.src=Fe})},j.onerror=()=>E(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 U=new y.Blob([new Uint8Array(I)],{type:"image/png"});j.src=I.byteLength?L.createObjectURL(U):Fe}(g,(I,E)=>e(I,E,x,b)))});return{cancel:()=>{u.cancel(),a()}}},Kt="NO_ACCESS_TOKEN";function ni(t){return t.indexOf("mapbox:")===0}function ui(t){return S.API_URL_REGEX.test(t)}function gi(t){return S.API_CDN_URL_REGEX.test(t)}function bi(t){return S.API_STYLE_REGEX.test(t)&&!Wi(t)}function Wi(t){return S.API_SPRITE_REGEX.test(t)}const Nn=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function tn(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 Cn(t){const e=t.params.length?`?${t.params.join("&")}`:"";return`${t.protocol}://${t.authority}${t.path}${e}`}function Vn(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 fe{constructor(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(e){const i=Vn(S.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)))):S.ACCESS_TOKEN||"",e?`mapbox.eventData.${e}:${a}`:`mapbox.eventData:${a}`}fetchEventData(){const e=Xt("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{Ne("Unable to read from LocalStorage")}}saveEventData(){const e=Xt("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{Ne("Unable to write to LocalStorage")}}processRequests(e){}postEvent(e,i,a,u){if(!S.EVENTS_URL)return;const f=tn(S.EVENTS_URL);f.params.push(`access_token=${u||S.ACCESS_TOKEN||""}`);const g={event:this.type,created:new Date(e).toISOString()},x=i?ee(g,i):g,b={url:Cn(f),headers:{"Content-Type":"text/plain"},body:JSON.stringify([x])};this.pendingRequest=function(I,E){return cn(ee(I,{method:"POST"}),E)}(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 fe{constructor(t){super("appUserTurnstile"),this._customAccessToken=t}postTurnstileEvent(t,e){S.EVENTS_URL&&S.ACCESS_TOKEN&&Array.isArray(t)&&t.some(i=>ni(i)||ui(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=Vn(S.ACCESS_TOKEN),i=e?e.u:S.ACCESS_TOKEN;let a=i!==this.eventData.tokenU;J(this.anonId)||(this.anonId=R(),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 fe{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(t,e,i,a){this.skuToken=e,this.errorCb=a,S.EVENTS_URL&&(i||S.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(Kt)))}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=R()),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 fe{constructor(){super("gljs.performance")}postPerformanceEvent(t,e){S.EVENTS_URL&&(t||S.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(L){const U={};if(L){for(const V in L)if(V!=="other")for(const Z of L[V]){const ne=`${V}ResolveRangeMin`,be=`${V}ResolveRangeMax`,Se=`${V}RequestCount`,ve=`${V}RequestCachedCount`;U[ne]=Math.min(U[ne]||1/0,Z.startTime),U[be]=Math.max(U[be]||-1/0,Z.responseEnd);const Te=ke=>{U[ke]===void 0&&(U[ke]=0),++U[ke]};Z.transferSize!==void 0&&Z.transferSize===0&&Te(ve),Te(Se)}}return U}(function(L,U){const V={};if(L)for(const Z of L){const ne=U(Z);V[ne]===void 0&&(V[ne]=[]),V[ne].push(Z)}return V}(f,xt)),b=y.devicePixelRatio,I=y.navigator.connection||y.navigator.mozConnection||y.navigator.webkitConnection,E={counters:[],metadata:[],attributes:[]},j=(L,U,V)=>{V!=null&&L.push({name:U,value:V.toString()})};for(const L in x)j(E.counters,L,x[L]);if(u.interactionRange[0]!==1/0&&u.interactionRange[1]!==-1/0&&(j(E.counters,"interactionRangeMin",u.interactionRange[0]),j(E.counters,"interactionRangeMax",u.interactionRange[1])),g)for(const L of Object.keys(ct)){const U=ct[L],V=g.find(Z=>Z.name===U);V&&j(E.counters,U,V.startTime)}return j(E.counters,"visibilityHidden",u.visibilityHidden),j(E.attributes,"style",function(L){if(L)for(const U of L){const V=U.name.split("?")[0];if(bi(V)){const Z=V.split("/").slice(-2);if(Z.length===2)return`mapbox://styles/${Z[0]}/${Z[1]}`}}}(f)),j(E.attributes,"terrainEnabled",u.terrainEnabled?"true":"false"),j(E.attributes,"fogEnabled",u.fogEnabled?"true":"false"),j(E.attributes,"projection",u.projection),j(E.attributes,"zoom",u.zoom),j(E.metadata,"devicePixelRatio",b),j(E.metadata,"connectionEffectiveType",I?I.effectiveType:void 0),j(E.metadata,"navigatorUserAgent",y.navigator.userAgent),j(E.metadata,"screenWidth",y.screen.width),j(E.metadata,"screenHeight",y.screen.height),j(E.metadata,"windowWidth",y.innerWidth),j(E.metadata,"windowHeight",y.innerHeight),j(E.metadata,"mapWidth",u.width/b),j(E.metadata,"mapHeight",u.height/b),j(E.metadata,"webglRenderer",u.renderer),j(E.metadata,"webglVendor",u.vendor),j(E.metadata,"sdkVersion",T),j(E.metadata,"sdkIdentifier","mapbox-gl-js"),E}(i);for(const u of a.metadata);for(const u of a.counters);for(const u of a.attributes);this.postEvent(e,a,()=>{},t)}},et=Ue.postPerformanceEvent.bind(Ue),X=new class extends fe{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(t,e,i,a){if(!S.API_URL||!S.SESSION_PATH)return;const u=tn(S.API_URL+S.SESSION_PATH);u.params.push(`sku=${e||""}`),u.params.push(`access_token=${a||S.ACCESS_TOKEN||""}`);const f={url:Cn(u),headers:{"Content-Type":"text/plain"}};this.pendingRequest=function(g,x){return cn(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,S.SESSION_PATH&&S.API_URL&&(i||S.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(Kt)))}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)}},de=X.getSessionAPI.bind(X),Ce=new Set,ct={create:"create",load:"load",fullLoad:"fullLoad"},Nt={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 S.API_FONTS_REGEX.test(i)}(e)?"fontRange":Wi(e)?"sprite":bi(e)?"style":function(i){return S.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 Gt,qt,ai,wi;const ii={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;wi||(wi=y.document.createElement("canvas"));const u=wi.getContext("2d",{willReadFrequently:!0});if(!u)throw new Error("failed to create canvas 2d context");return(i>wi.width||a>wi.height)&&(wi.width=i,wi.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=>(Gt||(Gt=y.document.createElement("a")),Gt.href=t,Gt.href),get devicePixelRatio(){return y.devicePixelRatio},get prefersReducedMotion(){return!!y.matchMedia&&(qt==null&&(qt=y.matchMedia("(prefers-reduced-motion: reduce)")),qt.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 qr{constructor(e,i={}){ee(this,i),this.type=e}}class Co extends qr{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 qr(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 Qn(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 Qn(t)}class F1 extends Error{constructor(e,i){super(i),this.message=i,this.key=e}}var Ar=F1;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 xf=fl;const gr={kind:"null"},Yt={kind:"number"},Bi={kind:"string"},Oi={kind:"boolean"},Qr={kind:"color"},Jo={kind:"object"},Ci={kind:"value"},aa={kind:"collator"},Ms={kind:"formatted"},So={kind:"resolvedImage"};function Jn(t,e){return{kind:"array",itemType:t,N:e}}function Dn(t){if(t.kind==="array"){const e=Dn(t.itemType);return typeof t.N=="number"?`array<${e}, ${t.N}>`:t.itemType.kind==="value"?"array":`array<${e}>`}return t.kind}const Xr=[gr,Yt,Bi,Oi,Qr,Ms,Jo,Jn(Ci),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 Xr)if(!la(i,e))return null}}return`Expected ${Dn(t)} but found ${Dn(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,Zc={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 Gc(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 Zc)return Zc[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]),E=pl(g[2]),j=E<=.5?E*(I+1):E+I-E*I,L=2*E-j;return[zo(255*Gc(L,j,b+1/3)),zo(255*Gc(L,j,b)),zo(255*Gc(L,j,b-1/3)),x];default:return null}}return null}}catch{}class xr{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 xr)return e;if(typeof e!="string")return;const i=ha(e);return i?new xr(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]}}xr.black=new xr(0,0,0,1),xr.white=new xr(1,1,1,1),xr.transparent=new xr(0,0,0,0),xr.red=new xr(1,0,0,1),xr.blue=new xr(0,0,1,1);var Sn=xr;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 Hc{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 Hc(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 Lr{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new Lr({name:e,available:!1}):null}serialize(){return["image",this.name]}}function vf(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 Sn||t instanceof fa||t instanceof er||t instanceof Lr)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 Yn(t){if(t===null)return gr;if(typeof t=="string")return Bi;if(typeof t=="boolean")return Oi;if(typeof t=="number")return Yt;if(t instanceof Sn)return Qr;if(t instanceof fa)return aa;if(t instanceof er)return Ms;if(t instanceof Lr)return So;if(Array.isArray(t)){const e=t.length;let i;for(const a of t){const u=Yn(a);if(i){if(i===u)continue;i=Ci;break}i=u}return Jn(i||Ci,e)}return Jo}function pa(t){const e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof Sn||t instanceof er||t instanceof Lr?t.toString():JSON.stringify(t)}class Wc{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=Yn(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 Wc(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 Sn?["rgba"].concat(this.value.toArray()):this.value instanceof er?this.value.serialize():this.value}}var ga=Wc,Xn=class{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}};const bs={string:Bi,number:Yt,boolean:Oi,object:Jo};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.");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=Ci;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,Ci);if(!x)return null;g.push(x)}return new qc(a,g)}evaluate(e){for(let i=0;i<this.args.length;i++){const a=this.args[i].evaluate(e);if(!la(this.type,Yn(a)))return a;if(i===this.args.length-1)throw new Xn(`Expected value to be of type ${Dn(this.type)}, but found ${Dn(Yn(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=qc;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(Bi)),!I))return null;let E=null;if(x["text-color"]&&(E=i.parse(x["text-color"],1,Qr),!E))return null;const j=u[u.length-1];j.scale=b,j.font=I,j.textColor=E}else{const b=i.parse(e[g],1,Ci);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 Yn(a)===So?new Hc("",a,null,null,null):new Hc(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,Bi);return a?new ml(a):i.error("No image name provided.")}evaluate(e){const i=this.input.evaluate(e),a=Lr.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 V1={"to-boolean":Oi,"to-color":Qr,"to-number":Yt,"to-string":Bi};class Xc{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=V1[a],f=[];for(let g=1;g<e.length;g++){const x=i.parse(e[g],g,Ci);if(!x)return null;f.push(x)}return new Xc(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 Sn)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.`:vf(i[0],i[1],i[2],i[3]),!a))return new Sn(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new Xn(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 Xn(`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"?Lr.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=Xc;const yl=["Unknown","Point","LineString","Polygon"];var Mf=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]=Sn.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,E]of x){b=new is(i.registry,i.path,null,i.scope);const j=[];let L=!1;for(let U=1;U<e.length;U++){const V=e[U],Z=Array.isArray(I)?I[U-1]:I.type,ne=b.parse(V,1+j.length,Z);if(!ne){L=!0;break}j.push(ne)}if(!L)if(Array.isArray(I)&&I.length!==j.length)b.error(`Expected ${I.length} arguments, but found ${j.length} instead.`);else{for(let U=0;U<j.length;U++){const V=Array.isArray(I)?I[U]:I.type,Z=j[U];b.concat(U+1).checkSubtype(V,Z.type)}if(b.errors.length===0)return new ws(a,f,E,j)}}if(x.length===1)i.errors.push(...b.errors);else{const I=(x.length?x:g).map(([j])=>{return L=j,Array.isArray(L)?`(${L.map(Dn).join(", ")})`:`(${Dn(L.type)}...)`;var L}).join(" | "),E=[];for(let j=1;j<e.length;j++){const L=i.parse(e[j],1+E.length);if(!L)return null;E.push(Dn(L.type))}i.error(`Expected arguments of type ${I}, but found (${E.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,Oi);if(!u)return null;const f=i.parse(a["diacritic-sensitive"]!==void 0&&a["diacritic-sensitive"],1,Oi);if(!f)return null;let g=null;return a.locale&&(g=i.parse(a.locale,1,Bi),!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 bf(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 wf(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,E=b.length;I<E-1;I++){if(wf(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 If(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 E=0;E<I.length-1;++E)if((x=[(g=I[E+1])[0]-(f=I[E])[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 Kc(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 Df(t,e){for(let i=0;i<e.length;i++)if(Kc(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=bf(t[u][g],i);xl(e,x),f.push(x)}a.push(f)}return a}function Jc(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 Tf(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 E of b){const j=[E.x+f[0],E.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=Oi,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=Jc(a.coordinates,f,g),b=qi(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);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=Tf(i.geometry(),u,f,g);if(!ya(u,f))return!1;for(const I of b)if(!Kc(I,x))return!1}if(a.type==="MultiPolygon"){const x=Jc(a.coordinates,f,g),b=Tf(i.geometry(),u,f,g);if(!ya(u,f))return!1;for(const I of b)if(!Df(I,x))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}var eu=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 eu)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 tu=wl;class Il{constructor(e,i=[],a,u=new xf,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 Mf;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 Ar(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 tu)return Ds(t.boundExpression);if(t instanceof jo&&t.name==="error"||t instanceof _l||t instanceof eu)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 Xn("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,E=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,E,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 Sn(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 iu=.95047,Af=1.08883,nu=4/29,El=6/29,Ef=3*El*El,Nf=Math.PI/180,Q1=180/Math.PI;function Nl(t){return t>.008856451679035631?Math.pow(t,1/3):t/Ef+nu}function Cl(t){return t>El?t*t*t:Ef*(t-nu)}function ru(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ou(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Cf(t){const e=ou(t.r),i=ou(t.g),a=ou(t.b),u=Nl((.4124564*e+.3575761*i+.1804375*a)/iu),f=Nl((.2126729*e+.7151522*i+.072175*a)/1);return{l:116*f-16,a:500*(u-f),b:200*(f-Nl((.0193339*e+.119192*i+.9503041*a)/Af)),alpha:t.a}}function Sf(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=iu*Cl(i),a=Af*Cl(a),new Sn(ru(3.2404542*i-1.5371385*e-.4985314*a),ru(-.969266*i+1.8760108*e+.041556*a),ru(.0556434*i-.2040259*e+1.0572252*a),t.alpha)}function Y1(t,e,i){const a=e-t;return t+i*(a>180||a<-180?a-360*Math.round(a/360):a)}const wa={forward:Cf,reverse:Sf,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}=Cf(t),u=Math.atan2(a,i)*Q1;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 Sf({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},interpolate:function(t,e,i){return{h:Y1(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 zf=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=su(i,e.base,a,u);else if(e.name==="linear")f=su(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(su(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(E=>typeof E!="number"||E<0||E>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 E=g[I],j=g[I+1],L=I+3,U=I+4;if(typeof E!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',L);if(x.length&&x[x.length-1][0]>=E)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',L);const V=i.parse(j,U,b);if(!V)return null;b=b||V.type,x.push([E,V])}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 ${Dn(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 su(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 Kr=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?Ci: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 Lr&&!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 au=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 jf=jl;class lu{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||Ci));return a&&u?new lu(u.type.itemType,a,u):null}evaluate(e){const i=this.index.evaluate(e),a=this.input.evaluate(e);if(i<0)throw new Xn(`Array index out of bounds: ${i} < 0.`);if(i>=a.length)throw new Xn(`Array index out of bounds: ${i} > ${a.length-1}.`);if(i!==Math.floor(i))throw new Xn(`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 Lf=lu;class Ll{constructor(e,i){this.type=Oi,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,Ci),u=i.parse(e[2],2,Ci);return a&&u?ca(a.type,[Oi,Bi,Yt,gr,Ci])?new Ll(a,u):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${Dn(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 Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Dn(Yn(i))} instead.`);if(!ua(a,["string","array"]))throw new Xn(`Expected second argument to be of type array or string, but found ${Dn(Yn(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=Ll;class Ol{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,Ci),u=i.parse(e[2],2,Ci);if(!a||!u)return null;if(!ca(a.type,[Oi,Bi,Yt,gr,Ci]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${Dn(a.type)} instead`);if(e.length===4){const f=i.parse(e[3],3,Yt);return f?new Ol(a,u,f):null}return new Ol(a,u)}evaluate(e){const i=this.needle.evaluate(e),a=this.haystack.evaluate(e);if(!ua(i,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Dn(Yn(i))} instead.`);if(!ua(a,["string","array"]))throw new Xn(`Expected second argument to be of type array or string, but found ${Dn(Yn(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 $1=Ol;class cu{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 E=e[I];const j=e[I+1];Array.isArray(E)||(E=[E]);const L=i.concat(I);if(E.length===0)return L.error("Expected at least one branch label.");for(const V of E){if(typeof V!="number"&&typeof V!="string")return L.error("Branch labels must be numbers or strings.");if(typeof V=="number"&&Math.abs(V)>Number.MAX_SAFE_INTEGER)return L.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof V=="number"&&Math.floor(V)!==V)return L.error("Numeric branch labels must be integer values.");if(a){if(L.checkSubtype(a,Yn(V)))return null}else a=Yn(V);if(f[String(V)]!==void 0)return L.error("Branch labels must be unique.");f[String(V)]=g.length}const U=i.parse(j,I,u);if(!U)return null;u=u||U.type,g.push(U)}const x=i.parse(e[1],1,Ci);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 cu(a,u,x,f,g,b):null}evaluate(e){const i=this.input.evaluate(e);return(Yn(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 Z1=cu;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,Oi);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 kf=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,Ci),u=i.parse(e[2],2,Yt);if(!a||!u)return null;if(!ca(a.type,[Jn(Ci),Bi,Ci]))return i.error(`Expected first argument to be of type array or string, but found ${Dn(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 Xn(`Expected first argument to be of type array or string, but found ${Dn(Yn(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 G1=Ia;function Pf(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 Rf(t,e,i,a){return a.compare(e,i)===0}function ns(t,e,i){const a=t!=="=="&&t!=="!=";return class ib{constructor(f,g,x){this.type=Oi,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,Ci);if(!b)return null;if(!Pf(x,b.type))return g.concat(1).error(`"${x}" comparisons are not supported for type '${Dn(b.type)}'.`);let I=g.parse(f[2],2,Ci);if(!I)return null;if(!Pf(x,I.type))return g.concat(2).error(`"${x}" comparisons are not supported for type '${Dn(I.type)}'.`);if(b.type.kind!==I.type.kind&&b.type.kind!=="value"&&I.type.kind!=="value")return g.error(`Cannot compare types '${Dn(b.type)}' and '${Dn(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 E=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(E=g.parse(f[3],3,aa),!E)return null}return new ib(b,I,E)}evaluate(f){const g=this.lhs.evaluate(f),x=this.rhs.evaluate(f);if(a&&this.hasUntypedArgument){const b=Yn(g),I=Yn(x);if(b.kind!==I.kind||b.kind!=="string"&&b.kind!=="number")throw new Xn(`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=Yn(g),I=Yn(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 Uf=ns("==",function(t,e,i){return e===i},Rf),Bf=ns("!=",function(t,e,i){return e!==i},function(t,e,i,a){return!Rf(0,e,i,a)}),uu=ns("<",function(t,e,i){return e<i},function(t,e,i,a){return a.compare(e,i)<0}),H1=ns(">",function(t,e,i){return e>i},function(t,e,i,a){return a.compare(e,i)>0}),W1=ns("<=",function(t,e,i){return e<=i},function(t,e,i,a){return a.compare(e,i)<=0}),q1=ns(">=",function(t,e,i){return e>=i},function(t,e,i,a){return a.compare(e,i)>=0});class hu{constructor(e,i,a,u,f,g){this.type=Bi,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,Bi),!f))return null;let g=null;if(u.currency&&(g=i.parse(u.currency,1,Bi),!g))return null;let x=null;if(u.unit&&(x=i.parse(u.unit,1,Bi),!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 hu(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 du{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 ${Dn(a.type)} instead.`):new du(a):null}evaluate(e){const i=this.input.evaluate(e);if(typeof i=="string"||Array.isArray(i))return i.length;throw new Xn(`Expected value to be of type string or array, but found ${Dn(Yn(i))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(i=>{e.push(i.serialize())}),e}}const Ff={"==":Uf,"!=":Bf,">":H1,"<":uu,">=":q1,"<=":W1,array:fo,at:Lf,boolean:fo,case:kf,coalesce:au,collator:_l,format:ma,image:ml,in:Of,"index-of":$1,interpolate:Kr,"interpolate-hcl":Kr,"interpolate-lab":Kr,length:du,let:jf,literal:ga,match:Z1,number:fo,"number-format":hu,object:fo,slice:G1,step:Tl,string:fo,"to-boolean":es,"to-color":es,"to-number":es,"to-string":es,var:tu,within:eu};function Vf(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=vf(e,i,a,f);if(g)throw new Xn(g);return new Sn(e/255*f,i/255*f,a/255*f,f)}function fu(t,e){return t in e}function kl(t,e){const i=e[t];return i===void 0?null:i}function Jr(t){return{type:t}}jo.register(Ff,{error:[{kind:"error"},[Bi],(t,[e])=>{throw new Xn(e.evaluate(t))}],typeof:[Bi,[Ci],(t,[e])=>Dn(Yn(e.evaluate(t)))],"to-rgba":[Jn(Yt,4),[Qr],(t,[e])=>e.evaluate(t).toArray()],rgb:[Qr,[Yt,Yt,Yt],Vf],rgba:[Qr,[Yt,Yt,Yt,Yt],Vf],has:{type:Oi,overloads:[[[Bi],(t,[e])=>fu(e.evaluate(t),t.properties())],[[Bi,Jo],(t,[e,i])=>fu(e.evaluate(t),i.evaluate(t))]]},get:{type:Ci,overloads:[[[Bi],(t,[e])=>kl(e.evaluate(t),t.properties())],[[Bi,Jo],(t,[e,i])=>kl(e.evaluate(t),i.evaluate(t))]]},"feature-state":[Ci,[Bi],(t,[e])=>kl(e.evaluate(t),t.featureState||{})],properties:[Jo,[],t=>t.properties()],"geometry-type":[Bi,[],t=>t.geometryType()],id:[Ci,[],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:[Ci,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[Yt,Jr(Yt),(t,e)=>{let i=0;for(const a of e)i+=a.evaluate(t);return i}],"*":[Yt,Jr(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,Jr(Yt),(t,e)=>Math.min(...e.map(i=>i.evaluate(t)))],max:[Yt,Jr(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-==":[Oi,[Bi,Ci],(t,[e,i])=>t.properties()[e.value]===i.value],"filter-id-==":[Oi,[Ci],(t,[e])=>t.id()===e.value],"filter-type-==":[Oi,[Bi],(t,[e])=>t.geometryType()===e.value],"filter-<":[Oi,[Bi,Ci],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a<u}],"filter-id-<":[Oi,[Ci],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i<a}],"filter->":[Oi,[Bi,Ci],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a>u}],"filter-id->":[Oi,[Ci],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i>a}],"filter-<=":[Oi,[Bi,Ci],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a<=u}],"filter-id-<=":[Oi,[Ci],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i<=a}],"filter->=":[Oi,[Bi,Ci],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a>=u}],"filter-id->=":[Oi,[Ci],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i>=a}],"filter-has":[Oi,[Ci],(t,[e])=>e.value in t.properties()],"filter-has-id":[Oi,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[Oi,[Jn(Bi)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[Oi,[Jn(Ci)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[Oi,[Bi,Jn(Ci)],(t,[e,i])=>i.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[Oi,[Bi,Jn(Ci)],(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:Oi,overloads:[[[Oi,Oi],(t,[e,i])=>e.evaluate(t)&&i.evaluate(t)],[Jr(Oi),(t,e)=>{for(const i of e)if(!i.evaluate(t))return!1;return!0}]]},any:{type:Oi,overloads:[[[Oi,Oi],(t,[e,i])=>e.evaluate(t)||i.evaluate(t)],[Jr(Oi),(t,e)=>{for(const i of e)if(i.evaluate(t))return!0;return!1}]]},"!":[Oi,[Oi],(t,[e])=>!e.evaluate(t)],"is-supported-script":[Oi,[Bi],(t,[e])=>{const i=t.globals&&t.globals.isSupportedScript;return!i||i(e.evaluate(t))}],upcase:[Bi,[Bi],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Bi,[Bi],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Bi,Jr(Ci),(t,e)=>e.map(i=>pa(i.evaluate(t))).join("")],"resolved-locale":[Bi,[aa],(t,[e])=>e.evaluate(t).resolvedLocale()]});var Da=Ff;function Qf(t){return{result:"success",value:t}}function Er(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 pu(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 X1(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||(pu(e)?"exponential":"interval");if(i&&((t=uo({},t)).stops&&(t.stops=t.stops.map(I=>[I[0],Sn.parse(I[1])])),t.default=Sn.parse(t.default?t.default:e.default)),t.colorSpace&&t.colorSpace!=="rgb"&&!zf[t.colorSpace])throw new Error(`Unknown color space: ${t.colorSpace}`);let g,x,b;if(f==="exponential")g=mu;else if(f==="interval")g=Yf;else if(f==="categorical"){g=gu,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=yu}if(a){const I={},E=[];for(let U=0;U<t.stops.length;U++){const V=t.stops[U],Z=V[0].zoom;I[Z]===void 0&&(I[Z]={zoom:Z,type:t.type,property:t.property,default:t.default,stops:[]},E.push(Z)),I[Z].stops.push([V[0].value,V[1]])}const j=[];for(const U of E)j.push([I[U].zoom,Pl(I[U],e)]);const L={name:"linear"};return{kind:"composite",interpolationType:L,interpolationFactor:Kr.interpolationFactor.bind(void 0,L),zoomStops:j.map(U=>U[0]),evaluate:({zoom:U},V)=>mu({stops:j,base:t.base},e,U).evaluate(U,V)}}if(u){const I=f==="exponential"?{name:"exponential",base:t.base!==void 0?t.base:1}:null;return{kind:"camera",interpolationType:I,interpolationFactor:Kr.interpolationFactor.bind(void 0,I),zoomStops:t.stops.map(E=>E[0]),evaluate:({zoom:E})=>g(t,e,E,x,b)}}return{kind:"source",evaluate(I,E){const j=E&&E.properties?E.properties[t.property]:void 0;return j===void 0?Es(t.default,e.default):g(t,e,j,x,b)}}}function Es(t,e,i){return t!==void 0?t:e!==void 0?e:i!==void 0?i:void 0}function gu(t,e,i,a,u){return Es(typeof i===u?a[i]:void 0,t.default,e.default)}function Yf(t,e,i){if(Xi(i)!=="number")return Es(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 mu(t,e,i){const a=t.base!==void 0?t.base:1;if(Xi(i)!=="number")return Es(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(E=>E[0]),i),g=function(E,j,L,U){const V=U-L,Z=E-L;return V===0?0:j===1?Z/V:(Math.pow(j,Z)-1)/(Math.pow(j,V)-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]||X1;if(t.colorSpace&&t.colorSpace!=="rgb"){const E=zf[t.colorSpace];I=(j,L)=>E.reverse(E.interpolate(E.forward(j),E.forward(L),g))}return typeof x.evaluate=="function"?{evaluate(...E){const j=x.evaluate.apply(void 0,E),L=b.evaluate.apply(void 0,E);if(j!==void 0&&L!==void 0)return I(j,L,g)}}:I(x,b,g)}function yu(t,e,i){return e.type==="color"?i=Sn.parse(i):e.type==="formatted"?i=er.fromString(i.toString()):e.type==="resolvedImage"?i=Lr.fromString(i.toString()):Xi(i)===e.type||e.type==="enum"&&e.values[i]||(i=void 0),Es(i,t.default,e.default)}class Rl{constructor(e,i){this.expression=e,this._warningHistory={},this._evaluator=new Mf,this._defaultValue=i?function(a){return a.type==="color"&&(Ta(a.default)||Array.isArray(a.default))?new Sn(0,0,0,0):a.type==="color"?Sn.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 Xn(`Expected value to be one of ${Object.keys(this._enumValues).map(E=>JSON.stringify(E)).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 Lo(t,e){const i=new is(Da,[],e?function(u){const f={color:Qr,string:Bi,number:Yt,enum:Bi,boolean:Oi,formatted:Ms,resolvedImage:So};return u.type==="array"?Jn(f[u.value]||Ci,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?Qf(new Rl(a,e)):Er(i.errors)}class Oo{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?Kr.interpolationFactor(this.interpolationType,e,i,a):0}}function _u(t,e){if((t=Lo(t,e)).result==="error")return t;const i=t.value.expression,a=Is(i);if(!a&&!rs(e))return Er([new Ar("","data expressions not supported")]);const u=Ma(i,["zoom","pitch","distance-from-center"]);if(!u&&!os(e))return Er([new Ar("","zoom expressions not supported")]);const f=Ea(i);return f||u?f instanceof Ar?Er([f]):f instanceof Kr&&!pu(e)?Er([new Ar("",'"interpolate" expressions cannot be used with this property')]):Qf(f?new Ul(a?"camera":"composite",t.value,f.labels,f instanceof Kr?f.interpolation:void 0):new Oo(a?"constant":"source",t.value)):Er([new Ar("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Ns{constructor(e,i){this._parameters=e,this._specification=i,uo(this,Pl(this._parameters,this._specification))}static deserialize(e){return new Ns(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Ea(t){let e=null;if(t instanceof jf)e=Ea(t.result);else if(t instanceof au){for(const i of t.args)if(e=Ea(i),e)break}else(t instanceof Tl||t instanceof Kr)&&t.input instanceof jo&&t.input.name==="zoom"&&(e=t);return e instanceof Ar||t.eachChild(i=>{const a=Ea(i);a instanceof Ar?e=a:!e&&a?e=new Ar("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&a&&e!==a&&(e=new Ar("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}class Zt{constructor(e,i,a,u){this.message=(e?`${e}: `:"")+a,u&&(this.identifier=u),i!=null&&i.__line__&&(this.line=i.__line__)}}function Or(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 Zt(e,i,`object expected, ${b} found`)];for(const I in i){const E=I.split(".")[0],j=a[E]||a["*"];let L;u[E]?L=u[E]:a[E]?L=ur:u["*"]?L=u["*"]:a["*"]&&(L=ur),L?x=x.concat(L({key:(e&&`${e}.`)+I,value:i[I],valueSpec:j,style:f,styleSpec:g,object:i,objectKey:I},i)):x.push(new Zt(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 Zt(e,i,`missing required property "${I}"`));return x}function Na(t){const e=t.value,i=t.valueSpec,a=t.style,u=t.styleSpec,f=t.key,g=t.arrayElementValidator||ur;if(Xi(e)!=="array")return[new Zt(f,e,`array expected, ${Xi(e)} found`)];if(i.length&&e.length!==i.length)return[new Zt(f,e,`array length ${i.length} expected, length ${e.length} found`)];if(i["min-length"]&&e.length<i["min-length"])return[new Zt(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 $f(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 Zt(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 Zt(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 Zt(e,i,`${i} is greater than the maximum value ${f}`)]}return[]}function Zf(t){const e=t.valueSpec,i=Qn(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",E=Or({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(U){if(i==="identity")return[new Zt(U.key,U.value,'identity function may not have a "stops" property')];let V=[];const Z=U.value;return V=V.concat(Na({key:U.key,value:Z,valueSpec:U.valueSpec,style:U.style,styleSpec:U.styleSpec,arrayElementValidator:j})),Xi(Z)==="array"&&Z.length===0&&V.push(new Zt(U.key,Z,"array must have at least one stop")),V},default:function(U){return ur({key:U.key,value:U.value,valueSpec:e,style:U.style,styleSpec:U.styleSpec})}}});return i==="identity"&&x&&E.push(new Zt(t.key,t.value,'missing required property "property"')),i==="identity"||t.value.stops||E.push(new Zt(t.key,t.value,'missing required property "stops"')),i==="exponential"&&t.valueSpec.expression&&!pu(t.valueSpec)&&E.push(new Zt(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(b&&!rs(t.valueSpec)?E.push(new Zt(t.key,t.value,"property functions not supported")):x&&!os(t.valueSpec)&&E.push(new Zt(t.key,t.value,"zoom functions not supported"))),i!=="categorical"&&!I||t.value.property!==void 0||E.push(new Zt(t.key,t.value,'"property" property is required')),E;function j(U){let V=[];const Z=U.value,ne=U.key;if(Xi(Z)!=="array")return[new Zt(ne,Z,`array expected, ${Xi(Z)} found`)];if(Z.length!==2)return[new Zt(ne,Z,`array length 2 expected, length ${Z.length} found`)];if(I){if(Xi(Z[0])!=="object")return[new Zt(ne,Z,`object expected, ${Xi(Z[0])} found`)];if(Z[0].zoom===void 0)return[new Zt(ne,Z,"object stop key must have zoom")];if(Z[0].value===void 0)return[new Zt(ne,Z,"object stop key must have value")];const be=Qn(Z[0].zoom);if(typeof be!="number")return[new Zt(ne,Z[0].zoom,"stop zoom values must be numbers")];if(f&&f>be)return[new Zt(ne,Z[0].zoom,"stop zoom values must appear in ascending order")];be!==f&&(f=be,u=void 0,g={}),V=V.concat(Or({key:`${ne}[0]`,value:Z[0],valueSpec:{zoom:{}},style:U.style,styleSpec:U.styleSpec,objectElementValidators:{zoom:$f,value:L}}))}else V=V.concat(L({key:`${ne}[0]`,value:Z[0],valueSpec:{},style:U.style,styleSpec:U.styleSpec},Z));return Aa(ho(Z[1]))?V.concat([new Zt(`${ne}[1]`,Z[1],"expressions are not allowed in function stops.")]):V.concat(ur({key:`${ne}[1]`,value:Z[1],valueSpec:e,style:U.style,styleSpec:U.styleSpec}))}function L(U,V){const Z=Xi(U.value),ne=Qn(U.value),be=U.value!==null?U.value:V;if(a){if(Z!==a)return[new Zt(U.key,be,`${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 Zt(U.key,be,"stop domain value must be a number, string, or boolean")];if(Z!=="number"&&i!=="categorical"){let Se=`number expected, ${Z} found`;return rs(e)&&i===void 0&&(Se+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Zt(U.key,be,Se)]}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 Zt(U.key,be,"stop domain values must appear in ascending order")]:(u=ne,i==="categorical"&&ne in g?[new Zt(U.key,be,"stop domain values must be unique")]:(g[ne]=!0,[])):[new Zt(U.key,be,`integer expected, found ${String(ne)}`)]}}function Cs(t){const e=(t.expressionContext==="property"?_u:Lo)(ho(t.value),t.valueSpec);if(e.result==="error")return e.value.map(a=>new Zt(`${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 Zt(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 Zt(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if(t.expressionContext==="filter")return Gf(i,t);if(t.expressionContext&&t.expressionContext.indexOf("cluster")===0){if(!Ma(i,["zoom","feature-state"]))return[new Zt(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(t.expressionContext==="cluster-initial"&&!Is(i))return[new Zt(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Gf(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 Zt(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(...Gf(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(Qn(i))===-1&&u.push(new Zt(e,i,`expected one of [${a.values.join(", ")}], ${JSON.stringify(i)} found`)):Object.keys(a.values).indexOf(Qn(i))===-1&&u.push(new Zt(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 E=ho(I);return Ca(E),E=vr(E),E}(i)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
41
+ `;class Th{constructor(s,c){Ui(this,"_store",void 0),Ui(this,"_refCount",1),Ui(this,"getLoadable",d=>(this.checkRefCount_INTERNAL(),O5(this._store,d))),Ui(this,"getPromise",d=>(this.checkRefCount_INTERNAL(),this.getLoadable(d).toPromise())),Ui(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 Hy(v.dirtyAtoms)}const m=this._store.getState().knownAtoms,w=this._store.getState().knownSelectors;return(d==null?void 0:d.isInitialized)==null?Gy.values():d.isInitialized===!0?Hy($y([m,w])):hg(Gy.values(),({key:v})=>!m.has(v)&&!w.has(v))}),Ui(this,"getInfo_UNSTABLE",({key:d})=>(this.checkRefCount_INTERNAL(),C5(this._store,this._store.getState().currentTree,d))),Ui(this,"map",d=>{this.checkRefCount_INTERNAL();const m=new yg(this,mg);return d(m),m}),Ui(this,"asyncMap",async d=>{this.checkRefCount_INTERNAL();const m=new yg(this,mg);return m.retain(),await d(m),m.autoRelease_INTERNAL(),m}),this._store={storeID:z5(),parentStoreID:c,getState:()=>s,replaceState:d=>{s.currentTree=d(s.currentTree)},getGraph:d=>{const m=s.graphsByVersion;if(m.has(d))return jn(m.get(d));const w=S5();return m.set(d,w),w},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw Ei("Cannot subscribe to Snapshots")}};for(const d of this._store.getState().knownAtoms)N5(this._store,d,"get"),Dh(this._store,d,1);this.autoRelease_INTERNAL()}retain(){if(this._refCount<=0){if(process.env.NODE_ENV!=="production")throw Ei("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(){B5||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(V5)}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 qy(n,s,c=!1){const d=n.getState(),m=c?R5():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,n.getGraph(s.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(_h(d.nodeCleanupFunctions.entries(),([w])=>[w,()=>{}]))}}function Q5(n){const s=new Th(U5());return n!=null?s.map(n):s}const[Xy,Ky]=F5((n,s)=>{var c;const d=n.getState(),m=s==="latest"?(c=d.nextTree)!==null&&c!==void 0?c:d.currentTree:jn(d.previousTree);return new Th(qy(n,m),n.storeID)},(n,s)=>{var c,d;return String(s)+String(n.storeID)+String((c=n.getState().nextTree)===null||c===void 0?void 0:c.version)+String(n.getState().currentTree.version)+String((d=n.getState().previousTree)===null||d===void 0?void 0:d.version)});P5(Ky);function Y5(n,s="latest"){const c=Xy(n,s);return c.isRetained()?c:(Ky(),Xy(n,s))}class yg extends Th{constructor(s,c){super(qy(s.getStore_INTERNAL(),s.getStore_INTERNAL().getState().currentTree,!0),s.getStoreID()),Ui(this,"_batch",void 0),Ui(this,"set",(d,m)=>{this.checkRefCount_INTERNAL();const w=this.getStore_INTERNAL();this._batch(()=>{Dh(w,d.key,1),Wy(this.getStore_INTERNAL(),d,m)})}),Ui(this,"reset",d=>{this.checkRefCount_INTERNAL();const m=this.getStore_INTERNAL();this._batch(()=>{Dh(m,d.key,1),Wy(this.getStore_INTERNAL(),d,j5)})}),Ui(this,"setUnvalidatedAtomValues_DEPRECATED",d=>{this.checkRefCount_INTERNAL();const m=this.getStore_INTERNAL();mg(()=>{for(const[w,v]of d.entries())Dh(m,w,1),k5(m,new L5(w),v)})}),this._batch=c}}var Ah={Snapshot:Th,MutableSnapshot:yg,freshSnapshot:Q5,cloneSnapshot:Y5},$5=Ah.Snapshot,Z5=Ah.MutableSnapshot,G5=Ah.freshSnapshot,H5=Ah.cloneSnapshot,Eh=Object.freeze({__proto__:null,Snapshot:$5,MutableSnapshot:Z5,freshSnapshot:G5,cloneSnapshot:H5});function W5(...n){const s=new Set;for(const c of n)for(const d of c)s.add(d);return s}var q5=W5;const{useRef:X5}=it;function K5(n){const s=X5(n);return s.current===n&&typeof n=="function"&&(s.current=n()),s}var Jy=K5;const{getNextTreeStateVersion:J5,makeEmptyStoreState:e_}=wy,{cleanUpNode:eI,getDownstreamNodes:tI,initializeNode:iI,setNodeValue:nI,setUnvalidatedAtomValue_DEPRECATED:rI}=ms,{graph:oI}=vc,{cloneGraph:sI}=vc,{getNextStoreID:t_}=Mh,{createMutableSource:_g,reactMode:i_}=Xa,{applyAtomValueWrites:aI}=bo,{releaseScheduledRetainablesNow:n_}=Xs,{freshSnapshot:lI}=Eh,{useCallback:cI,useContext:r_,useEffect:xg,useMemo:uI,useRef:hI,useState:dI}=it;function Ic(){throw Ei("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 vg=!1;function s_(n){if(vg)throw Ei("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=n.getState();if(s.nextTree===null){wn("recoil_memory_managament_2020")&&wn("recoil_release_on_cascading_update_killswitch_2021")&&s.commitDepth>0&&n_(n);const c=s.currentTree.version,d=J5();s.nextTree={...s.currentTree,version:d,stateID:d,dirtyAtoms:new Set,transactionMetadata:{}},s.graphsByVersion.set(d,sI(jn(s.graphsByVersion.get(c))))}}const a_=it.createContext({current:o_}),Nh=()=>r_(a_),l_=it.createContext(null);function fI(){const n=r_(l_);return n==null&&yh("Attempted to use a Recoil hook outside of a <RecoilRoot>. <RecoilRoot> must be an ancestor of any component that uses Recoil hooks."),n}function Mg(n,s,c){const d=tI(n,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_(n){const s=n.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(n);for(const[m,w]of s.transactionSubscriptions)w(n);(!i_().early||s.suspendedComponentResolvers.size>0)&&(Mg(n,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 pI(n){const s=n.getState();s.commitDepth++;try{const{nextTree:c}=s;if(c==null)return;s.previousTree=s.currentTree,s.currentTree=c,s.nextTree=null,c_(n),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_(n)}finally{s.commitDepth--}}function gI({setNotifyBatcherOfChange:n}){const s=Nh(),[,c]=dI([]);return n(()=>c({})),xg(()=>(n(()=>c({})),()=>{n(()=>{})}),[n]),xg(()=>{qb.enqueueExecution("Batcher",()=>{pI(s.current)})}),null}process.env.NODE_ENV!=="production"&&typeof window<"u"&&!window.$recoilDebugStates&&(window.$recoilDebugStates=[]);function mI(n,s){const c=e_();return s({set:(d,m)=>{const w=c.currentTree,v=nI(n,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:q5(w.dirtyAtoms,o),atomValues:aI(w.atomValues,v),nonvalidatedAtoms:y}},setUnvalidatedAtomValues:d=>{d.forEach((m,w)=>{c.currentTree=rI(c.currentTree,w,m)})}}),c}function yI(n){const s=lI(n),c=s.getStore_INTERNAL().getState();return s.retain(),c.nodeCleanupFunctions.forEach(d=>d()),c.nodeCleanupFunctions.clear(),c}let u_=0;function _I({initializeState_DEPRECATED:n,initializeState:s,store_INTERNAL:c,children:d}){let m;const w=B=>{const P=m.current.graphsByVersion;if(P.has(B))return jn(P.get(B));const F=oI();return P.set(B,F),F},v=(B,P)=>{if(P==null){const{transactionSubscriptions:F}=S.current.getState(),q=u_++;return F.set(q,B),{release:()=>{F.delete(q)}}}else{const{nodeTransactionSubscriptions:F}=S.current.getState();F.has(P)||F.set(P,new Map);const q=u_++;return jn(F.get(P)).set(q,B),{release:()=>{const me=F.get(P);me&&(me.delete(q),me.size===0&&F.delete(P))}}}},o=B=>{s_(S.current);for(const P of Object.keys(B))jn(S.current.getState().nextTree).transactionMetadata[P]=B[P]},y=B=>{s_(S.current);const P=jn(m.current.nextTree);let F;try{vg=!0,F=B(P)}finally{vg=!1}F!==P&&(process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.$recoilDebugStates.push(F),m.current.nextTree=F,i_().early&&Mg(S.current,m.current,F),jn(T.current)())},T=hI(null),C=cI(B=>{T.current=B},[T]),S=Jy(()=>c??{storeID:t_(),getState:()=>m.current,replaceState:y,getGraph:w,subscribeToTransactions:v,addTransactionMetadata:o});c!=null&&(S.current=c),m=Jy(()=>n!=null?mI(S.current,n):s!=null?yI(s):e_());const z=uI(()=>_g==null?void 0:_g(m,()=>m.current.currentTree.version),[m]);return xg(()=>{const B=S.current;for(const P of new Set(B.getState().knownAtoms))iI(B,P,"get");return()=>{for(const P of B.getState().knownAtoms)eI(B,P)}},[S]),it.createElement(a_.Provider,{value:S},it.createElement(l_.Provider,{value:z},it.createElement(gI,{setNotifyBatcherOfChange:C}),d))}function xI(n){const{override:s,...c}=n,d=Nh();return s===!1&&d.current!==o_?n.children:it.createElement(_I,c)}function vI(){return Nh().current.storeID}var Go={RecoilRoot:xI,useStoreRef:Nh,useRecoilMutableSource:fI,useRecoilStoreID:vI,notifyComponents_FOR_TESTING:Mg,sendEndOfBatchNotifications_FOR_TESTING:c_};function MI(n,s){if(n===s)return!0;if(n.length!==s.length)return!1;for(let c=0,d=n.length;c<d;c++)if(n[c]!==s[c])return!1;return!0}var bI=MI;const{useEffect:wI,useRef:II}=it;function DI(n){const s=II();return wI(()=>{s.current=n}),s.current}var h_=DI;const{useStoreRef:TI}=Go,{SUSPENSE_TIMEOUT_MS:AI}=Xs,{updateRetainCount:Dc}=Xs,{RetentionZone:EI}=bh,{useEffect:NI,useRef:CI}=it,{isSSR:d_}=wc;function SI(n){if(wn("recoil_memory_managament_2020"))return zI(n)}function zI(n){const c=(Array.isArray(n)?n:[n]).map(v=>v instanceof EI?v:v.key),d=TI();NI(()=>{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=CI(),w=h_(c);if(!d_&&(w===void 0||!bI(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)},AI)}}var bg=SI;function jI(){return"<component name not available>"}var Tc=jI;const{batchUpdates:LI}=Ih,{DEFAULT_VALUE:f_}=Cr,{currentRendererSupportsUseSyncExternalStore:OI,reactMode:Ks,useMutableSource:kI,useSyncExternalStore:PI}=Xa,{useRecoilMutableSource:RI,useStoreRef:wo}=Go,{isRecoilValue:UI}=Ws,{AbstractRecoilValue:wg,getRecoilValueAsLoadable:Ac,setRecoilValue:Ch,setUnvalidatedRecoilValue:BI,subscribeToRecoilValue:Ka}=bo,{useCallback:Sr,useEffect:Ja,useMemo:p_,useRef:Ec,useState:Ig}=it,{setByAddingToSet:FI}=Dy,{isSSR:VI}=wc;function Dg(n,s,c){if(n.state==="hasValue")return n.contents;throw n.state==="loading"?new Promise(m=>{const w=c.current.getState().suspendedComponentResolvers;w.add(m),VI&&bn(n.contents)&&n.contents.finally(()=>{w.delete(m)})}):n.state==="hasError"?n.contents:Ei(`Invalid value of loadable atom "${s.key}"`)}function Tr(n,s){if(!UI(n))throw Ei(`Invalid argument to ${s}: expected an atom or selector but got ${String(n)}`)}function QI(){const n=Tc(),s=wo(),[,c]=Ig([]),d=Ec(new Set);d.current=new Set;const m=Ec(new Set),w=Ec(new Map),v=Sr(y=>{const T=w.current.get(y);T&&(T.release(),w.current.delete(y))},[w]),o=Sr((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)){yh(`Double subscription to RecoilValue "${T}"`);return}const C=Ka(y,new wg(T),z=>o(z,T),n);w.current.set(T,C),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 C=Ka(s.current,new wg(T),S=>o(S,T),n);y.set(T,C)}),()=>y.forEach((T,C)=>v(C))},[n,s,v,o]),p_(()=>{function y(P){return process.env.NODE_ENV!=="production"&&Tr(P,"useSetRecoilState"),F=>{Ch(s.current,P,F)}}function T(P){return process.env.NODE_ENV!=="production"&&Tr(P,"useResetRecoilState"),()=>Ch(s.current,P,f_)}function C(P){var F;process.env.NODE_ENV!=="production"&&Tr(P,"useRecoilValueLoadable"),d.current.has(P.key)||(d.current=FI(d.current,P.key));const q=s.current.getState();return Ac(s.current,P,Ks().early&&(F=q.nextTree)!==null&&F!==void 0?F:q.currentTree)}function S(P){process.env.NODE_ENV!=="production"&&Tr(P,"useRecoilValue");const F=C(P);return Dg(F,P,s)}function z(P){return process.env.NODE_ENV!=="production"&&Tr(P,"useRecoilState"),[S(P),y(P)]}function B(P){return process.env.NODE_ENV!=="production"&&Tr(P,"useRecoilStateLoadable"),[C(P),y(P)]}return{getRecoilValue:S,getRecoilValueLoadable:C,getRecoilState:z,getRecoilStateLoadable:B,getSetRecoilState:y,getResetRecoilState:T}},[d,s])}const Nc={current:0};function YI(n){const s=wo(),c=Tc(),d=Sr(()=>{var o;process.env.NODE_ENV!=="production"&&Nc.current++;const y=s.current,T=y.getState(),C=Ks().early&&(o=T.nextTree)!==null&&o!==void 0?o:T.currentTree;return{loadable:Ac(y,n,C),key:n.key}},[s,n]),m=Sr(o=>{let y;return()=>{var T,C;const S=o();return(T=y)!==null&&T!==void 0&&T.loadable.is(S.loadable)&&((C=y)===null||C===void 0?void 0:C.key)===S.key?y:(y=S,S)}},[]),w=p_(()=>m(d),[d,m]),v=Sr(o=>{const y=s.current;return Ka(y,n,o,c).release},[s,n,c]);return PI(v,w,w).loadable}function $I(n){const s=wo(),c=Sr(()=>{var T;const C=s.current,S=C.getState(),z=Ks().early&&(T=S.nextTree)!==null&&T!==void 0?T:S.currentTree;return Ac(C,n,z)},[s,n]),d=Sr(()=>(process.env.NODE_ENV!=="production"&&Nc.current++,c()),[c]),m=Tc(),w=Sr((T,C)=>{const S=s.current;return Ka(S,n,()=>{if(!wn("recoil_suppress_rerender_in_callback"))return C();const B=c();y.current.is(B)||C(),y.current=B},m).release},[s,n,m,c]),v=RI();if(v==null)throw Ei("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const o=kI(v,d,w),y=Ec(o);return Ja(()=>{y.current=o}),o}function Tg(n){const s=wo(),c=Tc(),d=Sr(()=>{var y;process.env.NODE_ENV!=="production"&&Nc.current++;const T=s.current,C=T.getState(),S=Ks().early&&(y=C.nextTree)!==null&&y!==void 0?y:C.currentTree;return Ac(T,n,S)},[s,n]),m=Sr(()=>({loadable:d(),key:n.key}),[d,n.key]),w=Sr(y=>{const T=m();return y.loadable.is(T.loadable)&&y.key===T.key?y:T},[m]);Ja(()=>{const y=Ka(s.current,n,T=>{o(w)},c);return o(w),y.release},[c,n,s,w]);const[v,o]=Ig(m);return v.key!==n.key?m().loadable:v.loadable}function ZI(n){const s=wo(),[,c]=Ig([]),d=Tc(),m=Sr(()=>{var o;process.env.NODE_ENV!=="production"&&Nc.current++;const y=s.current,T=y.getState(),C=Ks().early&&(o=T.nextTree)!==null&&o!==void 0?o:T.currentTree;return Ac(y,n,C)},[s,n]),w=m(),v=Ec(w);return Ja(()=>{v.current=w}),Ja(()=>{const o=s.current,y=o.getState(),T=Ka(o,n,S=>{var z;if(!wn("recoil_suppress_rerender_in_callback"))return c([]);const B=m();(z=v.current)!==null&&z!==void 0&&z.is(B)||c(B),v.current=B},d);if(y.nextTree)o.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{v.current=null,c([])});else{var C;if(!wn("recoil_suppress_rerender_in_callback"))return c([]);const S=m();(C=v.current)!==null&&C!==void 0&&C.is(S)||c(S),v.current=S}return T.release},[d,m,n,s]),w}function Ag(n){return process.env.NODE_ENV!=="production"&&Tr(n,"useRecoilValueLoadable"),wn("recoil_memory_managament_2020")&&bg(n),{TRANSITION_SUPPORT:Tg,SYNC_EXTERNAL_STORE:OI()?YI:Tg,MUTABLE_SOURCE:$I,LEGACY:ZI}[Ks().mode](n)}function g_(n){process.env.NODE_ENV!=="production"&&Tr(n,"useRecoilValue");const s=wo(),c=Ag(n);return Dg(c,n,s)}function Sh(n){process.env.NODE_ENV!=="production"&&Tr(n,"useSetRecoilState");const s=wo();return Sr(c=>{Ch(s.current,n,c)},[s,n])}function GI(n){process.env.NODE_ENV!=="production"&&Tr(n,"useResetRecoilState");const s=wo();return Sr(()=>{Ch(s.current,n,f_)},[s,n])}function HI(n){return process.env.NODE_ENV!=="production"&&Tr(n,"useRecoilState"),[g_(n),Sh(n)]}function WI(n){return process.env.NODE_ENV!=="production"&&Tr(n,"useRecoilStateLoadable"),[Ag(n),Sh(n)]}function qI(){const n=wo();return(s,c={})=>{LI(()=>{n.current.addTransactionMetadata(c),s.forEach((d,m)=>BI(n.current,new wg(m),d))})}}function m_(n){return process.env.NODE_ENV!=="production"&&(Tr(n,"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")&&bg(n),Tg(n)}function y_(n){process.env.NODE_ENV!=="production"&&Tr(n,"useRecoilValue_TRANSITION_SUPPORT_UNSTABLE");const s=wo(),c=m_(n);return Dg(c,n,s)}function XI(n){return process.env.NODE_ENV!=="production"&&Tr(n,"useRecoilState_TRANSITION_SUPPORT_UNSTABLE"),[y_(n),Sh(n)]}var KI={recoilComponentGetRecoilValueCount_FOR_TESTING:Nc,useRecoilInterface:QI,useRecoilState:HI,useRecoilStateLoadable:WI,useRecoilValue:g_,useRecoilValueLoadable:Ag,useResetRecoilState:GI,useSetRecoilState:Sh,useSetUnvalidatedAtomValues:qI,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:m_,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:y_,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:XI};function JI(n,s){const c=new Map;for(const[d,m]of n)s(m,d)&&c.set(d,m);return c}var eD=JI;function tD(n,s){const c=new Set;for(const d of n)s(d)&&c.add(d);return c}var iD=tD;function nD(...n){const s=new Map;for(let c=0;c<n.length;c++){const d=n[c].keys();let m;for(;!(m=d.next()).done;)s.set(m.value,n[c].get(m.value))}return s}var rD=nD;const{batchUpdates:oD}=Ih,{DEFAULT_VALUE:sD,getNode:__,nodes:aD}=Cr,{useStoreRef:Eg}=Go,{AbstractRecoilValue:lD,setRecoilValueLoadable:cD}=bo,{SUSPENSE_TIMEOUT_MS:uD}=Xs,{cloneSnapshot:zh}=Eh,{useCallback:jh,useEffect:x_,useRef:v_,useState:hD}=it,{isSSR:M_}=wc;function Lh(n){const s=Eg();x_(()=>s.current.subscribeToTransactions(n).release,[n,s])}function b_(n){const s=n.atomValues.toMap(),c=vh(eD(s,(d,m)=>{const v=__(m).persistence_UNSTABLE;return v!=null&&v.type!=="none"&&d.state==="hasValue"}),d=>d.contents);return rD(n.nonvalidatedAtoms.toMap(),c)}function dD(n){Lh(jh(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=vh(aD,y=>{var T,C,S,z;return{persistence_UNSTABLE:{type:(T=(C=y.persistence_UNSTABLE)===null||C===void 0?void 0:C.type)!==null&&T!==void 0?T:"none",backButton:(S=(z=y.persistence_UNSTABLE)===null||z===void 0?void 0:z.backButton)!==null&&S!==void 0?S:!1}}}),o=iD(d.dirtyAtoms,y=>m.has(y)||w.has(y));n({atomValues:m,previousAtomValues:w,atomInfo:v,modifiedAtoms:o,transactionMetadata:{...d.transactionMetadata}})},[n]))}function fD(n){Lh(jh(s=>{const c=zh(s,"latest"),d=zh(s,"previous");n({snapshot:c,previousSnapshot:d})},[n]))}function pD(){const n=Eg(),[s,c]=hD(()=>zh(n.current)),d=h_(s),m=v_(),w=v_();if(Lh(jh(o=>c(zh(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},uD)}return s}function w_(n,s){var c;const d=n.getState(),m=(c=d.nextTree)!==null&&c!==void 0?c:d.currentTree,w=s.getStore_INTERNAL().getState().currentTree;oD(()=>{const v=new Set;for(const T of[m.atomValues.keys(),w.atomValues.keys()])for(const C of T){var o,y;((o=m.atomValues.get(C))===null||o===void 0?void 0:o.contents)!==((y=w.atomValues.get(C))===null||y===void 0?void 0:y.contents)&&__(C).shouldRestoreFromSnapshots&&v.add(C)}v.forEach(T=>{cD(n,new lD(T),w.atomValues.has(T)?jn(w.atomValues.get(T)):sD)}),n.replaceState(T=>({...T,stateID:s.getID()}))})}function gD(){const n=Eg();return jh(s=>w_(n.current,s),[n])}var I_={useRecoilSnapshot:pD,gotoSnapshot:w_,useGotoRecoilSnapshot:gD,useRecoilTransactionObserver:fD,useTransactionObservation_DEPRECATED:dD,useTransactionSubscription_DEPRECATED:Lh};const{peekNodeInfo:mD}=ms,{useStoreRef:yD}=Go;function _D(){const n=yD();return({key:s})=>mD(n.current,n.current.getState().currentTree,s)}var xD=_D;const{reactMode:vD}=Xa,{RecoilRoot:MD,useStoreRef:bD}=Go,{useMemo:wD}=it;function ID(){vD().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 n=bD().current;return wD(()=>{function s({children:c}){return it.createElement(MD,{store_INTERNAL:n},c)}return s},[n])}var DD=ID;const{loadableWithValue:TD}=_c,{initializeNode:AD}=ms,{DEFAULT_VALUE:ED,getNode:ND}=Cr,{copyTreeState:CD,getRecoilValueAsLoadable:SD,invalidateDownstreams:zD,writeLoadableToTreeState:jD}=bo;function D_(n){return ND(n.key).nodeType==="atom"}class LD{constructor(s,c){Ui(this,"_store",void 0),Ui(this,"_treeState",void 0),Ui(this,"_changes",void 0),Ui(this,"get",d=>{if(this._changes.has(d.key))return this._changes.get(d.key);if(!D_(d))throw Ei("Reading selectors within atomicUpdate is not supported");const m=SD(this._store,d,this._treeState);if(m.state==="hasValue")return m.contents;throw m.state==="hasError"?m.contents:Ei(`Expected Recoil atom ${d.key} to have a value, but it is in a loading state.`)}),Ui(this,"set",(d,m)=>{if(!D_(d))throw Ei("Setting selectors within atomicUpdate is not supported");if(typeof m=="function"){const w=this.get(d);this._changes.set(d.key,m(w))}else AD(this._store,d.key,"set"),this._changes.set(d.key,m)}),Ui(this,"reset",d=>{this.set(d,ED)}),this._store=s,this._treeState=c,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const s=CD(this._treeState);for(const[c,d]of this._changes)jD(s,c,TD(d));return zD(this._store,s),s}}function OD(n){return s=>{n.replaceState(c=>{const d=new LD(n,c);return s(d),d.newTreeState_INTERNAL()})}}var kD={atomicUpdater:OD},PD=kD.atomicUpdater,T_=Object.freeze({__proto__:null,atomicUpdater:PD});function RD(n,s){if(!n)throw new Error(s)}var UD=RD,Io=UD;const{atomicUpdater:BD}=T_,{batchUpdates:FD}=Ih,{DEFAULT_VALUE:VD}=Cr,{useStoreRef:QD}=Go,{refreshRecoilValue:YD,setRecoilValue:A_}=bo,{cloneSnapshot:$D}=Eh,{gotoSnapshot:ZD}=I_,{useCallback:GD}=it;class E_{}const HD=new E_;function N_(n,s,c,d){let m=HD,w;if(FD(()=>{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 Ei(o);const y=Ty({...d??{},set:(C,S)=>A_(n,C,S),reset:C=>A_(n,C,VD),refresh:C=>YD(n,C),gotoSnapshot:C=>ZD(n,C),transact_UNSTABLE:C=>BD(n)(C)},{snapshot:()=>{const C=$D(n);return w=C.retain(),C}}),T=s(y);if(typeof T!="function")throw Ei(o);m=T(...c)}),m instanceof E_&&(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 WD(n,s){const c=QD();return GD((...d)=>N_(c.current,n,d),s!=null?[...s,c]:void 0)}var C_={recoilCallback:N_,useRecoilCallback:WD};const{useStoreRef:qD}=Go,{refreshRecoilValue:XD}=bo,{useCallback:KD}=it;function JD(n){const s=qD();return KD(()=>{const c=s.current;XD(c,n)},[n,s])}var eT=JD;const{atomicUpdater:tT}=T_,{useStoreRef:iT}=Go,{useMemo:nT}=it;function rT(n,s){const c=iT();return nT(()=>(...d)=>{tT(c.current)(w=>{n(w)(...d)})},s!=null?[...s,c]:void 0)}var oT=rT;class sT{constructor(s){Ui(this,"value",void 0),this.value=s}}var aT={WrappedValue:sT},lT=aT.WrappedValue,S_=Object.freeze({__proto__:null,WrappedValue:lT});const{isFastRefreshEnabled:cT}=Xa;class z_ extends Error{}class uT{constructor(s){var c,d,m;Ui(this,"_name",void 0),Ui(this,"_numLeafs",void 0),Ui(this,"_root",void 0),Ui(this,"_onHit",void 0),Ui(this,"_onSet",void 0),Ui(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,C;for(const[q,me]of s){var S,z,B;const le=this._root;if((le==null?void 0:le.type)==="leaf")throw this.invalidCacheError();const he=T;if(T=he?he.branches.get(C):le,T=(S=T)!==null&&S!==void 0?S:{type:"branch",nodeKey:q,parent:he,branches:new Map,branchKey:C},T.type!=="branch"||T.nodeKey!==q)throw this.invalidCacheError();he==null||he.branches.set(C,T),d==null||(z=d.onNodeVisit)===null||z===void 0||z.call(d,T),C=this._mapNodeValue(me),this._root=(B=this._root)!==null&&B!==void 0?B:T}const P=T?(w=T)===null||w===void 0?void 0:w.branches.get(C):this._root;if(P!=null&&(P.type!=="leaf"||P.branchKey!==C))throw this.invalidCacheError();const F={type:"leaf",value:c,parent:T,branchKey:C};(v=T)===null||v===void 0||v.branches.set(C,F),this._root=(o=this._root)!==null&&o!==void 0?o:F,this._numLeafs++,this._onSet(F),d==null||(y=d.onNodeVisit)===null||y===void 0||y.call(d,F)};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=cT()?"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 hT={TreeCache:uT},dT=hT.TreeCache,j_=Object.freeze({__proto__:null,TreeCache:dT});class fT{constructor(s){var c;Ui(this,"_maxSize",void 0),Ui(this,"_size",void 0),Ui(this,"_head",void 0),Ui(this,"_tail",void 0),Ui(this,"_map",void 0),Ui(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=jn(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 pT={LRUCache:fT},gT=pT.LRUCache,L_=Object.freeze({__proto__:null,LRUCache:gT});const{LRUCache:mT}=L_,{TreeCache:yT}=j_;function _T({name:n,maxSize:s,mapNodeValue:c=d=>d}){const d=new mT({maxSize:s}),m=new yT({name:n,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 O_=_T;const xT=15;function Gr(n,s,c){if(typeof n=="string"&&!n.includes('"')&&!n.includes("\\"))return`"${n}"`;switch(typeof n){case"undefined":return"";case"boolean":return n?"true":"false";case"number":case"symbol":return String(n);case"string":return JSON.stringify(n);case"function":if((s==null?void 0:s.allowFunctions)!==!0)throw Ei("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${n.name})__`}if(n===null)return"null";if(typeof n!="object"){var d;return(d=JSON.stringify(n))!==null&&d!==void 0?d:""}if(bn(n))return"__PROMISE__";if(Array.isArray(n))return`[${n.map((m,w)=>Gr(m,s,w.toString()))}]`;if(typeof n.toJSON=="function")return Gr(n.toJSON(c),s,c);if(n instanceof Map){const m={};for(const[w,v]of n)m[typeof w=="string"?w:Gr(w,s)]=v;return Gr(m,s,c)}return n instanceof Set?Gr(Array.from(n).sort((m,w)=>Gr(m,s).localeCompare(Gr(w,s))),s,c):Symbol!==void 0&&n[Symbol.iterator]!=null&&typeof n[Symbol.iterator]=="function"?Gr(Array.from(n),s,c):`{${Object.keys(n).filter(m=>n[m]!==void 0).sort().map(m=>`${Gr(m,s)}:${Gr(n[m],s,m)}`).join(",")}}`}function vT(n,s={allowFunctions:!1}){if(process.env.NODE_ENV!=="production"&&typeof window<"u"){const c=window.performance?window.performance.now():0,d=Gr(n,s),m=window.performance?window.performance.now():0;return m-c>xT&&(console.groupCollapsed(`Recoil: Spent ${m-c}ms computing a cache key`),console.warn(n,d),console.groupEnd()),d}return Gr(n,s)}var Oh=vT;const{TreeCache:MT}=j_,kh={equality:"reference",eviction:"keep-all",maxSize:1/0};function bT({equality:n=kh.equality,eviction:s=kh.eviction,maxSize:c=kh.maxSize}=kh,d){const m=wT(n);return IT(s,c,m,d)}function wT(n){switch(n){case"reference":return s=>s;case"value":return s=>Oh(s)}throw Ei(`Unrecognized equality policy ${n}`)}function IT(n,s,c,d){switch(n){case"keep-all":return new MT({name:d,mapNodeValue:c});case"lru":return O_({name:d,maxSize:jn(s),mapNodeValue:c});case"most-recent":return O_({name:d,maxSize:1,mapNodeValue:c})}throw Ei(`Unrecognized eviction policy ${n}`)}var DT=bT;function TT(n){var s,c;if(typeof window>"u")return!1;const m=(c=(n!=null?(s=n.ownerDocument)!==null&&s!==void 0?s:n:document).defaultView)!==null&&c!==void 0?c:window;return n!=null&&(typeof m.Node=="function"?n instanceof m.Node:typeof n=="object"&&typeof n.nodeType=="number"&&typeof n.nodeName=="string")}var AT=TT;const{isReactNative:ET,isWindow:NT}=wc;function CT(n){if(n===null||typeof n!="object")return!0;switch(typeof n.$$typeof){case"symbol":return!0;case"number":return!0}return!!(n["@@__IMMUTABLE_ITERABLE__@@"]!=null||n["@@__IMMUTABLE_KEYED__@@"]!=null||n["@@__IMMUTABLE_INDEXED__@@"]!=null||n["@@__IMMUTABLE_ORDERED__@@"]!=null||n["@@__IMMUTABLE_RECORD__@@"]!=null||AT(n)||bn(n)||n instanceof Error||ArrayBuffer.isView(n)||!ET&&NT(n))}function k_(n){if(!(typeof n!="object"||CT(n))){Object.freeze(n);for(const s in n)if(Object.prototype.hasOwnProperty.call(n,s)){const c=n[s];typeof c=="object"&&c!=null&&!Object.isFrozen(c)&&k_(c)}Object.seal(n)}}var Ng=k_;function ST(n){return()=>null}var zT={startPerfBlock:ST};const{isLoadable:jT,loadableWithError:Ph,loadableWithPromise:LT,loadableWithValue:Cg}=_c,{WrappedValue:P_}=S_,{getNodeLoadable:Rh,peekNodeLoadable:OT,setNodeValue:kT}=ms,{saveDepsToStore:PT}=vc,{DEFAULT_VALUE:RT,getConfigDeletionHandler:UT,getNode:BT,registerNode:R_}=Cr,{isRecoilValue:FT}=Ws,{markRecoilValueModified:U_}=bo,{retainedByOptionWithDefault:VT}=Xs,{recoilCallback:QT}=C_,{startPerfBlock:YT}=zT;class B_{}const Cc=new B_,Sc=[],Uh=new Map,$T=(()=>{let n=0;return()=>n++})();function F_(n){let s=null;const{key:c,get:d,cachePolicy_UNSTABLE:m}=n,w=n.set!=null?n.set:void 0;if(process.env.NODE_ENV!=="production"){if(typeof c!="string")throw Ei("A key option with a unique string value must be provided when creating a selector.");if(typeof d!="function")throw Ei("Selectors must specify a get callback option to get the selector value.")}const v=new Set,o=DT(m??{equality:"reference",eviction:"keep-all"},c),y=VT(n.retainedBy_UNSTABLE),T=new Map;let C=0;function S(){return!wn("recoil_memory_managament_2020")||C>0}function z(G){return G.getState().knownSelectors.add(c),C++,()=>{C--}}function B(){return UT(c)!==void 0&&!S()}function P(G,R,Q,J,K){Ve(R,J,K),F(G,Q)}function F(G,R){lt(G,R)&&rt(G),me(R,!0)}function q(G,R){lt(G,R)&&(jn(Ye(G)).stateVersions.clear(),me(R,!1))}function me(G,R){const Q=Uh.get(G);if(Q!=null){for(const J of Q)U_(J,jn(s));R&&Uh.delete(G)}}function le(G,R){let Q=Uh.get(R);Q==null&&Uh.set(R,Q=new Set),Q.add(G)}function he(G,R,Q,J,K,_e){return R.then(Ie=>{if(!S())throw rt(G),Cc;const ye=Cg(Ie);return P(G,Q,K,ye,J),Ie}).catch(Ie=>{if(!S())throw rt(G),Cc;if(bn(Ie))return ge(G,Ie,Q,J,K,_e);const ye=Ph(Ie);throw P(G,Q,K,ye,J),Ie})}function ge(G,R,Q,J,K,_e){return R.then(Ie=>{if(!S())throw rt(G),Cc;_e.loadingDepKey!=null&&_e.loadingDepPromise===R?Q.atomValues.set(_e.loadingDepKey,Cg(Ie)):G.getState().knownSelectors.forEach(Ne=>{Q.atomValues.delete(Ne)});const ye=Re(G,Q);if(ye&&ye.state!=="loading"){if((lt(G,K)||Ye(G)==null)&&F(G,K),ye.state==="hasValue")return ye.contents;throw ye.contents}if(!lt(G,K)){const Ne=Ee(G,Q);if(Ne!=null)return Ne.loadingLoadable.contents}const[ze,He]=Le(G,Q,K);if(ze.state!=="loading"&&P(G,Q,K,ze,He),ze.state==="hasError")throw ze.contents;return ze.contents}).catch(Ie=>{if(Ie instanceof B_)throw Cc;if(!S())throw rt(G),Cc;const ye=Ph(Ie);throw P(G,Q,K,ye,J),Ie})}function W(G,R,Q,J){var K,_e,Ie,ye;if(lt(G,J)||R.version===((K=G.getState())===null||K===void 0||(_e=K.currentTree)===null||_e===void 0?void 0:_e.version)||R.version===((Ie=G.getState())===null||Ie===void 0||(ye=Ie.nextTree)===null||ye===void 0?void 0:ye.version)){var ze,He,Ne;PT(c,Q,G,(ze=(He=G.getState())===null||He===void 0||(Ne=He.nextTree)===null||Ne===void 0?void 0:Ne.version)!==null&&ze!==void 0?ze:G.getState().currentTree.version)}for(const Be of Q)v.add(Be)}function Le(G,R,Q){const J=YT(c);let K=!0,_e=!0;const Ie=()=>{J(),_e=!1};let ye,ze=!1,He;const Ne={loadingDepKey:null,loadingDepPromise:null},Be=new Map;function tt({key:ot}){const jt=Rh(G,R,ot);switch(Be.set(ot,jt),K||(W(G,R,new Set(Be.keys()),Q),q(G,Q)),jt.state){case"hasValue":return jt.contents;case"hasError":throw jt.contents;case"loading":throw Ne.loadingDepKey=ot,Ne.loadingDepPromise=jt.contents,jt.contents}throw Ei("Invalid Loadable state")}const Dt=ot=>(...jt)=>{if(_e)throw Ei("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)),QT(G,ot,jt,{node:s})};try{ye=d({get:tt,getCallback:Dt}),ye=FT(ye)?tt(ye):ye,jT(ye)&&(ye.state==="hasError"&&(ze=!0),ye=ye.contents),bn(ye)?ye=he(G,ye,R,Be,Q,Ne).finally(Ie):Ie(),ye=ye instanceof P_?ye.value:ye}catch(ot){ye=ot,bn(ye)?ye=ge(G,ye,R,Be,Q,Ne).finally(Ie):(ze=!0,Ie())}return ze?He=Ph(ye):bn(ye)?He=LT(ye):He=Cg(ye),K=!1,We(G,Q,Be),W(G,R,new Set(Be.keys()),Q),[He,Be]}function Re(G,R){let Q=R.atomValues.get(c);if(Q!=null)return Q;const J=new Set;try{Q=o.get(_e=>(typeof _e!="string"&&(process.env.NODE_ENV!=="production"?Io(!1,"Cache nodeKey is type string"):Io(!1)),Rh(G,R,_e).contents),{onNodeVisit:_e=>{_e.type==="branch"&&_e.nodeKey!==c&&J.add(_e.nodeKey)}})}catch(_e){throw Ei(`Problem with cache lookup for selector "${c}": ${_e.message}`)}if(Q){var K;R.atomValues.set(c,Q),W(G,R,J,(K=Ye(G))===null||K===void 0?void 0:K.executionID)}return Q}function Ge(G,R){const Q=Re(G,R);if(Q!=null)return rt(G),Q;const J=Ee(G,R);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 _e=$T(),[Ie,ye]=Le(G,R,_e);return Ie.state==="loading"?(Je(G,_e,Ie,ye,R),le(G,_e)):(rt(G),Ve(R,Ie,ye)),Ie}function Ee(G,R){const Q=$y([T.has(G)?[jn(T.get(G))]:[],_h(hg(T,([K])=>K!==G),([,K])=>K)]);function J(K){for(const[_e,Ie]of K)if(!Rh(G,R,_e).is(Ie))return!0;return!1}for(const K of Q){if(K.stateVersions.get(R.version)||!J(K.depValuesDiscoveredSoFarDuringAsyncWork))return K.stateVersions.set(R.version,!0),K;K.stateVersions.set(R.version,!1)}}function Ye(G){return T.get(G)}function Je(G,R,Q,J,K){T.set(G,{depValuesDiscoveredSoFarDuringAsyncWork:J,executionID:R,loadingLoadable:Q,stateVersions:new Map([[K.version,!0]])})}function We(G,R,Q){if(lt(G,R)){const J=Ye(G);J!=null&&(J.depValuesDiscoveredSoFarDuringAsyncWork=Q)}}function rt(G){T.delete(G)}function lt(G,R){var Q;return R===((Q=Ye(G))===null||Q===void 0?void 0:Q.executionID)}function Ae(G){return Array.from(G.entries()).map(([R,Q])=>[R,Q.contents])}function Ve(G,R,Q){process.env.NODE_ENV!=="production"&&R.state!=="loading"&&!n.dangerouslyAllowMutability&&Ng(R.contents),G.atomValues.set(c,R);try{o.set(Ae(Q),R)}catch(J){throw Ei(`Problem with setting cache for selector "${c}": ${J.message}`)}}function Xe(G){if(Sc.includes(c)){const R=`Recoil selector has circular dependencies: ${Sc.slice(Sc.indexOf(c)).join(" → ")}`;return Ph(Ei(R))}Sc.push(c);try{return G()}finally{Sc.pop()}}function _t(G,R){const Q=R.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=OT(G,R,J))===null||K===void 0?void 0:K.contents})}function ht(G,R){return Xe(()=>Ge(G,R))}function ee(G){G.atomValues.delete(c)}function ie(G,R){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=BT(J);(Q=K.clearCache)===null||Q===void 0||Q.call(K,G,R)}v.clear(),ee(R),o.clear(),U_(G,s)}return w!=null?s=R_({key:c,nodeType:"selector",peek:_t,get:ht,set:(R,Q,J)=>{let K=!1;const _e=new Map;function Ie({key:Ne}){if(K)throw Ei("Recoil: Async selector sets are not currently supported.");const Be=Rh(R,Q,Ne);if(Be.state==="hasValue")return Be.contents;if(Be.state==="loading"){const tt=`Getting value of asynchronous atom or selector "${Ne}" in a pending state while setting selector "${c}" is not yet supported.`;throw sr(tt),Ei(tt)}else throw Be.contents}function ye(Ne,Be){if(K){const ot="Recoil: Async selector sets are not currently supported.";throw sr(ot),Ei(ot)}const tt=typeof Be=="function"?Be(Ie(Ne)):Be;kT(R,Q,Ne.key,tt).forEach((ot,jt)=>_e.set(jt,ot))}function ze(Ne){ye(Ne,RT)}const He=w({set:ye,get:Ie,reset:ze},J);if(He!==void 0)throw bn(He)?Ei("Recoil: Async selector sets are not currently supported."):Ei("Recoil: selector set should be a void function.");return K=!0,_e},init:z,invalidate:ee,clearCache:ie,shouldDeleteConfigOnRelease:B,dangerouslyAllowMutability:n.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:y}):s=R_({key:c,nodeType:"selector",peek:_t,get:ht,init:z,invalidate:ee,clearCache:ie,shouldDeleteConfigOnRelease:B,dangerouslyAllowMutability:n.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:y})}F_.value=n=>new P_(n);var el=F_;const{isLoadable:ZT,loadableWithError:Sg,loadableWithPromise:zg,loadableWithValue:tl}=_c,{WrappedValue:V_}=S_,{peekNodeInfo:GT}=ms,{DEFAULT_VALUE:Js,DefaultValue:ys,getConfigDeletionHandler:Q_,registerNode:HT,setConfigDeletionHandler:WT}=Cr,{isRecoilValue:qT}=Ws,{getRecoilValueAsLoadable:XT,markRecoilValueModified:KT,setRecoilValue:Y_,setRecoilValueLoadable:JT}=bo,{retainedByOptionWithDefault:e6}=Xs,zc=n=>n instanceof V_?n.value:n;function t6(n){const{key:s,persistence_UNSTABLE:c}=n,d=e6(n.retainedBy_UNSTABLE);let m=0;function w(le){return zg(le.then(he=>(v=tl(he),he)).catch(he=>{throw v=Sg(he),he}))}let v=bn(n.default)?w(n.default):ZT(n.default)?n.default.state==="loading"?w(n.default.contents):n.default:tl(zc(n.default));T(v.contents);let o;const y=new Map;function T(le){return process.env.NODE_ENV!=="production"&&n.dangerouslyAllowMutability!==!0?bn(le)?le.then(he=>(Ng(he),he)):(Ng(le),le):le}function C(le,he){const ge=he.then(W=>{var Le,Re;return((Re=((Le=le.getState().nextTree)!==null&&Le!==void 0?Le:le.getState().currentTree).atomValues.get(s))===null||Re===void 0?void 0:Re.contents)===ge&&Y_(le,me,W),W}).catch(W=>{var Le,Re;throw((Re=((Le=le.getState().nextTree)!==null&&Le!==void 0?Le:le.getState().currentTree).atomValues.get(s))===null||Re===void 0?void 0:Re.contents)===ge&&JT(le,me,Sg(W)),W});return ge}function S(le,he,ge){var W;m++;const Le=()=>{var Ye;m--,(Ye=y.get(le))===null||Ye===void 0||Ye.forEach(Je=>Je()),y.delete(le)};if(le.getState().knownAtoms.add(s),v.state==="loading"){const Ye=()=>{var Je;((Je=le.getState().nextTree)!==null&&Je!==void 0?Je:le.getState().currentTree).atomValues.has(s)||KT(le,me)};v.contents.finally(Ye)}const Re=(W=n.effects)!==null&&W!==void 0?W:n.effects_UNSTABLE;if(Re!=null){let lt=function(ee){if(Je&&ee.key===s){const ie=Ye;return ie instanceof ys?z(le,he):bn(ie)?zg(ie.then(G=>G instanceof ys?v.toPromise():G)):tl(ie)}return XT(le,ee)},Ae=function(ee){return lt(ee).toPromise()},Ve=function(ee){var ie;const G=GT(le,(ie=le.getState().nextTree)!==null&&ie!==void 0?ie:le.getState().currentTree,ee.key);return Je&&ee.key===s&&!(Ye instanceof ys)?{...G,isSet:!0,loadable:lt(ee)}:G},Ye=Js,Je=!0,We=!1,rt=null;const Xe=ee=>ie=>{if(Je){const G=lt(me),R=G.state==="hasValue"?G.contents:Js;Ye=typeof ie=="function"?ie(R):ie,bn(Ye)&&(Ye=Ye.then(Q=>(rt={effect:ee,value:Q},Q)))}else{if(bn(ie))throw Ei("Setting atoms to async values is not implemented.");typeof ie!="function"&&(rt={effect:ee,value:zc(ie)}),Y_(le,me,typeof ie=="function"?G=>{const R=zc(ie(G));return rt={effect:ee,value:R},R}:zc(ie))}},_t=ee=>()=>Xe(ee)(Js),ht=ee=>ie=>{var G;const{release:R}=le.subscribeToTransactions(Q=>{var J;let{currentTree:K,previousTree:_e}=Q.getState();_e||(sr("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),_e=K);const Ie=(J=K.atomValues.get(s))!==null&&J!==void 0?J:v;if(Ie.state==="hasValue"){var ye,ze,He,Ne;const Be=Ie.contents,tt=(ye=_e.atomValues.get(s))!==null&&ye!==void 0?ye:v,Dt=tt.state==="hasValue"?tt.contents:Js;((ze=rt)===null||ze===void 0?void 0:ze.effect)!==ee||((He=rt)===null||He===void 0?void 0:He.value)!==Be?ie(Be,Dt,!K.atomValues.has(s)):((Ne=rt)===null||Ne===void 0?void 0:Ne.effect)===ee&&(rt=null)}},s);y.set(le,[...(G=y.get(le))!==null&&G!==void 0?G:[],R])};for(const ee of Re)try{const ie=ee({node:me,storeID:le.storeID,parentStoreID_UNSTABLE:le.parentStoreID,trigger:ge,setSelf:Xe(ee),resetSelf:_t(ee),onSet:ht(ee),getPromise:Ae,getLoadable:lt,getInfo_UNSTABLE:Ve});if(ie!=null){var Ge;y.set(le,[...(Ge=y.get(le))!==null&&Ge!==void 0?Ge:[],ie])}}catch(ie){Ye=ie,We=!0}if(Je=!1,!(Ye instanceof ys)){var Ee;const ee=We?Sg(Ye):bn(Ye)?zg(C(le,Ye)):tl(zc(Ye));T(ee.contents),he.atomValues.set(s,ee),(Ee=le.getState().nextTree)===null||Ee===void 0||Ee.atomValues.set(s,ee)}}return Le}function z(le,he){var ge,W;return(ge=(W=he.atomValues.get(s))!==null&&W!==void 0?W:o)!==null&&ge!==void 0?ge:v}function B(le,he){if(he.atomValues.has(s))return jn(he.atomValues.get(s));if(he.nonvalidatedAtoms.has(s)){if(o!=null)return o;if(c==null)return yh(`Tried to restore a persisted value for atom ${s} but it has no persistence settings.`),v;const ge=he.nonvalidatedAtoms.get(s),W=c.validator(ge,Js);return o=W instanceof ys?v:tl(W),o}else return v}function P(){o=void 0}function F(le,he,ge){if(he.atomValues.has(s)){const W=jn(he.atomValues.get(s));if(W.state==="hasValue"&&ge===W.contents)return new Map}else if(!he.nonvalidatedAtoms.has(s)&&ge instanceof ys)return new Map;return T(ge),o=void 0,new Map().set(s,tl(ge))}function q(){return Q_(s)!==void 0&&m<=0}const me=HT({key:s,nodeType:"atom",peek:z,get:B,set:F,init:S,invalidate:P,shouldDeleteConfigOnRelease:q,dangerouslyAllowMutability:n.dangerouslyAllowMutability,persistence_UNSTABLE:n.persistence_UNSTABLE?{type:n.persistence_UNSTABLE.type,backButton:n.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:d});return me}function jg(n){if(process.env.NODE_ENV!=="production"&&typeof n.key!="string")throw Ei("A key option with a unique string value must be provided when creating an atom.");const{...s}=n,c="default"in n?n.default:new Promise(()=>{});return qT(c)?i6({...s,default:c}):t6({...s,default:c})}function i6(n){const s=jg({...n,default:Js,persistence_UNSTABLE:n.persistence_UNSTABLE===void 0?void 0:{...n.persistence_UNSTABLE,validator:d=>d instanceof ys?d:jn(n.persistence_UNSTABLE).validator(d,Js)},effects:n.effects,effects_UNSTABLE:n.effects_UNSTABLE}),c=el({key:`${n.key}__withFallback`,get:({get:d})=>{const m=d(s);return m instanceof ys?n.default:m},set:({set:d},m)=>d(s,m),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:n.dangerouslyAllowMutability});return WT(c.key,Q_(n.key)),c}jg.value=n=>new V_(n);var $_=jg;class n6{constructor(s){var c;Ui(this,"_map",void 0),Ui(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 r6={MapCache:n6},o6=r6.MapCache,s6=Object.freeze({__proto__:null,MapCache:o6});const{LRUCache:Z_}=L_,{MapCache:a6}=s6,Bh={equality:"reference",eviction:"none",maxSize:1/0};function l6({equality:n=Bh.equality,eviction:s=Bh.eviction,maxSize:c=Bh.maxSize}=Bh){const d=c6(n);return u6(s,c,d)}function c6(n){switch(n){case"reference":return s=>s;case"value":return s=>Oh(s)}throw Ei(`Unrecognized equality policy ${n}`)}function u6(n,s,c){switch(n){case"keep-all":return new a6({mapKey:c});case"lru":return new Z_({mapKey:c,maxSize:jn(s)});case"most-recent":return new Z_({mapKey:c,maxSize:1})}throw Ei(`Unrecognized eviction policy ${n}`)}var G_=l6;const{setConfigDeletionHandler:h6}=Cr;function d6(n){var s,c;const d=G_({equality:(s=(c=n.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}=n,C="default"in n?n.default:new Promise(()=>{}),S=$_({...T,key:`${n.key}__${(w=Oh(m))!==null&&w!==void 0?w:"void"}`,default:typeof C=="function"?C(m):C,retainedBy_UNSTABLE:typeof n.retainedBy_UNSTABLE=="function"?n.retainedBy_UNSTABLE(m):n.retainedBy_UNSTABLE,effects:typeof n.effects=="function"?n.effects(m):typeof n.effects_UNSTABLE=="function"?n.effects_UNSTABLE(m):(v=n.effects)!==null&&v!==void 0?v:n.effects_UNSTABLE});return d.set(m,S),h6(S.key,()=>{d.delete(m)}),S}}var f6=d6;const{setConfigDeletionHandler:p6}=Cr;let g6=0;function m6(n){var s,c;const d=G_({equality:(s=(c=n.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(z){throw Ei(`Problem with cache lookup for selector ${n.key}: ${z.message}`)}if(v!=null)return v;const o=`${n.key}__selectorFamily/${(w=Oh(m,{allowFunctions:!0}))!==null&&w!==void 0?w:"void"}/${g6++}`,y=z=>n.get(m)(z),T=n.cachePolicy_UNSTABLE,C=typeof n.retainedBy_UNSTABLE=="function"?n.retainedBy_UNSTABLE(m):n.retainedBy_UNSTABLE;let S;if(n.set!=null){const z=n.set;S=el({key:o,get:y,set:(P,F)=>z(m)(P,F),cachePolicy_UNSTABLE:T,dangerouslyAllowMutability:n.dangerouslyAllowMutability,retainedBy_UNSTABLE:C})}else S=el({key:o,get:y,cachePolicy_UNSTABLE:T,dangerouslyAllowMutability:n.dangerouslyAllowMutability,retainedBy_UNSTABLE:C});return d.set(m,S),p6(S.key,()=>{d.delete(m)}),S}}var _s=m6;const y6=_s({key:"__constant",get:n=>()=>n,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function _6(n){return y6(n)}var x6=_6;const v6=_s({key:"__error",get:n=>()=>{throw Ei(n)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function M6(n){return v6(n)}var b6=M6;function w6(n){return n}var I6=w6;const{loadableWithError:H_,loadableWithPromise:W_,loadableWithValue:q_}=_c;function Fh(n,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]=n(w)}catch(v){d[m]=v}return[c,d]}function D6(n){return n!=null&&!bn(n)}function Vh(n){return Array.isArray(n)?n:Object.getOwnPropertyNames(n).map(s=>n[s])}function Lg(n,s){return Array.isArray(n)?s:Object.getOwnPropertyNames(n).reduce((c,d,m)=>({...c,[d]:s[m]}),{})}function il(n,s,c){const d=c.map((m,w)=>m==null?q_(s[w]):bn(m)?W_(m):H_(m));return Lg(n,d)}function T6(n,s){return s.map((c,d)=>c===void 0?n[d]:c)}const A6=_s({key:"__waitForNone",get:n=>({get:s})=>{const c=Vh(n),[d,m]=Fh(s,c);return il(n,d,m)},dangerouslyAllowMutability:!0}),E6=_s({key:"__waitForAny",get:n=>({get:s})=>{const c=Vh(n),[d,m]=Fh(s,c);return m.some(w=>!bn(w))?il(n,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(n,d,m))}).catch(y=>{m[v]=y,w(il(n,d,m))})})},dangerouslyAllowMutability:!0}),N6=_s({key:"__waitForAll",get:n=>({get:s})=>{const c=Vh(n),[d,m]=Fh(s,c);if(m.every(v=>v==null))return Lg(n,d);const w=m.find(D6);if(w!=null)throw w;return Promise.all(m).then(v=>Lg(n,T6(d,v)))},dangerouslyAllowMutability:!0}),C6=_s({key:"__waitForAllSettled",get:n=>({get:s})=>{const c=Vh(n),[d,m]=Fh(s,c);return m.every(w=>!bn(w))?il(n,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(n,d,m))},dangerouslyAllowMutability:!0}),S6=_s({key:"__noWait",get:n=>({get:s})=>{try{return el.value(q_(s(n)))}catch(c){return el.value(bn(c)?W_(c):H_(c))}},dangerouslyAllowMutability:!0});var z6={waitForNone:A6,waitForAny:E6,waitForAll:N6,waitForAllSettled:C6,noWait:S6};const{RecoilLoadable:j6}=_c,{DefaultValue:L6}=Cr,{RecoilRoot:O6,useRecoilStoreID:k6}=Go,{isRecoilValue:P6}=Ws,{retentionZone:R6}=bh,{freshSnapshot:U6}=Eh,{useRecoilState:B6,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:F6,useRecoilStateLoadable:V6,useRecoilValue:Q6,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Y6,useRecoilValueLoadable:$6,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Z6,useResetRecoilState:G6,useSetRecoilState:H6}=KI,{useGotoRecoilSnapshot:W6,useRecoilSnapshot:q6,useRecoilTransactionObserver:X6}=I_,{useRecoilCallback:K6}=C_,{noWait:J6,waitForAll:eA,waitForAllSettled:tA,waitForAny:iA,waitForNone:nA}=z6;var Qh={DefaultValue:L6,isRecoilValue:P6,RecoilLoadable:j6,RecoilEnv:qa,RecoilRoot:O6,useRecoilStoreID:k6,useRecoilBridgeAcrossReactRoots_UNSTABLE:DD,atom:$_,selector:el,atomFamily:f6,selectorFamily:_s,constSelector:x6,errorSelector:b6,readOnlySelector:I6,noWait:J6,waitForNone:nA,waitForAny:iA,waitForAll:eA,waitForAllSettled:tA,useRecoilValue:Q6,useRecoilValueLoadable:$6,useRecoilState:B6,useRecoilStateLoadable:V6,useSetRecoilState:H6,useResetRecoilState:G6,useGetRecoilValueInfo_UNSTABLE:xD,useRecoilRefresher_UNSTABLE:eT,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Z6,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Y6,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:F6,useRecoilCallback:K6,useRecoilTransaction_UNSTABLE:oT,useGotoRecoilSnapshot:W6,useRecoilSnapshot:q6,useRecoilTransactionObserver_UNSTABLE:X6,snapshot_UNSTABLE:U6,useRetain:bg,retentionZone:R6},rA=Qh.RecoilRoot,An=Qh.atom,Ni=Qh.useRecoilValue,Ji=Qh.useRecoilState;const oA=(n,s)=>{const c=n[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)))})},sA="mi-components";let Yh,X_,Fr=!1,Og=!1;const Ho=(n,s="")=>()=>{},aA=(n,s)=>()=>{},lA="{visibility:hidden}.hydrated{visibility:inherit}",K_="http://www.w3.org/1999/xlink",J_={},cA="http://www.w3.org/2000/svg",uA="http://www.w3.org/1999/xhtml",hA=n=>n!=null,kg=n=>(n=typeof n,n==="object"||n==="function");function e2(n){var s,c,d;return(d=(c=(s=n.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 Me=(n,s,...c)=>{let d=null,m=null,w=!1,v=!1;const o=[],y=C=>{for(let S=0;S<C.length;S++)d=C[S],Array.isArray(d)?y(d):d!=null&&typeof d!="boolean"&&((w=typeof n!="function"&&!kg(d))&&(d=String(d)),w&&v?o[o.length-1].$text$+=d:o.push(w?Pg(null,d):d),v=w)};if(y(c),s){s.key&&(m=s.key);{const C=s.className||s.class;C&&(s.class=typeof C!="object"?C:Object.keys(C).filter(S=>C[S]).join(" "))}}const T=Pg(n,null);return T.$attrs$=s,o.length>0&&(T.$children$=o),T.$key$=m,T},Pg=(n,s)=>{const c={$flags$:0,$tag$:n,$text$:s,$elm$:null,$children$:null};return c.$attrs$=null,c.$key$=null,c},qn={},dA=n=>n&&n.$tag$===qn,fA=(n,s)=>n!=null&&!kg(n)?s&4?n==="false"?!1:n===""||!!n:s&2?parseFloat(n):s&1?String(n):n:n,Wo=n=>xs(n).$hostElement$,In=(n,s,c)=>{const d=Wo(n);return{emit:m=>t2(d,s,{bubbles:!!(c&4),composed:!!(c&2),cancelable:!!(c&1),detail:m})}},t2=(n,s,c)=>{const d=ar.ce(s,c);return n.dispatchEvent(d),d},i2=new WeakMap,pA=(n,s,c)=>{let d=Hh.get(n);OA&&c?(d=d||new CSSStyleSheet,typeof d=="string"?d=s:d.replaceSync(s)):d=s,Hh.set(n,d)},gA=(n,s,c,d)=>{var m;let w=n2(s);const v=Hh.get(w);if(n=n.nodeType===11?n:Do,v)if(typeof v=="string"){n=n.head||n;let o=i2.get(n),y;if(o||i2.set(n,o=new Set),!o.has(w)){{y=Do.createElement("style"),y.innerHTML=v;const T=(m=ar.$nonce$)!==null&&m!==void 0?m:e2(Do);T!=null&&y.setAttribute("nonce",T),n.insertBefore(y,n.querySelector("link"))}o&&o.add(w)}}else n.adoptedStyleSheets.includes(v)||(n.adoptedStyleSheets=[...n.adoptedStyleSheets,v]);return w},mA=n=>{const s=n.$cmpMeta$,c=n.$hostElement$,d=s.$flags$,m=Ho("attachStyles",s.$tagName$),w=gA(c.shadowRoot?c.shadowRoot:c.getRootNode(),s);d&10&&(c["s-sc"]=w,c.classList.add(w+"-h")),m()},n2=(n,s)=>"sc-"+n.$tagName$,r2=(n,s,c,d,m,w)=>{if(c!==d){let v=y2(n,s),o=s.toLowerCase();if(s==="class"){const y=n.classList,T=o2(c),C=o2(d);y.remove(...T.filter(S=>S&&!C.includes(S))),y.add(...C.filter(S=>S&&!T.includes(S)))}else if(s==="style"){for(const y in c)(!d||d[y]==null)&&(y.includes("-")?n.style.removeProperty(y):n.style[y]="");for(const y in d)(!c||d[y]!==c[y])&&(y.includes("-")?n.style.setProperty(y,d[y]):n.style[y]=d[y])}else if(s!=="key")if(s==="ref")d&&d(n);else if(!v&&s[0]==="o"&&s[1]==="n")s[2]==="-"?s=s.slice(3):y2(jc,o)?s=o.slice(2):s=o[2]+s.slice(3),c&&ar.rel(n,s,c,!1),d&&ar.ael(n,s,d,!1);else{const y=kg(d);if((v||y&&d!==null)&&!m)try{if(n.tagName.includes("-"))n[s]=d;else{const C=d??"";s==="list"?v=!1:(c==null||n[s]!=C)&&(n[s]=C)}}catch{}let T=!1;o!==(o=o.replace(/^xlink\:?/,""))&&(s=o,T=!0),d==null||d===!1?(d!==!1||n.getAttribute(s)==="")&&(T?n.removeAttributeNS(K_,s):n.removeAttribute(s)):(!v||w&4||m)&&!y&&(d=d===!0?"":d,T?n.setAttributeNS(K_,s,d):n.setAttribute(s,d))}}},yA=/\s/,o2=n=>n?n.split(yA):[],s2=(n,s,c,d)=>{const m=s.$elm$.nodeType===11&&s.$elm$.host?s.$elm$.host:s.$elm$,w=n&&n.$attrs$||J_,v=s.$attrs$||J_;for(d in w)d in v||r2(m,d,w[d],void 0,c,s.$flags$);for(d in v)r2(m,d,w[d],v[d],c,s.$flags$)},$h=(n,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?cA:uA,m.$tag$),Fr&&m.$tag$==="foreignObject"&&(Fr=!1),s2(null,m,Fr),hA(Yh)&&v["s-si"]!==Yh&&v.classList.add(v["s-si"]=Yh),m.$children$)for(w=0;w<m.$children$.length;++w)o=$h(n,m,w),o&&v.appendChild(o);m.$tag$==="svg"?Fr=!1:v.tagName==="foreignObject"&&(Fr=!0)}return v},a2=(n,s,c,d,m,w)=>{let v=n,o;for(v.shadowRoot&&v.tagName===X_&&(v=v.shadowRoot);m<=w;++m)d[m]&&(o=$h(null,c,m),o&&(d[m].$elm$=o,v.insertBefore(o,s)))},l2=(n,s,c,d,m)=>{for(;s<=c;++s)(d=n[s])&&(m=d.$elm$,c2(d),m.remove())},_A=(n,s,c,d)=>{let m=0,w=0,v=0,o=0,y=s.length-1,T=s[0],C=s[y],S=d.length-1,z=d[0],B=d[S],P,F;for(;m<=y&&w<=S;)if(T==null)T=s[++m];else if(C==null)C=s[--y];else if(z==null)z=d[++w];else if(B==null)B=d[--S];else if(Zh(T,z))nl(T,z),T=s[++m],z=d[++w];else if(Zh(C,B))nl(C,B),C=s[--y],B=d[--S];else if(Zh(T,B))nl(T,B),n.insertBefore(T.$elm$,C.$elm$.nextSibling),T=s[++m],B=d[--S];else if(Zh(C,z))nl(C,z),n.insertBefore(C.$elm$,T.$elm$),C=s[--y],z=d[++w];else{for(v=-1,o=m;o<=y;++o)if(s[o]&&s[o].$key$!==null&&s[o].$key$===z.$key$){v=o;break}v>=0?(F=s[v],F.$tag$!==z.$tag$?P=$h(s&&s[w],c,v):(nl(F,z),s[v]=void 0,P=F.$elm$),z=d[++w]):(P=$h(s&&s[w],c,w),z=d[++w]),P&&T.$elm$.parentNode.insertBefore(P,T.$elm$)}m>y?a2(n,d[S+1]==null?null:d[S+1].$elm$,c,d,w,S):w>S&&l2(s,m,y)},Zh=(n,s)=>n.$tag$===s.$tag$?n.$key$===s.$key$:!1,nl=(n,s)=>{const c=s.$elm$=n.$elm$,d=n.$children$,m=s.$children$,w=s.$tag$,v=s.$text$;v===null?(Fr=w==="svg"?!0:w==="foreignObject"?!1:Fr,w==="slot"||s2(n,s,Fr),d!==null&&m!==null?_A(c,d,s,m):m!==null?(n.$text$!==null&&(c.textContent=""),a2(c,null,s,m,0,m.length-1)):d!==null&&l2(d,0,d.length-1),Fr&&w==="svg"&&(Fr=!1)):n.$text$!==v&&(c.data=v)},c2=n=>{n.$attrs$&&n.$attrs$.ref&&n.$attrs$.ref(null),n.$children$&&n.$children$.map(c2)},xA=(n,s)=>{const c=n.$hostElement$,d=n.$cmpMeta$,m=n.$vnode$||Pg(null,null),w=dA(s)?s:Me(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,n.$vnode$=w,w.$elm$=m.$elm$=c.shadowRoot||c,Yh=c["s-sc"],nl(m,w)},u2=(n,s)=>{s&&!n.$onRenderResolve$&&s["s-p"]&&s["s-p"].push(new Promise(c=>n.$onRenderResolve$=c))},Gh=(n,s)=>{if(n.$flags$|=16,n.$flags$&4){n.$flags$|=512;return}return u2(n,n.$ancestorComponent$),PA(()=>vA(n,s))},vA=(n,s)=>{const c=Ho("scheduleUpdate",n.$cmpMeta$.$tagName$),d=n.$lazyInstance$;let m;return s&&(n.$flags$|=256,n.$queuedListeners$&&(n.$queuedListeners$.map(([w,v])=>ea(d,w,v)),n.$queuedListeners$=null),m=ea(d,"componentWillLoad")),m=d2(m,()=>ea(d,"componentWillRender")),c(),d2(m,()=>MA(n,d,s))},MA=async(n,s,c)=>{const d=n.$hostElement$,m=Ho("update",n.$cmpMeta$.$tagName$),w=d["s-rc"];c&&mA(n);const v=Ho("render",n.$cmpMeta$.$tagName$);bA(n,s),w&&(w.map(o=>o()),d["s-rc"]=void 0),v(),m();{const o=d["s-p"],y=()=>wA(n);o.length===0?y():(Promise.all(o).then(y),n.$flags$|=4,o.length=0)}},bA=(n,s,c)=>{try{s=s.render&&s.render(),n.$flags$&=-17,n.$flags$|=2,xA(n,s)}catch(d){ta(d,n.$hostElement$)}return null},wA=n=>{const s=n.$cmpMeta$.$tagName$,c=n.$hostElement$,d=Ho("postUpdate",s),m=n.$lazyInstance$,w=n.$ancestorComponent$;ea(m,"componentDidRender"),n.$flags$&64?d():(n.$flags$|=64,f2(c),ea(m,"componentDidLoad"),d(),n.$onReadyResolve$(c),w||h2()),n.$onInstanceResolve$(c),n.$onRenderResolve$&&(n.$onRenderResolve$(),n.$onRenderResolve$=void 0),n.$flags$&512&&Fg(()=>Gh(n,!1)),n.$flags$&=-517},Rg=n=>{{const s=xs(n),c=s.$hostElement$.isConnected;return c&&(s.$flags$&18)===2&&Gh(s,!1),c}},h2=n=>{f2(Do.documentElement),Fg(()=>t2(jc,"appload",{detail:{namespace:sA}}))},ea=(n,s,c)=>{if(n&&n[s])try{return n[s](c)}catch(d){ta(d)}},d2=(n,s)=>n&&n.then?n.then(s):s(),f2=n=>n.classList.add("hydrated"),IA=(n,s)=>xs(n).$instanceValues$.get(s),DA=(n,s,c,d)=>{const m=xs(n),w=m.$hostElement$,v=m.$instanceValues$.get(s),o=m.$flags$,y=m.$lazyInstance$;c=fA(c,d.$members$[s][0]);const T=Number.isNaN(v)&&Number.isNaN(c),C=c!==v&&!T;if((!(o&8)||v===void 0)&&C&&(m.$instanceValues$.set(s,c),y)){if(d.$watchers$&&o&128){const S=d.$watchers$[s];S&&S.map(z=>{try{y[z](c,v,s)}catch(B){ta(B,w)}})}(o&18)===2&&Gh(m,!1)}},p2=(n,s,c)=>{if(s.$members$){n.watchers&&(s.$watchers$=n.watchers);const d=Object.entries(s.$members$),m=n.prototype;if(d.map(([w,[v]])=>{v&31||c&2&&v&32?Object.defineProperty(m,w,{get(){return IA(this,w)},set(o){DA(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})},n.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 n},TA=async(n,s,c,d,m)=>{if(!(s.$flags$&32)){{if(s.$flags$|=32,m=LA(c),m.then){const y=aA();m=await m,y()}m.isProxied||(c.$watchers$=m.watchers,p2(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(),g2(s.$lazyInstance$)}if(m.style){let o=m.style;const y=n2(c);if(!Hh.has(y)){const T=Ho("registerStyles",c.$tagName$);pA(y,o,!!(c.$flags$&1)),T()}}}const w=s.$ancestorComponent$,v=()=>Gh(s,!0);w&&w["s-rc"]?w["s-rc"].push(v):v()},g2=n=>{ea(n,"connectedCallback")},AA=n=>{if(!(ar.$flags$&1)){const s=xs(n),c=s.$cmpMeta$,d=Ho("connectedCallback",c.$tagName$);if(s.$flags$&1)m2(n,s,c.$listeners$),g2(s.$lazyInstance$);else{s.$flags$|=1;{let m=n;for(;m=m.parentNode||m.host;)if(m["s-p"]){u2(s,s.$ancestorComponent$=m);break}}c.$members$&&Object.entries(c.$members$).map(([m,[w]])=>{if(w&31&&n.hasOwnProperty(m)){const v=n[m];delete n[m],n[m]=v}}),TA(n,s,c)}d()}},EA=n=>{if(!(ar.$flags$&1)){const s=xs(n),c=s.$lazyInstance$;s.$rmListeners$&&(s.$rmListeners$.map(d=>d()),s.$rmListeners$=void 0),ea(c,"disconnectedCallback")}},NA=(n,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"),C=[];let S,z=!0;Object.assign(ar,s),ar.$resourcesUrl$=new URL(s.resourcesUrl||"./",Do.baseURI).href,n.map(B=>{B[1].map(P=>{const F={$flags$:P[0],$tagName$:P[1],$members$:P[2],$listeners$:P[3]};F.$members$=P[2],F.$listeners$=P[3],F.$attrsToReflect$=[],F.$watchers$={};const q=F.$tagName$,me=class extends HTMLElement{constructor(le){super(le),le=this,jA(le,F),F.$flags$&1&&le.attachShadow({mode:"open"})}connectedCallback(){S&&(clearTimeout(S),S=null),z?C.push(this):ar.jmp(()=>AA(this))}disconnectedCallback(){ar.jmp(()=>EA(this))}componentOnReady(){return xs(this).$onReadyPromise$}};F.$lazyBundleId$=B[0],!w.includes(q)&&!v.get(q)&&(m.push(q),v.define(q,p2(me,F,1)))})});{T.innerHTML=m+lA,T.setAttribute("data-styles","");const B=(c=ar.$nonce$)!==null&&c!==void 0?c:e2(Do);B!=null&&T.setAttribute("nonce",B),o.insertBefore(T,y?y.nextSibling:o.firstChild)}z=!1,C.length?C.map(B=>B.connectedCallback()):ar.jmp(()=>S=setTimeout(h2,30)),d()},m2=(n,s,c,d)=>{c&&c.map(([m,w,v])=>{const o=SA(n,m),y=CA(s,v),T=zA(m);ar.ael(o,w,y,T),(s.$rmListeners$=s.$rmListeners$||[]).push(()=>ar.rel(o,w,y,T))})},CA=(n,s)=>c=>{try{n.$flags$&256?n.$lazyInstance$[s](c):(n.$queuedListeners$=n.$queuedListeners$||[]).push([s,c])}catch(d){ta(d)}},SA=(n,s)=>s&8?jc:n,zA=n=>(n&2)!==0,Ug=new WeakMap,xs=n=>Ug.get(n),Gi=(n,s)=>Ug.set(s.$lazyInstance$=n,s),jA=(n,s)=>{const c={$flags$:0,$hostElement$:n,$cmpMeta$:s,$instanceValues$:new Map};return c.$onInstancePromise$=new Promise(d=>c.$onInstanceResolve$=d),c.$onReadyPromise$=new Promise(d=>c.$onReadyResolve$=d),n["s-p"]=[],n["s-rc"]=[],m2(n,c,s.$listeners$),Ug.set(n,c)},y2=(n,s)=>s in n,ta=(n,s)=>(0,console.error)(n,s),_2=new Map,LA=(n,s,c)=>{const d=n.$tagName$.replace(/-/g,"_"),m=n.$lazyBundleId$,w=_2.get(m);if(w)return w[d];/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return oA(Object.assign({"./combo-box-item.entry.js":()=>Promise.resolve().then(()=>$E),"./mi-card_2.entry.js":()=>Promise.resolve().then(()=>HE),"./mi-chip.entry.js":()=>Promise.resolve().then(()=>qE),"./mi-column.entry.js":()=>Promise.resolve().then(()=>XE),"./mi-combo-box.entry.js":()=>Promise.resolve().then(()=>eN),"./mi-data-table.entry.js":()=>Promise.resolve().then(()=>lN),"./mi-distance_2.entry.js":()=>Promise.resolve().then(()=>hN),"./mi-dropdown-item.entry.js":()=>Promise.resolve().then(()=>dN),"./mi-dropdown.entry.js":()=>Promise.resolve().then(()=>pN),"./mi-floor-selector.entry.js":()=>Promise.resolve().then(()=>mN),"./mi-keyboard.entry.js":()=>Promise.resolve().then(()=>IN),"./mi-list-item-category.entry.js":()=>Promise.resolve().then(()=>TN),"./mi-list-item-location.entry.js":()=>Promise.resolve().then(()=>EN),"./mi-list.entry.js":()=>Promise.resolve().then(()=>CN),"./mi-location-booking.entry.js":()=>Promise.resolve().then(()=>tj),"./mi-location-info.entry.js":()=>Promise.resolve().then(()=>nj),"./mi-map-googlemaps.entry.js":()=>Promise.resolve().then(()=>sj),"./mi-map-mapbox.entry.js":()=>Promise.resolve().then(()=>uj),"./mi-metric-card.entry.js":()=>Promise.resolve().then(()=>dj),"./mi-my-position.entry.js":()=>Promise.resolve().then(()=>Nj),"./mi-notification.entry.js":()=>Promise.resolve().then(()=>Sj),"./mi-route-instructions-heading.entry.js":()=>Promise.resolve().then(()=>jj),"./mi-route-instructions-maneuver-legacy.entry.js":()=>Promise.resolve().then(()=>Oj),"./mi-route-instructions-maneuver.entry.js":()=>Promise.resolve().then(()=>Pj),"./mi-route-instructions-step-legacy.entry.js":()=>Promise.resolve().then(()=>Uj),"./mi-route-instructions-step.entry.js":()=>Promise.resolve().then(()=>Fj),"./mi-route-instructions.entry.js":()=>Promise.resolve().then(()=>Qj),"./mi-scroll-buttons.entry.js":()=>Promise.resolve().then(()=>$j),"./mi-search.entry.js":()=>Promise.resolve().then(()=>qj),"./mi-share-sms.entry.js":()=>Promise.resolve().then(()=>Kj),"./mi-step-switcher.entry.js":()=>Promise.resolve().then(()=>e7),"./mi-tab-panel.entry.js":()=>Promise.resolve().then(()=>i7),"./mi-tab.entry.js":()=>Promise.resolve().then(()=>n7),"./mi-tabs.entry.js":()=>Promise.resolve().then(()=>o7),"./mi-time.entry.js":()=>Promise.resolve().then(()=>s7)}),`./${m}.entry.js`).then(v=>(_2.set(m,v),v[d]),ta)},Hh=new Map,jc=typeof window<"u"?window:{},Do=jc.document||{head:{}},ar={$flags$:0,$resourcesUrl$:"",jmp:n=>n(),raf:n=>requestAnimationFrame(n),ael:(n,s,c,d)=>n.addEventListener(s,c,d),rel:(n,s,c,d)=>n.removeEventListener(s,c,d),ce:(n,s)=>new CustomEvent(n,s)},x2=n=>Promise.resolve(n),OA=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replaceSync=="function"}catch{}return!1})(),v2=[],M2=[],kA=(n,s)=>c=>{n.push(c),Og||(Og=!0,s&&ar.$flags$&4?Fg(Bg):ar.raf(Bg))},b2=n=>{for(let s=0;s<n.length;s++)try{n[s](performance.now())}catch(c){ta(c)}n.length=0},Bg=()=>{b2(v2),b2(M2),(Og=v2.length>0)&&ar.raf(Bg)},Fg=n=>x2().then(n),PA=kA(M2,!0),RA=()=>x2(),UA=(n,s)=>typeof window>"u"?Promise.resolve():RA().then(()=>NA([["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],openSubsteps:[64],closeSubsteps:[64]}]]],["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],watchPosition:[64]}]]],["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-distance_2",[[1,"mi-distance",{meters:[2],unit:[1]}],[1,"mi-icon",{iconName:[1,"icon-name"]}]]],["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-route-instructions-maneuver",[[1,"mi-route-instructions-maneuver",{maneuver:[1],translations:[1],unit:[1],maneuverData:[32],translationsData:[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-route-instructions-maneuver-legacy",[[1,"mi-route-instructions-maneuver-legacy",{maneuver:[1],translations:[1],unit:[1],maneuverData:[32],translationsData:[32]}]]],["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-time",[[1,"mi-time",{seconds:[2],translations:[1],translationsData:[32]}]]]],s)),UO="",vs={Google:"google",Mapbox:"mapbox"},qo=An({key:"mapsIndoorsInstance",default:null,dangerouslyAllowMutability:!0}),BA=n=>{const s=Ni(qo),c=it.useRef(),[d,m]=it.useState([]);it.useEffect(()=>{(async()=>{if(s&&n){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)}})()},[n,s])},Vg=An({key:"venues",default:[]});var FA=function n(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(!n(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(!n(s[v],c[v]))return!1}return!0}return s!==s&&c!==c};const w2="__googleMapsScriptId";var rl;(function(n){n[n.INITIALIZED=0]="INITIALIZED",n[n.LOADING=1]="LOADING",n[n.SUCCESS=2]="SUCCESS",n[n.FAILURE=3]="FAILURE"})(rl||(rl={}));let VA=class pc{constructor({apiKey:s,authReferrerPolicy:c,channel:d,client:m,id:w=w2,language:v,libraries:o=[],mapIds:y,nonce:T,region:C,retries:S=3,url:z="https://maps.googleapis.com/maps/api/js",version:B}){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||w2,this.language=v,this.libraries=o,this.mapIds=y,this.nonce=T,this.region=C,this.retries=S,this.url=z,this.version=B,pc.instance){if(!FA(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 Qg=An({key:"gmApiKey",default:null}),ia=An({key:"primaryColor",default:"#005655"}),I2=An({key:"gmMapId",default:null});function QA({onMapView:n,onPositionControl:s}){const c=Ni(Qg),d=Ni(I2),[m,w]=it.useState(),[v,o]=it.useState(),[y,T]=it.useState(!1),[C,S]=it.useState(!1),z=Ni(qo),B=Ni(ia);return it.useEffect(()=>{new VA({apiKey:c,version:"quarterly",libraries:["geometry","places"]}).load().then(F=>{w(F);const q={element:document.getElementById("map"),disableDefaultUI:!0,center:{lat:0,lng:0},zoom:21,mapId:d},me=new window.mapsindoors.mapView.GoogleMapsView(q);o(me);const le=new window.mapsindoors.directions.GoogleMapsProvider;n(me,le)})},[]),it.useEffect(()=>{if(z&&v&&m&&!C){const P=document.createElement("mi-my-position");P.mapsindoors=z,v.getMap().controls[m.maps.ControlPosition.RIGHT_TOP].push(P),S(!0),s(P)}if(z&&v&&m&&!y){const P=document.createElement("mi-floor-selector");P.mapsindoors=z,P.primaryColor=B,v.getMap().controls[m.maps.ControlPosition.RIGHT_TOP].push(P),T(!0)}},[z,v,m,y,C]),$e.jsx("div",{className:"map-container",id:"map"})}var D2={exports:{}};(function(n,s){(function(c,d){n.exports=d()})(rb,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;",C={};c(C),m=y(C),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 C;const S={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(C==null){const t=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{C=process.env.API_URL_REGEX!=null?new RegExp(process.env.API_URL_REGEX):t}catch{C=t}}return C},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},z={supported:!1,testSupport:function(t){!F&&P&&(q?me(t):B=t)}};let B,P,F=!1,q=!1;function me(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,P),t.isContextLost())return;z.supported=!0}catch{}t.deleteTexture(e),F=!0}y.document&&(P=y.document.createElement("img"),P.onload=function(){B&&me(B),B=null,q=!0},P.onerror=function(){F=!0,B=null},P.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const le="01";var he=ge;function ge(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}ge.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 W=Le;function Le(t,e){this.x=t,this.y=e}Le.prototype={clone:function(){return new Le(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}},Le.convert=function(t){return t instanceof Le?t:Array.isArray(t)?new Le(t[0],t[1]):t};const Re=Math.PI/180,Ge=180/Math.PI;function Ee(t){return t*Re}function Ye(t){return t*Ge}const Je=[[0,0],[1,0],[1,1],[0,1]];function We(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 rt(t,e,i,a){const u=new he(t,e,i,a);return function(f){return u.solve(f)}}const lt=rt(.25,.1,.25,1);function Ae(t,e,i){return Math.min(i,Math.max(e,t))}function Ve(t,e,i){return(i=Ae((i-t)/(e-t),0,1))*i*(3-2*i)}function Xe(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 ht(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 R(){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 _e(t,e){return t.indexOf(e,t.length-e.length)!==-1}function Ie(t,e,i){const a={};for(const u in t)a[u]=e.call(i||this,t[u],u,t);return a}function ye(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 ze(t){return Array.isArray(t)?t.map(ze):typeof t=="object"&&t?Ie(t,ze):t}const He={};function Ne(t){He[t]||(typeof console<"u"&&console.warn(t),He[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 tt(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 ot(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 jt=null;function $t(t){if(jt==null){const e=t.navigator?t.navigator.userAgent:null;jt=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return jt}function Xt(t){try{const e=y[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch{return!1}}function yi(t,e){return[t[4*e],t[4*e+1],t[4*e+2],t[4*e+3]]}const en="mapbox-tiles";let xi,ji,vi=500,li=50;function di(){try{return y.caches}catch{}}function Pt(){di()&&!xi&&(xi=y.caches.open(en))}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 Li={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(Li);class _i extends Error{constructor(e,i,a){i===401&&ui(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,cn=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=(E=g.url).indexOf("sku=")>0&&ui(E);var E;a.type==="json"&&g.headers.set("Accept","application/json");const j=(U,V,Z)=>{if(b)return;if(U&&U.message!=="SecurityError"&&Ne(U),V&&Z)return L(V);const ne=Date.now();y.fetch(g).then(be=>{if(be.ok){const Se=I?be.clone():null;return L(be,Se,ne)}return u(new _i(be.statusText,be.status,a.url))}).catch(be=>{be.code!==20&&u(new Error(be.message))})},L=(U,V,Z)=>{(a.type==="arrayBuffer"?U.arrayBuffer():a.type==="json"?U.json():U.text()).then(ne=>{b||(V&&Z&&function(be,Se,ve){if(Pt(),!xi)return;const Te={status:Se.status,statusText:Se.statusText,headers:new y.Headers};Se.headers.forEach((ut,at)=>Te.headers.set(at,ut));const ke=ot(Se.headers.get("Cache-Control")||"");if(ke["no-store"])return;ke["max-age"]&&Te.headers.set("Expires",new Date(ve+1e3*ke["max-age"]).toUTCString());const je=Te.headers.get("Expires");je&&(new Date(je).getTime()-ve<42e4||function(ut,at){if(ji===void 0)try{new Response(new ReadableStream),ji=!0}catch{ji=!1}ji?at(ut.body):ut.blob().then(at)}(Se,ut=>{const at=new y.Response(ut,Te);Pt(),xi&&xi.then(vt=>vt.put(Ii(be.url),at)).catch(vt=>Ne(vt.message))}))}(g,V,Z),x=!0,u(null,ne,U.headers.get("Cache-Control"),U.headers.get("Expires")))}).catch(ne=>{b||u(new Error(ne.message))})};return I?function(U,V){if(Pt(),!xi)return V(null);const Z=Ii(U.url);xi.then(ne=>{ne.match(Z).then(be=>{const Se=function(ve){if(!ve)return!1;const Te=new Date(ve.headers.get("Expires")||0),ke=ot(ve.headers.get("Cache-Control")||"");return Te>Date.now()&&!ke["no-cache"]}(be);ne.delete(Z),Se&&ne.put(Z,be.clone()),V(null,be,Se)}).catch(V)}).catch(V)}(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)},En=function(t,e){return cn(ee(t,{type:"arrayBuffer"}),e)};function Qe(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,St;wt=[],St=0;const Ut=function(t,e){if(z.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),St>=S.MAX_PARALLEL_IMAGE_REQUESTS){const f={requestParameters:t,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return wt.push(f),f}St++;let i=!1;const a=()=>{if(!i)for(i=!0,St--;wt.length&&St<S.MAX_PARALLEL_IMAGE_REQUESTS;){const f=wt.shift(),{requestParameters:g,callback:x,cancelled:b}=f;b||(f.cancel=Ut(g,x).cancel)}},u=En(t,(f,g,x,b)=>{a(),f?e(f):g&&(y.createImageBitmap?function(I,E){const j=new y.Blob([new Uint8Array(I)],{type:"image/png"});y.createImageBitmap(j).then(L=>{E(null,L)}).catch(L=>{E(new Error(`Could not load image because of ${L.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(g,(I,E)=>e(I,E,x,b)):function(I,E){const j=new y.Image,L=y.URL;j.onload=()=>{E(null,j),L.revokeObjectURL(j.src),j.onload=null,y.requestAnimationFrame(()=>{j.src=Fe})},j.onerror=()=>E(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 U=new y.Blob([new Uint8Array(I)],{type:"image/png"});j.src=I.byteLength?L.createObjectURL(U):Fe}(g,(I,E)=>e(I,E,x,b)))});return{cancel:()=>{u.cancel(),a()}}},Kt="NO_ACCESS_TOKEN";function ni(t){return t.indexOf("mapbox:")===0}function ui(t){return S.API_URL_REGEX.test(t)}function gi(t){return S.API_CDN_URL_REGEX.test(t)}function bi(t){return S.API_STYLE_REGEX.test(t)&&!Wi(t)}function Wi(t){return S.API_SPRITE_REGEX.test(t)}const Nn=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function tn(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 Cn(t){const e=t.params.length?`?${t.params.join("&")}`:"";return`${t.protocol}://${t.authority}${t.path}${e}`}function Vn(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 fe{constructor(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(e){const i=Vn(S.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)))):S.ACCESS_TOKEN||"",e?`mapbox.eventData.${e}:${a}`:`mapbox.eventData:${a}`}fetchEventData(){const e=Xt("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{Ne("Unable to read from LocalStorage")}}saveEventData(){const e=Xt("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{Ne("Unable to write to LocalStorage")}}processRequests(e){}postEvent(e,i,a,u){if(!S.EVENTS_URL)return;const f=tn(S.EVENTS_URL);f.params.push(`access_token=${u||S.ACCESS_TOKEN||""}`);const g={event:this.type,created:new Date(e).toISOString()},x=i?ee(g,i):g,b={url:Cn(f),headers:{"Content-Type":"text/plain"},body:JSON.stringify([x])};this.pendingRequest=function(I,E){return cn(ee(I,{method:"POST"}),E)}(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 fe{constructor(t){super("appUserTurnstile"),this._customAccessToken=t}postTurnstileEvent(t,e){S.EVENTS_URL&&S.ACCESS_TOKEN&&Array.isArray(t)&&t.some(i=>ni(i)||ui(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=Vn(S.ACCESS_TOKEN),i=e?e.u:S.ACCESS_TOKEN;let a=i!==this.eventData.tokenU;J(this.anonId)||(this.anonId=R(),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 fe{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(t,e,i,a){this.skuToken=e,this.errorCb=a,S.EVENTS_URL&&(i||S.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(Kt)))}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=R()),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 fe{constructor(){super("gljs.performance")}postPerformanceEvent(t,e){S.EVENTS_URL&&(t||S.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(L){const U={};if(L){for(const V in L)if(V!=="other")for(const Z of L[V]){const ne=`${V}ResolveRangeMin`,be=`${V}ResolveRangeMax`,Se=`${V}RequestCount`,ve=`${V}RequestCachedCount`;U[ne]=Math.min(U[ne]||1/0,Z.startTime),U[be]=Math.max(U[be]||-1/0,Z.responseEnd);const Te=ke=>{U[ke]===void 0&&(U[ke]=0),++U[ke]};Z.transferSize!==void 0&&Z.transferSize===0&&Te(ve),Te(Se)}}return U}(function(L,U){const V={};if(L)for(const Z of L){const ne=U(Z);V[ne]===void 0&&(V[ne]=[]),V[ne].push(Z)}return V}(f,xt)),b=y.devicePixelRatio,I=y.navigator.connection||y.navigator.mozConnection||y.navigator.webkitConnection,E={counters:[],metadata:[],attributes:[]},j=(L,U,V)=>{V!=null&&L.push({name:U,value:V.toString()})};for(const L in x)j(E.counters,L,x[L]);if(u.interactionRange[0]!==1/0&&u.interactionRange[1]!==-1/0&&(j(E.counters,"interactionRangeMin",u.interactionRange[0]),j(E.counters,"interactionRangeMax",u.interactionRange[1])),g)for(const L of Object.keys(ct)){const U=ct[L],V=g.find(Z=>Z.name===U);V&&j(E.counters,U,V.startTime)}return j(E.counters,"visibilityHidden",u.visibilityHidden),j(E.attributes,"style",function(L){if(L)for(const U of L){const V=U.name.split("?")[0];if(bi(V)){const Z=V.split("/").slice(-2);if(Z.length===2)return`mapbox://styles/${Z[0]}/${Z[1]}`}}}(f)),j(E.attributes,"terrainEnabled",u.terrainEnabled?"true":"false"),j(E.attributes,"fogEnabled",u.fogEnabled?"true":"false"),j(E.attributes,"projection",u.projection),j(E.attributes,"zoom",u.zoom),j(E.metadata,"devicePixelRatio",b),j(E.metadata,"connectionEffectiveType",I?I.effectiveType:void 0),j(E.metadata,"navigatorUserAgent",y.navigator.userAgent),j(E.metadata,"screenWidth",y.screen.width),j(E.metadata,"screenHeight",y.screen.height),j(E.metadata,"windowWidth",y.innerWidth),j(E.metadata,"windowHeight",y.innerHeight),j(E.metadata,"mapWidth",u.width/b),j(E.metadata,"mapHeight",u.height/b),j(E.metadata,"webglRenderer",u.renderer),j(E.metadata,"webglVendor",u.vendor),j(E.metadata,"sdkVersion",T),j(E.metadata,"sdkIdentifier","mapbox-gl-js"),E}(i);for(const u of a.metadata);for(const u of a.counters);for(const u of a.attributes);this.postEvent(e,a,()=>{},t)}},et=Ue.postPerformanceEvent.bind(Ue),X=new class extends fe{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(t,e,i,a){if(!S.API_URL||!S.SESSION_PATH)return;const u=tn(S.API_URL+S.SESSION_PATH);u.params.push(`sku=${e||""}`),u.params.push(`access_token=${a||S.ACCESS_TOKEN||""}`);const f={url:Cn(u),headers:{"Content-Type":"text/plain"}};this.pendingRequest=function(g,x){return cn(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,S.SESSION_PATH&&S.API_URL&&(i||S.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(Kt)))}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)}},de=X.getSessionAPI.bind(X),Ce=new Set,ct={create:"create",load:"load",fullLoad:"fullLoad"},Nt={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 S.API_FONTS_REGEX.test(i)}(e)?"fontRange":Wi(e)?"sprite":bi(e)?"style":function(i){return S.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 Gt,qt,ai,wi;const ii={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;wi||(wi=y.document.createElement("canvas"));const u=wi.getContext("2d",{willReadFrequently:!0});if(!u)throw new Error("failed to create canvas 2d context");return(i>wi.width||a>wi.height)&&(wi.width=i,wi.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=>(Gt||(Gt=y.document.createElement("a")),Gt.href=t,Gt.href),get devicePixelRatio(){return y.devicePixelRatio},get prefersReducedMotion(){return!!y.matchMedia&&(qt==null&&(qt=y.matchMedia("(prefers-reduced-motion: reduce)")),qt.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 qr{constructor(e,i={}){ee(this,i),this.type=e}}class Co extends qr{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 qr(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 Qn(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 Qn(t)}class F1 extends Error{constructor(e,i){super(i),this.message=i,this.key=e}}var Ar=F1;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 xf=fl;const gr={kind:"null"},Yt={kind:"number"},Bi={kind:"string"},Oi={kind:"boolean"},Qr={kind:"color"},Jo={kind:"object"},Ci={kind:"value"},aa={kind:"collator"},Ms={kind:"formatted"},So={kind:"resolvedImage"};function Jn(t,e){return{kind:"array",itemType:t,N:e}}function Dn(t){if(t.kind==="array"){const e=Dn(t.itemType);return typeof t.N=="number"?`array<${e}, ${t.N}>`:t.itemType.kind==="value"?"array":`array<${e}>`}return t.kind}const Xr=[gr,Yt,Bi,Oi,Qr,Ms,Jo,Jn(Ci),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 Xr)if(!la(i,e))return null}}return`Expected ${Dn(t)} but found ${Dn(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,Zc={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 Gc(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 Zc)return Zc[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]),E=pl(g[2]),j=E<=.5?E*(I+1):E+I-E*I,L=2*E-j;return[zo(255*Gc(L,j,b+1/3)),zo(255*Gc(L,j,b)),zo(255*Gc(L,j,b-1/3)),x];default:return null}}return null}}catch{}class xr{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 xr)return e;if(typeof e!="string")return;const i=ha(e);return i?new xr(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]}}xr.black=new xr(0,0,0,1),xr.white=new xr(1,1,1,1),xr.transparent=new xr(0,0,0,0),xr.red=new xr(1,0,0,1),xr.blue=new xr(0,0,1,1);var Sn=xr;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 Hc{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 Hc(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 Lr{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new Lr({name:e,available:!1}):null}serialize(){return["image",this.name]}}function vf(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 Sn||t instanceof fa||t instanceof er||t instanceof Lr)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 Yn(t){if(t===null)return gr;if(typeof t=="string")return Bi;if(typeof t=="boolean")return Oi;if(typeof t=="number")return Yt;if(t instanceof Sn)return Qr;if(t instanceof fa)return aa;if(t instanceof er)return Ms;if(t instanceof Lr)return So;if(Array.isArray(t)){const e=t.length;let i;for(const a of t){const u=Yn(a);if(i){if(i===u)continue;i=Ci;break}i=u}return Jn(i||Ci,e)}return Jo}function pa(t){const e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof Sn||t instanceof er||t instanceof Lr?t.toString():JSON.stringify(t)}class Wc{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=Yn(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 Wc(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 Sn?["rgba"].concat(this.value.toArray()):this.value instanceof er?this.value.serialize():this.value}}var ga=Wc,Xn=class{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}};const bs={string:Bi,number:Yt,boolean:Oi,object:Jo};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.");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=Ci;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,Ci);if(!x)return null;g.push(x)}return new qc(a,g)}evaluate(e){for(let i=0;i<this.args.length;i++){const a=this.args[i].evaluate(e);if(!la(this.type,Yn(a)))return a;if(i===this.args.length-1)throw new Xn(`Expected value to be of type ${Dn(this.type)}, but found ${Dn(Yn(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=qc;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(Bi)),!I))return null;let E=null;if(x["text-color"]&&(E=i.parse(x["text-color"],1,Qr),!E))return null;const j=u[u.length-1];j.scale=b,j.font=I,j.textColor=E}else{const b=i.parse(e[g],1,Ci);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 Yn(a)===So?new Hc("",a,null,null,null):new Hc(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,Bi);return a?new ml(a):i.error("No image name provided.")}evaluate(e){const i=this.input.evaluate(e),a=Lr.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 V1={"to-boolean":Oi,"to-color":Qr,"to-number":Yt,"to-string":Bi};class Xc{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=V1[a],f=[];for(let g=1;g<e.length;g++){const x=i.parse(e[g],g,Ci);if(!x)return null;f.push(x)}return new Xc(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 Sn)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.`:vf(i[0],i[1],i[2],i[3]),!a))return new Sn(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new Xn(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 Xn(`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"?Lr.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=Xc;const yl=["Unknown","Point","LineString","Polygon"];var Mf=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]=Sn.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,E]of x){b=new is(i.registry,i.path,null,i.scope);const j=[];let L=!1;for(let U=1;U<e.length;U++){const V=e[U],Z=Array.isArray(I)?I[U-1]:I.type,ne=b.parse(V,1+j.length,Z);if(!ne){L=!0;break}j.push(ne)}if(!L)if(Array.isArray(I)&&I.length!==j.length)b.error(`Expected ${I.length} arguments, but found ${j.length} instead.`);else{for(let U=0;U<j.length;U++){const V=Array.isArray(I)?I[U]:I.type,Z=j[U];b.concat(U+1).checkSubtype(V,Z.type)}if(b.errors.length===0)return new ws(a,f,E,j)}}if(x.length===1)i.errors.push(...b.errors);else{const I=(x.length?x:g).map(([j])=>{return L=j,Array.isArray(L)?`(${L.map(Dn).join(", ")})`:`(${Dn(L.type)}...)`;var L}).join(" | "),E=[];for(let j=1;j<e.length;j++){const L=i.parse(e[j],1+E.length);if(!L)return null;E.push(Dn(L.type))}i.error(`Expected arguments of type ${I}, but found (${E.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,Oi);if(!u)return null;const f=i.parse(a["diacritic-sensitive"]!==void 0&&a["diacritic-sensitive"],1,Oi);if(!f)return null;let g=null;return a.locale&&(g=i.parse(a.locale,1,Bi),!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 bf(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 wf(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,E=b.length;I<E-1;I++){if(wf(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 If(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 E=0;E<I.length-1;++E)if((x=[(g=I[E+1])[0]-(f=I[E])[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 Kc(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 Df(t,e){for(let i=0;i<e.length;i++)if(Kc(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=bf(t[u][g],i);xl(e,x),f.push(x)}a.push(f)}return a}function Jc(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 Tf(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 E of b){const j=[E.x+f[0],E.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=Oi,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=Jc(a.coordinates,f,g),b=qi(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);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=Tf(i.geometry(),u,f,g);if(!ya(u,f))return!1;for(const I of b)if(!Kc(I,x))return!1}if(a.type==="MultiPolygon"){const x=Jc(a.coordinates,f,g),b=Tf(i.geometry(),u,f,g);if(!ya(u,f))return!1;for(const I of b)if(!Df(I,x))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}var eu=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 eu)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 tu=wl;class Il{constructor(e,i=[],a,u=new xf,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 Mf;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 Ar(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 tu)return Ds(t.boundExpression);if(t instanceof jo&&t.name==="error"||t instanceof _l||t instanceof eu)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 Xn("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,E=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,E,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 Sn(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 iu=.95047,Af=1.08883,nu=4/29,El=6/29,Ef=3*El*El,Nf=Math.PI/180,Q1=180/Math.PI;function Nl(t){return t>.008856451679035631?Math.pow(t,1/3):t/Ef+nu}function Cl(t){return t>El?t*t*t:Ef*(t-nu)}function ru(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ou(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Cf(t){const e=ou(t.r),i=ou(t.g),a=ou(t.b),u=Nl((.4124564*e+.3575761*i+.1804375*a)/iu),f=Nl((.2126729*e+.7151522*i+.072175*a)/1);return{l:116*f-16,a:500*(u-f),b:200*(f-Nl((.0193339*e+.119192*i+.9503041*a)/Af)),alpha:t.a}}function Sf(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=iu*Cl(i),a=Af*Cl(a),new Sn(ru(3.2404542*i-1.5371385*e-.4985314*a),ru(-.969266*i+1.8760108*e+.041556*a),ru(.0556434*i-.2040259*e+1.0572252*a),t.alpha)}function Y1(t,e,i){const a=e-t;return t+i*(a>180||a<-180?a-360*Math.round(a/360):a)}const wa={forward:Cf,reverse:Sf,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}=Cf(t),u=Math.atan2(a,i)*Q1;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 Sf({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},interpolate:function(t,e,i){return{h:Y1(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 zf=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=su(i,e.base,a,u);else if(e.name==="linear")f=su(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(su(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(E=>typeof E!="number"||E<0||E>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 E=g[I],j=g[I+1],L=I+3,U=I+4;if(typeof E!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',L);if(x.length&&x[x.length-1][0]>=E)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',L);const V=i.parse(j,U,b);if(!V)return null;b=b||V.type,x.push([E,V])}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 ${Dn(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 su(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 Kr=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?Ci: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 Lr&&!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 au=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 jf=jl;class lu{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||Ci));return a&&u?new lu(u.type.itemType,a,u):null}evaluate(e){const i=this.index.evaluate(e),a=this.input.evaluate(e);if(i<0)throw new Xn(`Array index out of bounds: ${i} < 0.`);if(i>=a.length)throw new Xn(`Array index out of bounds: ${i} > ${a.length-1}.`);if(i!==Math.floor(i))throw new Xn(`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 Lf=lu;class Ll{constructor(e,i){this.type=Oi,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,Ci),u=i.parse(e[2],2,Ci);return a&&u?ca(a.type,[Oi,Bi,Yt,gr,Ci])?new Ll(a,u):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${Dn(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 Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Dn(Yn(i))} instead.`);if(!ua(a,["string","array"]))throw new Xn(`Expected second argument to be of type array or string, but found ${Dn(Yn(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=Ll;class Ol{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,Ci),u=i.parse(e[2],2,Ci);if(!a||!u)return null;if(!ca(a.type,[Oi,Bi,Yt,gr,Ci]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${Dn(a.type)} instead`);if(e.length===4){const f=i.parse(e[3],3,Yt);return f?new Ol(a,u,f):null}return new Ol(a,u)}evaluate(e){const i=this.needle.evaluate(e),a=this.haystack.evaluate(e);if(!ua(i,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Dn(Yn(i))} instead.`);if(!ua(a,["string","array"]))throw new Xn(`Expected second argument to be of type array or string, but found ${Dn(Yn(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 $1=Ol;class cu{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 E=e[I];const j=e[I+1];Array.isArray(E)||(E=[E]);const L=i.concat(I);if(E.length===0)return L.error("Expected at least one branch label.");for(const V of E){if(typeof V!="number"&&typeof V!="string")return L.error("Branch labels must be numbers or strings.");if(typeof V=="number"&&Math.abs(V)>Number.MAX_SAFE_INTEGER)return L.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof V=="number"&&Math.floor(V)!==V)return L.error("Numeric branch labels must be integer values.");if(a){if(L.checkSubtype(a,Yn(V)))return null}else a=Yn(V);if(f[String(V)]!==void 0)return L.error("Branch labels must be unique.");f[String(V)]=g.length}const U=i.parse(j,I,u);if(!U)return null;u=u||U.type,g.push(U)}const x=i.parse(e[1],1,Ci);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 cu(a,u,x,f,g,b):null}evaluate(e){const i=this.input.evaluate(e);return(Yn(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 Z1=cu;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,Oi);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 kf=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,Ci),u=i.parse(e[2],2,Yt);if(!a||!u)return null;if(!ca(a.type,[Jn(Ci),Bi,Ci]))return i.error(`Expected first argument to be of type array or string, but found ${Dn(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 Xn(`Expected first argument to be of type array or string, but found ${Dn(Yn(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 G1=Ia;function Pf(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 Rf(t,e,i,a){return a.compare(e,i)===0}function ns(t,e,i){const a=t!=="=="&&t!=="!=";return class ib{constructor(f,g,x){this.type=Oi,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,Ci);if(!b)return null;if(!Pf(x,b.type))return g.concat(1).error(`"${x}" comparisons are not supported for type '${Dn(b.type)}'.`);let I=g.parse(f[2],2,Ci);if(!I)return null;if(!Pf(x,I.type))return g.concat(2).error(`"${x}" comparisons are not supported for type '${Dn(I.type)}'.`);if(b.type.kind!==I.type.kind&&b.type.kind!=="value"&&I.type.kind!=="value")return g.error(`Cannot compare types '${Dn(b.type)}' and '${Dn(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 E=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(E=g.parse(f[3],3,aa),!E)return null}return new ib(b,I,E)}evaluate(f){const g=this.lhs.evaluate(f),x=this.rhs.evaluate(f);if(a&&this.hasUntypedArgument){const b=Yn(g),I=Yn(x);if(b.kind!==I.kind||b.kind!=="string"&&b.kind!=="number")throw new Xn(`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=Yn(g),I=Yn(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 Uf=ns("==",function(t,e,i){return e===i},Rf),Bf=ns("!=",function(t,e,i){return e!==i},function(t,e,i,a){return!Rf(0,e,i,a)}),uu=ns("<",function(t,e,i){return e<i},function(t,e,i,a){return a.compare(e,i)<0}),H1=ns(">",function(t,e,i){return e>i},function(t,e,i,a){return a.compare(e,i)>0}),W1=ns("<=",function(t,e,i){return e<=i},function(t,e,i,a){return a.compare(e,i)<=0}),q1=ns(">=",function(t,e,i){return e>=i},function(t,e,i,a){return a.compare(e,i)>=0});class hu{constructor(e,i,a,u,f,g){this.type=Bi,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,Bi),!f))return null;let g=null;if(u.currency&&(g=i.parse(u.currency,1,Bi),!g))return null;let x=null;if(u.unit&&(x=i.parse(u.unit,1,Bi),!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 hu(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 du{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 ${Dn(a.type)} instead.`):new du(a):null}evaluate(e){const i=this.input.evaluate(e);if(typeof i=="string"||Array.isArray(i))return i.length;throw new Xn(`Expected value to be of type string or array, but found ${Dn(Yn(i))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(i=>{e.push(i.serialize())}),e}}const Ff={"==":Uf,"!=":Bf,">":H1,"<":uu,">=":q1,"<=":W1,array:fo,at:Lf,boolean:fo,case:kf,coalesce:au,collator:_l,format:ma,image:ml,in:Of,"index-of":$1,interpolate:Kr,"interpolate-hcl":Kr,"interpolate-lab":Kr,length:du,let:jf,literal:ga,match:Z1,number:fo,"number-format":hu,object:fo,slice:G1,step:Tl,string:fo,"to-boolean":es,"to-color":es,"to-number":es,"to-string":es,var:tu,within:eu};function Vf(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=vf(e,i,a,f);if(g)throw new Xn(g);return new Sn(e/255*f,i/255*f,a/255*f,f)}function fu(t,e){return t in e}function kl(t,e){const i=e[t];return i===void 0?null:i}function Jr(t){return{type:t}}jo.register(Ff,{error:[{kind:"error"},[Bi],(t,[e])=>{throw new Xn(e.evaluate(t))}],typeof:[Bi,[Ci],(t,[e])=>Dn(Yn(e.evaluate(t)))],"to-rgba":[Jn(Yt,4),[Qr],(t,[e])=>e.evaluate(t).toArray()],rgb:[Qr,[Yt,Yt,Yt],Vf],rgba:[Qr,[Yt,Yt,Yt,Yt],Vf],has:{type:Oi,overloads:[[[Bi],(t,[e])=>fu(e.evaluate(t),t.properties())],[[Bi,Jo],(t,[e,i])=>fu(e.evaluate(t),i.evaluate(t))]]},get:{type:Ci,overloads:[[[Bi],(t,[e])=>kl(e.evaluate(t),t.properties())],[[Bi,Jo],(t,[e,i])=>kl(e.evaluate(t),i.evaluate(t))]]},"feature-state":[Ci,[Bi],(t,[e])=>kl(e.evaluate(t),t.featureState||{})],properties:[Jo,[],t=>t.properties()],"geometry-type":[Bi,[],t=>t.geometryType()],id:[Ci,[],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:[Ci,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[Yt,Jr(Yt),(t,e)=>{let i=0;for(const a of e)i+=a.evaluate(t);return i}],"*":[Yt,Jr(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,Jr(Yt),(t,e)=>Math.min(...e.map(i=>i.evaluate(t)))],max:[Yt,Jr(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-==":[Oi,[Bi,Ci],(t,[e,i])=>t.properties()[e.value]===i.value],"filter-id-==":[Oi,[Ci],(t,[e])=>t.id()===e.value],"filter-type-==":[Oi,[Bi],(t,[e])=>t.geometryType()===e.value],"filter-<":[Oi,[Bi,Ci],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a<u}],"filter-id-<":[Oi,[Ci],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i<a}],"filter->":[Oi,[Bi,Ci],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a>u}],"filter-id->":[Oi,[Ci],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i>a}],"filter-<=":[Oi,[Bi,Ci],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a<=u}],"filter-id-<=":[Oi,[Ci],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i<=a}],"filter->=":[Oi,[Bi,Ci],(t,[e,i])=>{const a=t.properties()[e.value],u=i.value;return typeof a==typeof u&&a>=u}],"filter-id->=":[Oi,[Ci],(t,[e])=>{const i=t.id(),a=e.value;return typeof i==typeof a&&i>=a}],"filter-has":[Oi,[Ci],(t,[e])=>e.value in t.properties()],"filter-has-id":[Oi,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[Oi,[Jn(Bi)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[Oi,[Jn(Ci)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[Oi,[Bi,Jn(Ci)],(t,[e,i])=>i.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[Oi,[Bi,Jn(Ci)],(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:Oi,overloads:[[[Oi,Oi],(t,[e,i])=>e.evaluate(t)&&i.evaluate(t)],[Jr(Oi),(t,e)=>{for(const i of e)if(!i.evaluate(t))return!1;return!0}]]},any:{type:Oi,overloads:[[[Oi,Oi],(t,[e,i])=>e.evaluate(t)||i.evaluate(t)],[Jr(Oi),(t,e)=>{for(const i of e)if(i.evaluate(t))return!0;return!1}]]},"!":[Oi,[Oi],(t,[e])=>!e.evaluate(t)],"is-supported-script":[Oi,[Bi],(t,[e])=>{const i=t.globals&&t.globals.isSupportedScript;return!i||i(e.evaluate(t))}],upcase:[Bi,[Bi],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Bi,[Bi],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Bi,Jr(Ci),(t,e)=>e.map(i=>pa(i.evaluate(t))).join("")],"resolved-locale":[Bi,[aa],(t,[e])=>e.evaluate(t).resolvedLocale()]});var Da=Ff;function Qf(t){return{result:"success",value:t}}function Er(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 pu(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 X1(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||(pu(e)?"exponential":"interval");if(i&&((t=uo({},t)).stops&&(t.stops=t.stops.map(I=>[I[0],Sn.parse(I[1])])),t.default=Sn.parse(t.default?t.default:e.default)),t.colorSpace&&t.colorSpace!=="rgb"&&!zf[t.colorSpace])throw new Error(`Unknown color space: ${t.colorSpace}`);let g,x,b;if(f==="exponential")g=mu;else if(f==="interval")g=Yf;else if(f==="categorical"){g=gu,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=yu}if(a){const I={},E=[];for(let U=0;U<t.stops.length;U++){const V=t.stops[U],Z=V[0].zoom;I[Z]===void 0&&(I[Z]={zoom:Z,type:t.type,property:t.property,default:t.default,stops:[]},E.push(Z)),I[Z].stops.push([V[0].value,V[1]])}const j=[];for(const U of E)j.push([I[U].zoom,Pl(I[U],e)]);const L={name:"linear"};return{kind:"composite",interpolationType:L,interpolationFactor:Kr.interpolationFactor.bind(void 0,L),zoomStops:j.map(U=>U[0]),evaluate:({zoom:U},V)=>mu({stops:j,base:t.base},e,U).evaluate(U,V)}}if(u){const I=f==="exponential"?{name:"exponential",base:t.base!==void 0?t.base:1}:null;return{kind:"camera",interpolationType:I,interpolationFactor:Kr.interpolationFactor.bind(void 0,I),zoomStops:t.stops.map(E=>E[0]),evaluate:({zoom:E})=>g(t,e,E,x,b)}}return{kind:"source",evaluate(I,E){const j=E&&E.properties?E.properties[t.property]:void 0;return j===void 0?Es(t.default,e.default):g(t,e,j,x,b)}}}function Es(t,e,i){return t!==void 0?t:e!==void 0?e:i!==void 0?i:void 0}function gu(t,e,i,a,u){return Es(typeof i===u?a[i]:void 0,t.default,e.default)}function Yf(t,e,i){if(Xi(i)!=="number")return Es(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 mu(t,e,i){const a=t.base!==void 0?t.base:1;if(Xi(i)!=="number")return Es(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(E=>E[0]),i),g=function(E,j,L,U){const V=U-L,Z=E-L;return V===0?0:j===1?Z/V:(Math.pow(j,Z)-1)/(Math.pow(j,V)-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]||X1;if(t.colorSpace&&t.colorSpace!=="rgb"){const E=zf[t.colorSpace];I=(j,L)=>E.reverse(E.interpolate(E.forward(j),E.forward(L),g))}return typeof x.evaluate=="function"?{evaluate(...E){const j=x.evaluate.apply(void 0,E),L=b.evaluate.apply(void 0,E);if(j!==void 0&&L!==void 0)return I(j,L,g)}}:I(x,b,g)}function yu(t,e,i){return e.type==="color"?i=Sn.parse(i):e.type==="formatted"?i=er.fromString(i.toString()):e.type==="resolvedImage"?i=Lr.fromString(i.toString()):Xi(i)===e.type||e.type==="enum"&&e.values[i]||(i=void 0),Es(i,t.default,e.default)}class Rl{constructor(e,i){this.expression=e,this._warningHistory={},this._evaluator=new Mf,this._defaultValue=i?function(a){return a.type==="color"&&(Ta(a.default)||Array.isArray(a.default))?new Sn(0,0,0,0):a.type==="color"?Sn.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 Xn(`Expected value to be one of ${Object.keys(this._enumValues).map(E=>JSON.stringify(E)).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 Lo(t,e){const i=new is(Da,[],e?function(u){const f={color:Qr,string:Bi,number:Yt,enum:Bi,boolean:Oi,formatted:Ms,resolvedImage:So};return u.type==="array"?Jn(f[u.value]||Ci,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?Qf(new Rl(a,e)):Er(i.errors)}class Oo{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?Kr.interpolationFactor(this.interpolationType,e,i,a):0}}function _u(t,e){if((t=Lo(t,e)).result==="error")return t;const i=t.value.expression,a=Is(i);if(!a&&!rs(e))return Er([new Ar("","data expressions not supported")]);const u=Ma(i,["zoom","pitch","distance-from-center"]);if(!u&&!os(e))return Er([new Ar("","zoom expressions not supported")]);const f=Ea(i);return f||u?f instanceof Ar?Er([f]):f instanceof Kr&&!pu(e)?Er([new Ar("",'"interpolate" expressions cannot be used with this property')]):Qf(f?new Ul(a?"camera":"composite",t.value,f.labels,f instanceof Kr?f.interpolation:void 0):new Oo(a?"constant":"source",t.value)):Er([new Ar("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Ns{constructor(e,i){this._parameters=e,this._specification=i,uo(this,Pl(this._parameters,this._specification))}static deserialize(e){return new Ns(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Ea(t){let e=null;if(t instanceof jf)e=Ea(t.result);else if(t instanceof au){for(const i of t.args)if(e=Ea(i),e)break}else(t instanceof Tl||t instanceof Kr)&&t.input instanceof jo&&t.input.name==="zoom"&&(e=t);return e instanceof Ar||t.eachChild(i=>{const a=Ea(i);a instanceof Ar?e=a:!e&&a?e=new Ar("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&a&&e!==a&&(e=new Ar("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}class Zt{constructor(e,i,a,u){this.message=(e?`${e}: `:"")+a,u&&(this.identifier=u),i!=null&&i.__line__&&(this.line=i.__line__)}}function Or(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 Zt(e,i,`object expected, ${b} found`)];for(const I in i){const E=I.split(".")[0],j=a[E]||a["*"];let L;u[E]?L=u[E]:a[E]?L=ur:u["*"]?L=u["*"]:a["*"]&&(L=ur),L?x=x.concat(L({key:(e&&`${e}.`)+I,value:i[I],valueSpec:j,style:f,styleSpec:g,object:i,objectKey:I},i)):x.push(new Zt(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 Zt(e,i,`missing required property "${I}"`));return x}function Na(t){const e=t.value,i=t.valueSpec,a=t.style,u=t.styleSpec,f=t.key,g=t.arrayElementValidator||ur;if(Xi(e)!=="array")return[new Zt(f,e,`array expected, ${Xi(e)} found`)];if(i.length&&e.length!==i.length)return[new Zt(f,e,`array length ${i.length} expected, length ${e.length} found`)];if(i["min-length"]&&e.length<i["min-length"])return[new Zt(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 $f(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 Zt(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 Zt(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 Zt(e,i,`${i} is greater than the maximum value ${f}`)]}return[]}function Zf(t){const e=t.valueSpec,i=Qn(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",E=Or({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(U){if(i==="identity")return[new Zt(U.key,U.value,'identity function may not have a "stops" property')];let V=[];const Z=U.value;return V=V.concat(Na({key:U.key,value:Z,valueSpec:U.valueSpec,style:U.style,styleSpec:U.styleSpec,arrayElementValidator:j})),Xi(Z)==="array"&&Z.length===0&&V.push(new Zt(U.key,Z,"array must have at least one stop")),V},default:function(U){return ur({key:U.key,value:U.value,valueSpec:e,style:U.style,styleSpec:U.styleSpec})}}});return i==="identity"&&x&&E.push(new Zt(t.key,t.value,'missing required property "property"')),i==="identity"||t.value.stops||E.push(new Zt(t.key,t.value,'missing required property "stops"')),i==="exponential"&&t.valueSpec.expression&&!pu(t.valueSpec)&&E.push(new Zt(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(b&&!rs(t.valueSpec)?E.push(new Zt(t.key,t.value,"property functions not supported")):x&&!os(t.valueSpec)&&E.push(new Zt(t.key,t.value,"zoom functions not supported"))),i!=="categorical"&&!I||t.value.property!==void 0||E.push(new Zt(t.key,t.value,'"property" property is required')),E;function j(U){let V=[];const Z=U.value,ne=U.key;if(Xi(Z)!=="array")return[new Zt(ne,Z,`array expected, ${Xi(Z)} found`)];if(Z.length!==2)return[new Zt(ne,Z,`array length 2 expected, length ${Z.length} found`)];if(I){if(Xi(Z[0])!=="object")return[new Zt(ne,Z,`object expected, ${Xi(Z[0])} found`)];if(Z[0].zoom===void 0)return[new Zt(ne,Z,"object stop key must have zoom")];if(Z[0].value===void 0)return[new Zt(ne,Z,"object stop key must have value")];const be=Qn(Z[0].zoom);if(typeof be!="number")return[new Zt(ne,Z[0].zoom,"stop zoom values must be numbers")];if(f&&f>be)return[new Zt(ne,Z[0].zoom,"stop zoom values must appear in ascending order")];be!==f&&(f=be,u=void 0,g={}),V=V.concat(Or({key:`${ne}[0]`,value:Z[0],valueSpec:{zoom:{}},style:U.style,styleSpec:U.styleSpec,objectElementValidators:{zoom:$f,value:L}}))}else V=V.concat(L({key:`${ne}[0]`,value:Z[0],valueSpec:{},style:U.style,styleSpec:U.styleSpec},Z));return Aa(ho(Z[1]))?V.concat([new Zt(`${ne}[1]`,Z[1],"expressions are not allowed in function stops.")]):V.concat(ur({key:`${ne}[1]`,value:Z[1],valueSpec:e,style:U.style,styleSpec:U.styleSpec}))}function L(U,V){const Z=Xi(U.value),ne=Qn(U.value),be=U.value!==null?U.value:V;if(a){if(Z!==a)return[new Zt(U.key,be,`${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 Zt(U.key,be,"stop domain value must be a number, string, or boolean")];if(Z!=="number"&&i!=="categorical"){let Se=`number expected, ${Z} found`;return rs(e)&&i===void 0&&(Se+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Zt(U.key,be,Se)]}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 Zt(U.key,be,"stop domain values must appear in ascending order")]:(u=ne,i==="categorical"&&ne in g?[new Zt(U.key,be,"stop domain values must be unique")]:(g[ne]=!0,[])):[new Zt(U.key,be,`integer expected, found ${String(ne)}`)]}}function Cs(t){const e=(t.expressionContext==="property"?_u:Lo)(ho(t.value),t.valueSpec);if(e.result==="error")return e.value.map(a=>new Zt(`${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 Zt(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 Zt(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if(t.expressionContext==="filter")return Gf(i,t);if(t.expressionContext&&t.expressionContext.indexOf("cluster")===0){if(!Ma(i,["zoom","feature-state"]))return[new Zt(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(t.expressionContext==="cluster-initial"&&!Is(i))return[new Zt(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Gf(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 Zt(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(...Gf(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(Qn(i))===-1&&u.push(new Zt(e,i,`expected one of [${a.values.join(", ")}], ${JSON.stringify(i)} found`)):Object.keys(a.values).indexOf(Qn(i))===-1&&u.push(new Zt(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 E=ho(I);return Ca(E),E=vr(E),E}(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!